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/documentation/files-uses-dpkg-database-directly | |
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/documentation/files-uses-dpkg-database-directly')
11 files changed, 54 insertions, 0 deletions
diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.docs b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.docs new file mode 100644 index 0000000..58d7b07 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.docs @@ -0,0 +1,2 @@ +test-1 +test-2 diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.install b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.install new file mode 100644 index 0000000..1cc1957 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.install @@ -0,0 +1,6 @@ +test-1 var/lib/test +test-2 var/lib/test +README var/lib/test +misc.txt var/lib/test +test-1 usr/share/locale +test-2 usr/share/locale diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/fill-values b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/fill-values new file mode 100644 index 0000000..ccf850c --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: files-uses-dpkg-database-directly +Description: Check for code using dpkg internals +Package-Architecture: any diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/Makefile b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/Makefile new file mode 100644 index 0000000..e9d446e --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/Makefile @@ -0,0 +1,11 @@ +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o test test.c + +install: + install -d $(DESTDIR)/usr/bin + install -m 755 -c test $(DESTDIR)/usr/bin/test + +clean distclean: + rm -f test + +check test: diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/README b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/README new file mode 100644 index 0000000..a5c0f7b --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/README @@ -0,0 +1 @@ +/var/lib/dpkg/foo is a false positive. diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/misc.txt b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/misc.txt new file mode 100644 index 0000000..f51cff6 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/misc.txt @@ -0,0 +1 @@ +This file is false positive as it references /var/lib/dpkg/foo. diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-1 b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-1 new file mode 100755 index 0000000..1732799 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-1 @@ -0,0 +1,9 @@ +#!/bin/sh + +/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status + +echo /var/lib/dpkg/info/other-package.conffiles +echo /var/lib/dpkg/info/other-package.shlibs +echo /var/lib/dpkg/info/other-package.postinst +echo /var/lib/dpkg/info/other-package.preinst +echo /var/lib/dpkg/triggers/other-package diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-2 b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-2 new file mode 100755 index 0000000..91f2f88 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-2 @@ -0,0 +1,3 @@ +#!/bin/sh + +echo /var/lib/dpkg/info/other-package.list diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test.c b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test.c new file mode 100644 index 0000000..de46c32 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test.c @@ -0,0 +1,13 @@ +#include <stdio.h> +#include <string.h> + +#define VAR_LIB_DPKG "/var/lib/dpkg" + +int +main(void) +{ + printf("/var/lib/dpkg\n"); + printf("%s\n", VAR_LIB_DPKG); + + return 0; +} diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/desc b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/desc new file mode 100644 index 0000000..5335ea3 --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/desc @@ -0,0 +1,2 @@ +Testname: files-uses-dpkg-database-directly +Check: documentation diff --git a/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/hints b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/hints new file mode 100644 index 0000000..5086cdf --- /dev/null +++ b/t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/hints @@ -0,0 +1,2 @@ +files-uses-dpkg-database-directly (binary): package-contains-documentation-outside-usr-share-doc [var/lib/test/misc.txt] +files-uses-dpkg-database-directly (binary): package-contains-documentation-outside-usr-share-doc [var/lib/test/README] |