summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/selinux-python_3.6.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/selinux/selinux-python_3.6.bb')
-rw-r--r--recipes-security/selinux/selinux-python_3.6.bb122
1 files changed, 122 insertions, 0 deletions
diff --git a/recipes-security/selinux/selinux-python_3.6.bb b/recipes-security/selinux/selinux-python_3.6.bb
new file mode 100644
index 0000000..79125d0
--- /dev/null
+++ b/recipes-security/selinux/selinux-python_3.6.bb
@@ -0,0 +1,122 @@
1SUMMARY = "Python modules and various SELinux utilities."
2DESCRIPTION = "\
3This package contains Python modules sepolgen, sepolicy; And the \
4SELinux utilities audit2allow, chcat, semanage ..."
5SECTION = "base"
6LICENSE = "GPL-2.0-or-later"
7LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
8
9require selinux_common.inc
10
11inherit python3targetconfig
12
13SRC_URI += "file://fix-sepolicy-install-path.patch \
14 "
15
16S = "${WORKDIR}/git/python"
17
18DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native"
19
20RDEPENDS:${PN} = "\
21 python3-core \
22 python3-codecs \
23 python3-io \
24 python3-ipy \
25 python3-stringold \
26 python3-syslog \
27 python3-unixadmin \
28 libselinux-python \
29 libsemanage-python \
30 setools \
31"
32RDEPENDS:${PN}-audit2allow = "\
33 python3-core \
34 libselinux-python \
35 ${PN}-sepolgen \
36"
37RDEPENDS:${PN}-chcat = "\
38 python3-core \
39 python3-codecs \
40 python3-shell \
41 python3-stringold \
42 python3-unixadmin \
43 libselinux-python \
44 ${PN} \
45"
46RDEPENDS:${PN}-semanage = "\
47 python3-core \
48 python3-ipy \
49 python3-compression \
50 python3-xml \
51 python3-misc \
52 libselinux-python \
53 audit-python \
54 ${PN} \
55"
56RDEPENDS:${PN}-sepolicy = "\
57 binutils \
58 python3-core \
59 python3-codecs \
60 python3-distro \
61 python3-syslog \
62 python3-multiprocessing \
63 ${PN} \
64"
65RDEPENDS:${PN}-sepolgen-ifgen = "\
66 python3-core \
67 libselinux-python \
68"
69
70PACKAGES =+ "\
71 ${PN}-audit2allow \
72 ${PN}-sepolgen-ifgen \
73 ${PN}-chcat \
74 ${PN}-semanage \
75 ${PN}-sepolgen \
76 ${PN}-sepolicy \
77"
78FILES:${PN}-audit2allow = "\
79 ${bindir}/audit2allow \
80 ${bindir}/audit2why \
81"
82FILES:${PN}-chcat = "\
83 ${bindir}/chcat \
84"
85FILES:${PN}-semanage = "\
86 ${sbindir}/semanage \
87 ${datadir}/bash-completion/completions/semanage \
88"
89# The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy
90FILES:${PN}-sepolicy = "\
91 ${bindir}/sepolgen \
92 ${bindir}/sepolicy \
93 ${datadir}/bash-completion/completions/sepolicy \
94"
95FILES:${PN}-sepolgen-ifgen = "\
96 ${bindir}/sepolgen-ifgen \
97 ${bindir}/sepolgen-ifgen-attr-helper \
98"
99FILES:${PN}-sepolgen = "\
100 ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \
101 ${localstatedir}/lib/sepolgen/perm_map \
102"
103
104FILES:${PN} += "\
105 ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \
106 ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \
107 ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \
108"
109
110do_install() {
111 oe_runmake DESTDIR="${D}" \
112 PYLIBVER='python${PYTHON_BASEVERSION}' \
113 PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' \
114 install
115
116 # Remove .pyc files
117 find ${D} -name *.pyc -delete
118
119 # Fix buildpaths issue
120 sed -i -e 's,${WORKDIR},,g' \
121 ${D}${PYTHON_SITEPACKAGES_DIR}/sepolicy-${PV}.dist-info/direct_url.json
122}