[ioquake3] 02/05: Update reproducibility patch to pick up SOURCE_DATE_EPOCH, as set by debhelper >= 9.20151004
Simon McVittie
smcv at debian.org
Mon Mar 21 09:25:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository ioquake3.
commit 215025282caf7404496dc02ffc4785003a4c8e6c
Author: Simon McVittie <smcv at debian.org>
Date: Mon Mar 21 08:15:25 2016 +0000
Update reproducibility patch to pick up SOURCE_DATE_EPOCH, as set by debhelper >= 9.20151004
---
debian/changelog | 2 ++
...-SOURCE_DATE_EPOCH-for-reproducible-buil.patch} | 26 +++++++++++++---------
debian/patches/series | 2 +-
debian/rules | 3 ---
4 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 476c895..9aff8f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ ioquake3 (1.36+u20160122+dfsg1-2) UNRELEASED; urgency=medium
* Add an experimental AppArmor profile supporting OpenArena
(openarena) and Quake III Arena (quake3 from contrib), in complain
mode for now
+ * Update reproducibility patch to pick up SOURCE_DATE_EPOCH, as set by
+ debhelper >= 9.20151004
-- Simon McVittie <smcv at debian.org> Wed, 02 Mar 2016 09:28:06 +0000
diff --git a/debian/patches/Allow-__DATE__-to-be-avoided-for-reproducible-builds.patch b/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
similarity index 77%
rename from debian/patches/Allow-__DATE__-to-be-avoided-for-reproducible-builds.patch
rename to debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
index 1119a67..466e6ae 100644
--- a/debian/patches/Allow-__DATE__-to-be-avoided-for-reproducible-builds.patch
+++ b/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
@@ -1,25 +1,31 @@
From: Simon McVittie <smcv at debian.org>
Date: Thu, 2 Apr 2015 11:10:26 +0100
-Subject: Allow __DATE__ to be avoided, for reproducible builds
+Subject: Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
+The goal of reproducible builds is that a rebuild of the same source
+code with the same compiler, libraries, etc. should result in the same
+binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
+to fill in the date of the latest source change, typically from a git
+commit or from metadata like the debian/changelog in Debian packages.
---
- Makefile | 4 ++++
+ Makefile | 5 +++++
code/game/g_main.c | 4 ++--
code/qcommon/common.c | 4 ++--
code/qcommon/q_shared.h | 4 ++++
code/sys/sys_main.c | 2 +-
- 5 files changed, 13 insertions(+), 5 deletions(-)
+ 5 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
-index 825307f..54bc798 100644
+index d65d9bf..1e1490f 100644
--- a/Makefile
+++ b/Makefile
-@@ -1108,6 +1108,10 @@ else
+@@ -1100,6 +1100,11 @@ else
STRIP_FLAG = -s
endif
-+ifdef PRODUCT_DATE
-+ BASE_CFLAGS += -DPRODUCT_DATE=\\\"$(shell echo $(PRODUCT_DATE) | sed -e 's/ /\\\ /'g)\\\"
++# https://reproducible-builds.org/specs/source-date-epoch/
++ifdef SOURCE_DATE_EPOCH
++ BASE_CFLAGS += -DPRODUCT_DATE=\\\"$(shell date --date="$$SOURCE_DATE_EPOCH" "+%b %_d %Y" | sed -e 's/ /\\\ /'g)\\\"
+endif
+
BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
@@ -48,7 +54,7 @@ index e3903bf..6d9d9fa 100644
srand( randomSeed );
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
-index c72ae37..0cf0882 100644
+index aa62724..0ed1dab 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -2637,7 +2637,7 @@ void Com_Init( char *commandLine ) {
@@ -70,10 +76,10 @@ index c72ae37..0cf0882 100644
com_gamename = Cvar_Get("com_gamename", GAMENAME_FOR_MASTER, CVAR_SERVERINFO | CVAR_INIT);
com_protocol = Cvar_Get("com_protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_INIT);
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h
-index 90996a2..15a0e13 100644
+index 1812f5e..791a5ab 100644
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
-@@ -62,6 +62,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@@ -70,6 +70,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define PRODUCT_VERSION "1.36"
#endif
diff --git a/debian/patches/series b/debian/patches/series
index 648f6dd..35bcae6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@ Add-sv_dorestart-which-can-be-set-by-game-code-to-re.patch
Let-servers-set-sv_fps-too.patch
Run-in-a-window-by-default-on-new-installations.patch
ui-reinstate-minimal-code-to-determine-whether-this-.patch
-Allow-__DATE__-to-be-avoided-for-reproducible-builds.patch
+Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
diff --git a/debian/rules b/debian/rules
index 3927cf2..97e4417 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,8 +14,6 @@ DEB_CFLAGS_MAINT_APPEND := \
include /usr/share/dpkg/default.mk
-PRODUCT_DATE := $(shell date --utc --date="`dpkg-parsechangelog -SDate`" "+%b %_d %Y")
-
%:
dh $@ --parallel
@@ -44,7 +42,6 @@ OPTIONS := \
BUILD_GAME_SO=1 \
BUILD_GAME_QVM=0 \
VERSION=$(DEB_VERSION)/$(DEB_VENDOR) \
- PRODUCT_DATE='$(PRODUCT_DATE)' \
CFLAGS='$(CFLAGS) $(CPPFLAGS)' \
FULLBINEXT="" \
NO_STRIP=1 \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list