From b5292709cfe28e8be7e181e136fba5c22cfa619f Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 14 Jul 2018 04:52:39 +0200 Subject: [PATCH 1/2] Allow to override build date in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. This date call works with GNU and BSD variants of date. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9d7378742..ae0eae74e 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,11 @@ # The version number, for release: VER_VERSION:=0.9.23 -VER_DATE:=$(shell date +"%Y-%m-%d") +ifdef SOURCE_DATE_EPOCH + VER_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d") +else + VER_DATE=$(shell date "+%Y-%m-%d") +endif MAGIC_API_VERSION:=0x00000003 # Need to know the OS From 3e944e56a15b51c853ff9f7fc046df948792cbd0 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Wed, 8 Aug 2018 23:51:46 -0700 Subject: [PATCH 2/2] Doc build date override addition to Makefile --- docs/CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 0293ffd1a..c2beea72b 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -166,8 +166,8 @@ $Id$ the wrong(lossy) way, the program will crash (SF.net Bug #210) - * Ports - ----- + * Ports & Building + ---------------- * Rewrote the macOS build system to be more Linux-like, with no XCode IDE. Build for older releases of macOS / Mac OS X (10.6 and later). Mark K. Kim @@ -176,6 +176,9 @@ $Id$ Robert Buj Gelonch Mark K. Kim + * Allow to override build date (in order to make builds reproducible) + by Chris Lamb, pushed by Bernhard M. Wiedemann + * Other Improvements: ------------------- * Reformatted source code via GNU Indent tool; should