summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/scripts/scripts-does-not-start-with-shebang
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/scripts/scripts-does-not-start-with-shebang
parentInitial commit. (diff)
downloadlintian-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-does-not-start-with-shebang')
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postinst9
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postrm7
-rwxr-xr-xt/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/rules8
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/fill-values3
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/orig/true.c5
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/desc2
-rw-r--r--t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/hints3
7 files changed, 37 insertions, 0 deletions
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postinst b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postinst
new file mode 100644
index 0000000..9438152
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# This file should not be triggered by script-without-interpreter
+
+set -e
+
+true
+
+#DEBHELPER#
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postrm b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postrm
new file mode 100644
index 0000000..5a2a7e7
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/postrm
@@ -0,0 +1,7 @@
+# This file should be triggered by script-without-interpreter
+
+set -e
+
+true
+
+#DEBHELPER#
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/rules b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/rules
new file mode 100755
index 0000000..84ab89a
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_installdeb:
+ dh_installdeb
+ gcc -o debian/$(shell dh_listpackages)/DEBIAN/preinst true.c
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/fill-values b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/fill-values
new file mode 100644
index 0000000..6958689
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: scripts-does-not-start-with-shebang
+Description: Check for maintainer scripts that do not start with #!
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/orig/true.c b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/orig/true.c
new file mode 100644
index 0000000..8479e67
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/build-spec/orig/true.c
@@ -0,0 +1,5 @@
+int
+main(void)
+{
+ return 0;
+}
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/desc b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/desc
new file mode 100644
index 0000000..321fccc
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/desc
@@ -0,0 +1,2 @@
+Testname: scripts-does-not-start-with-shebang
+Check: scripts
diff --git a/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/hints b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/hints
new file mode 100644
index 0000000..61379e0
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-does-not-start-with-shebang/eval/hints
@@ -0,0 +1,3 @@
+scripts-does-not-start-with-shebang (binary): script-without-interpreter [postrm]
+scripts-does-not-start-with-shebang (binary): maintainer-script-interpreter /bin/sh [postinst]
+scripts-does-not-start-with-shebang (binary): elf-maintainer-script [preinst]