Source: manpages-de
Version: 1.11-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: locale
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that manpages-de could not be built reproducibly.
When processing po files with generate-addendum.sh and using a non-UTF8
locale, grep misdetects them as binary files and embeds the line:
"Binary file (standard input) matches"

The attached patch fixes this by telling grep to treat the input as
text.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7ab0073
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+unicode-grep.patch
diff --git a/debian/patches/unicode-grep.patch b/debian/patches/unicode-grep.patch
new file mode 100644
index 0000000..61212eb
--- /dev/null
+++ b/debian/patches/unicode-grep.patch
@@ -0,0 +1,20 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Fix misdetection as binary input when LC_ALL=C
+
+--- a/po/generate-addendum.sh
++++ b/po/generate-addendum.sh
+@@ -22,10 +22,10 @@
+ # and remove the comment character
+ translators=`sed '/msgid/q;s/^#\s\+//' "$pofile" |
+ # Throw away the common (non translator) lines
+-grep -v "German translation of manpages" |
+-grep -v "This file is distributed under the same license as the manpages-de package." |
+-grep -v "Copyright © of this file:" |
+-grep -v "msgid" |
++grep -a -v "German translation of manpages" |
++grep -a -v "This file is distributed under the same license as the manpages-de package." |
++grep -a -v "Copyright © of this file:" |
++grep -a -v "msgid" |
+ # Split lines to extract the name (and e-mail address)
+ cut -f1 -d","`
+ # Determine number of translators

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to