diff options
Diffstat (limited to 'recipes-security/selinux/selinux-python_3.5.bb')
-rw-r--r-- | recipes-security/selinux/selinux-python_3.5.bb | 120 |
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 @@ | |||
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 | python3-core \ | ||
58 | python3-codecs \ | ||
59 | python3-syslog \ | ||
60 | python3-multiprocessing \ | ||
61 | ${PN} \ | ||
62 | " | ||
63 | RDEPENDS:${PN}-sepolgen-ifgen = "\ | ||
64 | python3-core \ | ||
65 | libselinux-python \ | ||
66 | " | ||
67 | |||
68 | PACKAGES =+ "\ | ||
69 | ${PN}-audit2allow \ | ||
70 | ${PN}-sepolgen-ifgen \ | ||
71 | ${PN}-chcat \ | ||
72 | ${PN}-semanage \ | ||
73 | ${PN}-sepolgen \ | ||
74 | ${PN}-sepolicy \ | ||
75 | " | ||
76 | FILES:${PN}-audit2allow = "\ | ||
77 | ${bindir}/audit2allow \ | ||
78 | ${bindir}/audit2why \ | ||
79 | " | ||
80 | FILES:${PN}-chcat = "\ | ||
81 | ${bindir}/chcat \ | ||
82 | " | ||
83 | FILES:${PN}-semanage = "\ | ||
84 | ${sbindir}/semanage \ | ||
85 | ${datadir}/bash-completion/completions/semanage \ | ||
86 | " | ||
87 | # The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy | ||
88 | FILES:${PN}-sepolicy = "\ | ||
89 | ${bindir}/sepolgen \ | ||
90 | ${bindir}/sepolicy \ | ||
91 | ${datadir}/bash-completion/completions/sepolicy \ | ||
92 | " | ||
93 | FILES:${PN}-sepolgen-ifgen = "\ | ||
94 | ${bindir}/sepolgen-ifgen \ | ||
95 | ${bindir}/sepolgen-ifgen-attr-helper \ | ||
96 | " | ||
97 | FILES:${PN}-sepolgen = "\ | ||
98 | ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \ | ||
99 | ${localstatedir}/lib/sepolgen/perm_map \ | ||
100 | " | ||
101 | |||
102 | FILES:${PN} += "\ | ||
103 | ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \ | ||
104 | ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \ | ||
105 | ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \ | ||
106 | " | ||
107 | |||
108 | do_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 | } | ||