From 9592b318ccd6a8dca60d1060c8255ed8e62ef046 Mon Sep 17 00:00:00 2001 From: Randy MacLeod Date: Sun, 16 Jun 2019 11:48:15 -0400 Subject: libcap-ng: split into libcap-ng/libcap-ng-python util-linux's setpriv needs the libcap-ng library but not the python package so split the package up to enable this without a dependency loop. Signed-off-by: Randy MacLeod Signed-off-by: Richard Purdie --- meta/recipes-support/libcap-ng/libcap-ng | 1 + .../libcap-ng/libcap-ng-python/python.patch | 62 ++++++++++++++++++++++ .../libcap-ng/libcap-ng-python_0.7.9.bb | 27 ++++++++++ meta/recipes-support/libcap-ng/libcap-ng.inc | 17 ++++++ .../libcap-ng/libcap-ng/python.patch | 62 ---------------------- meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb | 28 ++-------- 6 files changed, 111 insertions(+), 86 deletions(-) create mode 120000 meta/recipes-support/libcap-ng/libcap-ng create mode 100644 meta/recipes-support/libcap-ng/libcap-ng-python/python.patch create mode 100644 meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb create mode 100644 meta/recipes-support/libcap-ng/libcap-ng.inc delete mode 100644 meta/recipes-support/libcap-ng/libcap-ng/python.patch (limited to 'meta/recipes-support/libcap-ng') diff --git a/meta/recipes-support/libcap-ng/libcap-ng b/meta/recipes-support/libcap-ng/libcap-ng new file mode 120000 index 0000000000..fb7744d293 --- /dev/null +++ b/meta/recipes-support/libcap-ng/libcap-ng @@ -0,0 +1 @@ +libcap-ng-python \ No newline at end of file diff --git a/meta/recipes-support/libcap-ng/libcap-ng-python/python.patch b/meta/recipes-support/libcap-ng/libcap-ng-python/python.patch new file mode 100644 index 0000000000..d60a0a39b6 --- /dev/null +++ b/meta/recipes-support/libcap-ng/libcap-ng-python/python.patch @@ -0,0 +1,62 @@ +From b4a354ae8d4f7c2ec3ec421c7d8a790cc57e77a9 Mon Sep 17 00:00:00 2001 +From: Li xin +Date: Sat, 18 Jul 2015 23:03:30 +0900 +Subject: [PATCH] configure.ac - Avoid an incorrect check for python. + Makefile.am - avoid hard coded host include paths. + +Upstream-Status: pending + +Signed-off-by: Mark Hatle +Signed-off-by: Li Xin +Signed-off-by: Yi Zhao +--- + bindings/python/Makefile.am | 4 +++- + configure.ac | 17 ++--------------- + 2 files changed, 5 insertions(+), 16 deletions(-) + +diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am +index 999b184..c8e49db 100644 +--- a/bindings/python/Makefile.am ++++ b/bindings/python/Makefile.am +@@ -23,7 +23,9 @@ + SUBDIRS = test + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + AM_CFLAGS = -fPIC -DPIC +-AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@ ++PYLIBVER ?= python$(PYTHON_VERSION) ++PYINC ?= /usr/include/$(PYLIBVER) ++AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC) + SWIG_FLAGS = -python + SWIG_INCLUDES = ${AM_CPPFLAGS} + pyexec_PYTHON = capng.py +diff --git a/configure.ac b/configure.ac +index 7f66179..079d026 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -123,21 +123,8 @@ if test x$use_python = xno ; then + else + AC_MSG_RESULT(testing) + AM_PATH_PYTHON +-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` +-if test -f ${PYINCLUDEDIR}/Python.h ; then +- python_found="yes" +- AC_SUBST(PYINCLUDEDIR) +- pybind_dir="python" +- AC_SUBST(pybind_dir) +- AC_MSG_NOTICE(Python bindings will be built) +-else +- python_found="no" +- if test x$use_python = xyes ; then +- AC_MSG_ERROR([Python explicitly requested and python headers were not found]) +- else +- AC_MSG_WARN("Python headers not found - python bindings will not be made") +- fi +-fi ++python_found="yes" ++AC_MSG_NOTICE(Python bindings will be built) + fi + AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes") + +-- +2.7.4 + diff --git a/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb b/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb new file mode 100644 index 0000000000..e49b445f57 --- /dev/null +++ b/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb @@ -0,0 +1,27 @@ +require libcap-ng.inc + +SUMMARY .= " - python" + +inherit lib_package autotools python3native + +DEPENDS += "libcap-ng python3 swig-native" + +S = "${WORKDIR}/libcap-ng-${PV}" + +EXTRA_OECONF += "--with-python --with-python3" +EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'" + +do_install_append() { + rm -rf ${D}${bindir} + rm -rf ${D}${libdir}/.debug + rm -f ${D}${libdir}/lib* + rm -rf ${D}${libdir}/pkgconfig + rm -rf ${D}${datadir} + rm -rf ${D}${includedir} +} + +# PACKAGES = "${PN}" + +FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}" +FILES_${PN}-dbg =+ "${PYTHON_SITEPACKAGES_DIR}/.debug/_capng.so" + diff --git a/meta/recipes-support/libcap-ng/libcap-ng.inc b/meta/recipes-support/libcap-ng/libcap-ng.inc new file mode 100644 index 0000000000..739b91fd2e --- /dev/null +++ b/meta/recipes-support/libcap-ng/libcap-ng.inc @@ -0,0 +1,17 @@ +SUMMARY = "An alternate posix capabilities library" +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+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" + +SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ + file://python.patch \ +" + +SRC_URI[md5sum] = "2398d695508fab9ce33668c53a89b0e9" +SRC_URI[sha256sum] = "4a1532bcf3731aade40936f6d6a586ed5a66ca4c7455e1338d1f6c3e09221328" + +BBCLASSEXTEND = "native nativesdk" \ No newline at end of file diff --git a/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/meta/recipes-support/libcap-ng/libcap-ng/python.patch deleted file mode 100644 index d60a0a39b6..0000000000 --- a/meta/recipes-support/libcap-ng/libcap-ng/python.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b4a354ae8d4f7c2ec3ec421c7d8a790cc57e77a9 Mon Sep 17 00:00:00 2001 -From: Li xin -Date: Sat, 18 Jul 2015 23:03:30 +0900 -Subject: [PATCH] configure.ac - Avoid an incorrect check for python. - Makefile.am - avoid hard coded host include paths. - -Upstream-Status: pending - -Signed-off-by: Mark Hatle -Signed-off-by: Li Xin -Signed-off-by: Yi Zhao ---- - bindings/python/Makefile.am | 4 +++- - configure.ac | 17 ++--------------- - 2 files changed, 5 insertions(+), 16 deletions(-) - -diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am -index 999b184..c8e49db 100644 ---- a/bindings/python/Makefile.am -+++ b/bindings/python/Makefile.am -@@ -23,7 +23,9 @@ - SUBDIRS = test - CONFIG_CLEAN_FILES = *.loT *.rej *.orig - AM_CFLAGS = -fPIC -DPIC --AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@ -+PYLIBVER ?= python$(PYTHON_VERSION) -+PYINC ?= /usr/include/$(PYLIBVER) -+AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC) - SWIG_FLAGS = -python - SWIG_INCLUDES = ${AM_CPPFLAGS} - pyexec_PYTHON = capng.py -diff --git a/configure.ac b/configure.ac -index 7f66179..079d026 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -123,21 +123,8 @@ if test x$use_python = xno ; then - else - AC_MSG_RESULT(testing) - AM_PATH_PYTHON --PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` --if test -f ${PYINCLUDEDIR}/Python.h ; then -- python_found="yes" -- AC_SUBST(PYINCLUDEDIR) -- pybind_dir="python" -- AC_SUBST(pybind_dir) -- AC_MSG_NOTICE(Python bindings will be built) --else -- python_found="no" -- if test x$use_python = xyes ; then -- AC_MSG_ERROR([Python explicitly requested and python headers were not found]) -- else -- AC_MSG_WARN("Python headers not found - python bindings will not be made") -- fi --fi -+python_found="yes" -+AC_MSG_NOTICE(Python bindings will be built) - fi - AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes") - --- -2.7.4 - diff --git a/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb b/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb index aff6259db2..6e6de45494 100644 --- a/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb +++ b/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb @@ -1,30 +1,10 @@ -SUMMARY = "An alternate posix capabilities library" -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+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" +require libcap-ng.inc -SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ - file://python.patch" +inherit lib_package autotools -inherit lib_package autotools python3native +EXTRA_OECONF += "--without-python --without-python3" -SRC_URI[md5sum] = "2398d695508fab9ce33668c53a89b0e9" -SRC_URI[sha256sum] = "4a1532bcf3731aade40936f6d6a586ed5a66ca4c7455e1338d1f6c3e09221328" - -DEPENDS += "swig-native python3" - -EXTRA_OECONF += "--with-python --with-python3" -EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'" - -PACKAGES += "${PN}-python" - -FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" - -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" do_install_append() { # Moving libcap-ng to base_libdir -- cgit 1.2.3-korg