[SCM] Debian package checker branch, master, updated. 2.3.3-45-g5eb50bf
The following commit has been merged in the master branch:
commit 3ce5911d688711674ace5b16ff4eb4c2b27f69c6
Author: Russ Allbery <rra@debian.org>
Date: Sat Mar 20 19:01:30 2010 -0700
Coding style and related cleanups for debian-source-dir
Document the new check script in lintian.1, untabify the source file,
add error checking to collection/debfiles, and rephrase the
descriptions of the new tags somewhat. Add a changelog entry.
diff --git a/checks/debian-source-dir b/checks/debian-source-dir
index c07b837..87e8617 100644
--- a/checks/debian-source-dir
+++ b/checks/debian-source-dir
@@ -24,22 +24,11 @@ use strict;
use Lintian::Data;
use Lintian::Tags qw(tag);
-our %KNOWN_FORMATS = (
- "1.0" => 1,
- "2.0" => 1,
- "3.0 (quilt)" => 1,
- "3.0 (native)" => 1,
- "3.0 (git)" => 1,
- "3.0 (bzr)" => 1,
-);
+our %KNOWN_FORMATS = map { $_ => 1 }
+ ('1.0', '2.0', '3.0 (quilt)', '3.0 (native)', '3.0 (git)', '3.0 (bzr)');
-our %KNOWN_FILES = (
- "format" => 1,
- "include-binaries" => 1,
- "lintian-overrides" => 1,
- "options" => 1,
- "patch-header" => 1,
-);
+our %KNOWN_FILES = map { $_ => 1 }
+ qw(format include-binaries lintian-overrides options patch-header);
sub run {
@@ -49,7 +38,7 @@ my $info = shift;
if (-e "debfiles/source/format") {
open(FORMAT, "<", "debfiles/source/format") or
- fail("cannot read debian/source/format: $!");
+ fail("cannot read debian/source/format: $!");
my $format = <FORMAT>;
chomp $format;
tag "unknown-source-format", $format unless $KNOWN_FORMATS{$format};
@@ -62,9 +51,9 @@ if (-d "debfiles/source") {
opendir(DEBSRC, "debfiles/source") or fail("cannot opendir debian/source/: $!");
my $file;
while ($file = readdir(DEBSRC)) {
- next if $file eq "." or $file eq "..";
- tag "unknown-file-in-debian-source", $file
- unless $KNOWN_FILES{$file};
+ next if $file eq "." or $file eq "..";
+ tag "unknown-file-in-debian-source", $file
+ unless $KNOWN_FILES{$file};
}
closedir(DEBSRC);
}
@@ -75,6 +64,6 @@ if (-d "debfiles/source") {
# Local Variables:
# indent-tabs-mode: t
-# cperl-indent-level: 4
+# cperl-indent-level: nil
# End:
-# vim: syntax=perl sw=4 ts=8 noet shiftround
+# vim: syntax=perl sw=4 ts=8 et shiftround
diff --git a/checks/debian-source-dir.desc b/checks/debian-source-dir.desc
index 7e4f029..98a4843 100644
--- a/checks/debian-source-dir.desc
+++ b/checks/debian-source-dir.desc
@@ -8,23 +8,24 @@ Needs-Info: debfiles
Tag: missing-debian-source-format
Severity: normal
Certainty: certain
-Info: With the introduction of new source formats, it's now recommended to
- explicitly select the desired source format in debian/source/format.
+Info: To allow for possible future changes in the default source format,
+ explicitly selecting a source format by creating
+ <tt>debian/source/format</tt> is recommended.
.
- If you don't have a good reason to stick with the old format,
- you should switch to "3.0 (quilt)" (for packages with a separate
- upstream tarball) or to "3.0 (native)" (for Debian native packages).
+ If you don't have a good reason to stick with the old format, you should
+ switch to "3.0 (quilt)" (for packages with a separate upstream tarball)
+ or to "3.0 (native)" (for Debian native packages).
.
- If you plan to keep using the old format, you should still create
- that file and put "1.0" in it. In that case, you are invited to get in
- touch with debian-dpkg@lists.debian.org to discuss the (technical) reasons
- why the new formats do not suit you.
+ If you plan to keep using the old format, you should still create that
+ file and put "1.0" in it. In that case, you are invited to get in touch
+ with debian-dpkg@lists.debian.org to discuss the (technical) reasons why
+ the new formats do not suit you.
Ref: dpkg-source(1), http://wiki.debian.org/Projects/DebSrc3.0
Tag: unknown-source-format
Severity: serious
Certainty: certain
-Info: debian/source/format contains an unknown source format. The
+Info: <tt>debian/source/format</tt> contains an unknown source format. The
formats officially supported by Debian are "3.0 (quilt)", "3.0 (native)"
and "1.0". dpkg-source additionnaly supports "2.0", "3.0 (git)" and
"3.0 (bzr)".
diff --git a/collection/debfiles b/collection/debfiles
index 6493741..e39585a 100755
--- a/collection/debfiles
+++ b/collection/debfiles
@@ -2,17 +2,17 @@
# debfiles -- lintian collector script
# Copyright (C) 1999 by Joey Hess
-#
+#
# 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
@@ -36,4 +36,5 @@ if (-e "debfiles") {
}
# Copy the whole debian directory
-copy_dir("unpacked/debian", "debfiles");
+copy_dir("unpacked/debian", "debfiles")
+ or fail("cannot copy unpacked/debian to debfiles: $!");
diff --git a/debian/changelog b/debian/changelog
index b84b577..6a9504a 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,13 @@ lintian (2.3.4) UNRELEASED; urgency=low
templates of type text in udebs, since they're frequently used by
including them into other templates at runtime. Patch from Frans
Pop. (Closes: #560414)
+ * checks/debian-source-dir{,.desc}:
+ + [RA] New check script from Raphaël Hertzog checking various things
+ about debian/source/* control files including checking for a source
+ format control file. (Closes: #566820)
+ * checks/fields.desc:
+ + [RA] Correct the supported source formats in the long description of
+ unsupported-source-format. Patch from Raphaël Hertzog.
* checks/init.d:
+ [RA] Exclude symlinks to upstart-job from init script syntax checks.
Based on a patch by Jos Boumans. (Closes: #569492)
@@ -52,9 +59,15 @@ lintian (2.3.4) UNRELEASED; urgency=low
changelog's distribution is "UNRELEASED." Thanks, Raphaël Hertzog.
(Closes: #571616)
+ * collection/debfiles:
+ + [RA] Simplify the logic since the entire debian directory is always
+ copied. Patch from Raphaël Hertzog.
+
* debian/control:
+ [RG] Update package description to mention Policy version 3.8.4
instead of 3.8.3. Should have been done on the previous release.
+ * debian/source/format:
+ + [RA] Switch package format to 3.0 (native).
* frontend/lintian:
+ [RA] Globally ignore SIGPIPE, forcing error return codes from write.
@@ -71,6 +84,7 @@ lintian (2.3.4) UNRELEASED; urgency=low
* man/lintian-info.1:
+ [CW] Fix typo.
+ + [RA] Document new debian-source-dir check script.
* reporting/templates/foot.tmpl:
+ [ADB] Replace the "please mail comments to the maintainer" request
diff --git a/debian/copyright b/debian/copyright
index ac61c52..d90a9b9 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -44,6 +44,7 @@ Portions Copyright (C) 2008 Niko Tyni
Portions Copyright (C) 2008-2010 Raphael Geissert
Portions Copyright (C) 2008-2009 Adam D. Barratt
Portions Copyright (C) 2009 Stéphane Glondu
+Portions Copyright (C) 2010 Raphaël Hertzog
This program is free software; you may redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/man/lintian.1 b/man/lintian.1
index 4caff6a..ccef961 100644
--- a/man/lintian.1
+++ b/man/lintian.1
@@ -491,6 +491,10 @@ Looks for common mistakes in source packages using debhelper.
Check if the README.Debian file is merely the debmake template.
.TP
+.B debian\-source\-dir (dsd)
+Check the debian/source/* control files in source packages for errors.
+
+.TP
.B description (des)
Check if the
.B Description
--
Debian package checker
Reply to: