[SCM] Debian package checker branch, master, updated. 2.5.0-41-gc990d76
The following commit has been merged in the master branch:
commit c990d765cbf7a6bbb9504c801d4fe3127ffcc850
Author: Niels Thykier <niels@thykier.net>
Date: Thu Jun 9 21:36:46 2011 +0200
Made Lintian always verify checksums in changes files
This also deprecated --checksums (and aliases).
diff --git a/checks/changes-file b/checks/changes-file
index 49e8ee2..450aa52 100644
--- a/checks/changes-file
+++ b/checks/changes-file
@@ -26,8 +26,6 @@ use Util;
use Lintian::Tags qw(tag);
use Lintian::Check qw(check_maintainer);
-our $CHECK_CHECKSUMS = $main::check_checksums;
-
sub run {
my $pkg = shift;
@@ -100,6 +98,8 @@ if (defined $info->field('distribution')) {
}
my $files = $info->files;
+ my $path = readlink('changes');
+ $path =~ s#/[^/]+$##;
foreach my $file (keys %$files) {
my $file_info = $files->{$file};
@@ -121,8 +121,6 @@ if (defined $info->field('distribution')) {
}
# check size
- my $path = readlink('changes');
- $path =~ s#/[^/]+$##;
my $filename = "$path/$file";
my $size = -s $filename;
@@ -132,15 +130,13 @@ if (defined $info->field('distribution')) {
}
# check checksums
- if ($CHECK_CHECKSUMS or $file =~ m/\.dsc$/o) {
- foreach my $alg (qw(md5 sha1 sha256)) {
- next unless exists $file_info->{checksums}{$alg};
+ foreach my $alg (qw(md5 sha1 sha256)) {
+ next unless exists $file_info->{checksums}{$alg};
- my $real_checksum = get_file_checksum($alg, $filename);
+ my $real_checksum = get_file_checksum($alg, $filename);
- if ($real_checksum ne $file_info->{checksums}{$alg}{sum}) {
- tag 'checksum-mismatch-in-changes-file', $alg, $file;
- }
+ if ($real_checksum ne $file_info->{checksums}{$alg}{sum}) {
+ tag 'checksum-mismatch-in-changes-file', $alg, $file;
}
}
}
diff --git a/debian/changelog b/debian/changelog
index aa517bc..196b0eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ lintian (2.5.1) UNRELEASED; urgency=low
* checks/debhelper{,.desc}:
+ [NT] Recognise that dh_python and dh_pycentral are now obsolete.
(Closes: #496902, #541978)
+ * checks/changes-file:
+ + [NT] Always verify the checksums of changes-files.
* checks/copyright-file:
+ [NT] Extended current dh_make template checks. Thanks to
Nelson A. de Oliveira for the report and investigative work.
@@ -86,12 +88,19 @@ lintian (2.5.1) UNRELEASED; urgency=low
(Closes: #460350)
+ [NT] Added --no-cfg option that can be specified if no config
file should be read.
+ + [NT] Deprecated --checksums (also known as --md5sums and -m).
+ Lintian will now always verify the checksums in changes files.
+ The options will be accepted with a warning for now, but may
+ be removed in a later release. (Closes: #629453)
* lib/Lintian/Tags.pm:
+ [NT] Fixed a flaw in logic that gave incorrect results for
architecture dependent overrides. Thanks to Andreas Beckmann for
the report and the patch. (Closes: #626587)
+ * man/lintian.pod.in:
+ + [NT] Mentioned that --checksums and aliases are deprecated.
+
* unpack/list-srcpkg:
+ [ADB] Don't rely on the order of fields in the Sources file. The
files produced by the Debian archive no longer follow the order
diff --git a/frontend/lintian b/frontend/lintian
index 9034733..13a729b 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -48,7 +48,6 @@ my $debug = 0;
my $check_everything = 0; #flag for -a|--all switch
my $lintian_info = 0; #flag for -i|--info switch
our $ftpmaster_tags = 0; #flag for -F|--ftp-master-rejects switch
-my $check_checksums = 0; #flag for -m|--md5sums|--checksums switch
my $allow_root = 0; #flag for --allow-root switch
my $keep_lab = 0; #flag for --keep-lab switch
my $packages_file = 0; #string for the -p option
@@ -162,7 +161,6 @@ Behaviour options:
-I, --display-info display "I:" tags (normally suppressed)
--keep-lab keep lab after run, even if temporary
-L, --display-level display tags with the specified level
- -m, --md5sums, --checksums check checksums when processing a .changes file
-o, --no-override ignore overrides
--pedantic display "P:" tags (normally suppressed)
--show-overrides output tags that have been overriden
@@ -352,6 +350,12 @@ sub record_display_source {
$display_source{$_[1]} = 1;
}
+# Process deprecated flags
+sub deprecated{
+ print STDERR "warning: $_[0] is deprecated and may be removed\n";
+ print STDERR "in a future Lintian release.\n";
+}
+
# Process display-info and display-level options in cfg files
# - dies if display-info and display-level are used together
# - adds the relevant display level unless the command-line
@@ -415,7 +419,7 @@ my %opthash = ( # ------------------ actions
'show-overrides' => \$opt{'show-overrides'},
'color=s' => \$opt{'color'},
'unpack-info|U=s' => \&record_unpack_info,
- 'checksums|md5sums|m' => \$check_checksums,
+ 'checksums|md5sums|m' => \&deprecated,
'allow-root' => \$allow_root,
'fail-on-warnings' => \$opt{'fail-on-warnings'},
'keep-lab' => \$keep_lab,
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index f63890c..069523e 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -248,9 +248,11 @@ configuration file.
=item B<-m>, B<--md5sums>, B<--checksums>
-Check checksums when processing a .changes file. Normally, Lintian
-only checks the checksums for .dsc files when processing a .changes
-file.
+This has become redundant in lintian 2.5.1 and may be removed in a
+later release.
+
+This option used to control whether Lintian would verify checksums
+in changes files. As of 2.5.1, Lintian always does this.
=item B<-o>, B<--no-override>
--
Debian package checker
Reply to: