[openarena] 01/03: Use SOURCE_DATE_EPOCH to generate PRODUCT_DATE, similar to ioquake3
Simon McVittie
smcv at debian.org
Mon Jun 27 10:09:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository openarena.
commit 2987d053ae43d2fb7d0c894eacb0529a77b3ba4a
Author: Simon McVittie <smcv at debian.org>
Date: Mon Jun 27 11:03:31 2016 +0100
Use SOURCE_DATE_EPOCH to generate PRODUCT_DATE, similar to ioquake3
---
debian/changelog | 1 +
debian/patches/Add-support-for-Aarch64-ARM64.patch | 2 +-
...om-SOURCE_DATE_EPOCH-for-reproducible-buil.patch} | 20 +++++++++++++-------
debian/patches/series | 2 +-
debian/rules | 3 ---
5 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 41de054..e31f120 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ openarena (0.8.8-16) UNRELEASED; urgency=medium
* Lock Debian-openarena account in purge instead of deleting it
(see #621833)
* Standards-Version: 3.9.7 (no further changes needed)
+ * Use SOURCE_DATE_EPOCH to generate PRODUCT_DATE, similar to ioquake3
-- Simon McVittie <smcv at debian.org> Wed, 02 Mar 2016 09:30:47 +0000
diff --git a/debian/patches/Add-support-for-Aarch64-ARM64.patch b/debian/patches/Add-support-for-Aarch64-ARM64.patch
index 1707400..ec195c2 100644
--- a/debian/patches/Add-support-for-Aarch64-ARM64.patch
+++ b/debian/patches/Add-support-for-Aarch64-ARM64.patch
@@ -12,7 +12,7 @@ Applied-upstream: (in ioquake3) https://github.com/ioquake/ioq3/commit/ebb69f699
2 files changed, 6 insertions(+)
diff --git a/Makefile b/Makefile
-index a0f4193..8876959 100644
+index 9732cc6..d36feaf 100644
--- a/Makefile
+++ b/Makefile
@@ -227,6 +227,10 @@ ifeq ($(PLATFORM),linux)
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 67%
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 a404eac..8945496 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,23 +1,29 @@
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/q_shared.h | 4 ++++
- 3 files changed, 10 insertions(+), 2 deletions(-)
+ 3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
-index 9732cc6..a0f4193 100644
+index d36feaf..13bbc2d 100644
--- a/Makefile
+++ b/Makefile
-@@ -850,6 +850,10 @@ else
+@@ -854,6 +854,11 @@ else
DEPEND_CFLAGS =
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)\\\"
diff --git a/debian/patches/series b/debian/patches/series
index 78de6a8..ece368b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,5 +5,5 @@ Fix-FTBFS-on-kFreeBSD.patch
Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch
Add-support-for-the-GNU-Hurd-architecture.patch
Use-LDFLAGS-on-non-Linux-too.patch
-Allow-__DATE__-to-be-avoided-for-reproducible-builds.patch
Add-support-for-Aarch64-ARM64.patch
+Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
diff --git a/debian/rules b/debian/rules
index e180e80..c21347c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,8 +6,6 @@ export TZ=UTC
include /usr/share/dpkg/default.mk
-PRODUCT_DATE := $(shell date --utc --date="`dpkg-parsechangelog -SDate`" "+%b %_d %Y")
-
# the Q3 engine's build system doesn't respect CPPFLAGS, so put them in CFLAGS
CFLAGS += $(CPPFLAGS) -fsigned-char
@@ -30,7 +28,6 @@ common_options = \
BUILD_GAME_SO=1 \
CROSS_COMPILING=1 \
VERSION=$(DEB_VERSION)/$(DEB_VENDOR) \
- PRODUCT_DATE='$(PRODUCT_DATE)' \
$(NULL)
TARGET = release
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openarena.git
More information about the Pkg-games-commits
mailing list