Source: sawfish Version: 1.11-2 Severity: wishlist Tags: patch upstream User: reproducible-builds@lists.alioth.debian.org Usertags: fileordering timestamps username hostname X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Dear Maintainer, While working on the “reproducible builds” effort [1], we have noticed that 'sawfish' could not be built reproducibly. The attached patch fixes the order in which files are included in the theme tgz files, strips hostname and username from the config.h file, and honours SOURCE_DATE_EPOCH when creating the config.h file. Once applied, sawfish can be built reproducibly in our current experimental framework. Regards, Alexis Bienvenüe. [1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru sawfish-1.11/debian/changelog sawfish-1.11/debian/changelog --- sawfish-1.11/debian/changelog 2016-03-19 18:05:17.000000000 +0100 +++ sawfish-1.11/debian/changelog 2016-04-11 10:30:04.000000000 +0200 @@ -1,3 +1,10 @@ +sawfish (1:1.11-2.0~reproducible1) unstable; urgency=medium + + * Removes timestamps, and fix files order, to make the build + reproducible. + + -- Alexis Bienvenüe <p...@passoire.fr> Mon, 11 Apr 2016 10:30:04 +0200 + sawfish (1:1.11-2) unstable; urgency=low * Upload to unstable. diff -Nru sawfish-1.11/debian/patches/honours_SOURCE_DATE_EPOCH_for_build_h sawfish-1.11/debian/patches/honours_SOURCE_DATE_EPOCH_for_build_h --- sawfish-1.11/debian/patches/honours_SOURCE_DATE_EPOCH_for_build_h 1970-01-01 01:00:00.000000000 +0100 +++ sawfish-1.11/debian/patches/honours_SOURCE_DATE_EPOCH_for_build_h 2016-04-11 10:27:07.000000000 +0200 @@ -0,0 +1,32 @@ +Description: Honours SOURCE_DATE_EPOCH for build.h + Honours SOURCE_DATE_EPOCH when building build.h, to get reproducible build. + See https://reproducible-builds.org/specs/source-date-epoch/ +Author: Alexis Bienvenüe <p...@passoire.fr> + +--- sawfish-1.11.orig/build-info ++++ sawfish-1.11/build-info +@@ -20,8 +20,11 @@ localedir="$5" + sys_name="$HOSTNAME.$LOCALDOMAIN" + user_name="$LOGNAME" + +-build_date="`date +'%a %b %e %Y'`" +-build_time="`date +'%T %Z'`" ++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}" ++DATE_FMT="%Y-%m-%d" ++build_date=$(date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT") ++DATE_FMT="%T %Z" ++build_time=$(date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT") + + cat >src/build.h <<EOF + /* build.h -- Definitions relating to the current build +@@ -36,8 +39,8 @@ cat >src/build.h <<EOF + #define SAWFISH_EXECDIR "$sawfishexecdir" + #define SAWFISH_LOCALEDIR "$localedir" + +-#define BUILD_HOST "$sys_name" +-#define BUILD_USER "$user_name" ++#define BUILD_HOST "unknown" ++#define BUILD_USER "unknown" + + #define BUILD_DATE "$build_date" + #define BUILD_TIME "$build_time" diff -Nru sawfish-1.11/debian/patches/make-build-reproducible sawfish-1.11/debian/patches/make-build-reproducible --- sawfish-1.11/debian/patches/make-build-reproducible 2016-02-08 22:44:20.000000000 +0100 +++ sawfish-1.11/debian/patches/make-build-reproducible 2016-04-11 10:28:57.000000000 +0200 @@ -1,16 +1,16 @@ Description: Remove time stamp Author: Jose M Calhariz <j...@calhariz.com> -Index: sawfish.git/themes/Makefile.in +Index: sawfish-1.11/themes/Makefile.in =================================================================== ---- sawfish.git.orig/themes/Makefile.in 2016-02-07 14:01:21.138285458 +0000 -+++ sawfish.git/themes/Makefile.in 2016-02-08 20:39:18.072356084 +0000 +--- sawfish-1.11.orig/themes/Makefile.in ++++ sawfish-1.11/themes/Makefile.in @@ -48,7 +48,7 @@ install : all installdirs rm -rf $(DESTDIR)$(themedir)/$$d; \ for f in $(srcdir)/$$d/*; do \ if [ $$f != $(srcdir)/$$d/CVS ]; then \ - ( cd $(srcdir) && tar czf $$d.tar.gz $$d/* ) ; \ -+ ( cd $(srcdir) && GZIP=-9n tar czf $$d.tar.gz $$d/* ) ; \ ++ ( cd $(srcdir) && GZIP=-9n tar czf $$d.tar.gz `LC_ALL=C ls $$d/*` ) ; \ $(INSTALL_DATA) $$d.tar.gz $(DESTDIR)$(themedir)/$$d.tar.gz; \ fi \ done \ diff -Nru sawfish-1.11/debian/patches/series sawfish-1.11/debian/patches/series --- sawfish-1.11/debian/patches/series 2016-03-05 01:46:54.000000000 +0100 +++ sawfish-1.11/debian/patches/series 2016-04-11 10:25:57.000000000 +0200 @@ -4,3 +4,4 @@ limit-max-dimensions.patch make-build-reproducible fix-desktop-entry-lacks-keywords-entry +honours_SOURCE_DATE_EPOCH_for_build_h
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds