[lintian] 03/03: Always pass -n to gzip for compressing files
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 90b17c78e01429f11db7c77c6abc3bde3a27e60c
Author: Niels Thykier <niels@thykier.net>
Date: Sun Apr 24 16:20:15 2016 +0000
Always pass -n to gzip for compressing files
(Also standardise on using "-9" rather than "--best"; previously we
would do either depending in difference places).
For lintian's purpose, the -n is rather insignificant. However, it
makes us follow best practises for "bit-for-bit" reproducibility (in
case someone would decide to cargo-cult code from lintian).
Signed-off-by: Niels Thykier <niels@thykier.net>
---
collection/bin-pkg-control | 2 +-
collection/file-info | 2 +-
collection/objdump-info | 2 +-
collection/src-orig-index | 2 +-
collection/unpacked | 4 ++--
debian/changelog | 3 +++
reporting/html_reports | 2 +-
t/helpers/bin/create-deb | 2 +-
8 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/collection/bin-pkg-control b/collection/bin-pkg-control
index 092a463..f27419f 100755
--- a/collection/bin-pkg-control
+++ b/collection/bin-pkg-control
@@ -89,7 +89,7 @@ sub collect {
# create index of control.tar.gz
spawn(
$job, ['tar', 'tvf', '-'],'|', ['sort', '-k', '6'],
- '|', ['gzip', '--best', '-c'],
+ '|', ['gzip', '-9nc'],
);
$in_fd->blocking(1);
diff --git a/collection/file-info b/collection/file-info
index a3daf90..8a296b9 100755
--- a/collection/file-info
+++ b/collection/file-info
@@ -61,7 +61,7 @@ sub collect {
);
spawn(\%opts,
['xargs', '-0r', 'file', '-e', 'ascii', '-NF', '', '--print0', '--'],
- '|', [$helper], '|', ['gzip', '--best', '-c']);
+ '|', [$helper], '|', ['gzip', '-9nc']);
$opts{pipe_in}->blocking(1);
foreach my $file ($info->sorted_index) {
diff --git a/collection/objdump-info b/collection/objdump-info
index 99b6c87..39de4aa 100755
--- a/collection/objdump-info
+++ b/collection/objdump-info
@@ -57,7 +57,7 @@ sub collect {
out => "$dir/objdump-info.gz",
fail => 'error'
);
- spawn(\%opts, ['xargs', '-0r', $helper], '|', ['gzip', '-9c']);
+ spawn(\%opts, ['xargs', '-0r', $helper], '|', ['gzip', '-9nc']);
$opts{pipe_in}->blocking(1);
foreach my $bin ($info->sorted_index) {
diff --git a/collection/src-orig-index b/collection/src-orig-index
index 8032381..241acd2 100755
--- a/collection/src-orig-index
+++ b/collection/src-orig-index
@@ -209,7 +209,7 @@ sub index_orig {
{ fail => 'error', out => "$dir/orig-index.gz" },
sub { print @result },
'|', ['sort', '-k', '6'],
- '|', ['gzip', '--best', '-c']);
+ '|', ['gzip', '-9nc']);
return 1;
}
diff --git a/collection/unpacked b/collection/unpacked
index 928aa04..d26acf5 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -98,7 +98,7 @@ sub collect {
'|',
['sort', '-k', '6'],
'|',
- ['gzip', '-9c']);
+ ['gzip', '-9nc']);
# fix permissions
spawn({ fail => 'error' },
@@ -153,7 +153,7 @@ sub can_use_dpkg_source{
sub extract_and_index_deb {
my ($dir) = @_;
- my @sort_gzip = (['sort', '-k', '6'], '|', ['gzip', '-9c']);
+ my @sort_gzip = (['sort', '-k', '6'], '|', ['gzip', '-9nc']);
my (@jobs, @out_fds, $err);
open(my $tar_in, '-|', 'dpkg-deb', '--fsys-tarfile', "$dir/deb");
diff --git a/debian/changelog b/debian/changelog
index c6147bf..e13d595 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ lintian (2.5.45) UNRELEASED; urgency=medium
to cover that debhelper will generally add it
automatically. Most packages will just need a rebuild.
+ * collection/*:
+ + [NT] Always pass "-n" to "gzip".
+
* commands/reporting-lintian-harness.pm:
+ [NT] Re-enable pedantic tags by default. These were
disabled in the previous release by mistake.
diff --git a/reporting/html_reports b/reporting/html_reports
index 1bf5f16..4162272 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -130,7 +130,7 @@ if ($ARGV[0]) {
);
copy($ARGV[0], "$HTML_TMP_DIR/lintian.log")
or die("cannot copy $ARGV[0] to $HTML_TMP_DIR/lintian.log: $!");
- spawn(\%opts, ['gzip', '-9c'])
+ spawn(\%opts, ['gzip', '-9nc'])
or die "cannot create $HTML_TMP_DIR/lintian.log.gz.\n";
}
diff --git a/t/helpers/bin/create-deb b/t/helpers/bin/create-deb
index b55c92e..393ab3f 100755
--- a/t/helpers/bin/create-deb
+++ b/t/helpers/bin/create-deb
@@ -131,7 +131,7 @@ if ($val{'auto-build-data'}) {
"root/usr/share/doc/$pkg/$file")
if -e $src;
}
- runsystem('gzip', '-nf', '--best', "root/usr/share/doc/$pkg/$dch")
+ runsystem('gzip', '-9nf', "root/usr/share/doc/$pkg/$dch")
if -e "root/usr/share/doc/$pkg/$dch";
# set root so it works for later :)
$val{'root'} = 'root/';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: