[Pkg-nagios-changes] [pkg-nrpe] 12/41: Make the build reproducible. (closes: #834857)

Bas Couwenberg sebastic at debian.org
Sun Dec 4 17:53:45 UTC 2016


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

sebastic pushed a commit to branch master
in repository pkg-nrpe.

commit e7f793fd89774d3b8e54ad32d5be6a21dfc71214
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Dec 4 13:34:16 2016 +0100

    Make the build reproducible. (closes: #834857)
---
 debian/changelog                           |  4 ++++
 debian/patches/10_reproducible_build.patch | 22 ++++++++++++++++++++++
 debian/patches/series                      |  1 +
 debian/rules                               |  6 ++++++
 4 files changed, 33 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index abcbeb9..82a9ffb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,10 @@ nagios-nrpe (2.15-2) UNRELEASED; urgency=medium
   * Fix copyright-refers-to-symlink-license.
     (closes: #756414)
 
+  [ Chris Lamb ]
+  * Make the build reproducible.
+    (closes: #834857)
+
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 04 Dec 2016 12:08:25 +0100
 
 nagios-nrpe (2.15-1) unstable; urgency=high
diff --git a/debian/patches/10_reproducible_build.patch b/debian/patches/10_reproducible_build.patch
new file mode 100644
index 0000000..2a53dbc
--- /dev/null
+++ b/debian/patches/10_reproducible_build.patch
@@ -0,0 +1,22 @@
+Description: Make the build reproducible.
+Author: Chris Lamb <lamby at debian.org>
+Bug-Debian: https://bugs.debian.org/834857
+
+--- a/update-version
++++ b/update-version
+@@ -20,11 +20,11 @@ fi
+ 
+ # Get date (two formats)
+ if [ -n "$2" ]; then
+-    LONGDATE=`date -d "$2" "+%B %d, %Y"`
+-    SHORTDATE=`date -d "$2" "+%m-%d-%Y"`
++    LONGDATE=$(LC_ALL=C date -u -d "$2" "+%B %d, %Y")
++    SHORTDATE=$(date -u -d "$2" "+%m-%d-%Y")
+ else
+-    LONGDATE=`date "+%B %d, %Y"`
+-    SHORTDATE=`date "+%m-%d-%Y"`
++    LONGDATE=$(LC_ALL=C date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%B %d, %Y")
++    SHORTDATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%m-%d-%Y")
+ fi
+ 
+ # Current version number
diff --git a/debian/patches/series b/debian/patches/series
index 8aa9efb..aeecc17 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 06_pid_directory.patch
 07_warn_ssloption.patch
 09_noremove_pid.patch
+10_reproducible_build.patch
diff --git a/debian/rules b/debian/rules
index d7e7274..05d3277 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,9 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 	    dh $@ --with autotools_dev
 
 override_dh_auto_configure:
+	# Save deterministic "openssl dhparam" output.
+	cp include/dh.h include/dh.h.orig
+
 	dh_auto_configure -- \
 		--prefix=/usr \
 		--enable-ssl \
@@ -16,4 +19,7 @@ override_dh_auto_configure:
 		--libexecdir=/usr/lib/nagios/plugins \
 		--libdir=/usr/lib/nagios
 
+	# Restore deterministic "openssl dhparam" output.
+	cp include/dh.h.orig include/dh.h
+
 override_dh_auto_install:

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



More information about the Pkg-nagios-changes mailing list