diff options
-rw-r--r-- | meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch | 52 | ||||
-rw-r--r-- | meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch | 10 | ||||
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.54.bb (renamed from meta/recipes-support/libcap/libcap_2.51.bb) | 4 |
3 files changed, 7 insertions, 59 deletions
diff --git a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch deleted file mode 100644 index 55872aa8fa..0000000000 --- a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 897900f3f9084c5542097851323bba3f2691df20 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 15 Jan 2020 17:16:28 +0100 | ||
4 | Subject: [PATCH] tests: do not statically link a test | ||
5 | |||
6 | This fails on e.g. centos 7 | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe-core specific] | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | --- | ||
11 | progs/Makefile | 2 +- | ||
12 | tests/Makefile | 4 ++-- | ||
13 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/progs/Makefile b/progs/Makefile | ||
16 | index 3e82862..48533f3 100644 | ||
17 | --- a/progs/Makefile | ||
18 | +++ b/progs/Makefile | ||
19 | @@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS) | ||
20 | $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) | ||
21 | |||
22 | tcapsh-static: capsh.c capshdoc.h.cf $(DEPS) | ||
23 | - $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static | ||
24 | + $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) | ||
25 | |||
26 | uns_test: ../tests/uns_test.c | ||
27 | $(MAKE) -C ../tests uns_test | ||
28 | diff --git a/tests/Makefile b/tests/Makefile | ||
29 | index 4a5f2f9..4266d86 100644 | ||
30 | --- a/tests/Makefile | ||
31 | +++ b/tests/Makefile | ||
32 | @@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes) | ||
33 | DEPS += ../libcap/libpsx.so | ||
34 | endif | ||
35 | else | ||
36 | -LDFLAGS += --static | ||
37 | +LDFLAGS += | ||
38 | DEPS=../libcap/libcap.a | ||
39 | ifeq ($(PTHREADS),yes) | ||
40 | DEPS += ../libcap/libpsx.a | ||
41 | @@ -113,7 +113,7 @@ noexploit: exploit.o $(DEPS) | ||
42 | |||
43 | # This one runs in a chroot with no shared library files. | ||
44 | noop: noop.c | ||
45 | - $(CC) $(CFLAGS) $< -o $@ --static | ||
46 | + $(CC) $(CFLAGS) $< -o $@ | ||
47 | |||
48 | clean: | ||
49 | rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~ | ||
50 | -- | ||
51 | 2.25.1 | ||
52 | |||
diff --git a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch index 69287152eb..0fe7295a5f 100644 --- a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch +++ b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 652071e430d5eea758965176b7648e79ad404daa Mon Sep 17 00:00:00 2001 | 1 | From cc97f84469ee7b266977a20d9cfa63c52f821384 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 20 Dec 2019 16:54:05 +0100 | 3 | Date: Fri, 20 Dec 2019 16:54:05 +0100 |
4 | Subject: [PATCH] tests: do not run target executables | 4 | Subject: [PATCH] tests: do not run target executables |
@@ -11,20 +11,20 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
11 | 1 file changed, 2 deletions(-) | 11 | 1 file changed, 2 deletions(-) |
12 | 12 | ||
13 | diff --git a/tests/Makefile b/tests/Makefile | 13 | diff --git a/tests/Makefile b/tests/Makefile |
14 | index fc39fee..3431df9 100644 | 14 | index d9ed248..2864f77 100644 |
15 | --- a/tests/Makefile | 15 | --- a/tests/Makefile |
16 | +++ b/tests/Makefile | 16 | +++ b/tests/Makefile |
17 | @@ -59,13 +59,11 @@ endif | 17 | @@ -63,13 +63,11 @@ endif |
18 | 18 | ||
19 | # unprivileged | 19 | # unprivileged |
20 | run_psx_test: psx_test | 20 | run_psx_test: psx_test |
21 | - ./psx_test | 21 | - ./psx_test |
22 | 22 | ||
23 | psx_test: psx_test.c $(DEPS) | 23 | psx_test: psx_test.c $(DEPS) |
24 | $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS) | 24 | $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS) |
25 | 25 | ||
26 | run_libcap_psx_test: libcap_psx_test | 26 | run_libcap_psx_test: libcap_psx_test |
27 | - ./libcap_psx_test | 27 | - ./libcap_psx_test |
28 | 28 | ||
29 | libcap_psx_test: libcap_psx_test.c $(DEPS) | 29 | libcap_psx_test: libcap_psx_test.c $(DEPS) |
30 | $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS) | 30 | $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS) |
diff --git a/meta/recipes-support/libcap/libcap_2.51.bb b/meta/recipes-support/libcap/libcap_2.54.bb index c9c30fb05f..04362e7032 100644 --- a/meta/recipes-support/libcap/libcap_2.51.bb +++ b/meta/recipes-support/libcap/libcap_2.54.bb | |||
@@ -12,9 +12,8 @@ DEPENDS = "hostperl-runtime-native gperf-native" | |||
12 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ | 12 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ |
13 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ | 13 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ |
14 | file://0002-tests-do-not-run-target-executables.patch \ | 14 | file://0002-tests-do-not-run-target-executables.patch \ |
15 | file://0001-tests-do-not-statically-link-a-test.patch \ | ||
16 | " | 15 | " |
17 | SRC_URI[sha256sum] = "6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9" | 16 | SRC_URI[sha256sum] = "5091b24247999fd7a5e62bd9ac8bc761cda29f9baa0d1a2ca6a46f13891b4f0f" |
18 | 17 | ||
19 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" | 18 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" |
20 | 19 | ||
@@ -42,6 +41,7 @@ do_compile() { | |||
42 | AR="${AR}" \ | 41 | AR="${AR}" \ |
43 | CC="${CC}" \ | 42 | CC="${CC}" \ |
44 | RANLIB="${RANLIB}" \ | 43 | RANLIB="${RANLIB}" \ |
44 | OBJCOPY="${OBJCOPY}" \ | ||
45 | COPTS="${CFLAGS}" \ | 45 | COPTS="${CFLAGS}" \ |
46 | BUILD_COPTS="${BUILD_CFLAGS}" | 46 | BUILD_COPTS="${BUILD_CFLAGS}" |
47 | } | 47 | } |