Source: ncurses Severity: wishlist Tags: patch Hi,
While working on the “reproducible builds” effort [1], we have noticed that ncurses could not be built reproducibly. We have found that MKterminfo.sh included a trailing space in one build test but not in the other. It is not quite clear to me what triggers this behaviour, but there is a note claiming it to be the locale difference (one build is in C and the other in a French UTF-8 locale). The attached patch makes MKterminfo.sh strip trailing spaces from the CAP file, which removes a source of non-determinism. Once applied, ncurses can be built reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds Thanks, ~Niels
>From 94dcd2cd7202f3671ca574bba9b798de5d701887 Mon Sep 17 00:00:00 2001 From: Niels Thykier <ni...@thykier.net> Date: Sun, 13 Mar 2016 09:29:25 +0000 Subject: [PATCH] Strip trailing whitespace in the terminfo manpage Signed-off-by: Niels Thykier <ni...@thykier.net> --- .../04-strip-trailing-whitespace-in-terminfo.diff | 21 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 22 insertions(+) create mode 100644 debian/patches/04-strip-trailing-whitespace-in-terminfo.diff diff --git a/debian/patches/04-strip-trailing-whitespace-in-terminfo.diff b/debian/patches/04-strip-trailing-whitespace-in-terminfo.diff new file mode 100644 index 0000000..5faefba --- /dev/null +++ b/debian/patches/04-strip-trailing-whitespace-in-terminfo.diff @@ -0,0 +1,21 @@ +Author: Niels Thykier <ni...@thykier.net> +Description: Strip leading whitespace in the terminfo manpage + In the reproducible build tests, the trailing space is + included in one build but not in the other. + . + It is not quite obvious to me what triggers this (difference in + locale being expected reason), but we can simply strip the space and + it works. + +diff --git a/man/MKterminfo.sh b/man/MKterminfo.sh +index 3a99609..4577b0e 100755 +--- a/man/MKterminfo.sh ++++ b/man/MKterminfo.sh +@@ -69,6 +69,7 @@ trap "rm -f $sorted $temp $unsorted; exit 99" 1 2 5 15 + + sed -n <$caps "\ + /%%-STOP-HERE-%%/q ++s/\s*$// + /^#%/s/#%//p + /^#/d + s/[ ][ ]*/ /g diff --git a/debian/patches/series b/debian/patches/series index 45a079a..ddf868d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01-debian-no-ada-doc.diff 02-debian-backspace.diff 03-debian-ncursesconfig-omit-L.diff +04-strip-trailing-whitespace-in-terminfo.diff -- 2.7.0
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds