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:30:04 +0100
commitecadaa08956f53dfedee908a0344f512673b770b (patch)
treeb0da2522191da30d167b00bc1cb0563876f4ee99 /meta/recipes-support/libcap
parent191d6d1f614a78ef8496e4357d419c68d1e03170 (diff)
downloadopenembedded-core-ecadaa08956f53dfedee908a0344f512673b770b.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. 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 @@
-From 897900f3f9084c5542097851323bba3f2691df20 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 15 Jan 2020 17:16:28 +0100
-Subject: [PATCH] tests: do not statically link a test
-
-This fails on e.g. centos 7
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- progs/Makefile | 2 +-
- tests/Makefile | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/progs/Makefile b/progs/Makefile
-index 3e82862..48533f3 100644
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS)
- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
-
- tcapsh-static: capsh.c capshdoc.h.cf $(DEPS)
-- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static
-+ $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
-
- uns_test: ../tests/uns_test.c
- $(MAKE) -C ../tests uns_test
-diff --git a/tests/Makefile b/tests/Makefile
-index 4a5f2f9..4266d86 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes)
- DEPS += ../libcap/libpsx.so
- endif
- else
--LDFLAGS += --static
-+LDFLAGS +=
- DEPS=../libcap/libcap.a
- ifeq ($(PTHREADS),yes)
- DEPS += ../libcap/libpsx.a
-@@ -113,7 +113,7 @@ noexploit: exploit.o $(DEPS)
-
- # This one runs in a chroot with no shared library files.
- noop: noop.c
-- $(CC) $(CFLAGS) $< -o $@ --static
-+ $(CC) $(CFLAGS) $< -o $@
-
- clean:
- rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~
---
-2.25.1
-
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 @@
-From 652071e430d5eea758965176b7648e79ad404daa Mon Sep 17 00:00:00 2001
+From cc97f84469ee7b266977a20d9cfa63c52f821384 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 20 Dec 2019 16:54:05 +0100
Subject: [PATCH] tests: do not run target executables
@@ -11,20 +11,20 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 2 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
-index fc39fee..3431df9 100644
+index d9ed248..2864f77 100644
--- a/tests/Makefile
+++ b/tests/Makefile
-@@ -59,13 +59,11 @@ endif
+@@ -63,13 +63,11 @@ endif
# unprivileged
run_psx_test: psx_test
- ./psx_test
psx_test: psx_test.c $(DEPS)
- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
run_libcap_psx_test: libcap_psx_test
- ./libcap_psx_test
libcap_psx_test: libcap_psx_test.c $(DEPS)
- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
+ $(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"
SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
file://0002-tests-do-not-run-target-executables.patch \
- file://0001-tests-do-not-statically-link-a-test.patch \
"
-SRC_URI[sha256sum] = "6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9"
+SRC_URI[sha256sum] = "5091b24247999fd7a5e62bd9ac8bc761cda29f9baa0d1a2ca6a46f13891b4f0f"
UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
@@ -42,6 +41,7 @@ do_compile() {
AR="${AR}" \
CC="${CC}" \
RANLIB="${RANLIB}" \
+ OBJCOPY="${OBJCOPY}" \
COPTS="${CFLAGS}" \
BUILD_COPTS="${BUILD_CFLAGS}"
}