[SCM] Debian package checker branch, master, updated. 09f3e94e3d421ea39071dfedf7e3dc87294f77d5
The following commit has been merged in the master branch:
commit 09f3e94e3d421ea39071dfedf7e3dc87294f77d5
Author: Russ Allbery <rra@debian.org>
Date: Sun Jul 13 16:44:53 2008 -0700
* checks/standards-version{.desc,}:
+ [RA] Warn for packages declaring a standards version released after
the date of the most recent changelog entry. Based on a patch by
Raphael Geissert.
diff --git a/checks/standards-version b/checks/standards-version
index 38217c9..56ab759 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -22,6 +22,7 @@ package Lintian::standards_version;
use strict;
use Date::Parse qw(str2time);
+use POSIX qw(strftime);
use Parse::DebianChangelog;
use Tags;
@@ -31,38 +32,38 @@ use Util;
# their dates of publication.
my @standards =
([ '3.8.0' => '2008-06-04' ],
- [ '3.7.3' => '2007-12-02' ],
+ [ '3.7.3' => '2007-12-03' ],
[ '3.7.2' => '2006-05-03' ],
[ '3.7.1' => '2006-05-03' ],
- [ '3.7.0' => '2006-04-25' ],
- [ '3.6.2' => '2005-06-16' ],
+ [ '3.7.0' => '2006-04-26' ],
+ [ '3.6.2' => '2005-06-17' ],
[ '3.6.1' => '2003-08-19' ],
[ '3.6.0' => '2003-07-09' ],
[ '3.5.10' => '2003-05-10' ],
[ '3.5.9' => '2003-03-07' ],
[ '3.5.8' => '2002-11-15' ],
[ '3.5.7' => '2002-08-31' ],
- [ '3.5.6' => '2001-07-24' ],
- [ '3.5.5' => '2001-07-01' ],
+ [ '3.5.6' => '2001-07-25' ],
+ [ '3.5.5' => '2001-06-01' ],
[ '3.5.4' => '2001-04-28' ],
[ '3.5.3' => '2001-04-15' ],
[ '3.5.2' => '2001-02-18' ],
[ '3.5.1' => '2001-02-15' ],
- [ '3.5.0' => '2001-01-28' ],
+ [ '3.5.0' => '2001-01-29' ],
[ '3.2.1' => '2000-08-24' ],
[ '3.2.0' => '2000-07-30' ],
[ '3.1.1' => '1999-11-16' ],
[ '3.1.0' => '1999-11-04' ],
[ '3.0.1' => '1999-07-15' ],
- [ '3.0.0' => '1999-06-30' ],
+ [ '3.0.0' => '1999-07-01' ],
[ '2.5.1' => '1999-04-27' ],
[ '2.5.0' => '1998-10-29' ],
[ '2.4.1' => '1998-04-14' ],
[ '2.4.0' => '1998-01-30' ],
- [ '2.3.0' => '1997-09-02' ],
+ [ '2.3.0' => '1997-09-01' ],
[ '2.2.0' => '1997-07-13' ],
[ '2.1.3' => '1997-03-15' ],
- [ '2.1.2' => '1996-11-22' ],
+ [ '2.1.2' => '1996-11-23' ],
[ '2.1.1' => '1996-09-12' ],
[ '2.1.0' => '1996-09-01' ],
[ '2.0.1' => '1996-08-31' ],
@@ -98,6 +99,25 @@ unless ($version =~ m/^\s*(\d+\.\d+\.\d+)(?:\.\d+)?\s*$/) {
my $stdver = $1;
my ($major, $minor, $patch) = $stdver =~ m/^(\d+)\.(\d+)\.(\d+)/;
+# To do some date checking, we have to get the package date from the changelog
+# file. If we can't find the changelog file, assume that the package was
+# released today, since that activates the most tags.
+my $changes = $info->changelog;
+my $pkgdate;
+if (defined $changes) {
+ my ($entry) = $changes->data;
+ $pkgdate = $entry ? $entry->Timestamp : 0;
+} else {
+ $pkgdate = time;
+}
+
+# Check for packages dated prior to the date of release of the standards
+# version with which they claim to comply.
+if ($standards{$stdver} && str2time($standards{$stdver}, '+0000') > $pkgdate) {
+ my $pretty = strftime ('%Y-%m-%d', gmtime $pkgdate);
+ tag 'timewarp-standards-version', "($pretty < $standards{$stdver})";
+}
+
my $tag = "$version (current is $current)";
if (not exists $standards{$stdver}) {
# Unknown standards version. Perhaps newer?
@@ -127,7 +147,7 @@ if (not exists $standards{$stdver}) {
last;
}
}
- if (str2time($obsdate) + (60 * 60 * 24 * 365 * 2) < time) {
+ if (str2time($obsdate, '+0000') + (60 * 60 * 24 * 365 * 2) < time) {
tag 'ancient-standards-version', $tag;
} else {
# We have to get the package date from the changelog file. If we
@@ -141,7 +161,7 @@ if (not exists $standards{$stdver}) {
my $timestamp = $entry ? $entry->Timestamp : 0;
for my $standard (@standards) {
last if $standard->[0] eq $stdver;
- if (str2time($standard->[1]) < $timestamp) {
+ if (str2time($standard->[1], '+0000') < $timestamp) {
tag 'out-of-date-standards-version', $tag;
last;
}
diff --git a/checks/standards-version.desc b/checks/standards-version.desc
index 7733e8a..9b259e9 100644
--- a/checks/standards-version.desc
+++ b/checks/standards-version.desc
@@ -51,3 +51,10 @@ Info: The source package refers to a Standards-Version older than the one
have to re-upload the package just to adjust the Standards-Version
control field. However, please remember to update this field next time
you upload the package.
+
+Tag: timewarp-standards-version
+Type: warning
+Info: The source package refers to a Standards-Version that was released
+ after the date of the most recent <tt>debian/changelog</tt> entry.
+ Perhaps you forgot to update the timestamp in <tt>debian/changelog</tt>
+ before building the package?
diff --git a/debian/changelog b/debian/changelog
index a6674bd..d3fd1a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -84,6 +84,9 @@ lintian (1.24.2) unstable; urgency=low
+ [RA] Base the two-year clock for ancient-standards-version on when
the Policy version was superseded, not when it was issued. Thanks,
Scott Kitterman. (Closes: #487780)
+ + [RA] Warn for packages declaring a standards version released after
+ the date of the most recent changelog entry. Based on a patch by
+ Raphael Geissert.
* checks/watch-file{,.desc}:
+ [FL] Check for more Debian specific strings in version
number. Issue an info tag if the watch file uses
diff --git a/testset/copyright/debian/changelog b/testset/copyright/debian/changelog
index 1f5755e..47c178e 100644
--- a/testset/copyright/debian/changelog
+++ b/testset/copyright/debian/changelog
@@ -14,4 +14,4 @@ copyright (1) unstable; urgency=emergency
- old-style-copyright-file
- FSSTND-dir-in-usr
- -- Tobias Toedter <t.toedter@gmx.net> Tue, 25 Mar 2008 17:22:00 +0100
+ -- Tobias Toedter <t.toedter@gmx.net> Sun, 13 Jul 2008 16:32:25 -0700
diff --git a/testset/debconf/debian/changelog b/testset/debconf/debian/changelog
index bf1a11d..2569799 100644
--- a/testset/debconf/debian/changelog
+++ b/testset/debconf/debian/changelog
@@ -3,4 +3,4 @@ debconf (1~rc1) unstable; urgency=low
* Initial Release
* Changelog line with exactly 80 characters which tests the line-too-long tag.
- -- Lintian Maintainers <lintian@packages.debian.org> Sat, 13 Nov 2004 22:45:05 +0100
+ -- Lintian Maintainers <lintian@packages.debian.org> Wed, 3 May 2006 18:07:19 -0500
diff --git a/testset/description/debian/changelog b/testset/description/debian/changelog
index 410a68e..d191d84 100644
--- a/testset/description/debian/changelog
+++ b/testset/description/debian/changelog
@@ -5,7 +5,7 @@ description (1.1-1) unstable; urgency=low
This is not yet recognized by Lintian, so the testset currently
fails.
- -- Tobias Toedter <toddy@debian.org> Wed, 23 Apr 2008 13:12:32 +0200
+ -- Tobias Toedter <toddy@debian.org> Sun, 13 Jul 2008 16:30:36 -0700
description (1.0-1) unstable; urgency=low
diff --git a/testset/dh7-test/debian/changelog b/testset/dh7-test/debian/changelog
index e6bcbbe..0281294 100644
--- a/testset/dh7-test/debian/changelog
+++ b/testset/dh7-test/debian/changelog
@@ -2,5 +2,5 @@ dh7-test (1.dfsg-1) unstable; urgency=low
* Initial release
- -- Frank Lichtenheld <djpig@debian.org> Thu, 4 Aug 2005 23:09:00 +0200
+ -- Frank Lichtenheld <djpig@debian.org> Wed, 04 Jun 2008 15:53:27 -0700
diff --git a/testset/diffs/debian/changelog b/testset/diffs/debian/changelog
index be9d5e9..e8eee64 100644
--- a/testset/diffs/debian/changelog
+++ b/testset/diffs/debian/changelog
@@ -12,4 +12,4 @@ diffs (1-1~lint1) unstable; urgency=low
(Closes Bug# 123893)
(Closes #1239124)
- -- Lintian Maintainers <lintian-maint@debian.org> Wed, 27 Nov 2002 14:15:00 +0100
+ -- Lintian Maintainers <lintian-maint@debian.org> Thu, 6 Mar 2003 18:00:00 -0600
diff --git a/testset/relations/debian/changelog b/testset/relations/debian/changelog
index 10227d7..ef46606 100644
--- a/testset/relations/debian/changelog
+++ b/testset/relations/debian/changelog
@@ -3,7 +3,7 @@ relations (5) unstable; urgency=low
* I'm orphaning this package -- I'm sick of it: it's completely broken,
lintian complains all over the place.
- -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 02 Dec 2007 00:00:00 -0800
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 02 Dec 2007 15:59:59 -0800
relations (4) unstable; urgency=low
diff --git a/testset/tags.debug b/testset/tags.debug
index 134cfcb..1ad1d02 100644
--- a/testset/tags.debug
+++ b/testset/tags.debug
@@ -23,6 +23,7 @@ W: debug source: ancient-standards-version 3.7.0 (current is 3.8.0)
W: debug source: changelog-should-not-mention-nmu
W: debug source: debhelper-script-needs-versioned-build-depends dh_icons (>= 5.0.51~)
W: debug source: debian-rules-sets-DH_COMPAT line 5
+W: debug source: timewarp-standards-version (2006-03-05 < 2006-04-26)
W: hello: binary-without-manpage usr/bin/hello
W: hello: binary-without-manpage usr/bin/hello.dbg
W: libhello0-dbg: dbg-package-missing-depends libhello0
diff --git a/testset/tags.relations b/testset/tags.relations
index 17623fa..78aefeb 100644
--- a/testset/tags.relations
+++ b/testset/tags.relations
@@ -51,6 +51,7 @@ W: relations source: stronger-dependency-implies-weaker relations depends -> rec
W: relations source: stronger-dependency-implies-weaker relations pre-depends -> depends gawk | awk
W: relations source: stronger-dependency-implies-weaker relations recommends -> suggests some-other-package
W: relations source: stronger-dependency-implies-weaker relations-multiple-libs depends -> recommends ${shlibs:Depends}
+W: relations source: timewarp-standards-version (2007-12-02 < 2007-12-03)
W: relations source: virtual-package-depends-without-real-package-depends build-depends: mail-transport-agent
W: relations-multiple-libs: bad-homepage lintian.debian.org
W: relations-multiple-libs: breaks-without-version libpng2
--
Debian package checker
Reply to: