From 75808db17caf8b960b351e3408e74142f4c85aac Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:42:30 +0200 Subject: Adding upstream version 2.117.0. Signed-off-by: Daniel Baumann --- .../binaries-general/build-spec/debian/rules | 12 +++ .../binaries-general/build-spec/fill-values | 4 + .../binaries-general/build-spec/orig/Makefile | 64 ++++++++++++++ .../binaries-general/build-spec/orig/basic.c | 12 +++ .../binaries-general/build-spec/orig/getbuildid | 30 +++++++ .../binaries-general/build-spec/orig/ocaml.c | 11 +++ .../detached/binaries-general/eval/desc | 2 + .../detached/binaries-general/eval/hints | 4 + .../detached/binaries-general/eval/post-test | 1 + .../legacy-debug/build-spec/debian/_symbols | 23 +++++ .../legacy-debug/build-spec/debian/changelog.in | 13 +++ .../legacy-debug/build-spec/debian/compat.in | 1 + .../legacy-debug/build-spec/debian/control | 85 +++++++++++++++++++ .../legacy-debug/build-spec/debian/copyright | 4 + .../detached/legacy-debug/build-spec/debian/rules | 99 ++++++++++++++++++++++ .../detached/legacy-debug/build-spec/fill-values | 6 ++ .../detached/legacy-debug/build-spec/orig/hello.c | 9 ++ .../legacy-debug/build-spec/orig/libhello.c | 7 ++ .../legacy-debug/build-spec/orig/libhello.h | 1 + .../debug-symbols/detached/legacy-debug/eval/desc | 2 + .../debug-symbols/detached/legacy-debug/eval/hints | 5 ++ .../detached/legacy-debug/eval/post-test | 2 + 22 files changed, 397 insertions(+) create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c create mode 100755 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints create mode 100755 t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright create mode 100755 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints create mode 100644 t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test (limited to 't/recipes/checks/binaries/debug-symbols/detached') diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules new file mode 100644 index 0000000..3ea7a63 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ + +override_dh_strip: + dh_strip -X usr/lib/debug -X unstripped -X ocaml + +override_dh_dwz: + # Can error with "deadbeefdeadbeef.debug: Found compressed .debug_info section, not attempting dwz compression" diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values new file mode 100644 index 0000000..a24247d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: binaries-general +Description: Misc errors related to binaries +Package-Architecture: any diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile new file mode 100644 index 0000000..cf0f211 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/Makefile @@ -0,0 +1,64 @@ +# 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 + +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) +# extract from readelf +GETBUILDID:=./getbuildid + +all: + # rpath not matching any of the exceptions to the rpath checks + # - with profiling enabled. + $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib + # rpath shipped in the package, but one of {/usr}?/lib + $(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib + # non-special rpath shipped in the package + $(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo + # special rpath shipped in the package, multiple paths + $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar + # static version of basic for debugging checks + $(COMPILE_NOPIE) -static -o basic.static basic.c + # static executable to trigger ocaml check + $(COMPILE_NOPIE) -o ocaml-exec ocaml.c + # version with debug + $(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c + +install: + # according to local debian rules /usr/lib/debug is unstripped + install -d $(DESTDIR)/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/ + install -d $(DESTDIR)/usr/lib/foo/ + install -d $(DESTDIR)/usr/bin + + install -m 755 -c basic $(DESTDIR)/usr/share/foo/basic + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic + install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath + install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath + install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec + install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore + objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug + # force fake buildid in order to have tag matching ok (deadbeefdeadbeef) + install -d "$(DESTDIR)/usr/lib/debug/.build-id/de" + objcopy --compress-debug-sections basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug" + install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug` + objcopy --compress-debug-sections --only-keep-debug basicdebug \ + "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`"/"`$(GETBUILDID) -f basicdebug`.debug + install -m 755 -c basic.static $(DESTDIR)/usr/lib/debug/ + # according to local debian rules unstripped in name avoid dh_strip to do the work + install -m 755 basicdebug $(DESTDIR)/usr/bin/unstripped + install -m 755 basic.static $(DESTDIR)/usr/bin/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c new file mode 100644 index 0000000..3618004 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + char t[10]; + printf("Hello world!\n"); + /* forces a stack protector */ + (void) strcpy(t,argv[0]); + return (int) t[0]; +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid new file mode 100755 index 0000000..0060d2b --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/getbuildid @@ -0,0 +1,30 @@ +#!/bin/sh +# get build-id of binary + +set -e + +usage() { + echo "Usage: getbuildid [flag] file"; + echo " print build-id of an object file" + echo "flags:" + echo " -f : full build-id (default)." + echo " -s : short build-id aka the first two characters." +} + +if test $# -lt 1; then usage; exit 77; fi +if test $# -gt 3; then usage; exit 77; fi + +if test $# -eq 1; then + LC_ALL=C readelf -n "$1" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' +else + case "x$1" in + 'x-f') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g' ;; + 'x-s') + LC_ALL=C readelf -n "$2" | grep -i 'Build Id:' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]\{2\}\).*/\1/g' ;; + *) + exit 2; + esac +fi + +exit 0; diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c new file mode 100644 index 0000000..370d17d --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/build-spec/orig/ocaml.c @@ -0,0 +1,11 @@ +#include + +int +main(int argc, char **argv) +{ + if (argc > 2) { + puts("Caml1999X000"); + } + puts("\n"); + return 0; +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc new file mode 100644 index 0000000..e94b7c0 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-general +Check: binaries/debug-symbols/detached diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints new file mode 100644 index 0000000..849ff30 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/hints @@ -0,0 +1,4 @@ +binaries-general (binary): debug-symbols-not-detached [usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug] +binaries-general (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/basic] +binaries-general (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/basic.static] +binaries-general (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/share/foo/basic] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test new file mode 100755 index 0000000..11ad2c8 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/binaries-general/eval/post-test @@ -0,0 +1 @@ +/: hardening-.*/ d diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/_symbols new file mode 100644 index 0000000..46e6af1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/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/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/changelog.in new file mode 100644 index 0000000..02da925 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/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 Tue, 4 Apr 2006 20:27:22 +0000 + +debug (1.0) unstable; urgency=low + + * Initial version. + + -- Russ Allbery Sat, 4 Mar 2006 21:31:06 -0800 + diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control new file mode 100644 index 0000000..fcb2b86 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/control @@ -0,0 +1,85 @@ +Source: debug +Section: utils +Priority: optional +Maintainer: Russ Allbery +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/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright new file mode 100644 index 0000000..5d4f6c2 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/copyright @@ -0,0 +1,4 @@ +Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery . + +Test for copyright in capital letters. (#464992) +COPYRIGHT RUSS ALLBERY 2006 diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/debian/rules new file mode 100755 index 0000000..b659895 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/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/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/fill-values new file mode 100644 index 0000000..79eebf1 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/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/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c new file mode 100644 index 0000000..76f8337 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/hello.c @@ -0,0 +1,9 @@ +#include +#include "libhello.h" + +int +main(void) +{ + hello(); + exit(0); +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c new file mode 100644 index 0000000..e2f8409 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.c @@ -0,0 +1,7 @@ +#include + +void +hello(void) +{ + printf("Hello, World!\n"); +} diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h new file mode 100644 index 0000000..ef77476 --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/build-spec/orig/libhello.h @@ -0,0 +1 @@ +void hello(void); diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc new file mode 100644 index 0000000..d606fde --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debug +Check: binaries/debug-symbols/detached diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints new file mode 100644 index 0000000..d524d8e --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/hints @@ -0,0 +1,5 @@ +libhello0-dbg (binary): debug-symbols-not-detached [usr/lib/debug/lib/libhello.so.0.0] +libhello0-dbg (binary): debug-symbols-directly-in-usr-lib-debug [usr/lib/debug/libhello.so.0.0] +libhello0-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/lib/libhello.so.0.0] +libhello0-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/lib/libhello.so.0.0] +hello-dbg (binary): debug-file-with-no-debug-symbols [usr/lib/debug/usr/bin/hello] diff --git a/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test new file mode 100644 index 0000000..fc97c5f --- /dev/null +++ b/t/recipes/checks/binaries/debug-symbols/detached/legacy-debug/eval/post-test @@ -0,0 +1,2 @@ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ -- cgit v1.2.3