[SCM] Debian package checker branch, master, updated. 2.2.12-18-g248aa4b
The following commit has been merged in the master branch:
commit 248aa4b5b04f654a1cef93e3e392247289bf82e8
Author: Russ Allbery <rra@debian.org>
Date: Fri Jun 26 19:11:18 2009 -0700
Better handling of init.d scripts that are symlinks
* checks/init.d:
+ [RA] Don't require symlink init scripts to be conffiles and realize
they are included in the package even if the symlink is dangling.
Thanks, Steve Langasek. (Closes: #534326)
diff --git a/checks/init.d b/checks/init.d
index b4cff44..a5634d5 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -143,16 +143,19 @@ if (open(IN, '<', $conffiles)) {
for (keys %initd_postinst) {
next if /^\$/;
- # init.d scripts have to be marked as conffiles
- unless ($conffiles{"/etc/init.d/$_"} or $conffiles{"etc/init.d/$_"}) {
+ my $initd_file = "init.d/$_";
+
+ # init.d scripts have to be marked as conffiles unless they're symlinks.
+ unless ($conffiles{"/etc/init.d/$_"} or $conffiles{"etc/init.d/$_"}
+ or -l $initd_file) {
tag "init.d-script-not-marked-as-conffile", "/etc/init.d/$_";
}
- # check if file exists in package
- my $initd_file = "init.d/$_";
+ # Check if file exists in package and check the script for other issues if
+ # it was included in the package.
if (-f $initd_file) {
check_init($initd_file);
- } else {
+ } elsif (not -l $initd_file) {
tag "init.d-script-not-included-in-package", "/etc/init.d/$_";
}
}
diff --git a/debian/changelog b/debian/changelog
index 805d346..277df39 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,9 @@ lintian (2.2.13) UNRELEASED; urgency=low
* checks/init.d:
+ [RA] Take into account dangling symlinks in /etc/init.d. Patch from
Raphael Geissert. (Closes: #534139)
+ + [RA] Don't require symlink init scripts to be conffiles and realize
+ they are included in the package even if the symlink is dangling.
+ Thanks, Steve Langasek. (Closes: #534326)
* checks/patch-systems:
+ [RA] Don't include the package name as extra data in tags that are
only issued for source packages. Patch from Raphael Geissert.
diff --git a/t/tests/init.d-symlink/debian/debian/links b/t/tests/init.d-symlink/debian/debian/links
new file mode 100644
index 0000000..b7a740f
--- /dev/null
+++ b/t/tests/init.d-symlink/debian/debian/links
@@ -0,0 +1 @@
+/lib/init/upstart-job etc/init.d/lintian
diff --git a/t/tests/init.d-symlink/debian/debian/postinst b/t/tests/init.d-symlink/debian/debian/postinst
new file mode 100755
index 0000000..ed6bc65
--- /dev/null
+++ b/t/tests/init.d-symlink/debian/debian/postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+update-rc.d lintian defaults >/dev/null
+#DEBHELPER#
diff --git a/t/tests/init.d-symlink/debian/debian/postrm b/t/tests/init.d-symlink/debian/debian/postrm
new file mode 100755
index 0000000..4bf5ee6
--- /dev/null
+++ b/t/tests/init.d-symlink/debian/debian/postrm
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+if [ "$1" = purse ] ; then
+ update-rc.d lintian remove >/dev/null
+fi
+#DEBHELPER#
diff --git a/t/tests/init.d-symlink/desc b/t/tests/init.d-symlink/desc
new file mode 100644
index 0000000..cdfd293
--- /dev/null
+++ b/t/tests/init.d-symlink/desc
@@ -0,0 +1,7 @@
+Testname: init.d-symlink
+Sequence: 6000
+Version: 1.0
+Description: Check proper handling of symlinked init scripts
+Test-Against:
+ init.d-script-not-included-in-package
+ init.d-script-not-marked-as-conffile
diff --git a/t/debs/deb-format-record-size/tags b/t/tests/init.d-symlink/tags
similarity index 100%
copy from t/debs/deb-format-record-size/tags
copy to t/tests/init.d-symlink/tags
--
Debian package checker
Reply to: