meta-selinux/recipes-security/selinux/libsemanage_3.8.bb
Yi Zhao 4273eb6d6e selinux: upgrade 3.7 -> 3.8
ChangeLog:
https://github.com/SELinuxProject/selinux/releases/tag/3.8

* libsemanage: Preserve file context and ownership in policy store
* libselinux: deprecate security_disable(3)
* libsepol: Support nlmsg extended permissions
* libsepol: Add policy capability netlink_xperm
* libsemanage: Optionally allow duplicate declarations
* policycoreutils: introduce unsetfiles
* libselinux/utils: introduce selabel_compare
* improved selabel_lookup performance
* libselinux: support parallel usage of selabel_lookup(3)
* libsepol: add support for xperms in conditional policies
* Improved man pages
* Code improvements and bug fixes
* Always build for LFS mode on 32-bit archs.
* libsemanage: Mute error messages from selinux_restorecon introduced in
  3.8-rc1
* Regex spec ordering is restored to pre 3.8-rc1
* Binary fcontext files format changed, files using old format are ignored
* Code improvements and bug fixes

License-Update: White space cleanup for libsemanage/LICENSE

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-07 14:34:45 -05:00

57 lines
1.8 KiB
BlitzBasic

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=03068f550c635f6520e0f0252da412fc"
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"