diff options
Diffstat (limited to 'meta/recipes-support/libcap-ng')
-rw-r--r-- | meta/recipes-support/libcap-ng/files/fix-issues-with-swig-4-2.patch | 32 | ||||
-rw-r--r-- | meta/recipes-support/libcap-ng/libcap-ng-python_0.8.4.bb (renamed from meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb) | 5 | ||||
-rw-r--r-- | meta/recipes-support/libcap-ng/libcap-ng.inc | 8 | ||||
-rw-r--r-- | meta/recipes-support/libcap-ng/libcap-ng/determinism.patch | 59 | ||||
-rw-r--r-- | meta/recipes-support/libcap-ng/libcap-ng_0.8.4.bb (renamed from meta/recipes-support/libcap-ng/libcap-ng_0.8.2.bb) | 2 |
5 files changed, 40 insertions, 66 deletions
diff --git a/meta/recipes-support/libcap-ng/files/fix-issues-with-swig-4-2.patch b/meta/recipes-support/libcap-ng/files/fix-issues-with-swig-4-2.patch new file mode 100644 index 0000000000..fb424fe725 --- /dev/null +++ b/meta/recipes-support/libcap-ng/files/fix-issues-with-swig-4-2.patch @@ -0,0 +1,32 @@ +From 355eada2d20886287cffc16e304087dd6f66ae37 Mon Sep 17 00:00:00 2001 +From: Steve Grubb <ausearch.1@gmail.com> +Date: Thu, 4 Jan 2024 15:06:29 -0500 +Subject: [PATCH] Remove python global exception handler since its deprecated + +Upstream-Status: Backport [https://github.com/stevegrubb/libcap-ng/commit/30453b6553948cd05c438f9f509013e3bb84f25b] +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + bindings/src/capng_swig.i | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i +index fcdaf18..fa85e13 100644 +--- a/bindings/src/capng_swig.i ++++ b/bindings/src/capng_swig.i +@@ -30,13 +30,6 @@ + + %varargs(16, signed capability = 0) capng_updatev; + +-%except(python) { +- $action +- if (result < 0) { +- PyErr_SetFromErrno(PyExc_OSError); +- return NULL; +- } +-} + #endif + + %define __signed__ +-- +2.43.2 + diff --git a/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb b/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.4.bb index 1240589d00..4790134ae9 100644 --- a/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb +++ b/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.4.bb @@ -6,11 +6,12 @@ SUMMARY .= " - python" inherit lib_package autotools python3targetconfig -DEPENDS += "libcap-ng python3 swig-native" +# drop setuptools when version > 0.8.3 is released; it's needed only for distutils +DEPENDS += "libcap-ng python3 swig-native python3-setuptools-native" S = "${WORKDIR}/libcap-ng-${PV}" -EXTRA_OECONF += "--with-python --with-python3" +EXTRA_OECONF += "--with-python3" do_install:append() { rm -rf ${D}${bindir} diff --git a/meta/recipes-support/libcap-ng/libcap-ng.inc b/meta/recipes-support/libcap-ng/libcap-ng.inc index 34374b4dbf..845b7c2f0a 100644 --- a/meta/recipes-support/libcap-ng/libcap-ng.inc +++ b/meta/recipes-support/libcap-ng/libcap-ng.inc @@ -3,15 +3,15 @@ DESCRIPTION = "The libcap-ng library is intended to make programming \ with POSIX capabilities much easier than the traditional libcap library." HOMEPAGE = "http://freecode.com/projects/libcap-ng" SECTION = "base" -LICENSE = "GPLv2+ & LGPLv2.1+" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" SRC_URI = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ - file://determinism.patch \ -" + file://fix-issues-with-swig-4-2.patch \ + " -SRC_URI[sha256sum] = "52c083b77c2b0d8449dee141f9c3eba76e6d4c5ad44ef05df25891126cb85ae9" +SRC_URI[sha256sum] = "68581d3b38e7553cb6f6ddf7813b1fc99e52856f21421f7b477ce5abd2605a8a" EXTRA_OECONF:append:class-target = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h" EXTRA_OECONF:append:class-nativesdk = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h" diff --git a/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch b/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch deleted file mode 100644 index fbb7380f56..0000000000 --- a/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch +++ /dev/null @@ -1,59 +0,0 @@ -[PATCH] bindings/python: Allow hardcoded path to capability.h to be overridden - -Currently the path to capability.h is hardcoded. When cross compiling -the host capabiity.h may be different to the target copy, leading -to different options being encoded in the python bindings than -expected. This causes a reproducibility issue amongst other potential -problems. - -Add a configure option to optionally specify the right path to the -correct header as its probably safer/more reliable than trying to -query the compiler to get the header path. - -Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org -Upstream-Status: Submitted [https://github.com/stevegrubb/libcap-ng/pull/30] - -Index: libcap-ng-0.8.2/configure.ac -=================================================================== ---- libcap-ng-0.8.2.orig/configure.ac -+++ libcap-ng-0.8.2/configure.ac -@@ -63,6 +63,13 @@ AC_CHECK_HEADERS(sys/vfs.h, [ - AC_CHECK_HEADERS(linux/magic.h, [] [AC_MSG_WARN(linux/magic.h is required in order to verify procfs.)]) - ], [AC_MSG_WARN(sys/vfs.h is required in order to verify procfs.)]) - -+ -+AC_ARG_WITH([capability_header], -+ [AS_HELP_STRING([--with-capability_header=path : path to cpapbility.h])], -+ [CAPABILITY_HEADER=$withval], -+ [CAPABILITY_HEADER=/usr/include/linux/capability.h]) -+AC_SUBST(CAPABILITY_HEADER) -+ - AC_C_CONST - AC_C_INLINE - AM_PROG_CC_C_O -Index: libcap-ng-0.8.2/bindings/python3/Makefile.am -=================================================================== ---- libcap-ng-0.8.2.orig/bindings/python3/Makefile.am -+++ libcap-ng-0.8.2/bindings/python3/Makefile.am -@@ -41,7 +41,7 @@ nodist__capng_la_SOURCES = capng_wrap.c - capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h - swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i - caps.h: -- cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h -+ cat $(CAPABILITY_HEADER) | grep '^#define CAP' | grep -v '[()]' > caps.h - capng.h: - cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h - -Index: libcap-ng-0.8.2/bindings/python/Makefile.am -=================================================================== ---- libcap-ng-0.8.2.orig/bindings/python/Makefile.am -+++ libcap-ng-0.8.2/bindings/python/Makefile.am -@@ -38,7 +38,7 @@ nodist__capng_la_SOURCES = capng_wrap.c - capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h - swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i - caps.h: -- cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h -+ cat $(CAPABILITY_HEADER) | grep '^#define CAP' | grep -v '[()]' > caps.h - capng.h: - cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h - diff --git a/meta/recipes-support/libcap-ng/libcap-ng_0.8.2.bb b/meta/recipes-support/libcap-ng/libcap-ng_0.8.4.bb index 6e16e886b9..3dbe3e2ffd 100644 --- a/meta/recipes-support/libcap-ng/libcap-ng_0.8.2.bb +++ b/meta/recipes-support/libcap-ng/libcap-ng_0.8.4.bb @@ -2,7 +2,7 @@ require libcap-ng.inc inherit lib_package autotools -EXTRA_OECONF += "--without-python --without-python3" +EXTRA_OECONF += "--without-python3" BBCLASSEXTEND = "native nativesdk" |