From 00c6ad9c5c93d33b667540b645fa0a2189f6dc88 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 6 Jul 2015 21:22:54 +0000 Subject: [PATCH] linux-source: Sort files in the tarball to make it reproducible svn path=/dists/trunk/linux/; revision=22804 --- debian/changelog | 2 +- debian/rules.real | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 769f90ef5..48f07370c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,7 @@ linux (4.1.1-1~exp1) UNRELEASED; urgency=medium * Fix some embedded timestamps that prevent a reproducible build (thanks to Jérémy Bobbio): - linux-image: Fix timestamps in the built-in initramfs - - linux-source: Fix timestamps in the tarball + - linux-source: Fix timestamps and sort files in the tarball - linux-doc: Drop original timestamp (and name) when compressing * aufs: Apply patches to enable building aufs out-of-tree * [x86] Enable MMIOTRACE (Closes: #790808) diff --git a/debian/rules.real b/debian/rules.real index 4793fb36f..e1fecd3c5 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -89,7 +89,9 @@ $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.xz: $(STAMPS_DIR)/source chmod -R u+rw,go=rX '$(DIR)' find '$(DIR)' -depth -newermt '$(SOURCE_DATE)' -print0 | \ xargs -0r touch --no-dereference --date='$(SOURCE_DATE)' - cd '$(BUILD_DIR)'; tar -caf 'linux-source-$(UPSTREAMVERSION).tar.xz' 'linux-source-$(UPSTREAMVERSION)' + cd '$(BUILD_DIR)'; find 'linux-source-$(UPSTREAMVERSION)' -print0 | \ + LC_ALL=C sort -z | \ + xargs -0 tar --no-recursion -raf 'linux-source-$(UPSTREAMVERSION).tar.xz' rm -rf '$(DIR)' $(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-%.patch.xz: $(STAMPS_DIR)/source_none $(STAMPS_DIR)/source_%