diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/scripts/scripts-interpreters | |
parent | Initial commit. (diff) | |
download | lintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/scripts/scripts-interpreters')
23 files changed, 120 insertions, 0 deletions
diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/control.in b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/control.in new file mode 100644 index 0000000..24733b6 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/control.in @@ -0,0 +1,16 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends}, python2.7, csh, cwltool +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/examples b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/examples new file mode 100644 index 0000000..dbf0e0e --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/examples @@ -0,0 +1,9 @@ +bin-env +no-interpreter +not-absolute +syntax +unusual +unversioned-pike +usr-bin-env-perl +usr-local +wrong-perl-path diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/install b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/install new file mode 100644 index 0000000..eb2fbdd --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/install @@ -0,0 +1,14 @@ +bin-env usr/bin/ +csh-shell usr/bin/ +cwl-runner usr/bin/ +no-interpreter usr/bin/ +not-absolute usr/bin/ +python2.7 usr/bin/ +syntax usr/bin/ +unusual usr/bin/ +unversioned-pike usr/bin/ +usr-bin-env-perl usr/bin/ +usr-local usr/bin/ +usr-local-bin-perl usr/bin/ +versioned-pike usr/bin/ +wrong-perl-path usr/bin/ diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/links b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/links new file mode 100644 index 0000000..ff8f522 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/links @@ -0,0 +1,14 @@ +usr/share/man/man1/interpreters.1 usr/share/man/man1/bin-env.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/csh-shell.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/cwl-runner.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/no-interpreter.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/not-absolute.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/python2.7.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/syntax.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/unusual.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/unversioned-pike.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/usr-bin-env-perl.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/usr-local.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/usr-local-bin-perl.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/versioned-pike.1 +usr/share/man/man1/interpreters.1 usr/share/man/man1/wrong-perl-path.1 diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/manpages b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/manpages new file mode 100644 index 0000000..74d51b8 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/debian/manpages @@ -0,0 +1 @@ +interpreters.1 diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/fill-values b/t/recipes/checks/scripts/scripts-interpreters/build-spec/fill-values new file mode 100644 index 0000000..f92de59 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: scripts-interpreters +Description: Check various script interpreter issues diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/bin-env b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/bin-env new file mode 100644 index 0000000..005e1a9 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/bin-env @@ -0,0 +1,2 @@ +#!/bin/env perl +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/csh-shell b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/csh-shell new file mode 100644 index 0000000..3e39c0b --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/csh-shell @@ -0,0 +1 @@ +#!/bin/csh diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/cwl-runner b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/cwl-runner new file mode 100644 index 0000000..3f3280f --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/cwl-runner @@ -0,0 +1 @@ +#!/usr/bin/cwl-runner diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/interpreters.1 b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/interpreters.1 new file mode 100644 index 0000000..9e6dd89 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/interpreters.1 @@ -0,0 +1,5 @@ +.TH interpreters 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*- +.SH NAME +interpreters \- test script + +Dummy manpage to avoid triggering warnings about it not existing. diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/no-interpreter b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/no-interpreter new file mode 100644 index 0000000..3487806 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/no-interpreter @@ -0,0 +1,3 @@ +#! +# Script missing any interpreter. +true diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/not-absolute b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/not-absolute new file mode 100644 index 0000000..ee656c6 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/not-absolute @@ -0,0 +1,2 @@ +#!perl +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/python2.7 b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/python2.7 new file mode 100644 index 0000000..1989667 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/python2.7 @@ -0,0 +1,3 @@ +#!/usr/bin/python2.7 +import sys +sys.exit(0) diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/syntax b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/syntax new file mode 100644 index 0000000..c04b97f --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/syntax @@ -0,0 +1,4 @@ +#!/bin/sh +# A shell script with a syntax error. +if true ; then + echo True diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unusual b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unusual new file mode 100644 index 0000000..8a74f66 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unusual @@ -0,0 +1,2 @@ +#!/usr/bin/lintian +use lintian shell to check package diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unversioned-pike b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unversioned-pike new file mode 100644 index 0000000..f1eaf01 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/unversioned-pike @@ -0,0 +1,4 @@ +#! /usr/bin/pike + +This is not a real pike script but sufficient to trigger a warning that the package +is missing a dependency for the interpreter. diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-bin-env-perl b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-bin-env-perl new file mode 100644 index 0000000..069c68b --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-bin-env-perl @@ -0,0 +1,3 @@ +#!/usr/bin/env perl + +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local new file mode 100644 index 0000000..be79cf8 --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local @@ -0,0 +1,2 @@ +#!/usr/local/bin/special-perl +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local-bin-perl b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local-bin-perl new file mode 100644 index 0000000..3c8f6fa --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/usr-local-bin-perl @@ -0,0 +1,3 @@ +#!/usr/local/bin/perl + +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/versioned-pike b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/versioned-pike new file mode 100644 index 0000000..6b3b65b --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/versioned-pike @@ -0,0 +1,4 @@ +#! /usr/bin/pike7.6 + +This is not a real pike script but sufficient to trigger a warning that the package +is missing a dependency for the interpreter. diff --git a/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/wrong-perl-path b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/wrong-perl-path new file mode 100644 index 0000000..1602d4e --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/build-spec/orig/wrong-perl-path @@ -0,0 +1,2 @@ +#!/bin/perl +print "Hello world\n"; diff --git a/t/recipes/checks/scripts/scripts-interpreters/eval/desc b/t/recipes/checks/scripts/scripts-interpreters/eval/desc new file mode 100644 index 0000000..7ee5e3f --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/eval/desc @@ -0,0 +1,3 @@ +Testname: scripts-interpreters +See-Also: Debian Bug#543873 +Check: scripts diff --git a/t/recipes/checks/scripts/scripts-interpreters/eval/hints b/t/recipes/checks/scripts/scripts-interpreters/eval/hints new file mode 100644 index 0000000..e9858ff --- /dev/null +++ b/t/recipes/checks/scripts/scripts-interpreters/eval/hints @@ -0,0 +1,19 @@ +scripts-interpreters (binary): wrong-path-for-interpreter perl != /usr/bin/perl [usr/bin/not-absolute] +scripts-interpreters (binary): wrong-path-for-interpreter /usr/local/bin/perl != /usr/bin/perl [usr/bin/usr-local-bin-perl] +scripts-interpreters (binary): wrong-path-for-interpreter /bin/perl != /usr/bin/perl [usr/bin/wrong-perl-path] +scripts-interpreters (binary): unusual-interpreter /usr/bin/lintian [usr/bin/unusual] +scripts-interpreters (binary): script-without-interpreter [usr/bin/no-interpreter] +scripts-interpreters (binary): script-uses-bin-env /bin/env [usr/bin/bin-env] +scripts-interpreters (binary): missing-dep-for-interpreter /usr/bin/pike7.6 (does not satisfy pike7.6:any | pike7.6-core:any) [usr/bin/versioned-pike] +scripts-interpreters (binary): missing-dep-for-interpreter /usr/bin/pike (does not satisfy pike7.6:any | pike7.6-core:any | pike7.8:any | pike7.8-core:any) [usr/bin/unversioned-pike] +scripts-interpreters (binary): interpreter-not-absolute perl [usr/bin/not-absolute] +scripts-interpreters (binary): interpreter-in-usr-local /usr/local/bin/special-perl [usr/bin/usr-local] +scripts-interpreters (binary): incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/bin/usr-bin-env-perl] +scripts-interpreters (binary): example-wrong-path-for-interpreter perl != /usr/bin/perl [usr/share/doc/scripts-interpreters/examples/not-absolute] +scripts-interpreters (binary): example-wrong-path-for-interpreter /bin/perl != /usr/bin/perl [usr/share/doc/scripts-interpreters/examples/wrong-perl-path] +scripts-interpreters (binary): example-unusual-interpreter /usr/bin/lintian [usr/share/doc/scripts-interpreters/examples/unusual] +scripts-interpreters (binary): example-script-without-interpreter [usr/share/doc/scripts-interpreters/examples/no-interpreter] +scripts-interpreters (binary): example-script-uses-bin-env /bin/env [usr/share/doc/scripts-interpreters/examples/bin-env] +scripts-interpreters (binary): example-interpreter-not-absolute perl [usr/share/doc/scripts-interpreters/examples/not-absolute] +scripts-interpreters (binary): example-interpreter-in-usr-local /usr/local/bin/special-perl [usr/share/doc/scripts-interpreters/examples/usr-local] +scripts-interpreters (binary): example-incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/doc/scripts-interpreters/examples/usr-bin-env-perl] |