ipkg-build: suppress timestamps in gzip headers
authorFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jun 2015 06:41:45 +0000 (06:41 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jun 2015 06:41:45 +0000 (06:41 +0000)
When creating control.tar.gz, data.tar.gz and $package.ipk
tar compresses them with default gzip options.
This includes build timestamps in their gzip headers.
By setting the GZIP env variable to -n, gzip no longer embeds
them, which is a step towards reproducibility.

See also [1] for more detailed motivations.

[1]: https://wiki.debian.org/ReproducibleBuilds/About

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
SVN-Revision: 46026

scripts/ipkg-build

index c466f2868102dd28d504d7582a1ad73483ea7252..6787ed41992f3a8daeb43095bfc091c2e8f99be7 100755 (executable)
@@ -13,6 +13,7 @@ version=1.0
 FIND="$(which find)"
 FIND="${FIND:-$(which gfind)}"
 TAR="${TAR:-$(which tar)}"
+export GZIP="-n"
 
 ipkg_extract_value() {
        sed -e "s/^[^:]*:[[:space:]]*//"