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/menus/menus-script-check-ok | |
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/menus/menus-script-check-ok')
12 files changed, 67 insertions, 0 deletions
diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/install b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/install new file mode 100644 index 0000000..1d3c127 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/install @@ -0,0 +1,5 @@ +debian/test-doc.txt usr/share/doc/menus-script-check-ok +debian/test-doc usr/share/doc-base +debian/test-menu usr/share/menu +debian/test-script usr/bin +debian/test-script.1 usr/share/man/man1 diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postinst b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postinst new file mode 100644 index 0000000..9907569 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postinst @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +# Checks that the maintainer script checks for the existence of programs that +# it calls. This should produce no warnings except a bashism warning about +# using type, a warning about the deprecated wm-menu-config invocation, and a +# warning for calling the deprecated install-docs outside of a trigger. +if [ -x /usr/bin/update-menus ] ; then + update-menus +fi +if type install-docs >/dev/null 2>&1 ; then + install-docs -i /usr/share/doc-base/test-doc +fi + +#DEBHELPER# diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postrm b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postrm new file mode 100644 index 0000000..c2274f3 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if type update-menus >/dev/null 2>&1 ; then + update-menus +fi + +#DEBHELPER# diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/prerm b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/prerm new file mode 100644 index 0000000..8618321 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/prerm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ -x "`which install-docs 2>/dev/null`" ] ; then + install-docs -r test-doc +fi + +#DEBHELPER# diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc new file mode 100644 index 0000000..4a133c4 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc @@ -0,0 +1,8 @@ +Document: test-doc +Title: Test document for Lintian test +Author: Russ Allbery +Abstract: This is just a test document +Section: Debian + +Format: text +Files: /usr/share/doc/menus-script-check-ok/test-doc.txt diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc.txt b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc.txt new file mode 100644 index 0000000..a0f31e8 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-doc.txt @@ -0,0 +1 @@ +This is a test document. diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-menu b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-menu new file mode 100644 index 0000000..9da38aa --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-menu @@ -0,0 +1,5 @@ +?package(menus-script-check-ok):\ + section="Applications/Programming"\ + needs="text"\ + title="Test menu entry"\ + command="/usr/bin/test-script" diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script new file mode 100644 index 0000000..f5da270 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script @@ -0,0 +1,2 @@ +#!/bin/sh +echo 'This script does nothing.' diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script.1 b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script.1 new file mode 100644 index 0000000..f9e84b6 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/debian/test-script.1 @@ -0,0 +1,7 @@ +.TH test-script 1 +.SH NAME +test\-script \- some test script +.SH SYNOPSIS +.B test\-script +.SH DESCRIPTION +Some test script. diff --git a/t/recipes/checks/menus/menus-script-check-ok/build-spec/fill-values b/t/recipes/checks/menus/menus-script-check-ok/build-spec/fill-values new file mode 100644 index 0000000..1c027d8 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: menus-script-check-ok +Description: Correct program checks in maintainer scripts diff --git a/t/recipes/checks/menus/menus-script-check-ok/eval/desc b/t/recipes/checks/menus/menus-script-check-ok/eval/desc new file mode 100644 index 0000000..f2854c0 --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/eval/desc @@ -0,0 +1,5 @@ +Testname: menus-script-check-ok +Test-Against: + maintainer-script-does-not-check-for-existence-of-installdocs + maintainer-script-does-not-check-for-existence-of-updatemenus +Check: menus diff --git a/t/recipes/checks/menus/menus-script-check-ok/eval/hints b/t/recipes/checks/menus/menus-script-check-ok/eval/hints new file mode 100644 index 0000000..64324cb --- /dev/null +++ b/t/recipes/checks/menus/menus-script-check-ok/eval/hints @@ -0,0 +1,2 @@ +menus-script-check-ok (binary): prerm-has-useless-call-to-install-docs [prerm:4] +menus-script-check-ok (binary): postinst-has-useless-call-to-install-docs [postinst:12] |