...
 
Commits (7)
......@@ -67,7 +67,7 @@ Ref: policy 12.7
Tag: wrong-name-for-changelog-of-native-package
Severity: normal
Certainty: certain
Info: The changelog file of a native Debian package (i.e., if there is
Info: The changelog file of a native Debian package (ie. if there is
no upstream source) should usually be installed as
/usr/share/doc/<i>pkg</i>/changelog.gz
Ref: policy 12.7
......
......@@ -455,7 +455,7 @@ Certainty: possible
Info: The source tarball contains prebuilt Sphinx documentation.
This is usually left by mistake when generating the tarball without
first cleaning the source directory. You may want to report this as
an upstream bug, if there is no sign that this was intended.
an upstream bug if there is no sign that this was intended.
.
It is preferable to rebuild documentation directly from source.
......@@ -465,7 +465,7 @@ Certainty: possible
Info: The source tarball contains prebuilt pandoc documentation.
This is usually left by mistake when generating the tarball without
first cleaning the source directory. You may want to report this as
an upstream bug, if there is no sign that this was intended.
an upstream bug if there is no sign that this was intended.
.
It is preferable to rebuild documentation directly from source.
......@@ -475,7 +475,7 @@ Certainty: possible
Info: The source tarball contains prebuilt doxygen documentation.
This is usually left by mistake when generating the tarball without
first cleaning the source directory. You may want to report this as
an upstream bug, if there is no sign that this was intended.
an upstream bug if there is no sign that this was intended.
.
It is preferable to rebuild documentation directly from source.
......
......@@ -402,8 +402,8 @@ Info: The listed target in debian/rules command is a likely misspelling.
silently not being executed by <tt>make</tt>.
.
Implementation detail: The typo is detected by using "Levenshtein
edit distance". Therefore, if the typo involve several characters,
Lintian may not detect it.
edit distance" so if the typo involve several characters Lintian may
not detect it.
Tag: maintscript-includes-maint-script-parameters
Severity: normal
......
......@@ -402,7 +402,7 @@ Info: The "Homepage:" field in this package's control file does not
.
This tag is also triggered if the scheme is not known by Lintian.
.
Please file a bug against Lintian, if this tag is triggered for a
Please file a bug against Lintian if this tag is triggered for a
valid homepage URL.
Tag: no-homepage-field
......@@ -506,7 +506,7 @@ Tag: package-relation-with-self
Severity: normal
Certainty: possible
Info: The package declares a relationship with itself. This is not very
useful, except in the case of a package Conflicting with itself, if its
useful except in the case of a package Conflicting with itself if its
package name doubles as a virtual package.
Tag: bad-relation
......@@ -849,7 +849,7 @@ Info: This package declares a Breaks relationship with another package
all versions predating a fix. If the two packages can never be installed
at the same time, Conflicts should normally be used instead.
.
Note this tag can also be issued, if a package has been split into two
Note this tag can also be issued if a package has been split into two
completely new ones. In this case, this package is missing a Replaces
on the old package.
......
......@@ -171,7 +171,7 @@ Info: The package installs a directory in <tt>/usr/local/...</tt> which is
If you want to provide an empty directory in <tt>/usr/local</tt> for
convenience of the local system administrator, please follow the rules
in the policy manual (section 9.1.2), i.e., create the directories in
the postinst script but don't fail if this isn't possible (e.g., if
the postinst script but don't fail if this isn't possible (e.g. if
<tt>/usr/local</tt> is mounted read-only).
Ref: policy 9.1.2
......@@ -1095,7 +1095,7 @@ Info: This package creates a potential privacy breach by fetching data
from an external website at runtime. Please remove these scripts or
external HTML resources.
.
Instead you can use the Debian package indicated in the hint, if it is
Instead you can use the Debian package indicated in the hint if it is
compatible.
Tag: privacy-breach-google-adsense
......
......@@ -3,7 +3,7 @@ Author: Christian Schwarz <schwarz@debian.org>
Abbrev: md5
Type: binary
Needs-Info: md5sums, bin-pkg-control, unpacked
Info: This script checks if md5sum control files are valid, if they are
Info: This script checks if md5sum control files are valid if they are
provided by a binary package.
Tag: no-md5sums-control-file
......@@ -33,7 +33,7 @@ Certainty: certain
Info: The md5sum listed for the file does not match the actual file
contents.
.
Usually, this error occurs during the package build process, if the
Usually, this error occurs during the package build process if the
<tt>debian/tmp/</tt> directory is touched after <tt>dh_md5sums</tt>
is run.
.
......@@ -46,7 +46,7 @@ Certainty: certain
Info: The md5sums control file lists a file which is not included in the
package.
.
Usually, this error occurs during the package build process, if the
Usually, this error occurs during the package build process if the
<tt>debian/tmp/</tt> directory is touched after <tt>dh_md5sums</tt>
is run.
......@@ -56,6 +56,6 @@ Certainty: certain
Info: The package contains a file which isn't listed in the md5sums control
file.
.
Usually, this error occurs during the package build process, if the
Usually, this error occurs during the package build process if the
<tt>debian/tmp/</tt> directory is touched after <tt>dh_md5sums</tt>
is run.
......@@ -51,8 +51,8 @@ Tag: maintainer-upload-has-incorrect-version-number
Severity: normal
Certainty: certain
Info: A maintainer upload should have a Debian revision without dots.
Revisions with dots are reserved for Non-Maintainer Uploads (NMU's), if you
do a maintainer-upload with dots, a potential NMU'er has problems choosing a
Revisions with dots are reserved for Non-Maintainer Uploads (NMUs). If you
do a maintainer-upload with dots a potential NMU'er has problems choosing a
correct version number.
Tag: changelog-should-mention-qa
......
......@@ -426,7 +426,7 @@ Info: The dependency_libs field in the .la file has not been cleared. It has
A non-empty dependency_libs field will also stall the Multi-Arch
conversion.
.
The .la file in itself may be useful, if the library is loaded dynamically
The .la file in itself may be useful if the library is loaded dynamically
via libltdl.
Ref: https://wiki.debian.org/ReleaseGoals/LAFileRemoval,
https://lists.debian.org/debian-devel/2011/05/msg01003.html,
......
......@@ -102,7 +102,7 @@ Ref: https://wiki.debian.org/Teams/pkg-systemd/Packaging
Info: The maintainer script calls systemctl directly. Actions such as enabling
a unit file should be done using <tt>deb-systemd-helper</tt> so that they work
on machines with or without systemd. Starting a service should be done via
<tt>invoke-rc.d</tt>, if the service has a corresponding sysvinit script, or
<tt>invoke-rc.d</tt> if the service has a corresponding sysvinit script or
<tt>deb-systemd-invoke</tt> if it does not.
.
If you are using debhelper, please use the <tt>systemd</tt> debhelper
......
......@@ -29,7 +29,7 @@ Certainty: certain
Ref: autodep8(1)
Info: The specified autopkgtest control file is considered obsolete.
.
Before autodep8 version 0.17 and autopkgtest version 5.7, if a
Before autodep8 version 0.17 and autopkgtest version 5.7 if a
maintainer wished to add tests to the set of tests generated
by autodep8 they provided those tests in a file named
<tt>debian/tests/control.autodep8</tt>.
......@@ -174,7 +174,7 @@ Info: This package does not declare a test suite.
package's dependencies have a new version and check whether that update
causes problems for your package.
.
In addition, since May 2018 such tests now influence migration from
In addition, since May 2018 these tests now influence migration from
unstable to testing:
.
https://lists.debian.org/debian-devel-announce/2018/05/msg00001.html
......
......@@ -10,7 +10,7 @@ Certainty: possible
Info: The package has a trigger that Lintian does not recognise in its
control file.
.
The package may be uninstallable, if dpkg does not support the trigger.
The package may be uninstallable if dpkg does not support the trigger.
.
If this is a new type of trigger, then Lintian may simply be out of date.
Please verify if the latest version of Lintian knows of the trigger, or file
......
......@@ -5,7 +5,7 @@ WORKDIR="$ADTTMP/$(basename $0)"
export LINTIAN_TEST_INSTALLED=yes
t/bin/build-test-packages
t/bin/build-test-packages --work-dir="$WORKDIR"
t/bin/runtests --unattended --keep-going --work-dir="$WORKDIR" --onlyrun="suite:tags"
......
......@@ -80,6 +80,11 @@ use constant NEWLINE => qq{\n};
use constant YES => q{yes};
use constant NO => q{no};
# turn off the @@-style headers in Text::Diff
no warnings 'redefine';
sub Text::Diff::Unified::file_header { return EMPTY; }
sub Text::Diff::Unified::hunk_header { return EMPTY; }
=head1 FUNCTIONS
=over 4
......
......@@ -396,6 +396,10 @@ if (-t STDOUT && !$unattended) {
die "Cannot run tagadjust for $testpath"
if system('tagadjust', '-i', $diffpath, $tagspath);
# also copy the new tags to workpath; no need to rebuild
die "Cannot copy updated tags to $workpath"
if system('cp', $tagspath, "$workpath/tags");
}
}
}
......
......@@ -51,7 +51,6 @@ BEGIN {
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Profile;
use Test::Lintian::Output::Universal qw(parse_line order);
use constant EMPTY => q{};
......@@ -85,12 +84,7 @@ my ($diffpath, $tagspath) = @ARGV;
my @difflines = path($diffpath)->lines_utf8;
chomp @difflines;
my $extractpath = Path::Tiny->tempfile;
die "Cannot execute tagextract on $tagspath: $!"
if
system('t/bin/tagextract', '-f', 'EWI', $tagspath, $extractpath->stringify);
my @tagslines = $extractpath->lines_utf8;
my @tagslines = path($tagspath)->lines_utf8;
chomp @tagslines;
my $changed;
......@@ -138,42 +132,13 @@ foreach my $line (@difflines) {
exit unless $changed;
my $profile = Lintian::Profile->new(undef, [$ENV{LINTIAN_ROOT}]);
# also sort output into preferred order
my $joined = EMPTY;
# do not sort until all tag specifications are kept in sorted order
#$joined .= $_ . NEWLINE for reverse sort { order($a) cmp order($b) } @tagslines;
$joined .= pretty2ewi($profile, $_) . NEWLINE for @tagslines;
$joined .= $_ . NEWLINE for reverse sort { order($a) cmp order($b) } @tagslines;
path($tagspath)->spew_utf8($joined);
exit;
sub pretty2ewi {
my ($profile, $line) = @_;
return EMPTY unless defined $line;
my ($package, $type, $name, $details)= parse_line($line);
my $taginfo = $profile->get_tag($name);
die "Cannot find tag $name"
unless $taginfo;
my $letter = $taginfo->code;
$letter = 'X' if $taginfo->experimental;
my $string = $letter . COLON . SPACE . $package;
$string .= SPACE . $type
unless $type eq 'binary';
$string .= COLON . SPACE . $name;
$string .= SPACE . $details
if length $details;
return $string;
}
sub usage {
print <<"END";
Usage: $0 -i <tagdiff-file> <tags-file>
......
#!/usr/bin/perl
# Copyright © 2019 Felix Lechner
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, you can find it on the World Wide
# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
# The harness for Lintian's test suite. For detailed information on
# the test suite layout and naming conventions, see t/tests/README.
# For more information about running tests, see
# doc/tutorial/Lintian/Tutorial/TestSuite.pod
#
use strict;
use warnings;
use autodie;
use v5.10;
use Cwd;
use Getopt::Long;
use List::Util qw(all);
use Path::Tiny;
use Term::ANSIColor;
BEGIN {
$ENV{'LINTIAN_TEST_INSTALLED'} = 'no'
unless exists $ENV{'LINTIAN_TEST_INSTALLED'};
my $cwd = Cwd::getcwd();
if ($ENV{'LINTIAN_TEST_INSTALLED'} eq 'yes') {
$ENV{'LINTIAN_ROOT'} = '/usr/share/lintian';
} else {
$ENV{'LINTIAN_ROOT'} = $cwd;
}
}
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Test::Lintian::Output::Universal qw(parse_line order);
use constant EMPTY => q{};
use constant SPACE => q{ };
use constant COLON => q{:};
use constant LPARENS => q{(};
use constant RPARENS => q{)};
use constant NEWLINE => qq{\n};
# options
my $interactive;
Getopt::Long::Configure;
unless (
Getopt::Long::GetOptions(
'help|h' => sub {usage(); exit;},
)
) {
usage();
die;
}
# check arguments and options
die "Please use -h for usage information.\n"
if scalar @ARGV != 1;
# get arguments
my ($tagspath) = @ARGV;
my @tagslines = path($tagspath)->lines_utf8;
chomp @tagslines;
my $joined = EMPTY;
$joined .= $_ . NEWLINE for reverse sort { order($a) cmp order($b) } @tagslines;
path($tagspath)->spew_utf8($joined);
exit;
sub usage {
print <<"END";
Usage: $0 <tagfile>
Sorts tagfile in the order preferred for universal tags.
END
return;
}
# Local Variables:
# indent-tabs-mode: nil
# cperl-indent-level: 4
# End:
# vim: syntax=perl sw=4 sts=4 sr et