diff options
Diffstat (limited to 'recipes-security/selinux/libsemanage_3.6.bb')
-rw-r--r-- | recipes-security/selinux/libsemanage_3.6.bb | 56 |
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 @@ | |||
1 | SUMMARY = "SELinux binary policy manipulation library" | ||
2 | DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ | ||
3 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ | ||
4 | as by programs like load_policy that need to perform specific transformations \ | ||
5 | on binary policies such as customizing policy boolean settings." | ||
6 | SECTION = "base" | ||
7 | LICENSE = "LGPL-2.1-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
9 | |||
10 | require selinux_common.inc | ||
11 | |||
12 | inherit lib_package python3native | ||
13 | |||
14 | SRC_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 | |||
19 | DEPENDS = "libsepol libselinux python3 bison-native swig-native" | ||
20 | |||
21 | DEPENDS:append:class-target = " audit" | ||
22 | |||
23 | S = "${WORKDIR}/git/libsemanage" | ||
24 | |||
25 | EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y" | ||
26 | |||
27 | PACKAGES =+ "${PN}-python" | ||
28 | |||
29 | # For /usr/libexec/selinux/semanage_migrate_store | ||
30 | RDEPENDS:${PN}-python = "python3-core" | ||
31 | |||
32 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/* \ | ||
33 | ${libexecdir}/selinux/semanage_migrate_store" | ||
34 | FILES:${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/*" | ||
35 | FILES:${PN} += "${libexecdir}" | ||
36 | |||
37 | do_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 | |||
44 | do_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 | |||
56 | BBCLASSEXTEND = "native" | ||