[glibc] 01/03: Make the package build reproducibly, thanks to Ximin Luo for the patch. Closes: #783210.
This is an automated email from the git hooks/post-receive script.
aurel32 pushed a commit to branch sid
in repository glibc.
commit 695bb7c93a8d423a775514a4c29f241bd741169b
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon Jan 16 18:42:14 2017 +0100
Make the package build reproducibly, thanks to Ximin Luo for the patch. Closes: #783210.
* Make the package build reproducibly, thanks to Ximin Luo for the patch.
Closes: #783210.
- debian/rules: export SOURCE_DATE_EPOCH when not building with
dpkg-buildpackage.
- debian/rules.d/build.mk: use --clamp-mtime instead of touching the
files.
- debian/rules.d/debhelper.mk: do not chmod +x the shell script, call
it with sh instead.
---
debian/changelog | 8 ++++++++
debian/rules | 2 ++
debian/rules.d/build.mk | 8 +++-----
debian/rules.d/debhelper.mk | 3 +--
debian/shlibs-add-udebs | 0
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7ffc6b8..6a09717 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,14 @@ glibc (2.24-9) UNRELEASED; urgency=medium
* patches/any/cvs-resolv-internal-qtype.diff: patch from upstream to fix a
NULL pointer dereference in libresolv when receiving a T_UNSPEC internal
QTYPE (CVE-2015-5180). Closes: #796106.
+ * Make the package build reproducibly, thanks to Ximin Luo for the patch.
+ Closes: #783210.
+ - debian/rules: export SOURCE_DATE_EPOCH when not building with
+ dpkg-buildpackage.
+ - debian/rules.d/build.mk: use --clamp-mtime instead of touching the
+ files.
+ - debian/rules.d/debhelper.mk: do not chmod +x the shell script, call
+ it with sh instead.
-- Samuel Thibault <sthibault@debian.org> Fri, 09 Dec 2016 01:51:00 +0100
diff --git a/debian/rules b/debian/rules
index eaef085..d58d9ee 100755
--- a/debian/rules
+++ b/debian/rules
@@ -48,6 +48,8 @@ DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | cut -f
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
GLIBC_VERSION = $(shell echo $(DEB_VERSION) | sed -e 's/.*://' -e 's/[+-].*//')
+SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
+
# The minimum package version with which these packages are compatible.
shlib_dep_ver = $(GLIBC_VERSION)
shlib_dep = $(libc) (>= $(shlib_dep_ver))
diff --git a/debian/rules.d/build.mk b/debian/rules.d/build.mk
index 3b5a06f..9aaea50 100644
--- a/debian/rules.d/build.mk
+++ b/debian/rules.d/build.mk
@@ -316,19 +316,17 @@ $(stamp)build_locales-all: $(stamp)/build_libc
$(stamp)source: $(stamp)patch
mkdir -p $(build-tree)
cd .. && \
- find $(GLIBC_SOURCES) -depth -newermt '$(DEB_BUILD_DATE)' \
- -print0 | \
- xargs -0r touch --no-dereference --date='$(DEB_BUILD_DATE)'
- cd .. && \
find $(GLIBC_SOURCES) -print0 | \
LC_ALL=C sort -z | \
tar -c -J --null --no-recursion -T - \
--mode=go=rX,u+rw,a-s \
+ --clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \
--owner=root --group=root --numeric-owner \
-f $(CURDIR)/$(build-tree)/glibc-$(GLIBC_VERSION).tar.xz
mkdir -p debian/glibc-source/usr/src/glibc
tar cf - --files-from debian/glibc-source.filelist \
- | tar -x -C debian/glibc-source/usr/src/glibc -f -
+ --clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \
+ | tar -x -C debian/glibc-source/usr/src/glibc -f -
touch $@
diff --git a/debian/rules.d/debhelper.mk b/debian/rules.d/debhelper.mk
index c2df89f..23de222 100644
--- a/debian/rules.d/debhelper.mk
+++ b/debian/rules.d/debhelper.mk
@@ -77,8 +77,7 @@ endif
-exec chmod a+x '{}' ';'
dh_makeshlibs -Xgconv/ -p$(curpass) -V "$(call xx,shlib_dep)"
# Add relevant udeb: lines in shlibs files
- chmod a+x debian/shlibs-add-udebs
- ./debian/shlibs-add-udebs $(curpass)
+ sh ./debian/shlibs-add-udebs $(curpass)
dh_installdeb -p$(curpass)
dh_shlibdeps -p$(curpass)
diff --git a/debian/shlibs-add-udebs b/debian/shlibs-add-udebs
old mode 100644
new mode 100755
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: