linux-source: Fix compression of the source tarball (Closes: #795199)

When we introduced the find | sort | xargs tar pipeline to make the
tarball reproducible, I was concerned that there could be so many
arguments that xargs would call tar more than once.  I therefore
changed the tar -c option to -r so that it would append rather
than overwriting in this case.

However, the -a option seems to have no effect when -r is used, so
the tarball is no longer compressed.

Instead of using xargs, use tar's -T option and change the -r
back to -c.
This commit is contained in:
Ben Hutchings 2015-08-12 18:02:17 +02:00
parent b13fc71d7e
commit 3bb9b71582
2 changed files with 2 additions and 1 deletions

1
debian/changelog vendored
View File

@ -227,6 +227,7 @@ linux (4.1.5-1) UNRELEASED; urgency=medium
* virtio-net: drop NETIF_F_FRAGLIST (CVE-2015-5156)
* ovl: Add support for NFS as lower filesystem (Closes: #786925)
* perf: Fix double-free of the AUX buffer
* linux-source: Fix compression of the source tarball (Closes: #795199)
-- Ian Campbell <ijc@debian.org> Tue, 04 Aug 2015 19:31:45 +0100

2
debian/rules.real vendored
View File

@ -91,7 +91,7 @@ $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.xz: $(STAMPS_DIR)/source
xargs -0r touch --no-dereference --date='$(SOURCE_DATE)'
cd '$(BUILD_DIR)'; find 'linux-source-$(UPSTREAMVERSION)' -print0 | \
LC_ALL=C sort -z | \
xargs -0 tar --no-recursion -raf 'linux-source-$(UPSTREAMVERSION).tar.xz'
tar --no-recursion --null -T - -caf 'linux-source-$(UPSTREAMVERSION).tar.xz'
rm -rf '$(DIR)'
$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-%.patch.xz: $(STAMPS_DIR)/source_none $(STAMPS_DIR)/source_%