[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r164 - in trunk: checks collection debian testset testset/binary/debian



Author: he
Date: 2004-04-15 23:55:21 +0200 (Thu, 15 Apr 2004)
New Revision: 164

Modified:
   trunk/checks/debdiff
   trunk/checks/debdiff.desc
   trunk/collection/diffstat
   trunk/debian/changelog
   trunk/testset/binary/debian/changelog
   trunk/testset/info_tags.binary
   trunk/testset/tags.binary
Log:
* checks/debdiff
  + [HE] Check for accidental native packaging. This is done by checking for
    a dash in the version number (though -0.\d+ and -0.\d+.\d+ are allowed
    for (binary) NMUs) and the existence of a .diff.gz. (Closes: #216327)

* collection/diffstat
  + [HE] The diff.gz file name does not include the the epoch, so strip it
    before trying to get the file.



Modified: trunk/checks/debdiff
===================================================================
--- trunk/checks/debdiff	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/checks/debdiff	2004-04-15 21:55:21 UTC (rev 164)
@@ -25,6 +25,16 @@
 my $pkg = shift;
 my $type = shift;
 
+open (VERSION, "fields/version") or fail("cannot open fields/version: $!");
+chomp(my $version = <VERSION>);
+close VERSION;
+$version =~ s/^\d://; #Remove epoch
+
+if ((not -f "${pkg}_${version}.diff.gz") and
+    ($version =~ /-/) and ($version !~ /-0\.\d+(?:\.\d+)?$/) ) {
+    tag_warn("native-package-with-dash-version");
+}
+
 open(STAT, "diffstat") or fail("cannot open diffstat file: $!");
 
 while (<STAT>) {

Modified: trunk/checks/debdiff.desc
===================================================================
--- trunk/checks/debdiff.desc	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/checks/debdiff.desc	2004-04-15 21:55:21 UTC (rev 164)
@@ -1,10 +1,10 @@
 Check-Script: debdiff
 Author: Richard Braakman <dark@xs4all.nl>
 Abbrev: dif
-Standards-Version: 3.2.0
+Standards-Version: 3.6.1
 Type: source
 Unpack-Level: 1
-Info: This script looks for .orig and .rej files in the Debian diff
+Info: This script checks the diff to the original source tarball of a debian package
 Needs-Info: diffstat
 
 Tag: patch-failure-file-in-diff
@@ -13,3 +13,13 @@
  it leaves certain files in the directory tree.  Lintian found such files
  in the Debian-diff for this source package.  This may indicate that the
  maintainer applied a patch that did not quite fit, and didn't notice.
+
+Tag: native-package-with-dash-version
+Type: warning
+Info: Native packaging should only be used if a piece of software was
+ written specifically to be turned into a Debian package. In this case,
+ the version number should not contain a debian revision part.
+ .
+ Native source packages are sometimes created by accident. In most cases
+ the reason is the location of the original source tarball. dpkg-source
+ searches for this in ../package_upstream-version.orig.tar.gz.

Modified: trunk/collection/diffstat
===================================================================
--- trunk/collection/diffstat	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/collection/diffstat	2004-04-15 21:55:21 UTC (rev 164)
@@ -38,6 +38,8 @@
 my $ver = <V>; chomp $ver;
 close V;
 
+$ver =~ s/^\d://; #Remove epoch for this
+
 my $diff_file = "${pkg}_${ver}.diff.gz";
 unless (-f $diff_file) {
 # we have to write an empty file so that the checks don't crap out. <sigh>

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/debian/changelog	2004-04-15 21:55:21 UTC (rev 164)
@@ -50,6 +50,10 @@
       patch by Denis Barbier <barbier@linuxfr.org>, thanks! (Closes: #233116)
     + [HE] Check if the translation of a Choices: field is empty, leading to
       skipped questions. (Closes: #149451)
+  * checks/debdiff
+    + [HE] Check for accidental native packaging. This is done by checking for
+      a dash in the version number (though -0.\d+ and -0.\d+.\d+ are allowed
+      for (binary) NMUs) and the existence of a .diff.gz. (Closes: #216327)
   * checks/debian-readme:
     + [HE] Add check for the debmake template email address. Patch by Steffen
       Moeller <moeller@pzr.uni-rostock.de>, thanks!
@@ -126,6 +130,10 @@
   * checks/standards-version:
     + [JvW] Also emit warning if standards version is 3.6.0, and not yet 3.6.1
 
+  * collection/diffstat
+    + [HE] The diff.gz file name does not include the the epoch, so strip it
+      before trying to get the file.
+
   * unpack/list-binpkg:
     + [HE] Try to open Packages.gz if no Packages file can be found. Fix
       based on patch by Robert Lemmen <robertle@semistable.com>, thanks!

Modified: trunk/testset/binary/debian/changelog
===================================================================
--- trunk/testset/binary/debian/changelog	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/testset/binary/debian/changelog	2004-04-15 21:55:21 UTC (rev 164)
@@ -1,3 +1,10 @@
+binary (4-1) unstable; urgency=low
+
+  * Weird version number for the new check for accidents with native
+    packaging.
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Thu, 15 Apr 2004 23:33:51 +0200
+
 binary (4) unstable; urgency=low
 
   * Add big file to /usr/share to trigger the big-usr-share check

Modified: trunk/testset/info_tags.binary
===================================================================
--- trunk/testset/info_tags.binary	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/testset/info_tags.binary	2004-04-15 21:55:21 UTC (rev 164)
@@ -9,6 +9,17 @@
 N:   Standards-Version control field. However, please remember to update
 N:   this field next time you upload the package.
 N:
+W: binary source: native-package-with-dash-version
+N:
+N:   Native packaging should only be used if a piece of software was
+N:   written specifically to be turned into a Debian package. In this case,
+N:   the version number should not contain a debian revision part.
+N:   
+N:   Native source packages are sometimes created by accident. In most
+N:   cases the reason is the location of the original source tarball.
+N:   dpkg-source searches for this in
+N:   ../package_upstream-version.orig.tar.gz.
+N:
 E: binary: binary-without-manpage hello
 N:
 N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin, or /usr/games, must
@@ -133,7 +144,7 @@
 N:   This may be intentional, but it's probably a typo that will make menu
 N:   ignore the line.
 N:
-W: binary: menu-command-not-in-package /usr/lib/menu/binary:6
+W: binary: menu-command-not-in-package /usr/lib/menu/binary:6 /imnothere
 E: binary: unstripped-binary-or-object ./usr/bin/hello
 N:
 N:   The package installs an unstripped binary or object file.
@@ -163,3 +174,11 @@
 N:   
 N:   Refer to Policy Manual, section 12.7 for details.
 N:
+E: binary: debian-changelog-file-missing
+N:
+N:   Each Debian package (which provides a /usr/share/doc/<pkg> directory)
+N:   has to install a Debian changelog file
+N:   /usr/share/doc/<pkg>/changelog.Debian.gz
+N:   
+N:   Refer to Policy Manual, section 12.7 for details.
+N:

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary	2004-04-15 21:24:48 UTC (rev 163)
+++ trunk/testset/tags.binary	2004-04-15 21:55:21 UTC (rev 164)
@@ -1,4 +1,5 @@
 W: binary source: ancient-standards-version 3.2.1
+W: binary source: native-package-with-dash-version
 E: binary: binary-without-manpage hello
 E: binary: binary-without-manpage hello-static
 E: binary: binary-without-manpage hello.static
@@ -18,7 +19,8 @@
 E: binary: non-wm-in-windowmanager-menu-section x11 /usr/lib/menu/binary:4
 E: binary: su-to-root-with-usr-bin /usr/lib/menu/binary:5
 W: binary: menu-item-needs-tag-has-unknown-value wm /usr/lib/menu/binary:5
-W: binary: menu-command-not-in-package /usr/lib/menu/binary:6
+W: binary: menu-command-not-in-package /usr/lib/menu/binary:6 /imnothere
 E: binary: unstripped-binary-or-object ./usr/bin/hello
 E: binary: statically-linked-binary ./usr/bin/static-hello
 E: binary: changelog-file-not-compressed changelog
+E: binary: debian-changelog-file-missing



Reply to: