summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Tricca <flihp@twobit.us>2013-10-09 12:32:44 +0000
committerJoe MacDonald <joe@deserted.net>2013-10-15 14:31:15 -0400
commit2da0c93c650feb5b81375b9a9a319cade3c1c99e (patch)
treedb54d152b3f5392012913e6f9c89dc47c158b617
parent392a44eeb60ae97d6976c9f9e91e03f695395a8b (diff)
downloadmeta-selinux-2da0c93c650feb5b81375b9a9a319cade3c1c99e.tar.gz
Break policycoreutils out into separate packages for the various utilities.
The driver beind this is to allow images to be built with the minimal tools necessary to load a policy. Breaking all of the stuff that's dependent on python out from the core utils allows us to make much smaller images. Signed-off-by: Philip Tricca <flihp@twobit.us> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-security/selinux/policycoreutils.inc188
1 files changed, 178 insertions, 10 deletions
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc
index dfd65e3..f8187e4 100644
--- a/recipes-security/selinux/policycoreutils.inc
+++ b/recipes-security/selinux/policycoreutils.inc
@@ -13,7 +13,7 @@ SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}
13 13
14PAM_SRC_URI = "file://pam.d/newrole \ 14PAM_SRC_URI = "file://pam.d/newrole \
15 file://pam.d/run_init \ 15 file://pam.d/run_init \
16 " 16"
17 17
18DEPENDS += "libsepol libselinux libsemanage" 18DEPENDS += "libsepol libselinux libsemanage"
19EXTRA_DEPENDS = "libcap-ng libcgroup setools" 19EXTRA_DEPENDS = "libcap-ng libcgroup setools"
@@ -26,7 +26,7 @@ RDEPENDS_${BPN} += "\
26 libselinux-python \ 26 libselinux-python \
27 libsemanage-python \ 27 libsemanage-python \
28 sepolgen \ 28 sepolgen \
29 " 29"
30RDEPENDS_${BPN} += "\ 30RDEPENDS_${BPN} += "\
31 python \ 31 python \
32 python-unixadmin \ 32 python-unixadmin \
@@ -36,8 +36,93 @@ RDEPENDS_${BPN} += "\
36 python-syslog \ 36 python-syslog \
37 python-textutils \ 37 python-textutils \
38 python-ipy \ 38 python-ipy \
39 " 39"
40 40RDEPENDS_${BPN}-audit2allow = "\
41 python-textutils \
42 libselinux-python \
43 sepolgen \
44"
45RDEPENDS_${BPN}-chcat = "\
46 python-codecs \
47 python-shell \
48 python-stringold \
49 python-unixadmin \
50 ${BPN}-python \
51 libselinux-python \
52"
53RDEPENDS_${BPN}-fixfiles += "\
54 ${BPN}-setfiles \
55"
56RDEPENDS_${BPN}-genhomedircon += "\
57 ${BPN}-genhomedircon \
58 ${BPN}-semodule \
59"
60RDEPENDS_${BPN}-loadpolicy += "\
61 libselinux \
62 libsepol \
63"
64RDEPENDS_${BPN}-newrole += "\
65 libcap-ng \
66 libselinux \
67"
68RDEPENDS_${BPN}-python += "\
69 python-codecs \
70 python-io \
71 python-ipy \
72 python-re \
73 python-stringold \
74 python-syslog \
75 python-unixadmin \
76 libselinux-python \
77 libsemanage-python \
78"
79RDEPENDS_${BPN}-runinit += "libselinux"
80RDEPENDS_${BPN}-sandbox += "\
81 python-math \
82 python-shell \
83 python-subprocess \
84 python-textutils \
85 python-unixadmin \
86 libselinux-python \
87 ${BPN}-python \
88"
89RDEPENDS_${BPN}-secon += "libselinux"
90RDEPENDS_${BPN}-semanage = "\
91 python-core \
92 python-ipy \
93 ${BPN}-python \
94 libselinux-python \
95"
96RDEPENDS_${BPN}-semodule += "\
97 libsepol \
98 libselinux \
99 libsemanage \
100"
101# static link to libsepol
102DEPENDS_${BPN}-semodule-deps += "libsepol"
103RDEPENDS_${BPN}-semodule-expand += "libsepol libselinux"
104RDEPENDS_${BPN}-semodule-link += "libsepol libselinux"
105RDEPENDS_${BPN}-semodule-package += "libsepol libselinux"
106RDEPENDS_${BPN}-sepolicy += "\
107 python-argparse \
108 python-codecs \
109 python-core \
110 python-syslog \
111 ${BPN}-python \
112"
113# static link to libsepol
114DEPENDS_${BPN}-sepolgen-ifgen += "libsepol"
115RDEPENDS_${BPN}-sepolgen-ifgen += "libselinux-python"
116RDEPENDS_${BPN}-sestatus += "libselinux"
117RDEPENDS_${BPN}-setfiles += "\
118 libselinux \
119 libsepol \
120"
121RDEPENDS_${BPN}-setsebool += "\
122 libsepol \
123 libselinux \
124 libsemanage \
125"
41RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python" 126RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python"
42 127
43WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" 128WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}"
@@ -45,14 +130,97 @@ ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}
45 130
46inherit pythonnative 131inherit pythonnative
47 132
48PACKAGES =+ "${PN}-python ${PN}-sandbox system-config-selinux" 133PACKAGES =+ "\
49FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \ 134 ${PN}-audit2allow \
135 ${PN}-chcat \
136 ${PN}-fixfiles \
137 ${PN}-genhomedircon \
138 ${PN}-loadpolicy \
139 ${PN}-newrole \
140 ${PN}-python \
141 ${PN}-runinit \
142 ${PN}-sandbox \
143 ${PN}-secon \
144 ${PN}-semanage \
145 ${PN}-semodule \
146 ${PN}-semodule-deps \
147 ${PN}-semodule-expand \
148 ${PN}-semodule-link \
149 ${PN}-semodule-package \
150 ${PN}-sepolgen-ifgen \
151 ${PN}-sepolicy \
152 ${PN}-sestatus \
153 ${PN}-setfiles \
154 ${PN}-setsebool \
155 system-config-selinux \
156"
157FILES_${PN}-audit2allow = "\
158 ${bindir}/audit2allow \
159 ${bindir}/audit2why \
160"
161FILES_${PN}-chcat = "\
162 ${bindir}/chcat \
163"
164FILES_${PN}-fixfiles += "${base_sbindir}/fixfiles"
165FILES_${PN}-genhomedircon += "${sbindir}/genhomedircon"
166FILES_${PN}-loadpolicy += "\
167 ${base_sbindir}/load_policy \
168 ${sbindir}/load_policy \
169"
170FILES_${PN}-newrole += "\
171 ${bindir}/newrole \
172 ${@base_contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \
173"
174FILES_${PN}-python = "\
175 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \
50 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \ 176 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \
51 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/*" 177 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/* \
178"
179FILES_${PN}-runinit += "\
180 ${sbindir}/run_init \
181 ${sbindir}/open_init_pty \
182 ${@base_contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \
183"
52FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/.debug/*" 184FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/.debug/*"
53FILES_${PN}-sandbox = "${datadir}/sandbox/*" 185FILES_${PN}-sandbox += "\
54FILES_${PN}-sandbox += "${bindir}/sandbox" 186 ${datadir}/sandbox/* \
55FILES_${PN}-sandbox += "${sbindir}/seunshare" 187 ${bindir}/sandbox \
188 ${sbindir}/seunshare \
189 ${sysconfdir}/sysconfig/sandbox \
190"
191FILES_${PN}-secon += "${bindir}/secon"
192FILES_${PN}-semanage = "\
193 ${sbindir}/semanage \
194 ${sysconfdir}/bash_completion.d/semanage-bash-completion.sh \
195"
196FILES_${PN}-semodule += "${sbindir}/semodule"
197FILES_${PN}-semodule-deps += "${bindir}/semodule_deps"
198FILES_${PN}-semodule-expand += "${bindir}/semodule_expand"
199FILES_${PN}-semodule-link += "${bindir}/semodule_link"
200FILES_${PN}-semodule-package += "\
201 ${bindir}/semodule_package \
202 ${bindir}/semodule_unpackage \
203"
204FILES_${PN}-sepolicy += "\
205 ${bindir}/sepolicy \
206 ${sysconfdir}/bash_completion.d/sepolicy-bash-completion.sh \
207"
208FILES_${PN}-sepolgen-ifgen += "\
209 ${bindir}/sepolgen-ifgen \
210 ${bindir}/sepolgen-ifgen-attr-helper \
211"
212FILES_${PN}-sestatus += "\
213 ${sbindir}/sestatus \
214 ${sysconfdir}/sestatus.conf \
215"
216FILES_${PN}-setfiles += "\
217 ${base_sbindir}/restorecon \
218 ${base_sbindir}/setfiles \
219"
220FILES_${PN}-setsebool += "\
221 ${sbindir}/setsebool \
222 ${sysconfdir}/bash_completion.d/setsebool-bash-completion.sh \
223"
56FILES_system-config-selinux = " \ 224FILES_system-config-selinux = " \
57 ${bindir}/sepolgen \ 225 ${bindir}/sepolgen \
58 ${datadir}/system-config-selinux/* \ 226 ${datadir}/system-config-selinux/* \