summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/systemd/no-systemd-service-for-init-script
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/systemd/no-systemd-service-for-init-script
parentInitial commit. (diff)
downloadlintian-upstream.tar.xz
lintian-upstream.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/systemd/no-systemd-service-for-init-script')
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/control.in18
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/init21
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.other.init21
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.service9
-rwxr-xr-xt/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/rules17
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/fill-values3
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/desc2
-rw-r--r--t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/hints2
8 files changed, 93 insertions, 0 deletions
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/control.in b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/control.in
new file mode 100644
index 0000000..680c2f2
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/control.in
@@ -0,0 +1,18 @@
+Source: [% $source %]
+Priority: [% $priority %]
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: [% $rules_requires_root %]
+Homepage: [% $homepage %]
+
+Package: [% $source %]
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base
+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/systemd/no-systemd-service-for-init-script/build-spec/debian/init b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/init
new file mode 100644
index 0000000..54cb8b1
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+. /lib/lsb/init-functions
+
+### BEGIN INIT INFO
+# Provides: no-systemd-service-for-init-script
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Do nothing at all
+# Description: The short description pretty much covers it.
+### END INIT INFO
+
+case "$1" in
+ start|stop|force-reload|restart|status|*)
+ echo hello world!
+ ;;
+esac
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.other.init b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.other.init
new file mode 100644
index 0000000..217ea92
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.other.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+. /lib/lsb/init-functions
+
+### BEGIN INIT INFO
+# Provides: other
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: Do nothing at all
+# Description: The short description pretty much covers it.
+### END INIT INFO
+
+case "$1" in
+ start|stop|force-reload|restart|status|*)
+ echo hello world!
+ ;;
+esac
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.service b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.service
new file mode 100644
index 0000000..7972526
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/no-systemd-service-for-init-script.service
@@ -0,0 +1,9 @@
+[Unit]
+After=network.target
+Documentation=https://example.com/
+
+[Service]
+ExecStart=/bin/test
+
+[Install]
+WantedBy=multi-user.target
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/rules b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/rules
new file mode 100755
index 0000000..d49d149
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+ dh $@
+
+override_dh_installinit:
+ dh_installinit
+ dh_installinit --name=other
+
+# In Ubuntu, dh does not catch this file by default.
+# They have diffed it to reduce the size of packages.
+ifneq (,$(strip $(wildcard Changes)))
+override_dh_installchangelogs:
+ dh_installchangelogs Changes
+endif
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/fill-values b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/fill-values
new file mode 100644
index 0000000..7f48d70
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: no-systemd-service-for-init-script
+Skeleton: upload-native
+Description: Test package with init.d script but no systemd service file
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/desc b/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/desc
new file mode 100644
index 0000000..11df1f6
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/desc
@@ -0,0 +1,2 @@
+Testname: no-systemd-service-for-init-script
+Check: systemd
diff --git a/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/hints b/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/hints
new file mode 100644
index 0000000..64d8d8f
--- /dev/null
+++ b/t/recipes/checks/systemd/no-systemd-service-for-init-script/eval/hints
@@ -0,0 +1,2 @@
+no-systemd-service-for-init-script (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/no-systemd-service-for-init-script.service]
+no-systemd-service-for-init-script (binary): omitted-systemd-service-for-init.d-script other [etc/init.d/other]