linux-source: Sort files in the tarball to make it reproducible

svn path=/dists/trunk/linux/; revision=22804
This commit is contained in:
Ben Hutchings 2015-07-06 21:22:54 +00:00
parent 91ddefc8eb
commit 00c6ad9c5c
2 changed files with 4 additions and 2 deletions

2
debian/changelog vendored
View File

@ -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)

4
debian/rules.real vendored
View File

@ -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_%