From fab07d6b75d8ddd9735b4bc02a57bf23cda5330f Mon Sep 17 00:00:00 2001 From: Dominic Hargreaves Date: Thu, 21 Apr 2016 22:23:25 +0100 Subject: Optionally strip variable build date from compiled program MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/misc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/misc.cpp') 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 -- cgit