summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominic Hargreaves <dom@earth.li>2016-04-21 22:23:25 +0100
committerDominic Hargreaves <dom@earth.li>2016-04-21 23:08:12 +0100
commitfab07d6b75d8ddd9735b4bc02a57bf23cda5330f (patch)
tree197e69f638c01ac790acda471a7c1383e6dd6c34 /src
parent8b6e17fe7e706ce87e700a4962d450d9cdeac85f (diff)
Optionally strip variable build date from compiled program
To aid build reproducibility, don't include the build date/time if -DREPRODUCIBLE_BUILD is defined. Based on the patch provided by Alexis Bienvenüe in the Debian report. Bug-Debian: https://bugs.debian.org/820152 Patch-Name: reproducible_datetime.diff
Diffstat (limited to 'src')
-rw-r--r--src/misc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index e1d78c800..8149481ca 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -632,7 +632,11 @@ Anope::string Anope::VersionShort()
Anope::string Anope::VersionBuildString()
{
+#ifdef REPRODUCIBLE_BUILD
+ Anope::string s = "build #" + stringify(BUILD);
+#else
Anope::string s = "build #" + stringify(BUILD) + ", compiled " + Anope::compiled;
+#endif
Anope::string flags;
#ifdef DEBUG_BUILD