[darkradiant] 06/11: Add patch to enable reproducible builds.

Tobias Frost tobi at moszumanska.debian.org
Thu Aug 4 16:30:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

tobi pushed a commit to branch master
in repository darkradiant.

commit 6f4a0b59118bfefef4115317b373cfb19016b835
Author: Tobias Frost <tobi at coldtobi.de>
Date:   Tue May 3 22:53:02 2016 +0200

    Add patch to enable reproducible builds.
---
 debian/changelog                           |  7 +++++--
 debian/control                             |  2 +-
 debian/patches/01-reproducible-build.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 debian/rules                               | 10 +++++++++-
 5 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 56753f8..3c17b20 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-darkradiant (2.0.3-1) UNRELEASED; urgency=medium
+darkradiant (2.0.3-1) unstable; urgency=medium
 
   * New upstream release.
   * d/control: Add VCS-Git and VCS-Browser, using https variants.
@@ -8,8 +8,11 @@ darkradiant (2.0.3-1) UNRELEASED; urgency=medium
     - 02-new-boost-m4.patch
     - 03-spelling-error.patch
     - 04-desktop-keywords.patch
+  * Add a few files to d/clean
+  * Run autgen.sh instead of stock dh_autoreconf
+  * Add patch to enable reproducible builds.
 
- -- Tobias Frost <tobi at debian.org>  Tue, 03 May 2016 08:29:35 +0200
+ -- Tobias Frost <tobi at debian.org>  Tue, 03 May 2016 22:49:40 +0200
 
 darkradiant (2.0.2-2) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index a7efdd6..8506fdf 100644
--- a/debian/control
+++ b/debian/control
@@ -23,7 +23,7 @@ Build-Depends: debhelper (>= 9),
                libwxgtk3.0-dev (>= 3.0.2+dfsg-1.1),
                libxml2-dev,
                python-dev
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8
 Homepage: http://darkradiant.sourceforge.net/
 VCS-Browser: https://anonscm.debian.org/git/pkg-games/darkradiant.git
 VCS-Git: https://anonscm.debian.org/git/pkg-games/darkradiant.git
diff --git a/debian/patches/01-reproducible-build.patch b/debian/patches/01-reproducible-build.patch
new file mode 100644
index 0000000..ca3e99b
--- /dev/null
+++ b/debian/patches/01-reproducible-build.patch
@@ -0,0 +1,26 @@
+Description: Reproducible build -- replace build date with date from d/changelog
+ d/rules defines the macro and this patch applies it
+Author: Tobias Frost <tobi at debian.org>
+Forwarded: no
+Last-Update: 2016-05-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/radiant/ui/about/AboutDialog.cpp
++++ b/radiant/ui/about/AboutDialog.cpp
+@@ -41,12 +41,15 @@
+ void AboutDialog::populateWindow()
+ {
+ 	loadNamedPanel(this, "AboutDialogPanel");
+-
++#ifdef DEB_BUILD_DATE
++	std::string buildDate = DEB_BUILD_DATE;
++#else
+ 	std::string date = __DATE__;
+ 	std::string time = __TIME__;
+ 
+ 	bool showBuildTime = registry::getValue<bool>(RKEY_SHOW_BUILD_TIME);
+ 	std::string buildDate = (showBuildTime) ? date + " " + time : date;
++#endif
+ 
+ 	wxStaticText* appTitle = findNamedObject<wxStaticText>(this, "AboutDialogAppTitle");
+ 	wxFont appTitleFont = appTitle->GetFont().Bold();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..04a070d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-reproducible-build.patch
diff --git a/debian/rules b/debian/rules
index 7e3e5b9..1aef3a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,18 @@
 #!/usr/bin/make -f
 
 # output every command that modifies files on the build system.
-DH_VERBOSE = 1
+#DH_VERBOSE = 1
 
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+export DEB_CFLAGS_MAINT_APPEND+= -Wdate-time
+export DEB_CXXFLAGS_MAINT_APPEND+= -Wdate-time
+
+
+export SOURCE_DATE_EPOCH_STR ?= $(shell TZ=UTC date -d "$$(dpkg-parsechangelog -SDate)" +'%Y-%m-%d %H:%M:%S')
+export DEB_CFLAGS_MAINT_APPEND += -DDEB_BUILD_DATE=\"$$SOURCE_DATE_EPOCH_STR\"
+export DEB_CXXFLAGS_MAINT_APPEND += -DDEB_BUILD_DATE=\"$$SOURCE_DATE_EPOCH_STR\"
+
 %:
 	dh $@ --parallel --with autoreconf
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/darkradiant.git



More information about the Pkg-games-commits mailing list