[SCM] Debian package checker branch, master, updated. 2.5.4-68-g8df7a4f
The following commit has been merged in the master branch:
commit 8df7a4f32b2672b38886ea4a14156bd2fcaf72a1
Author: Niels Thykier <niels@thykier.net>
Date: Thu Dec 22 15:04:25 2011 +0100
L::Collect::Package: Map "0/0" owner to "root/root"
This avoids a number of false-positive ownership tags if only
numerical ownership is available in the tarball.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index 76a8aa5..5115522 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -124,6 +124,11 @@ lintian (2.5.5) UNRELEASED; urgency=low
* lib/Lintian/Collect/Group.pm:
+ [NT] Made direct_dependencies properly handle udebs. This fixes
an error that would cause lintian to skip some checks for udebs.
+ * lib/Lintian/Collect/Package.pm:
+ + [NT] Map an owner/group of "0/0" to "root/root". This avoids a
+ number of false-positive ownership tags if only numerical
+ ownership is available in the tarball. Thanks to Thorsten
+ Glaser for the report. (Closes: #638278)
* lib/Lintian/Collect/Source.pm:
+ [NT] Removed assumption that source packages always have a
format field.
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index bcc1b14..06ad0d9 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -141,6 +141,9 @@ sub _fetch_index_data {
($file{owner}, $file{group}) = split '/', $owner, 2;
+ $file{owner} = 'root' if $file{owner} eq '0';
+ $file{group} = 'root' if $file{group} eq '0';
+
$name =~ s,^\./,,;
if ($name =~ s/ link to (.*)//) {
$file{type} = 'h';
diff --git a/t/debs/unpack-numerical-owner/Makefile b/t/debs/unpack-numerical-owner/Makefile
new file mode 100644
index 0000000..c414069
--- /dev/null
+++ b/t/debs/unpack-numerical-owner/Makefile
@@ -0,0 +1,9 @@
+name = copyright-file-foreign-package
+
+all:
+ create-deb -o $(name).deb --tar-opts='--numeric-owner' \
+ control
+
+clean:
+ rm -f *.tar.gz *.deb debian-binary
+ rm -rf root/
diff --git a/t/debs/unpack-numerical-owner/desc b/t/debs/unpack-numerical-owner/desc
new file mode 100644
index 0000000..490e785
--- /dev/null
+++ b/t/debs/unpack-numerical-owner/desc
@@ -0,0 +1,7 @@
+Testname: unpack-numerical-owner
+Sequence: 6000
+Version: 1.0
+Description: Test for tarballs with numerical owner only
+Test-Against:
+ bad-owner-for-doc-file
+ control-file-has-bad-owner
diff --git a/t/debs/deb-format-record-size/tags b/t/debs/unpack-numerical-owner/tags
similarity index 100%
copy from t/debs/deb-format-record-size/tags
copy to t/debs/unpack-numerical-owner/tags
diff --git a/t/helpers/bin/create-deb b/t/helpers/bin/create-deb
index f3f2af3..5f02e63 100755
--- a/t/helpers/bin/create-deb
+++ b/t/helpers/bin/create-deb
@@ -58,6 +58,7 @@ my %opts = (
'out-file|o=s' => \$val{'out-file'},
'help|h' => sub { usage(); exit 0; },
'root=s' => \$val{'root'},
+ 'tar-opts=s' => \$val{'tar-opts'},
'auto-build-data!' => \$val{'auto-build-data'},
'compression|c=s' => \$val{'compression'},
'md5sums!' => \$val{'md5sums'},
@@ -68,6 +69,7 @@ my %opts = (
my $cwd;
my $data;
+my @taropt = ();
Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev');
@@ -123,8 +125,9 @@ if ($val{'md5sums'}) {
# Create the data.tar.$ext
$data = "data.tar.$val{'compression'}";
+@taropt = split m/\s++/o, $val{'tar-opts'} if defined $val{'tar-opts'};
-runsystem('tar', '-C', $val{'root'}, @{ $TAR_OPTIONS{$val{'compression'}} },
+runsystem('tar', '-C', $val{'root'}, @taropt, @{ $TAR_OPTIONS{$val{'compression'}} },
'-cf', "$cwd/$data", '.');
# control.tar.gz
@@ -138,7 +141,7 @@ unless ( -e 'control.tar.gz' ) {
}
}
}
- runsystem('tar', 'czf', 'control.tar.gz', @ARGV);
+ runsystem('tar', @taropt, '-czf', 'control.tar.gz', @ARGV);
}
# debian-binary
--
Debian package checker
Reply to: