Source: haskell-devscripts Version: 0.9.10 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: toolchain X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Hi, While working on the "reproducible builds" effort [1], we have noticed that haskell-devscripts produces different packages depending on the build locale. This is due to grep(1) identifying a file as "binary" and thus returns "binary file matches" instead of the actual lines that match and therefore the substvar files are not populated correctly. This can be seen in the wild in "haskell-yi-language" where the unicode ellipsis character in the package long description causes the resulting package to have — or not have — a Recommends field based on whether it was built in a UTF-8 locale or not. The attached patch uses the -a switch to bypass grep's automagic. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/dh_haskell_depends b/dh_haskell_depends index 97af37b..3ecebec 100644 --- a/dh_haskell_depends +++ b/dh_haskell_depends @@ -88,10 +88,10 @@ for pkg in `dh_listpackages $args`; do echo "haskell:Recommends=" >> $sfile.tmp doc=`echo $pkg | sed -e 's/-dev$/-doc/'` prof=`echo $pkg | sed -e 's/-dev$/-prof/'` - grep -v '^#' debian/control | grep $doc > /dev/null \ + grep -av '^#' debian/control | grep $doc > /dev/null \ && suggests="$doc" \ || suggests="" - if grep -v '^#' debian/control | grep $prof > /dev/null + if grep -av '^#' debian/control | grep $prof > /dev/null then [ "$suggests" = "" ] \ && suggests="$prof" \ @@ -143,7 +143,7 @@ for pkg in `dh_listpackages $args`; do | sort -u \ | sed -e :a -e '$!N; s/\n/, /; ta'` dev=`echo $pkg | sed -e 's/^[^-]\+-\(.\+\)-doc/lib${hc}-\1-dev/'` - grep -v '^#' debian/control | grep $dev > /dev/null \ + grep -av '^#' debian/control | grep $dev > /dev/null \ && recommends="$recommends, $dev" \ || recommends="$recommends" echo "haskell:Recommends=$recommends" >> $sfile.tmp
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds