From 75808db17caf8b960b351e3408e74142f4c85aac Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:42:30 +0200 Subject: Adding upstream version 2.117.0. Signed-off-by: Daniel Baumann --- .../debian/files-uses-dpkg-database-directly.docs | 2 ++ .../debian/files-uses-dpkg-database-directly.install | 6 ++++++ .../build-spec/fill-values | 4 ++++ .../build-spec/orig/Makefile | 11 +++++++++++ .../build-spec/orig/README | 1 + .../build-spec/orig/misc.txt | 1 + .../build-spec/orig/test-1 | 9 +++++++++ .../build-spec/orig/test-2 | 3 +++ .../build-spec/orig/test.c | 13 +++++++++++++ .../files-uses-dpkg-database-directly/eval/desc | 2 ++ .../files-uses-dpkg-database-directly/eval/hints | 2 ++ 11 files changed, 54 insertions(+) create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.docs create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/debian/files-uses-dpkg-database-directly.install create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/fill-values create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/Makefile create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/README create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/misc.txt create mode 100755 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-1 create mode 100755 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test-2 create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/build-spec/orig/test.c create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/desc create mode 100644 t/recipes/checks/documentation/files-uses-dpkg-database-directly/eval/hints (limited to 't/recipes/checks/documentation/files-uses-dpkg-database-directly') 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 +#include + +#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] -- cgit v1.2.3