summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-11-17 11:00:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-11-17 11:00:54 -0700
commitfde00691054302b53783d14880ef015e8f81758b (patch)
tree323aae3f069791b9b9966ffdbf8fe3f5fc979cd6
parent43faee259ac0418b98f0c973a794c21f47c9d1c1 (diff)
parentbfb113c41cdc9bc875cec6f1c24f930e664e853e (diff)
Merge tag 'debian/8.1' into stretch-bpo
dgit release 8.1 for unstable (sid) [dgit] [dgit distro=debian] # gpg: Signature made Wed 07 Nov 2018 07:11:36 PM MST # gpg: using RSA key 559AE46C2D6B6D3265E7CBA1E3E3392348B50D39 # gpg: Can't check signature: No public key
-rw-r--r--NOTES.podchecker27
-rw-r--r--debian/changelog21
-rw-r--r--debian/control2
-rw-r--r--dgit-maint-debrebase.7.pod11
-rwxr-xr-xgit-debrebase3
-rw-r--r--git-debrebase.1.pod37
-rw-r--r--po/README1
-rw-r--r--po4a/.gitignore2
-rw-r--r--po4a/Makefile18
-rwxr-xr-xpo4a/list-documents2
-rwxr-xr-xpo4a/pairwise-pocheck107
-rw-r--r--po4a/po4a.cfg2
-rw-r--r--tests/lib2
-rwxr-xr-xtests/tests/manpages-format4
14 files changed, 222 insertions, 17 deletions
diff --git a/NOTES.podchecker b/NOTES.podchecker
new file mode 100644
index 0000000..57fc320
--- /dev/null
+++ b/NOTES.podchecker
@@ -0,0 +1,27 @@
+todo: maybe we wanted to run podchecker but it complains about a lot
+of things for which we don't have good alternatives. Eg:
+
+
+*** WARNING: (section) in 'dgit-maint-debrebase(7)' deprecated at line 17 in file ../git-debrebase.1.pod
+
+ But this is not actually described as deprecated and how else to
+ write a manpage cross-reference ? Maybe this warning applies
+ only to perl's own manpages.
+
+*** WARNING: 2 unescaped <> in paragraph at line 30 in file ../git-debrebase.1.pod
+
+ I have a habit of writing things like
+ git-debrebase [-- <git-rebase options...>]
+ which is obviously unescaped < but the E<> syntax would be awful
+
+*** WARNING: No items in =over (at line 31) / =back list at line 42 in file ../dgit-user.7.pod
+*** WARNING: No argument for =item at line 553 in file ../git-debrebase.1.pod
+
+ pod doesn't offer a better answer, and these render well
+
+*** ERROR: unresolved internal link 'dgit-maint-*(7)' at line 22 in file ../dgit-user.7.pod
+
+ This is obviously needed.
+
+At the time of writing it does not seem to detect anything which
+generates bad rendering. So for now I will not run it.
diff --git a/debian/changelog b/debian/changelog
index 415b76c..be104c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+dgit (8.1) unstable; urgency=medium
+
+ git-debrebase;
+ * convert-from-unapplied: Provide aa an alias for convert-from-gbp
+ and document its scope properly, etc. Closes:#905433.
+ * dgit-maint-debrebase(7): discuss -fdiverged with convert-from-*,
+ and (prompted) dgit --overwrite. Closes:#903377. [Sean Whitton]
+
+ i18n support:
+ * Check pod translations for a common class of syntax error.
+ (using new machinery for pairwise checking of pod translations.)
+ * po4a: Add -LUTF-8 to the config.
+ * po4a/.gitignore: actually ignore right .po4a.LANG.cfg.
+
+ test suite:
+ * Run everything with LC_CTYPE=C.UTF-8.
+ * manpages-format: pass --warnings.
+ * NOTES.podchecker: Document why we're not using podchecker.
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk> Thu, 08 Nov 2018 02:09:05 +0000
+
dgit (8.0~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
diff --git a/debian/control b/debian/control
index 62a4a11..eef4dca 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
Priority: optional
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
Standards-Version: 3.9.4.0
-Build-Depends: debhelper (>= 9), gettext, po4a
+Build-Depends: debhelper (>= 9), gettext, po4a, tcl
Testsuite: autopkgtest
Vcs-Git: git://git.chiark.greenend.org.uk/~ianmdlvl/dgit.git
Vcs-Browser: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git/dgit.git/
diff --git a/dgit-maint-debrebase.7.pod b/dgit-maint-debrebase.7.pod
index e5abe17..f167928 100644
--- a/dgit-maint-debrebase.7.pod
+++ b/dgit-maint-debrebase.7.pod
@@ -269,6 +269,11 @@ patches applied. Use
=back
+If you were not previously using dgit to upload your package (i.e. you
+were not using the workflow described in dgit-maint-gbp(7)), and you
+happen to have run B<dgit fetch sid> in this clone of the repository,
+you will need to pass I<--fdiverged> to this command.
+
=item (C) There is a delta queue, and patches are applied.
Use
@@ -442,6 +447,12 @@ cowbuilder>.
Upload with B<dgit push> or B<dgit push-source>. Remember to pass
I<--new> if the package is new in the target suite.
+In some cases where you used B<git debrebase convert-from-gbp> since
+the last upload, it is not possible for dgit to make your history
+fast-forwarding from the history on B<dgit-repos>. In such cases you
+will have to pass I<--overwrite> to dgit. git-debrebase will normally
+tell you if this is will be needed.
+
Right before uploading, if you did not just already do so, you might
want to have git-debrebase(1) shuffle your branch such that the Debian
delta queue appears right at the tip of the branch you will push:
diff --git a/git-debrebase b/git-debrebase
index 5e8a8bb..829ab82 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -47,7 +47,7 @@ usages:
git-debrebase [<options>] prepush [--prose=...]
git-debrebase [<options>] quick|conclude
git-debrebase [<options>] new-upstream <new-version> [<details ...>]
- git-debrebase [<options>] convert-from-gbp [<upstream-commitish>]
+ git-debrebase [<options>] convert-from-* ...
...
See git-debrebase(1), git-debrebase(5), dgit-maint-debrebase(7) (in dgit).
END
@@ -2537,6 +2537,7 @@ sub complete_convert_from ($$$$) {
update_head_checkout $old_head, $new_head, $mrest;
}
+sub cmd_convert_from_unapplied () { cmd_convert_from_gbp(); }
sub cmd_convert_from_gbp () {
badusage __ "want only 1 optional argument, the upstream git commitish"
unless @ARGV<=1;
diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod
index 04a57ee..00b664b 100644
--- a/git-debrebase.1.pod
+++ b/git-debrebase.1.pod
@@ -254,18 +254,39 @@ If the problem is simply that
the existing patches were not made by git-debrebase,
using dgit quilt-fixup instead should succeed.
+=item git-debrebase convert-from-unapplied [<upstream-commit-ish>]
+
=item git-debrebase convert-from-gbp [<upstream-commit-ish>]
-Cnnverts a gbp patches-unapplied branch
-(not a gbp pq patch queue branch)
-into a git-debrebase interchange branch.
+Cnnverts any of the following into a git-debrebase interchange branch:
+
+=over
+
+=item
+
+a gbp patches-unapplied branch (but not a gbp pq patch-queue branch)
+
+=item
+
+a patches-unapplied git packaging branch containing debian/patches,
+as used with quilt
+
+=item
+
+a git branch for a package which has no Debian delta -
+ie where upstream files are have not been modified in Debian,
+so there are no patches
+
+=back
+
+(These two commands operate identically and are simply aliases.)
-This is done by generating a new anchor merge,
-converting the quilt patches as a delta queue,
+The conversion is done by generating a new anchor merge,
+converting any quilt patches as a delta queue,
and dropping the patches from the tree.
The upstream commit-ish should correspond to
-the gbp upstream branch, if there is one.
+the upstream branch or tag, if there is one.
It is a snag if it is not an ancestor of HEAD,
or if the history between the upstream and HEAD
contains commits which make changes to upstream files.
@@ -284,14 +305,14 @@ and if it finds it will make a pseduomerge so that
your new git-debrebase view is appropriately fast forward.
The result is a well-formed git-debrebase interchange branch.
-The result is also fast-forward from the gbp branch.
+The result is also fast-forward from the original branch.
It is a snag if the new branch looks like it will have diverged,
just as for a laundering/unstitching call to git-debrebase;
See L</Establish the current branch's ffq-prev>, below.
Note that it is dangerous not to know whether you are
-dealing with a gbp patches-unapplied branch containing quilt patches,
+dealing with a (gbp) patches-unapplied branch containing quilt patches,
or a git-debrebase interchange branch.
At worst,
using the wrong tool for the branch format might result in
diff --git a/po/README b/po/README
index 365f2ff..dcf0e86 100644
--- a/po/README
+++ b/po/README
@@ -125,6 +125,7 @@ In po4a/
translated and compiled manpages which can
be previewed with `man -l', and prints a
list of appropriate `man -l' commands.
+ (Requires `tcl' to be installed.)
Committing and contributing your translation
diff --git a/po4a/.gitignore b/po4a/.gitignore
index e640b7e..b80fca6 100644
--- a/po4a/.gitignore
+++ b/po4a/.gitignore
@@ -1,5 +1,5 @@
translated
preview.*
-.*.po4a.cfg
+.po4a.*.cfg
.*.translated
*.tmp
diff --git a/po4a/Makefile b/po4a/Makefile
index c759ce8..e88aded 100644
--- a/po4a/Makefile
+++ b/po4a/Makefile
@@ -75,6 +75,11 @@
# tree.
#
# make targets: install
+#
+# Check:
+#
+# make targets: check
+# pairwise-pocheck.check
default: pofiles
@@ -84,6 +89,8 @@ PO4A ?= po4a
all update: translated
+check: po4a.cfg.check pairwise-pocheck.check
+
pofiles: po4a.cfg
$(PO4A) --no-translations $<
@@ -97,10 +104,13 @@ po4a.cfg.check: list-documents
./$< >$@.tmp
diff po4a.cfg $@.tmp
+pairwise-pocheck.check:
+ ./pairwise-pocheck
+
t = ../.po4a.translated-only
p = ../po4a
-translated-only: po4a.cfg
+translated-only: po4a.cfg pairwise-pocheck.check
rm -rf $t && mkdir $t
cd $t && ln -s $p/*.po $p/*.pot $p/po4a.cfg .
cd $t && $(PO4A) po4a.cfg
@@ -114,7 +124,11 @@ translated-only: po4a.cfg
.PRECIOUS: .po4a.%.cfg
-preview.%: .po4a.%.cfg
+pairwise-pocheck.%.check:
+ @tclsh /dev/null || printf ':;:; Please run apt-get install tcl\n'
+ ./pairwise-pocheck $*
+
+preview.%: .po4a.%.cfg pairwise-pocheck.%.check
$S $(PO4A) $<
$S ./install-documents >/dev/null .$*.translated $@
@ echo '# runes to preview the various final tranlated manpages:'
diff --git a/po4a/list-documents b/po4a/list-documents
index 4d625e0..9924379 100755
--- a/po4a/list-documents
+++ b/po4a/list-documents
@@ -13,7 +13,7 @@ cat <<END
# ^ add your language here (separate with spaces)
# Do not edit the rest of this file. It is automatically maintained.
-[options] opt:"-MUTF-8" opt:"-k10"
+[options] opt:"-MUTF-8" opt:"-LUTF-8" opt:"-k10"
[po4a_paths] \$master.pot \$lang:\$master.\$lang.po
END
diff --git a/po4a/pairwise-pocheck b/po4a/pairwise-pocheck
new file mode 100755
index 0000000..6a71f64
--- /dev/null
+++ b/po4a/pairwise-pocheck
@@ -0,0 +1,107 @@
+#!/usr/bin/tclsh
+#
+# We check each tranlated message against its original,
+# making certain consistency checks.
+
+# In theory this would be easy: we could read the .po file
+# directly. But the format of the .po file is not documented.
+# Looking at the source code for the po parser in GNU gettext,
+# the syntax is complicated with a wide variety of escapes.
+#
+# So I would prefer to reuse the gettext parser. That means getting
+# the output from gettext in some other format. Most of the gettext
+# utilities output in annoying formats. The least annoying seems
+# to be to use msgfmt to generate a tcl file (!)
+
+# usage:
+# cd po4a
+# ./pairwise-potcheck [LANG]
+
+proc badusage {} {
+ puts stderr "usage: ./pairwise-pocheck [LANG]"
+ exit 1
+}
+
+set lang *
+
+set bad 0
+
+proc bad {emsg} {
+ global po for_emsg bad
+ puts stderr "$po: $emsg $for_emsg"
+ incr bad
+}
+
+proc check_equal {desc script} {
+ upvar 1 m m
+ foreach is {id str} {
+ set m [uplevel 1 [list set msg$is]]
+ set m$is $m
+ set r$is [uplevel 1 $script]
+ }
+ if {![string compare $rid $rstr]} { return 0 }
+ bad "mismatch $rid != $rstr $desc"
+}
+
+# called directly by msgfmt output
+namespace eval ::msgcat {
+ proc mcset {lang msgid msgstr} {
+ check_msg $msgid $msgstr
+ }
+}
+
+proc check_msg {msgid msgstr} {
+ global for_emsg
+ set for_emsg "msgid=[list $msgid] msgstr=[list $msgstr]"
+ check_equal "un-escaped non-pod < count (missing B or I?)" {
+ regexp -all {(?!\b[IBCLEFSXZ])\<} $m
+ }
+}
+
+proc check {} {
+ # msgfmt --tcl wants to use a pretty much fixed filename:
+ # you get to specify part of it but it has to look like a
+ # locale. But we can specify ya directory to use, so
+ # one directory per po it is!
+ global po
+ set vexdir ".$po.pwpc.tmp"
+ set vexleaf xx.msg
+ set vexfile $vexdir/$vexleaf
+ file mkdir $vexdir
+ file delete $vexfile
+ exec msgfmt -d$vexdir -lxx --tcl $po
+
+ # and then we execute it!
+ source $vexfile
+}
+
+proc parseargs {} {
+ global argv lang
+ switch -glob [llength $argv].$argv {
+ 0. { }
+ 1.-* { badusage }
+ 1.* { set lang [lindex $argv 0] }
+ * { badusage }
+ }
+}
+
+proc iterate {} {
+ global po lang
+
+ foreach po [lsort [glob -nocomplain *.$lang.po]] {
+ check
+ puts "pairwise-pocheck $po ok."
+ }
+}
+
+proc report {} {
+ global bad
+ if {$bad} {
+ puts stderr "pairwise-pocheck: $bad errors"
+ exit 1
+ }
+}
+
+parseargs
+iterate
+report
diff --git a/po4a/po4a.cfg b/po4a/po4a.cfg
index a7c3e12..15e7f55 100644
--- a/po4a/po4a.cfg
+++ b/po4a/po4a.cfg
@@ -2,7 +2,7 @@
# ^ add your language here (separate with spaces)
# Do not edit the rest of this file. It is automatically maintained.
-[options] opt:"-MUTF-8" opt:"-k10"
+[options] opt:"-MUTF-8" opt:"-LUTF-8" opt:"-k10"
[po4a_paths] $master.pot $lang:$master.$lang.po
[type: man] ../dgit.1 $lang:translated/man/$lang/man1/dgit.1 master:file=dgit_1
[type: man] ../dgit.7 $lang:translated/man/$lang/man7/dgit.7 master:file=dgit_7
diff --git a/tests/lib b/tests/lib
index a050522..fa553af 100644
--- a/tests/lib
+++ b/tests/lib
@@ -36,6 +36,8 @@ export DGIT_TEST_DEBUG
export GIT_COMMITTER_DATE='1530000000 +0100'
export GIT_AUTHOR_DATE='1530000000 +0100'
+export LC_CTYPE=C.UTF-8
+
root=`pwd`
troot=$root/tests
testname="${DGIT_TEST_TESTNAME-${0##*/}}"
diff --git a/tests/tests/manpages-format b/tests/tests/manpages-format
index 7ba2f9d..e58da51 100755
--- a/tests/tests/manpages-format
+++ b/tests/tests/manpages-format
@@ -14,10 +14,10 @@ export MANWIDTH=80
run_man () {
if [ "x${DGIT_MANPAGES_SOURCE_DIR}" = x ]; then
- cmd='man "$@" $section $page'
+ cmd='man --warnings "$@" $section $page'
else
make $roff >&2
- cmd='man "$@" -l $roff'
+ cmd='man --warnings "$@" -l $roff'
fi
eval "$cmd 2>&1 >/dev/null |tee $errs"
}