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/systemd/systemd-missing-services | |
parent | Initial commit. (diff) | |
download | lintian-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/systemd-missing-services')
10 files changed, 170 insertions, 0 deletions
diff --git a/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/control.in b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/control.in new file mode 100644 index 0000000..1b8c645 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/control.in @@ -0,0 +1,55 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %]-with +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] - with .service file + 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. + . + This package has a .service file for its initscript. + +Package: [% $source %]-template +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] - with @.service template file + 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. + . + This package has a @.service template file for its initscript. + +Package: [% $source %]-without +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] - without .service file + 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. + . + This package does not have a .service file for its initscript. + +Package: [% $source %]-without-rcs +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] - rcS script without .service file + 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. + . + This package does not have a .service file for its rcS initscript. diff --git a/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-template.init b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-template.init new file mode 100644 index 0000000..022b722 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-template.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +. /lib/lsb/init-functions + +### BEGIN INIT INFO +# Provides: systemd-missing-services-template +# 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/systemd-missing-services/build-spec/debian/systemd-missing-services-template@.service b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-template@.service new file mode 100644 index 0000000..01dc11d --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-template@.service @@ -0,0 +1,11 @@ +[Unit] +After=network.target +Description=Test %I +Documentation=https://example.com/%i/ + +[Service] +ExecStart=/bin/test %i +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-with.init b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-with.init new file mode 100644 index 0000000..cfecc36 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-with.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +. /lib/lsb/init-functions + +### BEGIN INIT INFO +# Provides: systemd-missing-services-with +# 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/systemd-missing-services/build-spec/debian/systemd-missing-services-with.service b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-with.service new file mode 100644 index 0000000..7972526 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-with.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/systemd-missing-services/build-spec/debian/systemd-missing-services-without-rcs.init b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-without-rcs.init new file mode 100644 index 0000000..2f93d19 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-without-rcs.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +. /lib/lsb/init-functions + +### BEGIN INIT INFO +# Provides: systemd-missing-services-without-rcs +# Required-Start: +# Required-Stop: +# Default-Start: S 2 3 4 5 +# 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/systemd-missing-services/build-spec/debian/systemd-missing-services-without.init b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-without.init new file mode 100644 index 0000000..1425d83 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/debian/systemd-missing-services-without.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +. /lib/lsb/init-functions + +### BEGIN INIT INFO +# Provides: systemd-missing-services-without +# 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/systemd-missing-services/build-spec/fill-values b/t/recipes/checks/systemd/systemd-missing-services/build-spec/fill-values new file mode 100644 index 0000000..879420a --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: systemd-missing-services +Description: Check for missing service files diff --git a/t/recipes/checks/systemd/systemd-missing-services/eval/desc b/t/recipes/checks/systemd/systemd-missing-services/eval/desc new file mode 100644 index 0000000..425a261 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/eval/desc @@ -0,0 +1,4 @@ +Testname: systemd-missing-services +Test-Against: + omitted-systemd-service-for-init.d-script +Check: systemd diff --git a/t/recipes/checks/systemd/systemd-missing-services/eval/hints b/t/recipes/checks/systemd/systemd-missing-services/eval/hints new file mode 100644 index 0000000..f32bba0 --- /dev/null +++ b/t/recipes/checks/systemd/systemd-missing-services/eval/hints @@ -0,0 +1,4 @@ +systemd-missing-services-without-rcs (binary): missing-systemd-service-for-init.d-rcS-script systemd-missing-services-without-rcs [etc/init.d/systemd-missing-services-without-rcs] +systemd-missing-services-without (binary): missing-systemd-service-for-init.d-script systemd-missing-services-without [etc/init.d/systemd-missing-services-without] +systemd-missing-services-with (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/systemd-missing-services-with.service] +systemd-missing-services-template (binary): invalid-systemd-documentation https://example.com/%i/ [usr/lib/systemd/system/systemd-missing-services-template@.service] |