Source: pnmixer Version: 0.7-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that pnmixer could not be built reproducibly. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/Makefile.am.orig 1970-01-01 12:00:00.000000000 +1200 --- b/Makefile.am.orig 2017-02-04 22:04:29.272391085 +1300 @@ -0,0 +1,42 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = data man po src + +EXTRA_DIST = \ + autogen.sh README.md + +dist-hook: + $(MAKE) -C "$(srcdir)/po" "$(GETTEXT_PACKAGE).pot" + cp "$(srcdir)/po/$(GETTEXT_PACKAGE).pot" "$(distdir)/po/" + +uninstall-local: + @$(NORMAL_UNINSTALL) + rm -rf $(DESTDIR)$(pkgdatadir) + +doc: + cd "$(top_srcdir)/src"; \ + doxygen; \ + cd "$(top_srcdir)" + +install-doc: doc + $(MKDIR_P) "$(DESTDIR)$(htmldir)" + cp -pR "$(top_srcdir)"/src/html/* "$(DESTDIR)$(htmldir)"/ + +indent-code: + @which astyle >/dev/null || { echo "'astyle' is required, please install it"; exit 1; } + astyle --style=linux \ + --indent=tab=8 \ + --align-pointer=name \ + --suffix=none \ + src/*.[ch] + +indent-xml: + @which xmllint >/dev/null || { echo "'xmllint' is required, please install it"; exit 1; } + for f in data/ui/*.glade; do \ + mv "$$f" "$$f.bck"; \ + xmllint --format "$$f.bck" > "$$f"; \ + rm "$$f.bck"; \ + done + +clean-local: + rm -rf src/html src/latex --- a/debian/patches/reproducible-build.patch 1970-01-01 12:00:00.000000000 +1200 --- b/debian/patches/reproducible-build.patch 2017-02-04 22:08:44.125777757 +1300 @@ -0,0 +1,29 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2017-02-04 + +--- pnmixer-0.7.orig/man/Makefile.am ++++ pnmixer-0.7/man/Makefile.am +@@ -1,5 +1,10 @@ + .0.1: +- @sed -e "s/!VERSION!/@PACKAGE_VERSION@/g" -e "s/!DATE!/`date '+%B %Y'`/g" < $*.0 > $@ ++ @sed -e "s/!VERSION!/@PACKAGE_VERSION@/g" < $*.0 > $@ ++if WITH_SOURCE_DATE_EPOCH ++ @sed -e "s/!DATE!/`LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" '+%B %Y'`/g" < $*.0 > $@ ++else ++ @sed -e "s/!DATE!/`date '+%B %Y'`/g" < $*.0 > $@ ++endif + @echo Built $*.1 from template + + manpages_in_files = $(wildcard *.0) +--- pnmixer-0.7.orig/configure.ac ++++ pnmixer-0.7/configure.ac +@@ -7,6 +7,8 @@ AM_INIT_AUTOMAKE([foreign]) + AM_MAINTAINER_MODE + AC_CONFIG_HEADERS([src/config.h]) + ++AM_CONDITIONAL([WITH_SOURCE_DATE_EPOCH], [test "$SOURCE_DATE_EPOCH" != ""]) ++ + # ===================================================== # + # Basic compiler settings # + # ===================================================== # --- a/debian/patches/series 1970-01-01 12:00:00.000000000 +1200 --- b/debian/patches/series 2017-02-04 21:49:56.928890444 +1300 @@ -0,0 +1 @@ +reproducible-build.patch