This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit 322a4b27539ca2481cf7f823f00b8ef8b7dab1b1 Author: Chris Lamb <[email protected]> Date: Sun Nov 26 11:08:57 2017 +0900 Warn on files called "-" (hyphen symbol). See #882638 for an example. --- checks/files.desc | 8 ++++++++ checks/files.pm | 3 +++ debian/changelog | 2 ++ t/tests/files-hyphen-file/debian/debian/rules | 11 +++++++++++ t/tests/files-hyphen-file/desc | 5 +++++ t/tests/files-hyphen-file/tags | 1 + 6 files changed, 30 insertions(+) diff --git a/checks/files.desc b/checks/files.desc index f2cad25..399f681 100644 --- a/checks/files.desc +++ b/checks/files.desc @@ -1549,6 +1549,14 @@ Info: The given file is literally installed as <tt>*</tt> (star symbol). Normally this indicates a mistake in the installation process of the package either when creating symlinks or renaming files. +Tag: hyphen-file +Severity: important +Certainty: possible +Info: The given file is literally installed as <tt>-</tt> (hyphen + symbol). Normally this indicates a mistake in the package when + attempting to write to standard output. +Ref: #882638 + Tag: incorrect-locale-code Severity: normal Certainty: possible diff --git a/checks/files.pm b/checks/files.pm index c0be669..19e422c 100644 --- a/checks/files.pm +++ b/checks/files.pm @@ -1318,6 +1318,9 @@ sub run { if ($fname =~ m,/\*\z,) { tag 'star-file', $file; } + if ($fname =~ m,/-\z,) { + tag 'hyphen-file', $file; + } # ---------------- misplaced lintian overrides if ( $fname =~ m,^usr/share/doc/$ppkg/override\.[lL]intian(?:\.gz)?$, diff --git a/debian/changelog b/debian/changelog index 084fc48..c05feb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ lintian (2.5.60) UNRELEASED; urgency=medium false-positive multiarch-foreign-shared-library when a package only had executables in usr/sbin. Thanks to Helmut Grohne for reporting the issue. + + [CL] Warn on files called "-" (hyphen symbol). See #882638 for an + example. * checks/version-substvars.desc: + [CL] Don't recommend "Source-Version" in tag descriptions. diff --git a/t/tests/files-hyphen-file/debian/debian/rules b/t/tests/files-hyphen-file/debian/debian/rules new file mode 100755 index 0000000..a82a5fc --- /dev/null +++ b/t/tests/files-hyphen-file/debian/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +tmp := $(CURDIR)/debian/$(shell dh_listpackages) + +%: + dh $@ + +override_dh_install: + dh_install + mkdir -p $(tmp)/usr/share/foo + touch $(tmp)/usr/share/foo/- diff --git a/t/tests/files-hyphen-file/desc b/t/tests/files-hyphen-file/desc new file mode 100644 index 0000000..52ca445 --- /dev/null +++ b/t/tests/files-hyphen-file/desc @@ -0,0 +1,5 @@ +Testname: files-hyphen-file +Version: 1.0 +Description: Test for files called "-" +Test-For: + hyphen-file diff --git a/t/tests/files-hyphen-file/tags b/t/tests/files-hyphen-file/tags new file mode 100644 index 0000000..13a7b67 --- /dev/null +++ b/t/tests/files-hyphen-file/tags @@ -0,0 +1 @@ +E: files-hyphen-file: hyphen-file usr/share/foo/- -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

