summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/selinux-python_3.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/selinux/selinux-python_3.5.bb')
-rw-r--r--recipes-security/selinux/selinux-python_3.5.bb120
1 files changed, 120 insertions, 0 deletions
diff --git a/recipes-security/selinux/selinux-python_3.5.bb b/recipes-security/selinux/selinux-python_3.5.bb
new file mode 100644
index 0000000..9ff63db
--- /dev/null
+++ b/recipes-security/selinux/selinux-python_3.5.bb
@@ -0,0 +1,120 @@
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 python3-core \
58 python3-codecs \
59 python3-syslog \
60 python3-multiprocessing \
61 ${PN} \
62"
63RDEPENDS:${PN}-sepolgen-ifgen = "\
64 python3-core \
65 libselinux-python \
66"
67
68PACKAGES =+ "\
69 ${PN}-audit2allow \
70 ${PN}-sepolgen-ifgen \
71 ${PN}-chcat \
72 ${PN}-semanage \
73 ${PN}-sepolgen \
74 ${PN}-sepolicy \
75"
76FILES:${PN}-audit2allow = "\
77 ${bindir}/audit2allow \
78 ${bindir}/audit2why \
79"
80FILES:${PN}-chcat = "\
81 ${bindir}/chcat \
82"
83FILES:${PN}-semanage = "\
84 ${sbindir}/semanage \
85 ${datadir}/bash-completion/completions/semanage \
86"
87# The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy
88FILES:${PN}-sepolicy = "\
89 ${bindir}/sepolgen \
90 ${bindir}/sepolicy \
91 ${datadir}/bash-completion/completions/sepolicy \
92"
93FILES:${PN}-sepolgen-ifgen = "\
94 ${bindir}/sepolgen-ifgen \
95 ${bindir}/sepolgen-ifgen-attr-helper \
96"
97FILES:${PN}-sepolgen = "\
98 ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \
99 ${localstatedir}/lib/sepolgen/perm_map \
100"
101
102FILES:${PN} += "\
103 ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \
104 ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \
105 ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \
106"
107
108do_install() {
109 oe_runmake DESTDIR="${D}" \
110 PYLIBVER='python${PYTHON_BASEVERSION}' \
111 PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' \
112 install
113
114 # Remove .pyc files
115 find ${D} -name *.pyc -delete
116
117 # Fix buildpaths issue
118 sed -i -e 's,${WORKDIR},,g' \
119 ${D}${PYTHON_SITEPACKAGES_DIR}/sepolicy-${PV}.dist-info/direct_url.json
120}