[tbb-commits] [rbm/master] Bug 31264: Remove timestamps from gzip headers

boklm at torproject.org boklm at torproject.org
Wed Sep 11 10:05:36 UTC 2019


commit 5a41aae4a0d745f74b675d3c9c142b3d5fb3ca09
Author: JeremyRand <biolizard89 at gmail.com>
Date:   Tue Jul 30 22:34:19 2019 +0000

    Bug 31264: Remove timestamps from gzip headers
    
    See https://wiki.debian.org/ReproducibleBuilds/TimestampsInGzipHeaders
    
    Thanks to boklm for helping with this patch.
---
 lib/RBM.pm               | 2 +-
 lib/RBM/DefaultConfig.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/RBM.pm b/lib/RBM.pm
index 75912af..087ebe3 100644
--- a/lib/RBM.pm
+++ b/lib/RBM.pm
@@ -582,7 +582,7 @@ sub maketar {
     }
     my %compress = (
         xz  => ['xz', '-f'],
-        gz  => ['gzip', '-f'],
+        gz  => ['gzip', '--no-name', '-f'],
         bz2 => ['bzip2', '-f'],
     );
     if (my $c = project_config($project, 'compress_tar', $options)) {
diff --git a/lib/RBM/DefaultConfig.pm b/lib/RBM/DefaultConfig.pm
index f8165c3..f7de8bb 100644
--- a/lib/RBM/DefaultConfig.pm
+++ b/lib/RBM/DefaultConfig.pm
@@ -575,7 +575,7 @@ OPT_END
 find [% src.join(' ') %] [% IF c('gnu_utils') %]-executable[% ELSE %]-perm +0111[% END %] -exec chmod 700 {} \\;
 find [% src.join(' ') %] ! [% IF c('gnu_utils') %]-executable[% ELSE %]-perm +0111[% END %] -exec chmod 600 {} \\;
 find [% src.join(' ') %] | sort | \
-        tar --no-recursion [% IF c('gnu_utils') -%]
+        GZIP="--no-name \${GZIP}" tar --no-recursion [% IF c('gnu_utils') -%]
                 --owner=root --group=root --mtime=@[% c('timestamp') %]
                 [%- END -%]
                 [% c('tar_args', { error_if_undef => 1 }) %] -T -



More information about the tbb-commits mailing list