lintian: r59 - branches/1.22.11+udeb/checks
Author: djpig
Date: 2004-02-22 21:06:47 +0100 (Sun, 22 Feb 2004)
New Revision: 59
Modified:
branches/1.22.11+udeb/checks/deb-format.desc
branches/1.22.11+udeb/checks/debconf
branches/1.22.11+udeb/checks/fields
branches/1.22.11+udeb/checks/files
branches/1.22.11+udeb/checks/files.desc
branches/1.22.11+udeb/checks/shared-libs.desc
branches/1.22.11+udeb/checks/spelling.desc
Log:
Many fixes to the debconf checks, smaller corrections to files and
fields. Use additional checks.
Modified: branches/1.22.11+udeb/checks/deb-format.desc
===================================================================
--- branches/1.22.11+udeb/checks/deb-format.desc 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/deb-format.desc 2004-02-22 20:06:47 UTC (rev 59)
@@ -2,7 +2,7 @@
Author: Marc Brockschmidt <marc@dch-faq.de>
Abbrev: dfmt
Standards-Version: 3.6.1
-Type: binary
+Type: binary, udeb
Unpack-Level: 1
Info: This script checks if a binary package was build using a broken version
of tar (i.e., containing bug#230910)
Modified: branches/1.22.11+udeb/checks/debconf
===================================================================
--- branches/1.22.11+udeb/checks/debconf 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/debconf 2004-02-22 20:06:47 UTC (rev 59)
@@ -35,6 +35,7 @@
my %valid_types;
map { $valid_types{$_}=1 } qw(string boolean select multiselect
note text password);
+$valid_types{error} = 1 if $type eq 'udeb';
my $seenconfig='';
my $seentemplates='';
@@ -53,7 +54,7 @@
# Check that both debconf control area files are present.
if ($seenconfig and not $seentemplates) {
print "W: $pkg $type: no-debconf-templates\n";
-} elsif ($seentemplates and not $seenconfig) {
+} elsif ($seentemplates and not $seenconfig and $type ne 'udeb') {
print "W: $pkg $type: no-debconf-config\n";
}
@@ -140,13 +141,19 @@
if (-f "fields/$field") {
open(IN, "fields/$field") or fail("Can't open fields/$field: $!");
chomp($_ = <IN>);
+ $_ .= ", $version" if defined $version;
$_ =~ s/debconf-2\.0/debconf (>= 1.2.30)/go;
- $_ .= ", $version" if defined $version;
- push @alldeps, $_;
+ $_ =~ s/cdebconf(-\w+)?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+ $_ =~ s/libdebconfclient.?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+ push @alldeps, $_;
$dependencies{$field} = Dep::parse($_);
} else {
- push @alldeps, $version;
- $dependencies{$field} = Dep::parse($version);
+ my $dep = $version;
+ $dep =~ s/debconf-2\.0/debconf (>= 1.2.30)/go;
+ $dep =~ s/cdebconf(-\w+)?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+ $dep =~ s/libdebconfclient.?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+ push @alldeps, $dep;
+ $dependencies{$field} = Dep::parse($dep);
}
}
@@ -174,6 +181,9 @@
my $isdefault='';
my $usesseen='';
+ my $fl = <IN>;
+ next if $fl !~ /^#!/; # skip, if not a script
+
while (<IN>) {
s/#.*//; # Not perfect for Perl, but should be OK
next unless m/\S/;
@@ -190,7 +200,8 @@
}
if ($file eq 'postinst' and not $db_input and m/db_input/) {
# TODO: Perl?
- print "W: $pkg $type: postinst-uses-db-input\n";
+ print "W: $pkg $type: postinst-uses-db-input\n"
+ if $type ne 'udeb';
$db_input=1;
}
if (not $isdefault and m/db_fset.*isdefault/) {
@@ -255,7 +266,7 @@
# the following checks is ignored if the package being checked is debconf
# itself.
-exit 0 if $pkg eq "debconf";
+exit 0 if ($pkg eq "debconf") || ($type eq 'udeb');
open(SCRIPTS, "scripts") or fail("cannot open lintian scripts file: $!");
while (<SCRIPTS>) {
Modified: branches/1.22.11+udeb/checks/fields
===================================================================
--- branches/1.22.11+udeb/checks/fields 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/fields 2004-02-22 20:06:47 UTC (rev 59)
@@ -134,10 +134,10 @@
if (open(IN, "fields/installer-menu-item")) {
chop($_ = <IN>);
- my @subarchs = split;
+ /^\d+$/ || tag_error("bad-menu-item");
close(IN);
- single_line('subarchitecture', $_);
+ single_line('installer-menu-item', $_);
}
if (not open(IN, "fields/maintainer")) {
Modified: branches/1.22.11+udeb/checks/files
===================================================================
--- branches/1.22.11+udeb/checks/files 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/files 2004-02-22 20:06:47 UTC (rev 59)
@@ -103,11 +103,11 @@
print "E: $pkg $type: config-file-reserved $file by libpam-runtime\n";
}
# ---------------- /etc/rc.d
- elsif ($file =~ m,^etc/rc\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
+ elsif ($type ne 'udeb' and $file =~ m,^etc/rc\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
print "E: $pkg $type: package-installs-into-etc-rc.d $file\n";
}
# ---------------- /etc/rc?.d
- elsif ($file =~ m,^etc/rc(\d|S)\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
+ elsif ($type ne 'udeb' and $file =~ m,^etc/rc(\d|S)\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
print "E: $pkg $type: package-installs-into-etc-rc.d $file\n";
}
# ---------------- /etc/rc.boot
@@ -134,7 +134,7 @@
# ---------------- /usr/share/doc
if ($file =~ m,^usr/share/doc/\S,) {
if ($type eq 'udeb') {
- print "E: $pkg $type: file-in-usr-share-doc $file\n";
+ print "E: $pkg $type: documentation-file $file\n";
} else {
# file not owned by root?
if ($owner ne 'root/root') {
@@ -221,10 +221,19 @@
}
# ---------------- /usr/share/man and /usr/X11R6/man
elsif ($file =~ m,^usr/X11R6/man/\S+, or m,^usr/share/man/\S+, ) {
+ if ($type eq 'udeb') {
+ print "E: $pkg $type: documentation-file $file\n";
+ }
if ($perm =~ m/^-.*[xt]/) {
print "E: $pkg $type: executable-manpage $file\n";
}
}
+ # ---------------- /usr/share/info
+ elsif ($file =~ m,^usr/share/info\S+,) {
+ if ($type eq 'udeb') {
+ print "E: $pkg $type: documentation-file $file\n";
+ }
+ }
# ---------------- /usr/share
elsif ($file =~ m,^usr/share/[^/]+$,) {
if ($perm =~ m/^-/) {
@@ -292,7 +301,9 @@
# base system. (Specifically, /cdrom, /floppy, /initrd, and /proc
# are not mentioned in the FHS).
print "E: $pkg $type: non-standard-toplevel-dir $file\n"
- unless $pkg eq 'base-files' or $pkg eq 'hurd';
+ unless $pkg eq 'base-files'
+ or $pkg eq 'hurd'
+ or $pkg =~ /^rootskel(-bootfloppy)?/;
}
# ---------------- compatibility symlinks should not be used
Modified: branches/1.22.11+udeb/checks/files.desc
===================================================================
--- branches/1.22.11+udeb/checks/files.desc 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/files.desc 2004-02-22 20:06:47 UTC (rev 59)
@@ -196,7 +196,7 @@
absolute.
Ref: policy 10.5
-Tag: contains-usr-share-doc
+Tag: documentation-file
Type: error
Info: udeb packages should not contain any documentation.
.
Modified: branches/1.22.11+udeb/checks/shared-libs.desc
===================================================================
--- branches/1.22.11+udeb/checks/shared-libs.desc 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/shared-libs.desc 2004-02-22 20:06:47 UTC (rev 59)
@@ -2,7 +2,7 @@
Author: Christian Schwarz <schwarz@debian.org>
Abbrev: shl
Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
Unpack-Level: 1
Needs-Info: file-info, objdump-info
Info: This script checks if a binary package conforms to shared library policy.
Modified: branches/1.22.11+udeb/checks/spelling.desc
===================================================================
--- branches/1.22.11+udeb/checks/spelling.desc 2004-02-22 15:24:32 UTC (rev 58)
+++ branches/1.22.11+udeb/checks/spelling.desc 2004-02-22 20:06:47 UTC (rev 59)
@@ -2,7 +2,7 @@
Author: Richard Braakman <dark@xs4all.nl>
Abbrev: spl
Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
Unpack-Level: 1
Info: This script looks for common spelling errors.
Needs-Info: copyright-file, debian-readme
Reply to: