[OpenWrt-Devel] [PATCH] ipkg-build: suppress timestamps in gzip headers

Reiner Herrmann reiner at reiner-h.de
Wed Jun 17 14:08:51 EDT 2015


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 at reiner-h.de>
---
 scripts/ipkg-build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index c466f28..6787ed4 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -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:]]*//"
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list