summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Spooren2026-06-10 15:18:37 +0000
committerChristian Marangi2026-06-19 07:04:59 +0000
commit9243f9e181b38c90eedd64ca10042e5a239d4cee (patch)
tree2a249f7bf7ac9bdd6aa7894547b04c67f6e665c2
parent98134ee1a38f967c2fa2e975fae8d21cc7bb2b81 (diff)
downloadopenwrt-9243f9e181b38c90eedd64ca10042e5a239d4cee.tar.gz
package: make APK embedded help gzip reproducible
APK compresses it's helptext using LUA and require `zlib`, which isn't available on the Buildbots. It thens falls back to `gzip`, which embeds the MTIME, making the binary itself unreproducible. This commits adds a downstream patch to run `gzip` with `-n`, setting the time to 0. Link: https://github.com/openwrt/openwrt/pull/23736 Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 353e23dfbc15feb9557bf09095cf54ab77f3042b) Link: https://github.com/openwrt/openwrt/pull/23846 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r--package/system/apk/patches/0011-genhelp-reproducible-gzip.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/package/system/apk/patches/0011-genhelp-reproducible-gzip.patch b/package/system/apk/patches/0011-genhelp-reproducible-gzip.patch
new file mode 100644
index 0000000000..f6684f29e6
--- /dev/null
+++ b/package/system/apk/patches/0011-genhelp-reproducible-gzip.patch
@@ -0,0 +1,11 @@
+--- a/src/genhelp.lua
++++ b/src/genhelp.lua
+@@ -168,7 +168,7 @@ function scapp:compress(data)
+ f:write(data)
+ f:close()
+
+- local p = io.popen(('gzip -%d < %s'):format(level, tmp), 'r')
++ local p = io.popen(('gzip -n%d < %s'):format(level, tmp), 'r')
+ if p ~= nil then
+ ret = p:read("*all")
+ p:close()