summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi
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/binaries/prerequisites/php/binaries-missing-depends-on-xapi
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.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/binaries/prerequisites/php/binaries-missing-depends-on-xapi')
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules17
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values4
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile16
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c19
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc2
-rw-r--r--t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints1
6 files changed, 59 insertions, 0 deletions
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules
new file mode 100644
index 0000000..7b55940
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+ dh $@
+
+override_dh_perl:
+
+override_dh_builddeb:
+ # Work around debhelper bug (triggers useless call to ldconfig)
+ rm -f debian/*/DEBIAN/postinst debian/*/DEBIAN/postrm
+ rm -f debian/*/DEBIAN/triggers
+ dh_builddeb
+
+# errors out with: objcopy: '.../binaries-missing-depends-on-xapi.debug': No such file
+override_dh_dwz:
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values
new file mode 100644
index 0000000..bf3682a
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/fill-values
@@ -0,0 +1,4 @@
+Skeleton: upload-native
+Testname: binaries-missing-depends-on-xapi
+Description: Test for missing perlapi depends
+Package-Architecture: any
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile
new file mode 100644
index 0000000..5c9cbaf
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/Makefile
@@ -0,0 +1,16 @@
+all:
+ gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so basic.c
+
+VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)')
+
+install:
+ # install it under the correct triplet directory
+ install -d $(DESTDIR)/$(VENDORARCH)
+ install -m 644 -c -s libbasic.so $(DESTDIR)/$(VENDORARCH)/libbasic.so
+ install -d $(DESTDIR)/usr/lib/php5
+ install -m 644 -c -s libbasic.so $(DESTDIR)/usr/lib/php5/libbasic.so
+
+clean distclean:
+ rm -f libbasic.so.2
+
+check test:
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c
new file mode 100644
index 0000000..27e93fc
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/build-spec/orig/basic.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <string.h>
+
+static void
+hardening_trigger(char *p, int i, void (*f)(char *))
+{
+ char test[10];
+ memcpy(test, p, i);
+ f(test);
+ printf("%s", test);
+}
+
+int
+lib_interface(void)
+{
+ printf("Hello world!\n");
+ hardening_trigger(NULL, 0, NULL);
+ return 0;
+}
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc
new file mode 100644
index 0000000..1f5f111
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/desc
@@ -0,0 +1,2 @@
+Testname: binaries-missing-depends-on-xapi
+Check: binaries/prerequisites/php
diff --git a/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints
new file mode 100644
index 0000000..0791fd8
--- /dev/null
+++ b/t/recipes/checks/binaries/prerequisites/php/binaries-missing-depends-on-xapi/eval/hints
@@ -0,0 +1 @@
+binaries-missing-depends-on-xapi (binary): missing-dependency-on-phpapi