[med-svn] [aghermann] 01/05: follow debian recipe to properly ensure reproducible builds

andrei zavada hmmr-guest at moszumanska.debian.org
Thu Aug 4 23:11:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch master
in repository aghermann.

commit bb606b7be0be35697ab786fe32c747e74bfcc645
Author: Andrei Zavada <hmmr at frdg>
Date:   Sun Jun 26 02:10:52 2016 +0300

    follow debian recipe to properly ensure reproducible builds
    
    which is, look at SOURCE_DATE_EPOCH in configure.ac
---
 debian/rules                            | 2 --
 upstream/configure.ac                   | 4 ++--
 upstream/src/aghermann/print_version.cc | 4 ----
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/debian/rules b/debian/rules
index 60a9db7..9f3491f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,6 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-CXXFLAGS += -D__REPRODUCIBLE_BUILD
-
 %:
 	dh $@ --with autoreconf
 
diff --git a/upstream/configure.ac b/upstream/configure.ac
index 3000402..b96c254 100644
--- a/upstream/configure.ac
+++ b/upstream/configure.ac
@@ -192,8 +192,8 @@ fi
 
 dnl Any private defines
 AC_SUBST(user, [`whoami`@`hostname`])
-AC_SUBST(build_date, [`date +"%F"`])
-AC_SUBST(build_datetime, [`date`])
+AC_SUBST(build_date, [`date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} +"%F"`])
+AC_SUBST(build_datetime, [`date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)}`])
 
 AC_OUTPUT([
 	Makefile
diff --git a/upstream/src/aghermann/print_version.cc b/upstream/src/aghermann/print_version.cc
index 5573ddc..c3c2d6c 100644
--- a/upstream/src/aghermann/print_version.cc
+++ b/upstream/src/aghermann/print_version.cc
@@ -15,9 +15,5 @@
 void
 print_version()
 {
-#ifdef __REPRODUCIBLE_BUILD
-        printf( PACKAGE_STRING "\n");
-#else
         printf( PACKAGE_STRING " built " __DATE__ " " __TIME__ " by " BUILT_BY "\n");
-#endif
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list