Source: ui-auto Version: 1.2.6-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-Cc: [email protected]
Hi, Whilst working on the "reproducible builds" effort [0], we noticed that ui-auto could not be built reproducibly. Patch attached. [0] https://wiki.debian.org/ReproducibleBuilds Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2016-07-23 11:47:54.645498315 +0100 @@ -0,0 +1,79 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2016-07-23 + +--- ui-auto-1.2.6.orig/src/tools/Makefile.am ++++ ui-auto-1.2.6/src/tools/Makefile.am +@@ -14,7 +14,11 @@ man_MANS = ui-auto-uvc.1 ui-auto-ubs.1 u + @echo "This is just a copy for convenience:" >>$@ + @-$(srcdir)/$< -H >>$@ + @echo ".SH AUTHOR" >>$@ +- echo "Produced automatically by ui-auto on `date --rfc-822`." >>$@ ++ if [ -n "$$SOURCE_DATE_EPOCH" ]; then \ ++ echo "Produced automatically by ui-auto on `date --utc --rfc-822 --date="@$$SOURCE_DATE_EPOCH"`." >>$@; \ ++ else \ ++ echo "Produced automatically by ui-auto on `date --rfc-822`." >>$@; \ ++ fi + + clean-local: + rm -v -f $(man_MANS) +--- ui-auto-1.2.6.orig/src/tools/ui-auto-release ++++ ui-auto-1.2.6/src/tools/ui-auto-release +@@ -1539,7 +1539,7 @@ ui_opt_add "s" "Snapshot mode: Do a sna + - Auto-generates snapshot versions. + - Omit vc checkins. + - Omit sequents: ${SEQUENCE_SNAPSHOT}." +-ui_opt_add "S:" "Snapshot mode with manual version appendix." "snapshot$(date -u +%Y%m%d%H%M%S)" "s" "\ ++ui_opt_add "S:" "Snapshot mode with manual version appendix." "snapshot$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%M%S)" "s" "\ + - Example: '~rc1' when your version is already bumped to the upcoming stable." \ + "expert" + +--- ui-auto-1.2.6.orig/src/m4/ui-auto.m4 ++++ ui-auto-1.2.6/src/m4/ui-auto.m4 +@@ -109,8 +109,12 @@ ${PACKAGE_NAME} in a parsable way. + + This is intended to be used by automatic version checks of build systems. + .SH AUTHOR +-Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`. + EOF ++ if [ -n "${SOURCE_DATE_EPOCH}" ]; then \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --utc --rfc-822 --date="@${SOURCE_DATE_EPOCH}"`." >>${S_PATH}.1 ++ else \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`." >>${S_PATH}.1 ++ fi + + dnl Automake rules for installation && distclean + UI_ADD_AM([ +--- ui-auto-1.2.6.orig/aclocal.m4 ++++ ui-auto-1.2.6/aclocal.m4 +@@ -131,8 +131,12 @@ ${PACKAGE_NAME} in a parsable way. + + This is intended to be used by automatic version checks of build systems. + .SH AUTHOR +-Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`. + EOF ++ if [ -n "${SOURCE_DATE_EPOCH}" ]; then \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --utc --rfc-822 --date="@${SOURCE_DATE_EPOCH}"`." >>${S_PATH}.1 ++ else \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`." >>${S_PATH}.1 ++ fi + + dnl Automake rules for installation && distclean + UI_ADD_AM([ +--- ui-auto-1.2.6.orig/configure ++++ ui-auto-1.2.6/configure +@@ -2625,9 +2625,12 @@ ${PACKAGE_NAME} in a parsable way. + + This is intended to be used by automatic version checks of build systems. + .SH AUTHOR +-Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`. + EOF +- ++ if [ -n "${SOURCE_DATE_EPOCH}" ]; then \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --utc --rfc-822 --date="@${SOURCE_DATE_EPOCH}"`." >>${S_PATH}.1 ++ else \ ++ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`." >>${S_PATH}.1 ++ fi + + echo -n " + ui-version-script-install: --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2016-07-23 11:22:17.588718952 +0100 @@ -0,0 +1 @@ +reproducible-build.patch

