diff options
Diffstat (limited to 'recipes-security/selinux/selinux-python_3.6.bb')
-rw-r--r-- | recipes-security/selinux/selinux-python_3.6.bb | 122 |
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 @@ | |||
1 | SUMMARY = "Python modules and various SELinux utilities." | ||
2 | DESCRIPTION = "\ | ||
3 | This package contains Python modules sepolgen, sepolicy; And the \ | ||
4 | SELinux utilities audit2allow, chcat, semanage ..." | ||
5 | SECTION = "base" | ||
6 | LICENSE = "GPL-2.0-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833" | ||
8 | |||
9 | require selinux_common.inc | ||
10 | |||
11 | inherit python3targetconfig | ||
12 | |||
13 | SRC_URI += "file://fix-sepolicy-install-path.patch \ | ||
14 | " | ||
15 | |||
16 | S = "${WORKDIR}/git/python" | ||
17 | |||
18 | DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native" | ||
19 | |||
20 | RDEPENDS:${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 | " | ||
32 | RDEPENDS:${PN}-audit2allow = "\ | ||
33 | python3-core \ | ||
34 | libselinux-python \ | ||
35 | ${PN}-sepolgen \ | ||
36 | " | ||
37 | RDEPENDS:${PN}-chcat = "\ | ||
38 | python3-core \ | ||
39 | python3-codecs \ | ||
40 | python3-shell \ | ||
41 | python3-stringold \ | ||
42 | python3-unixadmin \ | ||
43 | libselinux-python \ | ||
44 | ${PN} \ | ||
45 | " | ||
46 | RDEPENDS:${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 | " | ||
56 | RDEPENDS:${PN}-sepolicy = "\ | ||
57 | binutils \ | ||
58 | python3-core \ | ||
59 | python3-codecs \ | ||
60 | python3-distro \ | ||
61 | python3-syslog \ | ||
62 | python3-multiprocessing \ | ||
63 | ${PN} \ | ||
64 | " | ||
65 | RDEPENDS:${PN}-sepolgen-ifgen = "\ | ||
66 | python3-core \ | ||
67 | libselinux-python \ | ||
68 | " | ||
69 | |||
70 | PACKAGES =+ "\ | ||
71 | ${PN}-audit2allow \ | ||
72 | ${PN}-sepolgen-ifgen \ | ||
73 | ${PN}-chcat \ | ||
74 | ${PN}-semanage \ | ||
75 | ${PN}-sepolgen \ | ||
76 | ${PN}-sepolicy \ | ||
77 | " | ||
78 | FILES:${PN}-audit2allow = "\ | ||
79 | ${bindir}/audit2allow \ | ||
80 | ${bindir}/audit2why \ | ||
81 | " | ||
82 | FILES:${PN}-chcat = "\ | ||
83 | ${bindir}/chcat \ | ||
84 | " | ||
85 | FILES:${PN}-semanage = "\ | ||
86 | ${sbindir}/semanage \ | ||
87 | ${datadir}/bash-completion/completions/semanage \ | ||
88 | " | ||
89 | # The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy | ||
90 | FILES:${PN}-sepolicy = "\ | ||
91 | ${bindir}/sepolgen \ | ||
92 | ${bindir}/sepolicy \ | ||
93 | ${datadir}/bash-completion/completions/sepolicy \ | ||
94 | " | ||
95 | FILES:${PN}-sepolgen-ifgen = "\ | ||
96 | ${bindir}/sepolgen-ifgen \ | ||
97 | ${bindir}/sepolgen-ifgen-attr-helper \ | ||
98 | " | ||
99 | FILES:${PN}-sepolgen = "\ | ||
100 | ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \ | ||
101 | ${localstatedir}/lib/sepolgen/perm_map \ | ||
102 | " | ||
103 | |||
104 | FILES:${PN} += "\ | ||
105 | ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \ | ||
106 | ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \ | ||
107 | ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \ | ||
108 | " | ||
109 | |||
110 | do_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 | } | ||