summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/shlibs/shared-libs-control-file
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/debian/shlibs/shared-libs-control-file
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/debian/shlibs/shared-libs-control-file')
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in57
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols3
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols3
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols3
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols3
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install1
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols3
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules19
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values5
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile23
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c15
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc2
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints11
18 files changed, 153 insertions, 0 deletions
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in
new file mode 100644
index 0000000..a223c7e
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/control.in
@@ -0,0 +1,57 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libnoshf1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] (no shlibs file)
+ 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.
+ .
+ Checks for missing shlibs file.
+
+Package: libeshf1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] (empty shlibs file)
+ 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.
+ .
+ Checks for empty shlibs file.
+
+Package: libunshf1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] (unused entry)
+ 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.
+ .
+ Checks for unused entry in shlibs file.
+
+Package: libfdshf1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] (foreign dep)
+ 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.
+ .
+ Checks for foreign dependency entry in shlibs file.
+
+Package: libdupshf1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] (dup entry)
+ 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.
+ .
+ Checks for duplicate entry in shlibs file.
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install
new file mode 100644
index 0000000..7452fe1
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.install
@@ -0,0 +1 @@
+usr/lib/libdupshf*
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols
new file mode 100644
index 0000000..166a346
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libdupshf1.symbols
@@ -0,0 +1,3 @@
+libdupshf.so.1 libdupshf1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install
new file mode 100644
index 0000000..5ef4c2d
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.install
@@ -0,0 +1 @@
+usr/lib/libeshf*
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols
new file mode 100644
index 0000000..fdd0204
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libeshf1.symbols
@@ -0,0 +1,3 @@
+libeshf.so.1 libeshf1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install
new file mode 100644
index 0000000..c01a368
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.install
@@ -0,0 +1 @@
+usr/lib/libfdshf*
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols
new file mode 100644
index 0000000..4a18831
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libfdshf1.symbols
@@ -0,0 +1,3 @@
+libfdshf.so.1 libfdshf1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install
new file mode 100644
index 0000000..175a915
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.install
@@ -0,0 +1 @@
+usr/lib/libnoshf*
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols
new file mode 100644
index 0000000..fef945e
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libnoshf1.symbols
@@ -0,0 +1,3 @@
+libnoshf.so.1 libnoshf1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install
new file mode 100644
index 0000000..dcdae56
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.install
@@ -0,0 +1 @@
+usr/lib/libunshf*
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols
new file mode 100644
index 0000000..737842d
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/libunshf1.symbols
@@ -0,0 +1,3 @@
+libunshf.so.1 libunshf1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules
new file mode 100644
index 0000000..0cd4c15
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/debian/rules
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+DUPSHF:=debian/libdupshf1/DEBIAN/shlibs
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+ dh $@
+
+override_dh_builddeb:
+ # Work around "smart tools" that check the shlibs
+ # before installing them.
+ rm -f debian/libnoshf1/DEBIAN/shlibs
+ echo "# aloha" > debian/libeshf1/DEBIAN/shlibs
+ echo "libfoo 1 libunshf1 (> 0.1)" >> debian/libunshf1/DEBIAN/shlibs
+ sed -i 's/libfdshf1/libforeign1/' debian/libfdshf1/DEBIAN/shlibs
+ cat $(DUPSHF) $(DUPSHF) > $(DUPSHF).tmp
+ mv -f $(DUPSHF).tmp $(DUPSHF)
+ dh_builddeb
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values
new file mode 100644
index 0000000..9336eee
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-native
+Testname: shared-libs-control-file
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Dh-Compat-Level: 9
+Description: Test checks related to shlibs files
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile
new file mode 100644
index 0000000..37bef22
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/Makefile
@@ -0,0 +1,23 @@
+CC=gcc
+CFLAGS+= -fPIC
+
+SONAMES:= libnoshf.so.1 libeshf.so.1 libunshf.so.1 libfdshf.so.1 \
+ libdupshf.so.1
+LIBFILES:= $(patsubst %,%.0.1, $(SONAMES))
+
+all: $(LIBFILES)
+
+$(LIBFILES): code.o
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc
+
+clean:
+ rm -f *.a *.o *.so*
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.so* $(DESTDIR)/usr/lib
+ for FILE in $(SONAMES) ; do \
+ ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \
+ done
+
+.PHONY: install clean
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c
new file mode 100644
index 0000000..0ed08e0
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/build-spec/orig/code.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <math.h>
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+double energy(double mass){
+ return pow(10.0, 8.0) * pow(3.0, 2.0) * mass;
+}
+
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc
new file mode 100644
index 0000000..9ccf196
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/desc
@@ -0,0 +1,2 @@
+Testname: shared-libs-control-file
+Check: debian/shlibs
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints
new file mode 100644
index 0000000..87f69e6
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-control-file/eval/hints
@@ -0,0 +1,11 @@
+libunshf1 (binary): symbols-file-missing-build-depends-package-field libunshf.so.1 [symbols]
+libunshf1 (binary): shared-library-not-shipped libfoo 1 [shlibs]
+libunshf1 (binary): outdated-relation-in-shlibs libunshf1 (> 0.1) [shlibs]
+libnoshf1 (binary): symbols-file-missing-build-depends-package-field libnoshf.so.1 [symbols]
+libnoshf1 (binary): no-shlibs usr/lib/libnoshf.so.1.0.1
+libfdshf1 (binary): symbols-file-missing-build-depends-package-field libfdshf.so.1 [symbols]
+libfdshf1 (binary): distant-prerequisite-in-shlibs libforeign1 [shlibs]
+libeshf1 (binary): symbols-file-missing-build-depends-package-field libeshf.so.1 [symbols]
+libeshf1 (binary): ships-undeclared-shared-library libeshf 1 for usr/lib/libeshf.so.1.0.1 [shlibs]
+libdupshf1 (binary): symbols-file-missing-build-depends-package-field libdupshf.so.1 [symbols]
+libdupshf1 (binary): duplicate-in-shlibs (lines 1 2) libdupshf 1 [shlibs]