diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2015-03-15 19:37:54 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2015-03-15 19:37:54 +0000 |
commit | 4eea36b1eb11f8b1a5629ee7a44c4e0b61ee643e (patch) | |
tree | f8dc5466ce749f079545adf2d3fa3a306c48bd98 /debian/patches | |
parent | 000f704fc6a2f8a14551575d2dbaedf651e7f5f4 (diff) | |
download | wavemon-4eea36b1eb11f8b1a5629ee7a44c4e0b61ee643e.tar.gz |
Add support for reproducible builds
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/02-patch-configure.ac-to-allow-external-build_date.patch | 62 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/debian/patches/02-patch-configure.ac-to-allow-external-build_date.patch b/debian/patches/02-patch-configure.ac-to-allow-external-build_date.patch new file mode 100644 index 0000000..6026187 --- /dev/null +++ b/debian/patches/02-patch-configure.ac-to-allow-external-build_date.patch @@ -0,0 +1,62 @@ +From b951f6292f74edd114a403b6be8752070c8d819f Mon Sep 17 00:00:00 2001 +From: Jonathan McCrohan <jmccrohan@gmail.com> +Date: Thu, 12 Mar 2015 15:21:58 -0700 +Subject: [PATCH] configure.ac: Support external BUILD_DATE values + +Support reproducible builds [1] by allowing build systems to pass in an +external value for BUILD_DATE. + +autoreconf has been run to resync configure with configure.ac changes. + +[1] https://wiki.debian.org/ReproducibleBuilds + +Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> +Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> +--- + configure | 8 ++++++++ + configure.ac | 7 ++++++- + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 082dd99..eeb8115 100755 +--- a/configure ++++ b/configure +@@ -2186,11 +2186,19 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + ac_config_files="$ac_config_files Makefile" + ++# allow BUILD_DATE to be externally set for build reproducibility ++if test "$BUILD_DATE"; then ++ cat >>confdefs.h <<_ACEOF ++#define BUILD_DATE "$BUILD_DATE" ++_ACEOF ++ ++else + + cat >>confdefs.h <<_ACEOF + #define BUILD_DATE "`/bin/date`" + _ACEOF + ++fi + + CFLAGS="-O2 -Wall" + +diff --git a/configure.ac b/configure.ac +index e50c986..7ae0db9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7,8 +7,13 @@ AC_INIT([wavemon], [0.7.6], [gerrit@erg.abdn.ac.uk], [wavemon-current], + # Variables + AC_CONFIG_AUX_DIR([config]) + AC_CONFIG_FILES([Makefile]) +-AC_DEFINE_UNQUOTED([BUILD_DATE], ["`/bin/date`"], ++# allow BUILD_DATE to be externally set for build reproducibility ++if test "$BUILD_DATE"; then ++ AC_DEFINE_UNQUOTED(BUILD_DATE, ["$BUILD_DATE"]) ++else ++ AC_DEFINE_UNQUOTED([BUILD_DATE], ["`/bin/date`"], + [date wavemon was last configured and built]) ++fi + + CFLAGS="-O2 -Wall" + diff --git a/debian/patches/series b/debian/patches/series index 18ef635..3c4f399 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 01-patch-makefile.in-to-not-install-docs.patch +02-patch-configure.ac-to-allow-external-build_date.patch |