summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames')
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in48
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install1
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols2
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install1
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols2
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install1
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols2
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install1
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols2
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values5
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile23
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c9
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc2
-rw-r--r--t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints4
15 files changed, 104 insertions, 0 deletions
diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/control.in
new file mode 100644
index 0000000..1109beb
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.install
new file mode 100644
index 0000000..283bc61
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany5gcc1v5.symbols
new file mode 100644
index 0000000..a394502
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.install
new file mode 100644
index 0000000..9485e87
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libany6gcc1v6.symbols
new file mode 100644
index 0000000..aee5f00
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.install
new file mode 100644
index 0000000..b4ecaea
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/libanyq16-6.symbols
new file mode 100644
index 0000000..0f32f79
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.install
new file mode 100644
index 0000000..5c86ce1
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/debian/mylibany.symbols
new file mode 100644
index 0000000..9b6f454
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/fill-values
new file mode 100644
index 0000000..523eb0b
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/Makefile
new file mode 100644
index 0000000..21a67b5
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/build-spec/orig/code.c
new file mode 100644
index 0000000..0c4f917
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/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/debian/shlibs/binaries-doesnt-match-sonames/eval/desc b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc
new file mode 100644
index 0000000..02d87f3
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/desc
@@ -0,0 +1,2 @@
+Testname: binaries-doesnt-match-sonames
+Check: debian/shlibs
diff --git a/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints
new file mode 100644
index 0000000..6cf925b
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/binaries-doesnt-match-sonames/eval/hints
@@ -0,0 +1,4 @@
+mylibany (binary): symbols-file-missing-build-depends-package-field libany.so.1 [symbols]
+libanyq16-6 (binary): symbols-file-missing-build-depends-package-field libanyQ16.so.6 [symbols]
+libany6gcc1v6 (binary): symbols-file-missing-build-depends-package-field libany6gcc.so.1v6 [symbols]
+libany5gcc1v5 (binary): symbols-file-missing-build-depends-package-field libany5gcc.so.1 [symbols]