From ef24d47df9988baa4fb899c525b3cfd1c13e9c04 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Thu, 13 Feb 2025 18:22:39 +0100 Subject: [PATCH] build: Ignore timestamps recording in gzip metadata Use the `-n / --noname` option to ignore non-deterministric information, such as timestamps, in gzip metadata. This is required for [reproducible builds](https://reproducible-builds.org/). Signed-off-by: Robin Candau --- scripts/compress_assets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/compress_assets.sh b/scripts/compress_assets.sh index 19e1e22486..91b1c7b31a 100755 --- a/scripts/compress_assets.sh +++ b/scripts/compress_assets.sh @@ -13,9 +13,9 @@ fi cd web/ui cp embed.go.tmpl embed.go -GZIP_OPTS="-fk" +GZIP_OPTS="-fkn" # gzip option '-k' may not always exist in the latest gzip available on different distros. -if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-f"; fi +if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-fn"; fi mkdir -p static find static -type f -name '*.gz' -delete