diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/binaries/large-file-support | |
parent | Initial commit. (diff) | |
download | lintian-upstream.tar.xz lintian-upstream.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/binaries/large-file-support')
9 files changed, 81 insertions, 0 deletions
diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in new file mode 100644 index 0000000..1c522b3 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %], perl +Rules-Requires-Root: no + +Package: libbasic2 +Architecture: [% $package_architecture %] +Section: libs +Depends: ${misc:Depends}, ${shlibs: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. It may + be an empty package. diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols new file mode 100644 index 0000000..c67f613 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/debian/libbasic2.symbols @@ -0,0 +1,4 @@ +libbasic.so.2 libbasic2 #MINVER# + do_open@Base 1.0 + lib_interface@Base 1.0 + zz_open@Base 1.0 diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values new file mode 100644 index 0000000..b6b9ca6 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: binaries-missing-lfs +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test for missing lfs +Package-Architecture: any diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/Makefile b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/Makefile new file mode 100644 index 0000000..637a9ca --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/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 lfs.c basic.c + +install: + # install it under the correct triplet directory + 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/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c new file mode 100644 index 0000000..3d12fde --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/basic.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.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; +} + +int +do_open (char *file) { + return open (file, O_RDONLY); +} diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c new file mode 100644 index 0000000..04fe113 --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/build-spec/orig/lfs.c @@ -0,0 +1,10 @@ +#define _FILE_OFFSET_BITS 64 + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +int +zz_open (char *file) { + return open (file, O_RDONLY); +} diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc new file mode 100644 index 0000000..65404ca --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/desc @@ -0,0 +1,3 @@ +Testname: binaries-missing-lfs +Test-Architectures: i386 armhf +Check: binaries/large-file-support diff --git a/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints new file mode 100644 index 0000000..beba8ae --- /dev/null +++ b/t/recipes/checks/binaries/large-file-support/binaries-missing-lfs/eval/hints @@ -0,0 +1 @@ +libbasic2 (binary): binary-file-built-without-LFS-support [usr/lib/libbasic.so.2] |