[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
Sun Aug 16 01:44:16 PDT 2026


https://github.com/lfmeadow updated https://github.com/llvm/llvm-project/pull/216533

>From aab10f8c912a67377815215d5b17f1ded85fc219 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

Fixes lintian's package-contains-timestamped-gzip: gzip before 1.10 and
pigz of any version stamp the header with the current time when reading a
pipe.  -n zeroes the field, and is a no-op on newer gzip.

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