This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use NEWS file date instead of build date


as date in man page headers, in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

Also use UTC to be independent of timezone

---
While working on making openSUSE Linux package builds reproducible,
I found that the systemtap package would differ in the stappaths.7
man page

An alternative solution could use $SOURCE_DATE_EPOCH
to allow to override the date but leave the default behaviour as before.
But I think few people care about which date goes into the manual.
---
 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 099664f..1f0b64d 100755
--- a/configure
+++ b/configure
@@ -11451,7 +11451,7 @@ $as_echo "$as_me: staprun will link $staprun_LIBS" >&6;}
 $as_echo "$as_me: stapbpf will link $stapbpf_LIBS" >&6;}
 
 
-date=`date +%Y-%m-%d`
+date=`date -u -r NEWS +%Y-%m-%d`
 
 cat >>confdefs.h <<_ACEOF
 #define DATE "$date"
diff --git a/configure.ac b/configure.ac
index a5cb47c..a10fd83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -598,7 +598,7 @@ AC_MSG_NOTICE([stapbpf will link $stapbpf_LIBS])
 
 
 dnl Plop in the build (configure) date
-date=`date +%Y-%m-%d`
+date=`date -u -r NEWS +%Y-%m-%d`
 AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date])
 AC_SUBST(DATE, "$date")
 
-- 
2.13.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]