summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/init-d/init.d-general/build-spec
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/init-d/init.d-general/build-spec
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/init-d/init.d-general/build-spec')
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/control.in61
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.init17
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst17
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-interpreter-in-usr-dir.init14
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init31
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init52
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.default17
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.init21
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/fill-values3
9 files changed, 233 insertions, 0 deletions
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/control.in b/t/recipes/checks/init-d/init.d-general/build-spec/debian/control.in
new file mode 100644
index 0000000..80dcc37
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/control.in
@@ -0,0 +1,61 @@
+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 %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6)
+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.
+
+Package: [% $source %]-bugs
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6)
+Description: [% $description %] -- bugs
+ Test some simple bugs in the check
+ .
+ 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.
+
+Package: [% $source %]-interpreter-in-usr-dir
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] -- bad script interpreter
+ Test a check for a /usr dir interpreter used in an init script
+ .
+ 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.
+
+Package: [% $source %]-sourcing-without-test
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6)
+Description: [% $description %] -- sourcing without test
+ Test a check for . /etc/default/foo without checking the existence of
+ the file beforehand.
+ .
+ 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.
+
+Package: [% $source %]-new-style
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] -- "new style"
+ New style of init.d. (#919604)
+ .
+ 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.
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.init
new file mode 100644
index 0000000..55305ab
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.init
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+### BEGIN INIT INFO
+# Provides: init.d-general-bugs
+# 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
+
+# start stop force-reload restart status
+
+. /lib/lsb/init-functions
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
new file mode 100644
index 0000000..37a4b2a
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+ # duplicate call
+ update-rc.d init.d-general-bugs word > /dev/null
+ update-rc.d init.d-general-bugs anotherword
+fi
+
+# Actually debhelper will add a third one for us, but since the line
+# number might change with any debhelper release, we don't want to
+# rely on that debhelper only changing seldomly what replaces the
+# token and hence rather add our own second one above. The token below
+# is just to not trigger further lintian warnings.
+
+#DEBHELPER#
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-interpreter-in-usr-dir.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-interpreter-in-usr-dir.init
new file mode 100644
index 0000000..ff7698c
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-interpreter-in-usr-dir.init
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -w
+
+### BEGIN INIT INFO
+# Provides: init.d-general-interpreter-in-usr-dir
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start daemon at boot time
+# Description: Enable service provided by daemon.
+### END INIT INFO
+
+printf "start status stop reload restart force-reload\n";
+
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init
new file mode 100644
index 0000000..e815337
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init
@@ -0,0 +1,31 @@
+#!/usr/bin/env /lib/init/init-d-script
+### BEGIN INIT INFO
+# Provides: init.d-general-new-style
+# Should-Start: $syslog
+# Required-Start: $time $local_fs
+# Required-Stop: $time
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: init.d-general-new-style
+### END INIT INFO
+NAME='init.d-general-new-style'
+DESC='init.d-general-new-style description here'
+DAEMON=/usr/sbin/init.d-general-new-styl
+
+daemon_ () { /usr/bin/daemon --noconfig --name "${NAME}" "$@"; }
+if ! test -x '/usr/bin/daemon' ; then
+ log_failure_msg "install \`daemon' package to use ${NAME} script"
+ exit 1
+fi
+
+do_start_cmd_override () {
+ daemon_ "${DAEMON}"
+}
+
+do_stop_cmd_override () {
+ if daemon_ --running ; then
+ daemon_ --stop
+ fi
+}
+
+# vim: ft=sh
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init
new file mode 100644
index 0000000..7046ed9
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init
@@ -0,0 +1,52 @@
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides: init.d-general-sourcing-without-test
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start daemon at boot time
+# Description: Enable service provided by daemon.
+### END INIT INFO
+
+echo start stop reload restart force-reload status
+
+. /lib/lsb/init-functions
+
+. /etc/default/rcS
+
+[ ! -f /etc/default/foo ] || . /etc/default/foo
+
+[ -f /etc/default/bar ] && . /etc/default/bar
+
+if [ -e /etc/default/locale ]; then
+ . /etc/default/locale
+fi
+
+if [ -f /etc/default/moo ]; then
+ . /etc/default/moo
+fi
+
+if [ -r /etc/default/tmpfs ]; then
+ . /etc/default/tmpfs
+fi
+
+PACKAGE=moo
+[ -f /etc/default/$PACKAGE ] && . /etc/default/$PACKAGE
+
+if [ -f /etc/default/$PACKAGE ]; then
+ . /etc/default/$PACKAGE
+fi
+
+if test -f /etc/default/$PACKAGE; then
+ . /etc/default/$PACKAGE
+fi
+
+# This is not sourcing without a test and shouldn't produce an error.
+if [ ! -f /etc/default/$PACKAGE ] ; then
+ # do something else
+ :
+else
+ . /etc/default/$PACKAGE
+fi
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.default b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.default
new file mode 100644
index 0000000..c1d7f21
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.default
@@ -0,0 +1,17 @@
+ENABLED="false"
+ENABLED=false
+DISABLED="true"
+DISABLED=true
+RUN="true"
+RUN=true
+PREFIXRUN="true"
+PREFIXRUN=true
+
+# ENABLED="false"
+# ENABLED=false
+# DISABLED="true"
+# DISABLED=true
+# RUN="true"
+# RUN=true
+# PREFIXRUN="true"
+# PREFIXRUN=true
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.init
new file mode 100644
index 0000000..b3e8ae7
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+. /lib/lsb/init-functions
+
+### BEGIN INIT INFO
+# Provides: init.d-general
+# 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/init-d/init.d-general/build-spec/fill-values b/t/recipes/checks/init-d/init.d-general/build-spec/fill-values
new file mode 100644
index 0000000..e567c49
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: init.d-general
+Description: Test tags related to the init.d checks