summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-08 20:01:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-11 18:41:37 +0100
commit801a17bfbe6b2296c2bbf303d864b091602efbe3 (patch)
treea3e7bc40c3ca6187b58014ba6646e5aec83df286 /meta/recipes-support/libcap
parentf33e81a64395666a3cbb5b9ef299606c3b8052f3 (diff)
downloadpoky-801a17bfbe6b2296c2bbf303d864b091602efbe3.tar.gz
libcap: update 2.51 -> 2.54
Rebase patches. Delete 0001-tests-do-not-statically-link-a-test.patch as centos builds are now using their own buildtools. (From OE-Core rev: ecadaa08956f53dfedee908a0344f512673b770b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libcap')
-rw-r--r--meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch52
-rw-r--r--meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch10
-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 @@
1From 897900f3f9084c5542097851323bba3f2691df20 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 15 Jan 2020 17:16:28 +0100
4Subject: [PATCH] tests: do not statically link a test
5
6This fails on e.g. centos 7
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-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
15diff --git a/progs/Makefile b/progs/Makefile
16index 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
28diff --git a/tests/Makefile b/tests/Makefile
29index 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--
512.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 @@
1From 652071e430d5eea758965176b7648e79ad404daa Mon Sep 17 00:00:00 2001 1From cc97f84469ee7b266977a20d9cfa63c52f821384 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Dec 2019 16:54:05 +0100 3Date: Fri, 20 Dec 2019 16:54:05 +0100
4Subject: [PATCH] tests: do not run target executables 4Subject: [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
13diff --git a/tests/Makefile b/tests/Makefile 13diff --git a/tests/Makefile b/tests/Makefile
14index fc39fee..3431df9 100644 14index 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"
12SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ 12SRC_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 "
17SRC_URI[sha256sum] = "6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9" 16SRC_URI[sha256sum] = "5091b24247999fd7a5e62bd9ac8bc761cda29f9baa0d1a2ca6a46f13891b4f0f"
18 17
19UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" 18UPSTREAM_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}