summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/libraries/shared/soname
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/libraries/shared/soname')
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/control.in48
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install1
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install1
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install1
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install1
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/fill-values5
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile23
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/code.c9
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/hints1
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/changelog.in6
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/control58
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/copyright8
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.postinst4
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.prerm4
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.postinst10
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.prerm7
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.shlibs8
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.symbols3
-rwxr-xr-xt/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/rules121
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/source.lintian-overrides1
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/Makefile55
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/baz.c6
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/extra.c0
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/hints2
-rwxr-xr-xt/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/post-test4
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/_symbols23
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/changelog.in13
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/control85
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/copyright4
-rwxr-xr-xt/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/rules99
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/hello.c9
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.c7
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.h1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/hints1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/post-test2
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/changelog.in6
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/control58
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/copyright8
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.postinst4
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.prerm4
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.postinst10
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.prerm7
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.shlibs8
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.symbols3
-rwxr-xr-xt/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/rules121
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/source.lintian-overrides1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/Makefile55
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/baz.c6
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/extra.c0
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/hints1
-rwxr-xr-xt/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/post-test4
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/control.in15
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/Makefile19
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/code.c10
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/main.c4
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/hints1
74 files changed, 1023 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/control.in
new file mode 100644
index 0000000..1109beb
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/control.in
@@ -0,0 +1,48 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: mylibany
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ 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.
+
+
+Package: libany6gcc1v6
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] with gcc 6 version
+ 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.
+ .
+ It test if v6 string are correctly escaped
+
+Package: libany5gcc1v5
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] with gcc 5 version
+ 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.
+ .
+ It test if v5 string are correctly escaped
+
+Package: libanyq16-6
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] with Q16 version
+ 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.
+ .
+ It test if string are correctly escaped like for imagemagick.
+ .
+ library name is not libanyQ166 \ No newline at end of file
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install
new file mode 100644
index 0000000..283bc61
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install
@@ -0,0 +1 @@
+/usr/lib/libany5gcc.* \ No newline at end of file
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols
new file mode 100644
index 0000000..a394502
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols
@@ -0,0 +1,2 @@
+libany5gcc.so.1 libany5gcc1v5 #MINVER#
+ e@Base 1.0
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install
new file mode 100644
index 0000000..9485e87
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install
@@ -0,0 +1 @@
+/usr/lib/libany6gcc.* \ No newline at end of file
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols
new file mode 100644
index 0000000..aee5f00
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols
@@ -0,0 +1,2 @@
+libany6gcc.so.1v6 libany6gcc1v6 #MINVER#
+ e@Base 1.0
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install
new file mode 100644
index 0000000..b4ecaea
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install
@@ -0,0 +1 @@
+/usr/lib/libanyQ16* \ No newline at end of file
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols
new file mode 100644
index 0000000..0f32f79
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols
@@ -0,0 +1,2 @@
+libanyQ16.so.1v6 libanyQ16-6 #MINVER#
+ e@Base 1.0
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install
new file mode 100644
index 0000000..5c86ce1
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install
@@ -0,0 +1 @@
+/usr/lib/libany.* \ No newline at end of file
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols
new file mode 100644
index 0000000..9b6f454
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols
@@ -0,0 +1,2 @@
+libany.so.1 mylibany #MINVER#
+ e@Base 1.0
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/fill-values b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/fill-values
new file mode 100644
index 0000000..523eb0b
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-native
+Testname: binaries-doesnt-match-sonames
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Dh-Compat-Level: 9
+Description: Test for library package that does not match SONAME
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile
new file mode 100644
index 0000000..21a67b5
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/Makefile
@@ -0,0 +1,23 @@
+CC=gcc
+MYCFLAGS=-Wall -Winline -O2 -fPIC
+CFLAGS:=$(MYCFLAGS) $(CPPFLAGS) $(CFLAGS)
+
+SONAMES:= libany.so.1 libany6gcc.so.1v6 libany5gcc.so.1 libanyQ16.so.6
+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 0755 *.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/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/code.c b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/code.c
new file mode 100644
index 0000000..0c4f917
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/build-spec/orig/code.c
@@ -0,0 +1,9 @@
+#include <string.h>
+#include <stdio.h>
+
+void e(char *p, int i, void (*f)(char *)){
+ char test[10];
+ memcpy(test, p, i);
+ f(test);
+ printf("%s", test);
+}
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/desc b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/desc
new file mode 100644
index 0000000..f56f7dc
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/desc
@@ -0,0 +1,2 @@
+Testname: binaries-doesnt-match-sonames
+Check: libraries/shared/soname
diff --git a/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/hints b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/hints
new file mode 100644
index 0000000..3bf2fcf
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/binaries-doesnt-match-sonames/eval/hints
@@ -0,0 +1 @@
+mylibany (binary): package-name-doesnt-match-sonames libany1
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/changelog.in
new file mode 100644
index 0000000..91a6bb5
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/changelog.in
@@ -0,0 +1,6 @@
+libbaz ([% $version %]) [% $distribution %]; urgency=low
+
+ * Initial setup
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Tue, 30 Jan 2001 15:23:59 -0800
+
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/control
new file mode 100644
index 0000000..1506687
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/control
@@ -0,0 +1,58 @@
+Source: libbaz
+Section: libs
+Priority: optional
+Maintainer: Lintian Maintainer <lintian-maint@debian.org>
+Build-depends: debhelper (>=4)
+Standards-Version: 3.2.1
+
+Package: libbaz1
+Architecture: any
+Provides: libbaz
+Description: test handling of library packages
+ Regression test for lintian's handling of libraries.
+ .
+ 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.
+
+Package: libbaz1-dev
+Architecture: any
+Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8
+Description: development package
+ Regression test for lintian's handling of libraries (dev).
+ .
+ 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.
+
+Package: libbaz2
+Architecture: any
+Depends: ${shlibs:Depends}, libssl0.9.8
+Description: test handling of library packages (good)
+ Regression test for lintian's handling of libraries (good).
+ .
+ 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.
+
+Package: libbaz2-dev
+Architecture: any
+Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version})
+Description: development package (good)
+ Regression test for lintian's handling of libraries (dev good).
+ .
+ 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.
+
+Package: libbaz2-dbg
+Architecture: any
+Depends: libbaz2 (= ${binary:Version})
+Priority: optional
+Description: debugging package
+ Regression test for lintian's handling of libraries (debug).
+ .
+ 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.
+
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/copyright
new file mode 100644
index 0000000..a874c87
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/copyright
@@ -0,0 +1,8 @@
+This package is released under public domain. This is distributed in the hope
+that it will be useful, but without any warranty; without even the implied
+warranty of merchantability or fitness for a particular purpose.
+
+A reference to /usr/share/common-licenses/GPL-2 to make it look like this
+package is under the GPL and trigger the OpenSSL warning.
+
+However, this has an OpenSSL exception.
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.postinst
new file mode 100644
index 0000000..683e3cc
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+$PKG=libbaz1-dev
+
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.prerm
new file mode 100644
index 0000000..683e3cc
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/dev.prerm
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+$PKG=libbaz1-dev
+
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.postinst
new file mode 100644
index 0000000..ec0b98a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+$PKG=libbaz1
+
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ]
+; then
+ ln -sf ../share/doc/$PKG /usr/doc/$PKG
+ fi
+fi
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.prerm
new file mode 100644
index 0000000..50e37c3
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.prerm
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+$PKG=libbaz1
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then
+ rm -f /usr/doc/$PKG
+fi
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.shlibs
new file mode 100644
index 0000000..b88e288
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.shlibs
@@ -0,0 +1,8 @@
+libdoesntexist2 1.0 libbaz1
+libdoesntexist2 1.0 libbaz1
+libbaz2 1.1 libbaz
+libbaz3 1 libbaz1 (>> 1-1)
+libbaz4 1 libbaz1 (= 1-1)
+libbaz5 1 libbaz2
+udeb: libdoesntexist2 1.0 libbaz2
+udeb: libdoesntexist2 1.0 libbaz2
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.symbols
new file mode 100644
index 0000000..72f9d8a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/lib.symbols
@@ -0,0 +1,3 @@
+libbaz.so.2 libbaz1 #MINVER#
+ pw 1-1
+ foo 1.1-1
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/rules
new file mode 100755
index 0000000..fa99bc8
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/rules
@@ -0,0 +1,121 @@
+#!/usr/bin/make -f
+
+lib_tmp=debian/tmp-lib
+dev_tmp=debian/tmp-dev
+
+LIB=libbaz1
+DEV=libbaz1-dev
+
+VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)')
+
+build-arch:
+ $(MAKE)
+
+build-indep:
+
+build: build-arch build-indep
+
+clean:
+ $(MAKE) clean
+ dh_clean -plibbaz2 -plibbaz2-dev
+ rm -f debian/files debian/substvars
+ rm -rf $(lib_tmp) $(dev_tmp)
+
+# Now the correct libbaz2-dev package
+binary-correct:
+ install -d debian/libbaz2-dev/usr/lib
+ cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib
+ # usually, I'd also include some .h files to /usr/include
+
+ # Now the correct libbaz2 package
+ install -d debian/libbaz2/usr/lib
+ cp -a libbaz2.so.* debian/libbaz2/usr/lib
+ chmod a-x debian/libbaz2/usr/lib/*
+
+ # General stuff that is tested in other testsets:
+ dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+ # Mess up the libbaz2 changelog files to test the symlink handling.
+ ln -s /usr/share/doc/lintian/changelog.gz \
+ debian/libbaz2/usr/share/doc/libbaz2/changelog.gz
+ install -m 644 debian/changelog \
+ debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo
+ ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog
+
+ # Okay, if either line is omitted, it should be noted
+ dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev
+ dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+ # and again, regular packaging stuff
+ dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs
+ dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+# and the incorrect one
+binary-arch: build-arch binary-correct
+ # first, the lib package
+ install -d $(lib_tmp)/usr/lib
+ # resp. no soname (check), wrong soname (check), and no-pic (check)
+ cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib
+ cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b
+ install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b
+ # let's include the .a in the non-dev too (TODO)
+ # Also, libbaz1.a hasn't a symbol table (TODO)
+ cp -a *.a $(lib_tmp)/usr/lib
+ # And a wrong .so symlink (wrong, only in -dev, TODO)
+ ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so
+ # And a wrong .so.X symlink (wrong, should point to a real existing
+ # shlib, TODO)
+ ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9
+ # And a plain .so (wrong, TODO)
+ touch $(lib_tmp)/usr/lib/libbar2.so
+ # And a non-versioned SONAME.
+ install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so
+ strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so
+ # Pretend to be a Perl module to test a lack of Perl dependencies.
+ install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo
+ install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+
+ install -d $(lib_tmp)/usr/share/doc/$(LIB)
+ install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB)
+ install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB)
+ gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog
+ install -d $(lib_tmp)/DEBIAN
+ install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst
+ install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm
+ touch $(lib_tmp)/usr/share/doc/README.Debian
+ #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0
+ install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs
+ install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols
+ dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp)
+ dpkg --build $(lib_tmp) ..
+
+ # now the -dev package
+ install -d $(dev_tmp)/usr/include
+ install -d $(lib_tmp)/usr/lib
+ # let's also install the .so at the same time... (wrong, TODO)
+ cp -a *.a *.so.* $(lib_tmp)/usr/lib
+ # and fuck up permission (TODO)
+ chmod a+x $(lib_tmp)/usr/lib/*.a
+ # Pretend to be a Perl module to test a lack of Perl dependencies.
+ install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo
+ install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ install -d $(dev_tmp)/usr/share/doc
+ ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV)
+ install -d $(dev_tmp)/DEBIAN
+ install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst
+ install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm
+ dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp)
+ dpkg --build $(dev_tmp) ..
+
+
+binary: binary-arch
+
+# The mention of binary-indep here should be sufficient to suppress the
+# warning that it's not present.
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/source.lintian-overrides
new file mode 100644
index 0000000..6008d27
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/debian/source.lintian-overrides
@@ -0,0 +1 @@
+libbaz source: maintainer-script-lacks-debhelper-token
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/fill-values
new file mode 100644
index 0000000..7effe4f
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/fill-values
@@ -0,0 +1,6 @@
+Skeleton: upload-non-native
+Testname: legacy-libbaz
+Source: libbaz
+Version: 1-1
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Description: Legacy test "libbaz"
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/Makefile
new file mode 100644
index 0000000..657dc2a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/Makefile
@@ -0,0 +1,55 @@
+# This is the correct way to build a lib
+
+CC=gcc
+CFLAGS=-g -Wall -Winline -O2
+LDFLAGS=-Wl,--no-as-needed
+
+OBJS=baz.o extra.o
+SHOBJS=baz.sho extra.sho
+NOPICOBJS = $(SHOBJS)
+
+all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \
+ libbaz.so
+
+libbaz2.so: libbaz2.so.1.0
+ ln -sf $^ $@
+libbaz2.so.1.0: libbaz2.so.1.0.3b
+ ln -sf $^ $@
+
+# Oops, forget the soname altogether
+libbaz1.so.1.0.3b: $(NOPICOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared $^ -lc
+
+libbaz2.so.1.0.3b: $(SHOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc
+
+# Non-PIC. We can't test this on all architectures
+libbaz3.so.1.0.3b: $(NOPICOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc
+
+# Non-versioned SONAME.
+libbaz.so: $(SHOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc
+
+#%.o-noreentrant: %.c
+# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $<
+
+%.sho: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
+
+%.o: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $<
+
+libbaz2.a: $(OBJS)
+ ar cq $@ $(OBJS)
+ strip --strip-unneeded --remove-section=.comment \
+ --remove-section=-note $@
+ ranlib $@
+
+# The pic one in the .a (wrong), no archive table
+libbaz1.a: $(SHOBJS)
+ ar cqS $@ $^
+ strip --strip-unneeded --remove-section=.comment \
+ --remove-section=-note $@
+clean:
+ rm -f *.a *.o *.so* *.sho
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/baz.c
new file mode 100644
index 0000000..4d5fc45
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/baz.c
@@ -0,0 +1,6 @@
+#include <math.h>
+
+double pw(double p)
+{
+ return exp(p);
+}
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/extra.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/build-spec/orig/extra.c
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/desc b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/desc
new file mode 100644
index 0000000..0a028e1
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-libbaz
+Check: libraries/shared/soname
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/hints b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/hints
new file mode 100644
index 0000000..17a0bab
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/hints
@@ -0,0 +1,2 @@
+libbaz2 (binary): package-name-doesnt-match-sonames libbaz2-1.0
+libbaz1 (binary): package-name-doesnt-match-sonames libbaz libbaz2-1.0 libbaz3-1
diff --git a/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/post-test b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/post-test
new file mode 100755
index 0000000..29dc3f4
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/legacy-libbaz/eval/post-test
@@ -0,0 +1,4 @@
+/: hardening-.*/ d
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
+s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g
+/: file-references-package-build-path / d
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/_symbols
new file mode 100644
index 0000000..46e6af1
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/_symbols
@@ -0,0 +1,23 @@
+ This line should flag a syntax error
+# but this one shouldn't
+| although this one should, but for a different reason
+ and so should this
+
+libhello.so.0 libhello0 #MINVER#
+| libhello0c2 (>= 1.2) , libhelloc0c2 (<< 1.3)
+| hello-dbg3| libhelloc0c3|foobar (= 1.2) |hello-dbg2
+| hello-dbg
+ hello@Base 1.0
+* Build-Dep-Foo: bar
+ hello2@Base 2.0 4
+ hello3@Base 2.0 1
+ hello3@Base 2.0 A
+ dummy
+
+libhello.so.2 libhello2 #MINVER#
+* Build-Depends-Package: libbar
+| libhello2 (>= 1:2.3)
+ hello@Base 2.0
+
+libhello.so.0 libhello0 #MINVER#
+ duplicate@Base 1.0
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/changelog.in
new file mode 100644
index 0000000..02da925
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/changelog.in
@@ -0,0 +1,13 @@
+debug ([% $version %]) [% $distribution %]; urgency=low
+
+ * NMU.
+ (uploaded by the maintainer and with repeated version number)
+
+ -- Russ Allbery <rra@debian.org> Tue, 4 Apr 2006 20:27:22 +0000
+
+debug (1.0) unstable; urgency=low
+
+ * Initial version.
+
+ -- Russ Allbery <rra@debian.org> Sat, 4 Mar 2006 21:31:06 -0800
+
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/control b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/control
new file mode 100644
index 0000000..fcb2b86
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/control
@@ -0,0 +1,85 @@
+Source: debug
+Section: utils
+Priority: optional
+Maintainer: Russ Allbery <rra@debian.org>
+Build-Depends: debhelper (>= 5.0.0)
+Build-Depends-Indep: not-debhelper (>= 0.4.3)
+Standards-Version: 3.7.0
+
+Package: hello
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information
+ Lintian regression test for external debugging file handling. This test
+ contains the binary.
+ .
+ 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.
+
+Package: hello-dbg
+Priority: optional
+Section: debug
+Architecture: any
+Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information (symbols)
+ Lintian regression test for external debugging file handling. This test
+ contains the binary symbols.
+ .
+ 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.
+
+Package: libhello0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information (library)
+ Lintian regression test for external debugging file handling. This test
+ contains a library.
+ .
+ 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.
+
+Package: libhello0-dbg
+Section: debug
+Priority: optional
+Architecture: any
+Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information (library symbols)
+ Lintian regression test for external debugging file handling. This test
+ contains the library symbols.
+ .
+ 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.
+
+Package: hi-dbg
+Section: debug
+Priority: optional
+Architecture: any
+Depends: foo-pkg, not-libhello0
+Description: Test for external debugging symbols
+ Lintian regression test for external debugging files handling. This test
+ contains the library symbols.
+ .
+ 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. It may
+ be an empty package.
+
+Package: hello-hello-dbg
+Section: debug
+Priority: optional
+Architecture: any
+Depends: foo-pkg, not-libhello0, hello
+Description: Test for external debugging symbols - another try
+ Lintian regression test for external debugging files handling. This test
+ contains the library symbols. This package actually tests a combination of
+ the above.
+ .
+ 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. It may
+ be an empty package.
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/copyright
new file mode 100644
index 0000000..5d4f6c2
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/copyright
@@ -0,0 +1,4 @@
+Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery <rra@debian.org>.
+
+Test for copyright in capital letters. (#464992)
+COPYRIGHT RUSS ALLBERY 2006
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/rules b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/rules
new file mode 100755
index 0000000..b659895
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/debian/rules
@@ -0,0 +1,99 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+
+# turn off PIE in CC in case we have a PIEful toolchain:
+ifneq ($(findstring -no-pie,$(shell gcc -no-pie 2>&1)),)
+ CC := gcc
+else
+ CC := gcc -fno-pie -no-pie
+endif
+
+build-indep:
+
+build-arch: build-stamp
+
+build-stamp:
+ dh_testdir
+ $(CC) -D_REENTRANT -fPIC -c libhello.c
+ $(CC) -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o
+ ln -s libhello.so.0.0 libhello.so
+ $(CC) -o hello hello.c -L. -lhello
+ touch build-stamp
+
+build: build-arch build-indep
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp *.o libhello.so.0.0 libhello.so
+ dh_clean
+
+install: build-stamp
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ install -D hello $(CURDIR)/debian/hello/usr/bin/hello
+ install -D libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0
+ ln -s libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0
+
+# Build architecture-dependent files here.
+export DH_OPTIONS
+binary-arch: DH_OPTIONS=-a
+binary-arch: build-stamp install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -N hello-dbg
+ dh_installdocs
+ DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg
+ DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg
+
+ # Now break a few things. Copy the debugging data into places it
+ # shouldn't be.
+ cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \
+ $(CURDIR)/debian/hello/usr/bin/hello.dbg
+ cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg
+
+ # Put a full copy of the library in libhello0-dbg in /usr/lib/debug,
+ # which is okay.
+ install -m 644 libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0
+
+ # Also put it in /usr/lib/debug/lib, which isn't.
+ install -D -m 644 libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0
+
+ # Requires a versioned dependency.
+ dh_icons
+
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs -X debug
+ dh_installdeb
+ dh_shlibdeps -X debug
+
+ # We do this by hand as otherwise dpkg-gensymbols
+ # will error due to the broken symbols file
+ # and abort the build; similarly the file in
+ # the source tree is _symbols so that dpkg
+ # doesn't attempt to sanity check it
+ install -d $(CURDIR)/debian/libhello0/DEBIAN
+ install -m 644 $(CURDIR)/debian/_symbols \
+ $(CURDIR)/debian/libhello0/DEBIAN/symbols
+ # hello doesn't contain any shlibs, but we
+ # make it contain a symbols file
+ install -d $(CURDIR)/debian/hello/DEBIAN
+ install -m 644 $(CURDIR)/debian/_symbols \
+ $(CURDIR)/debian/hello/DEBIAN/symbols
+
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-indep:
+binary: binary-indep binary-arch
+.PHONY: build-arch build-indep build binary binary-indep binary-arch clean install
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/fill-values b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/fill-values
new file mode 100644
index 0000000..79eebf1
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/fill-values
@@ -0,0 +1,6 @@
+Skeleton: upload-native
+Testname: legacy-debug
+Source: debug
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Dh-Compat-Level: 7
+Description: Legacy test "debug"
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/hello.c
new file mode 100644
index 0000000..76f8337
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/hello.c
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include "libhello.h"
+
+int
+main(void)
+{
+ hello();
+ exit(0);
+}
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.c
new file mode 100644
index 0000000..e2f8409
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+void
+hello(void)
+{
+ printf("Hello, World!\n");
+}
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.h
new file mode 100644
index 0000000..ef77476
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/build-spec/orig/libhello.h
@@ -0,0 +1 @@
+void hello(void);
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/desc b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/desc
new file mode 100644
index 0000000..c44e37c
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-debug
+Check: libraries/shared/soname/missing
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/hints b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/hints
new file mode 100644
index 0000000..67b1bb6
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/hints
@@ -0,0 +1 @@
+libhello0-dbg (binary): sharedobject-in-library-directory-missing-soname [usr/lib/libhello.so.dbg]
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/post-test b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/post-test
new file mode 100644
index 0000000..fc97c5f
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-debug/eval/post-test
@@ -0,0 +1,2 @@
+/: hardening-.*/ d
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/changelog.in b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/changelog.in
new file mode 100644
index 0000000..91a6bb5
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/changelog.in
@@ -0,0 +1,6 @@
+libbaz ([% $version %]) [% $distribution %]; urgency=low
+
+ * Initial setup
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Tue, 30 Jan 2001 15:23:59 -0800
+
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/control b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/control
new file mode 100644
index 0000000..1506687
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/control
@@ -0,0 +1,58 @@
+Source: libbaz
+Section: libs
+Priority: optional
+Maintainer: Lintian Maintainer <lintian-maint@debian.org>
+Build-depends: debhelper (>=4)
+Standards-Version: 3.2.1
+
+Package: libbaz1
+Architecture: any
+Provides: libbaz
+Description: test handling of library packages
+ Regression test for lintian's handling of libraries.
+ .
+ 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.
+
+Package: libbaz1-dev
+Architecture: any
+Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8
+Description: development package
+ Regression test for lintian's handling of libraries (dev).
+ .
+ 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.
+
+Package: libbaz2
+Architecture: any
+Depends: ${shlibs:Depends}, libssl0.9.8
+Description: test handling of library packages (good)
+ Regression test for lintian's handling of libraries (good).
+ .
+ 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.
+
+Package: libbaz2-dev
+Architecture: any
+Depends: ${shlibs:Depends}, libbaz2 (= ${source:Version})
+Description: development package (good)
+ Regression test for lintian's handling of libraries (dev good).
+ .
+ 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.
+
+Package: libbaz2-dbg
+Architecture: any
+Depends: libbaz2 (= ${binary:Version})
+Priority: optional
+Description: debugging package
+ Regression test for lintian's handling of libraries (debug).
+ .
+ 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.
+
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/copyright b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/copyright
new file mode 100644
index 0000000..a874c87
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/copyright
@@ -0,0 +1,8 @@
+This package is released under public domain. This is distributed in the hope
+that it will be useful, but without any warranty; without even the implied
+warranty of merchantability or fitness for a particular purpose.
+
+A reference to /usr/share/common-licenses/GPL-2 to make it look like this
+package is under the GPL and trigger the OpenSSL warning.
+
+However, this has an OpenSSL exception.
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.postinst b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.postinst
new file mode 100644
index 0000000..683e3cc
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+$PKG=libbaz1-dev
+
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.prerm b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.prerm
new file mode 100644
index 0000000..683e3cc
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/dev.prerm
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+$PKG=libbaz1-dev
+
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.postinst b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.postinst
new file mode 100644
index 0000000..ec0b98a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+$PKG=libbaz1
+
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/$PKG -a -d /usr/share/doc/$PKG ]
+; then
+ ln -sf ../share/doc/$PKG /usr/doc/$PKG
+ fi
+fi
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.prerm b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.prerm
new file mode 100644
index 0000000..50e37c3
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.prerm
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+$PKG=libbaz1
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/$PKG ]; then
+ rm -f /usr/doc/$PKG
+fi
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.shlibs b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.shlibs
new file mode 100644
index 0000000..b88e288
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.shlibs
@@ -0,0 +1,8 @@
+libdoesntexist2 1.0 libbaz1
+libdoesntexist2 1.0 libbaz1
+libbaz2 1.1 libbaz
+libbaz3 1 libbaz1 (>> 1-1)
+libbaz4 1 libbaz1 (= 1-1)
+libbaz5 1 libbaz2
+udeb: libdoesntexist2 1.0 libbaz2
+udeb: libdoesntexist2 1.0 libbaz2
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.symbols b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.symbols
new file mode 100644
index 0000000..72f9d8a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/lib.symbols
@@ -0,0 +1,3 @@
+libbaz.so.2 libbaz1 #MINVER#
+ pw 1-1
+ foo 1.1-1
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/rules b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/rules
new file mode 100755
index 0000000..fa99bc8
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/rules
@@ -0,0 +1,121 @@
+#!/usr/bin/make -f
+
+lib_tmp=debian/tmp-lib
+dev_tmp=debian/tmp-dev
+
+LIB=libbaz1
+DEV=libbaz1-dev
+
+VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)')
+
+build-arch:
+ $(MAKE)
+
+build-indep:
+
+build: build-arch build-indep
+
+clean:
+ $(MAKE) clean
+ dh_clean -plibbaz2 -plibbaz2-dev
+ rm -f debian/files debian/substvars
+ rm -rf $(lib_tmp) $(dev_tmp)
+
+# Now the correct libbaz2-dev package
+binary-correct:
+ install -d debian/libbaz2-dev/usr/lib
+ cp -a libbaz2.a libbaz2.so debian/libbaz2-dev/usr/lib
+ # usually, I'd also include some .h files to /usr/include
+
+ # Now the correct libbaz2 package
+ install -d debian/libbaz2/usr/lib
+ cp -a libbaz2.so.* debian/libbaz2/usr/lib
+ chmod a-x debian/libbaz2/usr/lib/*
+
+ # General stuff that is tested in other testsets:
+ dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+ # Mess up the libbaz2 changelog files to test the symlink handling.
+ ln -s /usr/share/doc/lintian/changelog.gz \
+ debian/libbaz2/usr/share/doc/libbaz2/changelog.gz
+ install -m 644 debian/changelog \
+ debian/libbaz2-dev/usr/share/doc/libbaz2-dev/foo
+ ln -s foo debian/libbaz2-dev/usr/share/doc/libbaz2-dev/changelog
+
+ # Okay, if either line is omitted, it should be noted
+ dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev
+ dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+ # and again, regular packaging stuff
+ dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs
+ dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+ dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+
+# and the incorrect one
+binary-arch: build-arch binary-correct
+ # first, the lib package
+ install -d $(lib_tmp)/usr/lib
+ # resp. no soname (check), wrong soname (check), and no-pic (check)
+ cp -a libbaz1.so.1.0* $(lib_tmp)/usr/lib
+ cp -a libbaz2.so.1.0.3b $(lib_tmp)/usr/lib/libfoo2.so.1.0.3b
+ install -m644 libbaz3.so.1.0.3b $(lib_tmp)/usr/lib/libbaz3.so.1.0.3b
+ # let's include the .a in the non-dev too (TODO)
+ # Also, libbaz1.a hasn't a symbol table (TODO)
+ cp -a *.a $(lib_tmp)/usr/lib
+ # And a wrong .so symlink (wrong, only in -dev, TODO)
+ ln -s libfoo3.so.0.9 $(lib_tmp)/usr/lib/libfoo3.so
+ # And a wrong .so.X symlink (wrong, should point to a real existing
+ # shlib, TODO)
+ ln -s libfoo.so.0.9.1 $(lib_tmp)/usr/lib/libfoo.so.0.9
+ # And a plain .so (wrong, TODO)
+ touch $(lib_tmp)/usr/lib/libbar2.so
+ # And a non-versioned SONAME.
+ install -m644 libbaz.so $(lib_tmp)/usr/lib/libbaz.so
+ strip --remove-section=.comment --strip-unneeded $(lib_tmp)/usr/lib/libbaz.so
+ # Pretend to be a Perl module to test a lack of Perl dependencies.
+ install -d $(lib_tmp)/$(VENDORARCH)/auto/Foo
+ install -m 644 libbaz2.so.1.0.3b $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ strip $(lib_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+
+ install -d $(lib_tmp)/usr/share/doc/$(LIB)
+ install -m 644 debian/copyright $(lib_tmp)/usr/share/doc/$(LIB)
+ install -m 644 debian/changelog $(lib_tmp)/usr/share/doc/$(LIB)
+ gzip -n -9 $(lib_tmp)/usr/share/doc/$(LIB)/changelog
+ install -d $(lib_tmp)/DEBIAN
+ install -m 755 debian/lib.postinst $(lib_tmp)/DEBIAN/postinst
+ install -m 755 debian/lib.prerm $(lib_tmp)/DEBIAN/prerm
+ touch $(lib_tmp)/usr/share/doc/README.Debian
+ #dpkg-shlibdeps $(lib_tmp)/usr/lib/libbaz.so.1.0
+ install -m 755 debian/lib.shlibs $(lib_tmp)/DEBIAN/shlibs
+ install -m 755 debian/lib.symbols $(lib_tmp)/DEBIAN/symbols
+ dpkg-gencontrol -isp -p$(LIB) -P$(lib_tmp)
+ dpkg --build $(lib_tmp) ..
+
+ # now the -dev package
+ install -d $(dev_tmp)/usr/include
+ install -d $(lib_tmp)/usr/lib
+ # let's also install the .so at the same time... (wrong, TODO)
+ cp -a *.a *.so.* $(lib_tmp)/usr/lib
+ # and fuck up permission (TODO)
+ chmod a+x $(lib_tmp)/usr/lib/*.a
+ # Pretend to be a Perl module to test a lack of Perl dependencies.
+ install -d $(dev_tmp)/$(VENDORARCH)/auto/Foo
+ install -m 644 libbaz2.so.1.0.3b $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ strip $(dev_tmp)/$(VENDORARCH)/auto/Foo/Foo.so
+ install -d $(dev_tmp)/usr/share/doc
+ ln -s $(LIB) $(dev_tmp)/usr/share/doc/$(DEV)
+ install -d $(dev_tmp)/DEBIAN
+ install -m 755 debian/dev.postinst $(dev_tmp)/DEBIAN/postinst
+ install -m 755 debian/dev.prerm $(dev_tmp)/DEBIAN/prerm
+ dpkg-gencontrol -isp -p$(DEV) -P$(dev_tmp)
+ dpkg --build $(dev_tmp) ..
+
+
+binary: binary-arch
+
+# The mention of binary-indep here should be sufficient to suppress the
+# warning that it's not present.
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/source.lintian-overrides b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/source.lintian-overrides
new file mode 100644
index 0000000..6008d27
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/debian/source.lintian-overrides
@@ -0,0 +1 @@
+libbaz source: maintainer-script-lacks-debhelper-token
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/fill-values b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/fill-values
new file mode 100644
index 0000000..7effe4f
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/fill-values
@@ -0,0 +1,6 @@
+Skeleton: upload-non-native
+Testname: legacy-libbaz
+Source: libbaz
+Version: 1-1
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Description: Legacy test "libbaz"
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/Makefile
new file mode 100644
index 0000000..657dc2a
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/Makefile
@@ -0,0 +1,55 @@
+# This is the correct way to build a lib
+
+CC=gcc
+CFLAGS=-g -Wall -Winline -O2
+LDFLAGS=-Wl,--no-as-needed
+
+OBJS=baz.o extra.o
+SHOBJS=baz.sho extra.sho
+NOPICOBJS = $(SHOBJS)
+
+all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b \
+ libbaz.so
+
+libbaz2.so: libbaz2.so.1.0
+ ln -sf $^ $@
+libbaz2.so.1.0: libbaz2.so.1.0.3b
+ ln -sf $^ $@
+
+# Oops, forget the soname altogether
+libbaz1.so.1.0.3b: $(NOPICOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared $^ -lc
+
+libbaz2.so.1.0.3b: $(SHOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc
+
+# Non-PIC. We can't test this on all architectures
+libbaz3.so.1.0.3b: $(NOPICOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc
+
+# Non-versioned SONAME.
+libbaz.so: $(SHOBJS)
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,libbaz.so $^ -lc
+
+#%.o-noreentrant: %.c
+# $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -c $<
+
+%.sho: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
+
+%.o: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -D_REENTRANT -o $@ -c $<
+
+libbaz2.a: $(OBJS)
+ ar cq $@ $(OBJS)
+ strip --strip-unneeded --remove-section=.comment \
+ --remove-section=-note $@
+ ranlib $@
+
+# The pic one in the .a (wrong), no archive table
+libbaz1.a: $(SHOBJS)
+ ar cqS $@ $^
+ strip --strip-unneeded --remove-section=.comment \
+ --remove-section=-note $@
+clean:
+ rm -f *.a *.o *.so* *.sho
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/baz.c b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/baz.c
new file mode 100644
index 0000000..4d5fc45
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/baz.c
@@ -0,0 +1,6 @@
+#include <math.h>
+
+double pw(double p)
+{
+ return exp(p);
+}
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/extra.c b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/extra.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/build-spec/orig/extra.c
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/desc b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/desc
new file mode 100644
index 0000000..ae6536b
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-libbaz
+Check: libraries/shared/soname/missing
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/hints b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/hints
new file mode 100644
index 0000000..28d3482
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/hints
@@ -0,0 +1 @@
+libbaz1 (binary): sharedobject-in-library-directory-missing-soname [usr/lib/libbaz1.so.1.0.3b]
diff --git a/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/post-test b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/post-test
new file mode 100755
index 0000000..29dc3f4
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/legacy-libbaz/eval/post-test
@@ -0,0 +1,4 @@
+/: hardening-.*/ d
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
+s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g
+/: file-references-package-build-path / d
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/control.in
new file mode 100644
index 0000000..c749732
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/debian/control.in
@@ -0,0 +1,15 @@
+Source: [% $source %]
+Priority: optional
+Section: libs
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libhallo1
+Architecture: [% $package_architecture %]
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ 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.
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/fill-values b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/fill-values
new file mode 100644
index 0000000..94741cf
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/fill-values
@@ -0,0 +1,6 @@
+Skeleton: upload-native
+Testname: shared-libs-missing-soname
+Package-Architecture: any
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Dh-Compat-Level: 9
+Description: Test for shlib without SONAME
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/Makefile
new file mode 100644
index 0000000..2c8bd5e
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/Makefile
@@ -0,0 +1,19 @@
+CFLAGS += -fPIC
+
+all: libhallo.so hallohelper
+
+libhallo.so: code.o
+ $(LINK.c) -o $@ -shared $^ -lc
+
+hallohelper: main.o
+ $(LINK.c) -o $@ -pie $^ -lc
+
+clean:
+ rm -f *.a *.o *.so *helper
+
+install: all
+ install -m 0755 -d $(DESTDIR)/usr/lib
+ install -m 0644 *.so $(DESTDIR)/usr/lib
+ install -m 0755 *helper $(DESTDIR)/usr/lib
+
+.PHONY: install clean
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/code.c b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/code.c
new file mode 100644
index 0000000..65887f3
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/code.c
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+#include <math.h>
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/main.c b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/main.c
new file mode 100644
index 0000000..832667c
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/build-spec/orig/main.c
@@ -0,0 +1,4 @@
+int main(int argc, char **argv)
+{
+ return 42;
+}
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/desc b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/desc
new file mode 100644
index 0000000..64729bb
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/desc
@@ -0,0 +1,2 @@
+Testname: shared-libs-missing-soname
+Check: libraries/shared/soname/missing
diff --git a/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/hints b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/hints
new file mode 100644
index 0000000..cd76dc7
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/soname/missing/shared-libs-missing-soname/eval/hints
@@ -0,0 +1 @@
+libhallo1 (binary): sharedobject-in-library-directory-missing-soname [usr/lib/libhallo.so]