From e582e169c4e0373839dc085f98cacc484389cf04 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 11 Mar 2023 21:12:58 +0800 Subject: libsemanage: upgrade 3.4 -> 3.5 License-Update: Rename COPYING to LICENSE. No content changes. Signed-off-by: Yi Zhao Signed-off-by: Joe MacDonald --- recipes-security/selinux/libsemanage_3.4.bb | 55 ---------------------------- recipes-security/selinux/libsemanage_3.5.bb | 56 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 55 deletions(-) delete mode 100644 recipes-security/selinux/libsemanage_3.4.bb create mode 100644 recipes-security/selinux/libsemanage_3.5.bb diff --git a/recipes-security/selinux/libsemanage_3.4.bb b/recipes-security/selinux/libsemanage_3.4.bb deleted file mode 100644 index 7f038ac..0000000 --- a/recipes-security/selinux/libsemanage_3.4.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "SELinux binary policy manipulation library" -DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ -It is used by checkpolicy (the policy compiler) and similar tools, as well \ -as by programs like load_policy that need to perform specific transformations \ -on binary policies such as customizing policy boolean settings." -SECTION = "base" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" - -require selinux_common.inc - -inherit lib_package python3native - -SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ - file://libsemanage-allow-to-disable-audit-support.patch \ - file://libsemanage-disable-expand-check-on-policy-load.patch \ - " - -DEPENDS = "libsepol libselinux python3 bison-native swig-native" - -DEPENDS:append:class-target = " audit" - -S = "${WORKDIR}/git/libsemanage" - -EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y" - -PACKAGES =+ "${PN}-python" - -# For /usr/libexec/selinux/semanage_migrate_store -RDEPENDS:${PN}-python = "python3-core" - -FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ - ${libexecdir}/selinux/semanage_migrate_store" -FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" -FILES:${PN} += "${libexecdir}" - -do_compile:append() { - oe_runmake pywrap \ - PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ - PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ - PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' -} - -do_install:append() { - oe_runmake install-pywrap \ - PYCEXT='.so' \ - PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ - PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' - - # Update "policy-version" for semanage.conf - sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 33/' \ - ${D}/etc/selinux/semanage.conf -} - -BBCLASSEXTEND = "native" diff --git a/recipes-security/selinux/libsemanage_3.5.bb b/recipes-security/selinux/libsemanage_3.5.bb new file mode 100644 index 0000000..93eb870 --- /dev/null +++ b/recipes-security/selinux/libsemanage_3.5.bb @@ -0,0 +1,56 @@ +SUMMARY = "SELinux binary policy manipulation library" +DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ +It is used by checkpolicy (the policy compiler) and similar tools, as well \ +as by programs like load_policy that need to perform specific transformations \ +on binary policies such as customizing policy boolean settings." +SECTION = "base" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=a6f89e2100d9b6cdffcea4f398e37343" + +require selinux_common.inc + +inherit lib_package python3native + +SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ + file://libsemanage-allow-to-disable-audit-support.patch \ + file://libsemanage-disable-expand-check-on-policy-load.patch \ + " + +DEPENDS = "libsepol libselinux python3 bison-native swig-native" + +DEPENDS:append:class-target = " audit" + +S = "${WORKDIR}/git/libsemanage" + +EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y" + +PACKAGES =+ "${PN}-python" + +# For /usr/libexec/selinux/semanage_migrate_store +RDEPENDS:${PN}-python = "python3-core" + +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/* \ + ${libexecdir}/selinux/semanage_migrate_store" +FILES:${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/*" +FILES:${PN} += "${libexecdir}" + +do_compile:append() { + oe_runmake pywrap \ + PYLIBVER='python${PYTHON_BASEVERSION}' \ + PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ + PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' +} + +do_install:append() { + oe_runmake install-pywrap \ + DESTDIR=${D} \ + PYCEXT='.so' \ + PYLIBVER='python${PYTHON_BASEVERSION}' \ + PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' + + # Update "policy-version" for semanage.conf + sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 33/' \ + ${D}/etc/selinux/semanage.conf +} + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf