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/libraries/shared/stack/shared-libs-exec-stack | |
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/libraries/shared/stack/shared-libs-exec-stack')
9 files changed, 66 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/control.in new file mode 100644 index 0000000..bd81464 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/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: libexecstack1 +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/stack/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols new file mode 100644 index 0000000..1cc72ae --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/debian/libexecstack1.symbols @@ -0,0 +1,3 @@ +libexecstack.so.1 libexecstack1 #MINVER# + foo@Base 1.0 + get@Base 1.0 diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/fill-values b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/fill-values new file mode 100644 index 0000000..7ca10e3 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exec-stack +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs with exec stack diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/Makefile new file mode 100644 index 0000000..1754891 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecstack.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): foo.o get.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ + +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/stack/shared-libs-exec-stack/build-spec/orig/foo.c b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/foo.c new file mode 100644 index 0000000..7f41799 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/foo.c @@ -0,0 +1,9 @@ +extern int get(int, int (*)(int)); + +int foo(int a) { + int b = a; + int bar(int a) { + return a + b; + } + return get(a, bar); +} diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/get.c b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/get.c new file mode 100644 index 0000000..8207637 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/build-spec/orig/get.c @@ -0,0 +1,6 @@ +int get(int a, int (*f)(int)) { + return f(a); +} + +extern int foo(int); + diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/desc b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/desc new file mode 100644 index 0000000..d4a1cf4 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/desc @@ -0,0 +1,3 @@ +Testname: shared-libs-exec-stack +Check: libraries/shared/stack +Test-Architectures: any-amd64 any-i386 arm64 armel armhf ppc64el s390x alpha arc hppa ia64 m68k powerpc ppc64 riscv64 sh4 sparc64 x32 diff --git a/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/hints b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/hints new file mode 100644 index 0000000..577d912 --- /dev/null +++ b/t/recipes/checks/libraries/shared/stack/shared-libs-exec-stack/eval/hints @@ -0,0 +1 @@ +libexecstack1 (binary): executable-stack-in-shared-library [usr/lib/libexecstack.so.1.0.1] |