[llvm] [Release] Pass -n to gzip so the release tarball is reproducible (PR #216533)
Larry Meadows via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 22:19:10 PDT 2026
https://github.com/lfmeadow updated https://github.com/llvm/llvm-project/pull/216533
>From 6ebbff90d3d9e08c06dfd316e99d2edfffb0d21f Mon Sep 17 00:00:00 2001
From: Larry Meadows <Lawrence.Meadows at amd.com>
Date: Sat, 15 Aug 2026 22:58:48 -0500
Subject: [PATCH] [Release] Pass -n to gzip so the release tarball is
reproducible
gzip before 1.10, and pigz of any version, record the current time in the
gzip header when compressing from a pipe, so the tarball's bytes depend on
when and where it was packaged. Debian's lintian reports that as
package-contains-timestamped-gzip and recommends -n, which zeroes the
field. It is a no-op on gzip 1.10 and later.
Co-authored-by: Jonathan Luu <jonatluu at amd.com>
Co-authored-by: Cursor <cursoragent at cursor.com>
---
llvm/utils/release/test-release.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh
index 20fbf83ce90a9..3c1d7ef4c2091 100755
--- a/llvm/utils/release/test-release.sh
+++ b/llvm/utils/release/test-release.sh
@@ -369,7 +369,7 @@ function build_with_cmake_cache() {
pushd $BuildDir/Release
mv $InstallDir/usr/local $Package
if [ "$use_gzip" = "yes" ]; then
- tar cf - $Package | gzip -9c > $BuildDir/$Package.tar.gz
+ tar cf - $Package | gzip -9c -n > $BuildDir/$Package.tar.gz
else
tar cf - $Package | xz -9ce -T $NumJobs > $BuildDir/$Package.tar.xz
fi
@@ -613,7 +613,7 @@ function package_release() {
cd $BuildDir/Phase3/Release
mv llvmCore-$Release-$RC.install/usr/local $Package
if [ "$use_gzip" = "yes" ]; then
- tar cf - $Package | gzip -9c > $BuildDir/$Package.tar.gz
+ tar cf - $Package | gzip -9c -n > $BuildDir/$Package.tar.gz
else
tar cf - $Package | xz -9ce -T $NumJobs > $BuildDir/$Package.tar.xz
fi
More information about the llvm-commits
mailing list