lintian: r1077 - in trunk: checks debian testset
Author: rra
Date: 2007-12-09 21:55:15 +0100 (Sun, 09 Dec 2007)
New Revision: 1077
Modified:
trunk/checks/binaries.desc
trunk/checks/changelog-file.desc
trunk/checks/control-file.desc
trunk/checks/copyright-file.desc
trunk/checks/debconf.desc
trunk/checks/debhelper.desc
trunk/checks/files.desc
trunk/checks/lintian.desc
trunk/checks/manpages.desc
trunk/debian/changelog
trunk/testset/runtests
Log:
* checks/*.desc:
+ [RA] Escape all literal angle brackets and fix unclosed and unknown
HTML tags. Based on a patch by Thijs Kinkhorst. (Closes: #455211)
* testset/runtests:
+ [RA] Check all tag descriptions for unknown or unclosed HTML tags
and for stray angle brackets.
Modified: trunk/checks/binaries.desc
===================================================================
--- trunk/checks/binaries.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/binaries.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -69,7 +69,7 @@
gcc test.o -o test -Wl,--rpath,/usr/local/lib
or
gcc test.o -o test -R/usr/local/lib
- and remove the <tt>-Wl,--rpath</tt> or <t>-R</t> argument. You can also
+ and remove the <tt>-Wl,--rpath</tt> or <tt>-R</tt> argument. You can also
use the chrpath utility to remove the RPATH.
Tag: binary-has-unneeded-section
Modified: trunk/checks/changelog-file.desc
===================================================================
--- trunk/checks/changelog-file.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/changelog-file.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -140,7 +140,7 @@
There are many ways to convert a changelog from an obsoleted encoding
like ISO-8859-1; you may for example use "iconv" like:
.
- $ iconv -f ISO-8859-1 -t UTF-8 changelog > changelog.new
+ $ iconv -f ISO-8859-1 -t UTF-8 changelog > changelog.new
$ mv changelog.new changelog
Tag: debian-news-file-uses-obsolete-national-encoding
@@ -151,7 +151,7 @@
There are many ways to convert a changelog from an obsoleted encoding
like ISO-8859-1; you may for example use "iconv" like:
.
- $ iconv -f ISO-8859-1 -t UTF-8 NEWS.Debian > NEWS.Debian.new
+ $ iconv -f ISO-8859-1 -t UTF-8 NEWS.Debian > NEWS.Debian.new
$ mv NEWS.Debian.new NEWS.Debian
Tag: latest-debian-changelog-entry-without-new-date
Modified: trunk/checks/control-file.desc
===================================================================
--- trunk/checks/control-file.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/control-file.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -14,7 +14,7 @@
There are many ways to convert a control from an obsoleted encoding
like ISO-8859-1; you may for example use "iconv" like:
.
- $ iconv -f ISO-8859-1 -t UTF-8 control > control.new
+ $ iconv -f ISO-8859-1 -t UTF-8 control > control.new
$ mv control.new control
Tag: build-info-in-binary-control-file-section
Modified: trunk/checks/copyright-file.desc
===================================================================
--- trunk/checks/copyright-file.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/copyright-file.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -179,7 +179,7 @@
There are many ways to convert a copyright file from an obsoleted encoding
like ISO-8859-1; you may for example use "iconv" like:
.
- $ iconv -f ISO-8859-1 -t UTF-8 copyright > copyright.new
+ $ iconv -f ISO-8859-1 -t UTF-8 copyright > copyright.new
$ mv copyright.new copyright
Tag: copyright-contains-dh_make-todo-boilerplate
Modified: trunk/checks/debconf.desc
===================================================================
--- trunk/checks/debconf.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/debconf.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -180,7 +180,7 @@
.
Since error types were added after debconf-2.0, one cannot use the normal
debconf-2.0 alternative to allow for cdebconf or other implementations.
- Instead, use <tt>debconf (>= 1.4.69) | cdebconf (>= 0.39)</tt>.
+ Instead, use <tt>debconf (>= 1.4.69) | cdebconf (>= 0.39)</tt>.
.
All versions of debconf back to etch support error templates, but the
debconf released with sarge didn't, so this dependency is still helpful
Modified: trunk/checks/debhelper.desc
===================================================================
--- trunk/checks/debhelper.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/debhelper.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -21,7 +21,7 @@
Tag: package-lacks-versioned-build-depends-on-debhelper
Type: info
-Info: If a package sets debhelper's compatibility version to >= 5,
+Info: If a package sets debhelper's compatibility version to >= 5,
either via DH_COMPAT, or via debian/compat, or via dh_testversion
(which is deprecated), it should declare a versioned Build-Depends on
the needed version of debhelper.
@@ -91,7 +91,7 @@
Type: info
Info: The source package requests dh_python compatibility level 2 (or
higher) in <tt>debian/pycompat</tt> but doesn't depend on a new enough
- debhelper. A Build-Depends on debhelper (>= 5.0.37.2) is required for
+ debhelper. A Build-Depends on debhelper (>= 5.0.37.2) is required for
this support.
.
All versions of debhelper back to etch support this, but the debhelper
Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/files.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -29,9 +29,9 @@
installed into the old /usr/X11R6/lib/X11/fonts path may not be seen by
the X server.
.
- If the package uses imake, it must build-depend on xutils-dev (>=
+ If the package uses imake, it must build-depend on xutils-dev (>=
1:1.0.2-2) for the correct paths. If it uses dh_installxfonts to handle X
- font installation, it must build-depend on debhelper (>= 5.0.31).
+ font installation, it must build-depend on debhelper (>= 5.0.31).
Ref: policy 11.8.5
Tag: package-installs-file-to-usr-x11r6-bin
@@ -47,14 +47,14 @@
successfully. However, such a package will be left in an inconsistent
state and may orphan files when the compatibility link goes away.
.
- If the package uses imake, it must build-depend on xutils-dev (>=
+ If the package uses imake, it must build-depend on xutils-dev (>=
1:1.0.2-2) for the correct paths.
Ref: policy 11.8.7
Tag: file-in-usr-something-x11-without-pre-depends
Type: info
Info: Packages that install files into /usr/include/X11 or /usr/lib/X11
- should pre-depend on at least x11-common (>= 1:7.0.0). These directories
+ should pre-depend on at least x11-common (>= 1:7.0.0). These directories
used to be symlinks and installing files in them while they are still
symlinks will put files in the wrong locations and cause stranded files
and other problems. x11-common is responsible for converting the
@@ -73,7 +73,7 @@
.
Programs that use GNU autoconf and automake are usually easily configured
at compile time to use /usr/ instead of /usr/X11R6/. Packages that use
- imake must build-depend on xutils-dev (>= 1:1.0.2-2) for the correct
+ imake must build-depend on xutils-dev (>= 1:1.0.2-2) for the correct
paths.
Ref: policy 11.8.7
@@ -346,7 +346,8 @@
Tag: file-directly-in-usr-share-doc
Type: error
-Info: Documentation files have to be installed in <tt>/usr/share/doc/<i>pkg</i>
+Info: Documentation files have to be installed in
+ <tt>/usr/share/doc/<i>pkg</i></tt>.
Ref: policy 12.3
Tag: bad-owner-for-doc-file
@@ -526,7 +527,7 @@
Type: error
Ref: policy 11.8.6
Info: Packages that install files into the /etc/X11/Xresources/ directory must
- declare a conflict with xbase (<< 3.3.2.3a-2); if this is not done it is
+ declare a conflict with xbase (<< 3.3.2.3a-2); if this is not done it is
possible for the installing package to destroy a previously-existing
/etc/X11/Xresources file which had been customized by the system
administrator.
Modified: trunk/checks/lintian.desc
===================================================================
--- trunk/checks/lintian.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/lintian.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -70,7 +70,7 @@
.
<package>[ <type>]: <tag>[ <extra> ...]
.
- where <package> is the package name, the optional <type> parameter
- specifies the package type (binary is the default), <tag> is the tag to
- suppress, and <extra> is any specific information for the particular tag
- to suppress.
+ where <package> is the package name, the optional <type>
+ parameter specifies the package type (binary is the default), <tag>
+ is the tag to suppress, and <extra> is any specific information for
+ the particular tag to suppress.
Modified: trunk/checks/manpages.desc
===================================================================
--- trunk/checks/manpages.desc 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/checks/manpages.desc 2007-12-09 20:55:15 UTC (rev 1077)
@@ -25,7 +25,7 @@
For help with writing manual pages, refer to the Man-Page-HOWTO at
http://www.schweikhardt.net/man_page_howto.html, the examples created
by <tt>debmake</tt> or <tt>dh_make</tt>, or the
- <file>/usr/share/doc/man-db/examples</file> directory.
+ <tt>/usr/share/doc/man-db/examples</tt> directory.
If the package provides <tt>--help</tt> output, you might want to use
the <tt>help2man</tt> utility to generate a simple manual page.
Ref: policy 12.1
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/debian/changelog 2007-12-09 20:55:15 UTC (rev 1077)
@@ -3,6 +3,9 @@
The "it would be lovely if there were an actual desktop file standard"
release.
+ * checks/*.desc:
+ + [RA] Escape all literal angle brackets and fix unclosed and unknown
+ HTML tags. Based on a patch by Thijs Kinkhorst. (Closes: #455211)
* checks/field{.desc,}:
+ [FL] Add some checks for the Homepage field:
- warn about enclosing < and >
@@ -21,8 +24,12 @@
* debian/control:
+ [FL] Add liburi-perl to Depends for the Homepage checks.
- -- Russ Allbery <rra@debian.org> Sat, 08 Dec 2007 20:35:56 -0800
+ * testset/runtests:
+ + [RA] Check all tag descriptions for unknown or unclosed HTML tags
+ and for stray angle brackets.
+ -- Russ Allbery <rra@debian.org> Sun, 09 Dec 2007 12:54:51 -0800
+
lintian (1.23.40) unstable; urgency=low
The "Russ's brown paper bag bug" release.
Modified: trunk/testset/runtests
===================================================================
--- trunk/testset/runtests 2007-12-09 17:15:52 UTC (rev 1076)
+++ trunk/testset/runtests 2007-12-09 20:55:15 UTC (rev 1077)
@@ -138,8 +138,27 @@
print "E: test-has-no-info $i->{'tag'} in $desc_file\n";
$testok = 0;
}
- if (!exists($i->{'type'})
- && !exists($i->{'severity'})) {
+
+ # Check the tag info for unescaped <> or for unknown tags (which
+ # probably indicate the same thing).
+ my $info = $i->{'info'};
+ my @tags;
+ while ($info =~ s,<([^\s>]+)(?:\s+href=\"[^\"]+\")?>.*?</\1>,,s) {
+ push (@tags, $1);
+ }
+ my %known = map { $_ => 1 } qw(a em i tt);
+ my %seen;
+ @tags = grep { !$known{$_} && !$seen{$_}++ } @tags;
+ if (@tags) {
+ print "E: test-info-has-unknown-html-tags $i->{'tag'} @tags"
+ . " in $desc_file\n";
+ }
+ if ($info =~ /[<>]/) {
+ print "E: test-info-has-stray-angle-brackets $i->{'tag'}"
+ . " in $desc_file\n";
+ }
+
+ if (!exists($i->{'type'}) && !exists($i->{'severity'})) {
use Data::Dumper;
print Dumper $i;
print "E: test-has-no-type $i->{'tag'} in $desc_file\n";
Reply to: