[SCM] Debian package checker branch, master, updated. 2.5.10-68-ga8eb908
The following commit has been merged in the master branch:
commit a8eb908b2933ccf96be7a5ce90de181bf4b24f4d
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jul 22 14:09:41 2012 +0200
c/scripts: Fix executable-not-elf-or-script false positive
... for executable hardlinks of scripts. This issue was observed
in gzip/1.5-1.1 (bin/uncompress -> bin/gunzip).
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/scripts b/checks/scripts
index 845d4d8..5b97e5a 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -413,8 +413,20 @@ for my $filename (sort keys %{$info->scripts}) {
}
foreach (keys %executable) {
+ my $index_info = $info->index ($_);
+ my $ok = 0;
+ if ($index_info->is_hardlink) {
+ # We don't collect script information for hardlinks, so check
+ # if the target is a script.
+ my $target = $index_info->link_resolved;
+ if (exists $info->scripts->{$target}) {
+ $ok = 1;
+ }
+ }
+
tag 'executable-not-elf-or-script', $_
- unless ( $ELF{$_}
+ unless ( $ok
+ or $ELF{$_}
or $scripts{$_}
or $_ =~ m,^usr(?:/X11R6)?/man/,
or $_ =~ m/\.exe$/ # mono convention
diff --git a/debian/changelog b/debian/changelog
index 9a4c32f..d785092 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,8 @@ lintian (2.5.11) UNRELEASED; urgency=low
manpages.
* checks/scripts{,.desc}:
+ [NT] Retire check for dpkg-maintscript-helper in preinst.
+ + [NT] Fix false positive "executable-not-elf-or-script" when
+ the file is an executable hardlink to a script.
* checks/source-copyright{,.desc}:
+ [NT] Check for possible misspellings of known field
names. (Closes: #678639)
diff --git a/t/COVERAGE b/t/COVERAGE
index b5497a9..1c0b118 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
-Last generated 2012-07-14
-Coverage: 833/963 (86.50%), w. legacy tests: 933/963 (96.88%)
+Last generated 2012-07-22
+Coverage: 835/963 (86.71%), w. legacy tests: 933/963 (96.88%)
The following tags are not tested by the test suite:
@@ -140,10 +140,8 @@ nmu qa-upload-has-incorrect-version-number
po-debconf newer-debconf-templates
po-debconf unknown-encoding-in-po-file
-scripts executable-not-elf-or-script
scripts maintainer-script-ignores-errors
scripts maintainer-script-removes-device-files
-scripts script-not-executable
scripts update-alternatives-remove-called-in-postrm
shared-libs sharedobject-in-library-directory-missing-soname
@@ -174,7 +172,6 @@ binary
doc-base-index-references-multiple-files
doc-base-invalid-document-field
doc-base-unknown-section
- executable-not-elf-or-script
menu-file-in-usr-lib
menu-item-missing-required-tag
menu-item-needs-tag-has-unknown-value
@@ -236,7 +233,6 @@ filenames
desktop-file-in-wrong-dir
package-contains-devhelp-file-without-symlink
package-installs-packlist
- script-not-executable
use-of-compat-symlink
windows-thumbnail-database-in-package
wrong-file-owner-uid-or-gid
diff --git a/t/tests/scripts-exec/debian/01-normal-script b/t/tests/scripts-exec/debian/01-normal-script
new file mode 100644
index 0000000..97fd3b7
--- /dev/null
+++ b/t/tests/scripts-exec/debian/01-normal-script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hallo world"
diff --git a/t/tests/scripts-exec/debian/02-no-exec-script b/t/tests/scripts-exec/debian/02-no-exec-script
new file mode 100644
index 0000000..98b699f
--- /dev/null
+++ b/t/tests/scripts-exec/debian/02-no-exec-script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Goodbye world"
diff --git a/t/tests/scripts-exec/debian/03-hardlink-script b/t/tests/scripts-exec/debian/03-hardlink-script
new file mode 100644
index 0000000..e7959bb
--- /dev/null
+++ b/t/tests/scripts-exec/debian/03-hardlink-script
@@ -0,0 +1 @@
+Not actually installed/tested; just here to ensure manpage is generated.
diff --git a/t/tests/scripts-exec/debian/04-not-a-script b/t/tests/scripts-exec/debian/04-not-a-script
new file mode 100644
index 0000000..84cf6d3
--- /dev/null
+++ b/t/tests/scripts-exec/debian/04-not-a-script
@@ -0,0 +1,2 @@
+# This is not a script nor an ELF executable, but yet it will be marked
+# executable. Tsk tsk tsk.
diff --git a/t/tests/scripts-missing-dep/debian/debian/clean b/t/tests/scripts-exec/debian/debian/clean
similarity index 100%
copy from t/tests/scripts-missing-dep/debian/debian/clean
copy to t/tests/scripts-exec/debian/debian/clean
diff --git a/t/tests/scripts-missing-dep/debian/debian/install b/t/tests/scripts-exec/debian/debian/install
similarity index 100%
copy from t/tests/scripts-missing-dep/debian/debian/install
copy to t/tests/scripts-exec/debian/debian/install
diff --git a/t/tests/scripts-missing-dep/debian/debian/manpages b/t/tests/scripts-exec/debian/debian/manpages
similarity index 100%
copy from t/tests/scripts-missing-dep/debian/debian/manpages
copy to t/tests/scripts-exec/debian/debian/manpages
diff --git a/t/tests/scripts-exec/debian/debian/rules b/t/tests/scripts-exec/debian/debian/rules
new file mode 100755
index 0000000..ad569a5
--- /dev/null
+++ b/t/tests/scripts-exec/debian/debian/rules
@@ -0,0 +1,20 @@
+#!/usr/bin/make -f
+
+TMP:=debian/$(shell dh_listpackages)/
+%:
+ dh $@
+
+override_dh_fixperms:
+ chmod 0755 $(TMP)/usr/bin/01-normal-script
+ chmod 0644 $(TMP)/usr/bin/02-no-exec-script
+ rm -f $(TMP)/usr/bin/03-hardlink-script
+ ln $(TMP)/usr/bin/01-normal-script $(TMP)/usr/bin/03-hardlink-script
+ chmod 0755 $(TMP)/usr/bin/04-not-a-script
+
+override_dh_auto_build:
+ mkdir man
+ for FILE in *-script ; do \
+ sed s/@SCRIPT@/$$FILE/g script.pod | \
+ pod2man --section=1 > man/$$FILE.1 ; \
+ done
+
diff --git a/t/tests/scripts-missing-dep/debian/script.pod b/t/tests/scripts-exec/debian/script.pod
similarity index 100%
copy from t/tests/scripts-missing-dep/debian/script.pod
copy to t/tests/scripts-exec/debian/script.pod
diff --git a/t/tests/scripts-exec/desc b/t/tests/scripts-exec/desc
new file mode 100644
index 0000000..33f381f
--- /dev/null
+++ b/t/tests/scripts-exec/desc
@@ -0,0 +1,7 @@
+Testname: scripts-exec
+Sequence: 6000
+Version: 1.0
+Description: Check for exec bit related issues for scripts
+Test-For:
+ executable-not-elf-or-script
+ script-not-executable
diff --git a/t/tests/scripts-exec/tags b/t/tests/scripts-exec/tags
new file mode 100644
index 0000000..d33e83f
--- /dev/null
+++ b/t/tests/scripts-exec/tags
@@ -0,0 +1,2 @@
+W: scripts-exec: executable-not-elf-or-script usr/bin/04-not-a-script
+W: scripts-exec: script-not-executable usr/bin/02-no-exec-script
--
Debian package checker
Reply to: