diff options
Diffstat (limited to 't/recipes/checks/binaries/location/binaries-multiarch-same')
8 files changed, 68 insertions, 0 deletions
diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in new file mode 100644 index 0000000..2efaa33 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/control.in @@ -0,0 +1,25 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends}, multiarch-support +Depends: ${misc:Depends}, ${shlibs:Depends} +Multi-Arch: same +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. It may + be an empty package. + . + Note there is an explicitly pre-depends on multiarch-support, since + older versions of debhelper might not use it yet. dpkg-dev will + remove the duplicate entry (if any). + + + diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c2b8fb3 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/debian/libbasic2.symbols @@ -0,0 +1,2 @@ +libbasic.so.2 libbasic2 #MINVER# + lib_interface@Base 1.0 diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values new file mode 100644 index 0000000..c508b75 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-multiarch-same +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test of multiarch same package with unsafe binaries diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile new file mode 100644 index 0000000..ad7783b --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/Makefile @@ -0,0 +1,12 @@ + +all: + gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c + +install: + install -d $(DESTDIR)/usr/lib/ + install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/libbasic.so.2 + +clean distclean: + rm -f libbasic.so.2 + +check test: diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c new file mode 100644 index 0000000..27e93fc --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/build-spec/orig/basic.c @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <string.h> + +static void +hardening_trigger(char *p, int i, void (*f)(char *)) +{ + char test[10]; + memcpy(test, p, i); + f(test); + printf("%s", test); +} + +int +lib_interface(void) +{ + printf("Hello world!\n"); + hardening_trigger(NULL, 0, NULL); + return 0; +} diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc new file mode 100644 index 0000000..50a4f57 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-multiarch-same +Check: binaries/location diff --git a/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints new file mode 100644 index 0000000..b482a07 --- /dev/null +++ b/t/recipes/checks/binaries/location/binaries-multiarch-same/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): arch-dependent-file-not-in-arch-specific-directory [usr/lib/libbasic.so.2] |