summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/libsemanage_3.6.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/selinux/libsemanage_3.6.bb')
-rw-r--r--recipes-security/selinux/libsemanage_3.6.bb56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-security/selinux/libsemanage_3.6.bb b/recipes-security/selinux/libsemanage_3.6.bb
new file mode 100644
index 0000000..93eb870
--- /dev/null
+++ b/recipes-security/selinux/libsemanage_3.6.bb
@@ -0,0 +1,56 @@
1SUMMARY = "SELinux binary policy manipulation library"
2DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
3It is used by checkpolicy (the policy compiler) and similar tools, as well \
4as by programs like load_policy that need to perform specific transformations \
5on binary policies such as customizing policy boolean settings."
6SECTION = "base"
7LICENSE = "LGPL-2.1-or-later"
8LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=a6f89e2100d9b6cdffcea4f398e37343"
9
10require selinux_common.inc
11
12inherit lib_package python3native
13
14SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
15 file://libsemanage-allow-to-disable-audit-support.patch \
16 file://libsemanage-disable-expand-check-on-policy-load.patch \
17 "
18
19DEPENDS = "libsepol libselinux python3 bison-native swig-native"
20
21DEPENDS:append:class-target = " audit"
22
23S = "${WORKDIR}/git/libsemanage"
24
25EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y"
26
27PACKAGES =+ "${PN}-python"
28
29# For /usr/libexec/selinux/semanage_migrate_store
30RDEPENDS:${PN}-python = "python3-core"
31
32FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/* \
33 ${libexecdir}/selinux/semanage_migrate_store"
34FILES:${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/*"
35FILES:${PN} += "${libexecdir}"
36
37do_compile:append() {
38 oe_runmake pywrap \
39 PYLIBVER='python${PYTHON_BASEVERSION}' \
40 PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \
41 PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}'
42}
43
44do_install:append() {
45 oe_runmake install-pywrap \
46 DESTDIR=${D} \
47 PYCEXT='.so' \
48 PYLIBVER='python${PYTHON_BASEVERSION}' \
49 PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}'
50
51 # Update "policy-version" for semanage.conf
52 sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 33/' \
53 ${D}/etc/selinux/semanage.conf
54}
55
56BBCLASSEXTEND = "native"