[Glibc-bsd-commits] r5872 - trunk/freebsd-buildutils/debian
stevenc-guest at alioth.debian.org
stevenc-guest at alioth.debian.org
Sun Feb 7 00:33:23 UTC 2016
Author: stevenc-guest
Date: 2016-02-07 00:33:23 +0000 (Sun, 07 Feb 2016)
New Revision: 5872
Modified:
trunk/freebsd-buildutils/debian/changelog
trunk/freebsd-buildutils/debian/rules
Log:
Make get-orig-source tarball reproducible
Modified: trunk/freebsd-buildutils/debian/changelog
===================================================================
--- trunk/freebsd-buildutils/debian/changelog 2016-02-07 00:32:15 UTC (rev 5871)
+++ trunk/freebsd-buildutils/debian/changelog 2016-02-07 00:33:23 UTC (rev 5872)
@@ -1,6 +1,7 @@
freebsd-buildutils (10.3~svn295289-1) UNRELEASED; urgency=medium
* New upstream snapshot of 10.3-BETA1
+ * Make get-orig-source tarball reproducible
-- Steven Chamberlain <steven at pyro.eu.org> Sat, 06 Feb 2016 22:50:09 +0000
Modified: trunk/freebsd-buildutils/debian/rules
===================================================================
--- trunk/freebsd-buildutils/debian/rules 2016-02-07 00:32:15 UTC (rev 5871)
+++ trunk/freebsd-buildutils/debian/rules 2016-02-07 00:33:23 UTC (rev 5872)
@@ -45,6 +45,7 @@
SOURCE = freebsd-buildutils
ORIGDIR = $(SOURCE)-$(tar_version)
TARNAME = $(SOURCE)_$(tar_version).orig.tar.xz
+SOURCE_DATE_EPOCH ?= $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s)
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -92,7 +93,16 @@
; do \
svn export --ignore-keywords -r $(svn_revision) $(SVN)/$$i $(ORIGDIR)/src/$$i ; \
done
- tar --numeric-owner --owner 0 --group 0 -cJf ../$(TARNAME) $(ORIGDIR)
+ # Clamp timestamps to be no newer than last changelog entry, see
+ # https://wiki.debian.org/ReproducibleBuilds/TimestampsInTarball
+ find $(ORIGDIR) -newermt "@$(SOURCE_DATE_EPOCH)" -print0 \
+ | xargs -0r touch --no-dereference --date="@$(SOURCE_DATE_EPOCH)"
+ # Create tarball with files sorted in a stable order, see
+ # https://wiki.debian.org/ReproducibleBuilds/FileOrderInTarballs
+ find $(ORIGDIR) -print0 | LC_ALL=C sort -z \
+ | tar --null --no-recursion --files-from - \
+ --numeric-owner --owner 0 --group 0 \
+ -cJf ../$(TARNAME)
rm -rf $(ORIGDIR)
unpack: unpack-stamp
@@ -193,7 +203,7 @@
# Build architecture-independent files here.
-binary-indep: build install
+binary-indep: build binary-arch install
# We have nothing to do by default.
# Build architecture-dependent files here.
More information about the Glibc-bsd-commits
mailing list