Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/policycoreutils/
Date: Thu, 01 Sep 2016 16:32:08
Message-Id: 1472747287.86445f360079224b43ba28d5a2c1f2267eee7a59.perfinion@gentoo
1 commit: 86445f360079224b43ba28d5a2c1f2267eee7a59
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 14:11:48 2016 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 1 16:28:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86445f36
7
8 sys-apps/policycoreutils: Drop old
9
10 Package-Manager: portage-2.2.28
11
12 sys-apps/policycoreutils/Manifest | 7 -
13 .../policycoreutils-2.2.5-r4.ebuild | 156 -----------------
14 .../policycoreutils/policycoreutils-2.3-r3.ebuild | 154 -----------------
15 .../policycoreutils/policycoreutils-2.4-r1.ebuild | 159 -----------------
16 .../policycoreutils/policycoreutils-2.4-r2.ebuild | 190 ---------------------
17 .../policycoreutils/policycoreutils-2.4.ebuild | 147 ----------------
18 6 files changed, 813 deletions(-)
19
20 diff --git a/sys-apps/policycoreutils/Manifest b/sys-apps/policycoreutils/Manifest
21 index 604d0be..7f322b1 100644
22 --- a/sys-apps/policycoreutils/Manifest
23 +++ b/sys-apps/policycoreutils/Manifest
24 @@ -1,9 +1,2 @@
25 -DIST patchbundle-policycoreutils-2.2.5-gentoo-r1.tar.gz 7287 SHA256 cb6915c46a5e6789f95ac254d34b1d890055b31ded61596ffb5bf925aa8c446a SHA512 be6eeaf4927d80f2c198ecc4fbe88a3e960380a0de532155eff3a12157df0615e7b3ffbc09e984df08fb32ce5b62f75147559a093b620a98d9ff836ad07b18b0 WHIRLPOOL de7e0348abc45713ede926d79f26bb8590c41db6f984ff8f29a01b933f6e3c38531682f10a0d7de73f8b26994ac9a476bd9d54fc36fb45689f7ad9eca5206f09
26 -DIST patchbundle-policycoreutils-3.tar.gz 7294 SHA256 44db261c87f583a7620690fc5041d8a21b1c935e741fe7b594aa2cc958e3deb7 SHA512 24e4c73e97441a1042618f6a4179d71672c81f821ffc2f97a54116bf6b33a93bd7f3e2030dbdb362da5e2a7d8936604e5b0283261c7b2447cc4f7594966c73bc WHIRLPOOL d38416ff9707d7d2bbf04f5d582944a87d27de06f3d70677341d38dacc6501dd78ef01fd8a7bb044d49b1f2a8c95181e2cb1b4b81dae49819409dbcf9d7abcb7
27 -DIST policycoreutils-2.2.5.tar.gz 4948944 SHA256 bbf850a8c3c2f371f439d6525663eecdd3a737acd594d2f27f8d8f3a07830cc4 SHA512 88a32fbbede56f3e717394f134212ed9df9b06cbb5532168ccc03ef2a465f4320b54a561348ea5c319b5b641f7661565ad29fbdc5aae50190a6d21d076cf2c3f WHIRLPOOL 0eb0e0c7e1fc1514cb28bbda7a10066ad23a9ccfecc92dee606e3f0e71632e07fe1c4ba7ac89993adf15e9520fc9e527e16d623d56b4e96cc882bf82dea4cb14
28 -DIST policycoreutils-2.3.tar.gz 4984980 SHA256 864cfaee58b5d2f15b140c354e59666e57143293c89f2b2e85bc0d0e4beefcd2 SHA512 3256849d13856ec47ac85470632a57e26952c5dafffb51df4eb8e32467196ff3ef725cc582798727fe45fd6284c1893d12eae2c89088ae1758ad39faec385659 WHIRLPOOL 1dd9bfd67ebb744b8c47144966f09d8361e9018e8d941355080c274b9ac891c18eb95771f3dc8b136683224bc5f12f3fb58fa00666b5815d65e7141c31d9293d
29 -DIST policycoreutils-2.4.tar.gz 5004280 SHA256 b819f876f12473783ccce9f63b9a79cd77177477cd6d46818441f808cc4c3479 SHA512 0eb0ea569c1699ed78e5e9798d9f182b3a8bfa6dcd387bcc78923755b3a1cad982673db88857745154d3769d44402b87e52d5fe3024874001f61f783aa25cce6 WHIRLPOOL d101080973ef6248617b5bca9d8b76e59008061b3411aec4ed95343af09b941a34acb3bb0001da5468595c4c37684ab6f34204e18ccb3cbbd5b3d31df0cb5e7f
30 DIST policycoreutils-2.5.tar.gz 4986066 SHA256 329382cfe9fa977678abf541dcd8fe3847cf0c83b24654c8f7322343907078a1 SHA512 0eabf046cf44c6fe2e28492f53862f4302551d602e9b678b923f34f35bfc48f03a73b62962ac71465b9d99b411016b2cfc976f3baf113133a6c0adab1e1f6f8b WHIRLPOOL 27a6810d611f50ac1292f614c9936f0b73b7334be80685f1eda6fd72ec7e85fc0f7b4ff930a48c08a61ade84fd46bd9e7285f5a135ea6db6e4fe88e38d73bd16
31 -DIST policycoreutils-extra-1.31.tar.bz2 16080 SHA256 ad0a78d96fd01aa51fe774e1701bd23934cd72182b2bad68112006f0ea17cc7b SHA512 520f93f1a2ce3c60a1d192b09cb9a968d207fbc6ab1f01861be95a50b65264f706335620ccbca48ce38f81581a4cf5128e5db9e5b0564460c9f05f04038abfba WHIRLPOOL 56e713b9bd8f1af1496f383f45f1ef8d373b3f45148237bfd28c016f4becaa87d932b363d165b46c657ea3a08503e7bc60b1c5a5a2a814a659770bedf33d4202
32 -DIST policycoreutils-extra-1.33.tar.bz2 16191 SHA256 743c3930277102f5545907314b21e98955e88be7972e30264c6cb5dca370b788 SHA512 3f6f19ae33d5b1043f2979fb3e79bc061767f7051cbd0981e5c5663b4391fa29544b2184b384c9fce7b4100623bc776748d77a01865dcee78b0756d73ee10886 WHIRLPOOL e74b9c3a6dff563b81bf3ce85119fbdfc658191ac063763f2916a7dcd90584f98cbccd1d6cd5ef3aecb00366a82c949c62ab9b907cb98800cb53d3e9ab63b492
33 DIST policycoreutils-extra-1.34.tar.bz2 12107 SHA256 56ae2aac57bf104d6a8a7837b25de7978b25e0642744ef95e6e6d483201aa4ca SHA512 b1db6d70cf864023f22583e5bd24c85e796f1541f9c1bc878dd55309464b27346e05e414db3ef81bef2dfe8c8d7d7063ee7e0422878f38a3db56c67d9468b89d WHIRLPOOL 8b094818bed0e438ce4258428afa054cb561f53e303d84e171881add5952cfc0fa577bce2765294905dac8ddd5560906904958f35c96afce0f357feb5333646d
34
35 diff --git a/sys-apps/policycoreutils/policycoreutils-2.2.5-r4.ebuild b/sys-apps/policycoreutils/policycoreutils-2.2.5-r4.ebuild
36 deleted file mode 100644
37 index 477789b..00000000
38 --- a/sys-apps/policycoreutils/policycoreutils-2.2.5-r4.ebuild
39 +++ /dev/null
40 @@ -1,156 +0,0 @@
41 -# Copyright 1999-2014 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -# $Id$
44 -
45 -EAPI="5"
46 -PYTHON_COMPAT=( python2_7 )
47 -PYTHON_REQ_USE="xml"
48 -
49 -inherit multilib python-r1 toolchain-funcs eutils
50 -
51 -EXTRAS_VER="1.31"
52 -SEMNG_VER="2.2"
53 -SELNX_VER="2.2"
54 -SEPOL_VER="2.2"
55 -
56 -IUSE="audit pam dbus"
57 -
58 -DESCRIPTION="SELinux core utilities"
59 -HOMEPAGE="http://userspace.selinuxproject.org"
60 -SRC_URI="http://userspace.selinuxproject.org/releases/20131030/${P}.tar.gz
61 -https://dev.gentoo.org/~swift/patches/policycoreutils/patchbundle-${P}-gentoo-r1.tar.gz
62 - mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
63 -
64 -LICENSE="GPL-2"
65 -SLOT="0"
66 -KEYWORDS="amd64 x86"
67 -
68 -COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python]
69 - >=sys-libs/glibc-2.4
70 - >=sys-libs/libcap-1.10-r10
71 - >=sys-libs/libsemanage-${SEMNG_VER}[python]
72 - sys-libs/libcap-ng
73 - >=sys-libs/libsepol-${SEPOL_VER}
74 - sys-devel/gettext
75 - dev-python/ipy
76 - dbus? (
77 - sys-apps/dbus
78 - dev-libs/dbus-glib
79 - )
80 - audit? ( >=sys-process/audit-1.5.1 )
81 - pam? ( sys-libs/pam )
82 - ${PYTHON_DEPS}"
83 -
84 -### libcgroup -> seunshare
85 -### dbus -> restorecond
86 -
87 -# pax-utils for scanelf used by rlpkg
88 -RDEPEND="${COMMON_DEPS}
89 - dev-python/sepolgen
90 - app-misc/pax-utils"
91 -
92 -DEPEND="${COMMON_DEPS}"
93 -
94 -S1="${WORKDIR}/${P}"
95 -S2="${WORKDIR}/policycoreutils-extra"
96 -
97 -src_prepare() {
98 - # rlpkg is more useful than fixfiles
99 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
100 - || die "fixfiles sed 1 failed"
101 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
102 - || die "fixfiles sed 2 failed"
103 -
104 - EPATCH_MULTI_MSG="Applying policycoreutils patches ... " \
105 - EPATCH_SUFFIX="patch" \
106 - EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
107 - EPATCH_FORCE="yes" \
108 - epatch
109 -
110 - epatch_user
111 -
112 - python_copy_sources
113 - # Our extra code is outside the regular directory, so set it to the extra
114 - # directory. We really should optimize this as it is ugly, but the extra
115 - # code is needed for Gentoo at the same time that policycoreutils is present
116 - # (so we cannot use an additional package for now).
117 - S="${S2}"
118 - python_copy_sources
119 -}
120 -
121 -src_compile() {
122 - local use_audit="n";
123 - local use_pam="n";
124 - local use_dbus="n";
125 - local use_sesandbox="n";
126 -
127 - use audit && use_audit="y";
128 - use pam && use_pam="y";
129 - use dbus && use_dbus="y";
130 -
131 - building() {
132 - emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" || die
133 - }
134 - S="${S1}" # Regular policycoreutils
135 - python_foreach_impl building
136 - S="${S2}" # Extra set
137 - python_foreach_impl building
138 -}
139 -
140 -src_install() {
141 - local use_audit="n";
142 - local use_pam="n";
143 - local use_dbus="n";
144 - local use_sesandbox="n";
145 -
146 - use audit && use_audit="y";
147 - use pam && use_pam="y";
148 - use dbus && use_dbus="y";
149 -
150 - # Python scripts are present in many places. There are no extension modules.
151 - installation-policycoreutils() {
152 - einfo "Installing policycoreutils"
153 - emake -C "${BUILD_DIR}" DESTDIR="${D}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="${EPYTHON}" install || return 1
154 - }
155 -
156 - installation-extras() {
157 - einfo "Installing policycoreutils-extra"
158 - emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="${use_dbus}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1
159 - }
160 -
161 - S="${S1}" # policycoreutils
162 - python_foreach_impl installation-policycoreutils
163 - S="${S2}" # extras
164 - python_foreach_impl installation-extras
165 - S="${S1}" # back for later
166 -
167 - # remove redhat-style init script
168 - rm -fR "${D}/etc/rc.d"
169 -
170 - # compatibility symlinks
171 - dosym /sbin/setfiles /usr/sbin/setfiles
172 - dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
173 -
174 - # location for permissive definitions
175 - dodir /var/lib/selinux
176 - keepdir /var/lib/selinux
177 -
178 - # Set version-specific scripts
179 - for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
180 - python_replicate_script "${ED}/usr/bin/${pyscript}"
181 - done
182 - for pyscript in semanage rlpkg; do
183 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
184 - done
185 -
186 - dodir /usr/share/doc/${PF}/mcstrans/examples
187 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
188 -}
189 -
190 -pkg_postinst() {
191 - elog "Previous versions of policycoreutils optionally installed sesandbox support."
192 - elog "However, due to the possible unsafe state of seunshare (CVE-2014-3215) and the"
193 - elog "fact that sesandbox (called 'sandbox' upstream but collides with Portage sandbox)"
194 - elog "has not been supported in Gentoo for a while (for one, our policies do not provide"
195 - elog "sandboxing support) we have discontinued providing the sandbox related files."
196 -}
197
198 diff --git a/sys-apps/policycoreutils/policycoreutils-2.3-r3.ebuild b/sys-apps/policycoreutils/policycoreutils-2.3-r3.ebuild
199 deleted file mode 100644
200 index c1cde9b..00000000
201 --- a/sys-apps/policycoreutils/policycoreutils-2.3-r3.ebuild
202 +++ /dev/null
203 @@ -1,154 +0,0 @@
204 -# Copyright 1999-2015 Gentoo Foundation
205 -# Distributed under the terms of the GNU General Public License v2
206 -# $Id$
207 -
208 -EAPI="5"
209 -PYTHON_COMPAT=( python2_7 )
210 -PYTHON_REQ_USE="xml"
211 -
212 -inherit multilib python-r1 toolchain-funcs eutils
213 -
214 -MY_P="${P//_/-}"
215 -
216 -EXTRAS_VER="1.33"
217 -SEMNG_VER="2.3"
218 -SELNX_VER="2.3"
219 -SEPOL_VER="2.3"
220 -PATCHBUNDLE="3"
221 -
222 -IUSE="audit pam dbus"
223 -
224 -DESCRIPTION="SELinux core utilities"
225 -HOMEPAGE="http://userspace.selinuxproject.org"
226 -SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/${MY_P}.tar.gz
227 -https://dev.gentoo.org/~swift/patches/policycoreutils/patchbundle-${PN}-${PATCHBUNDLE}.tar.gz
228 - mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
229 -
230 -LICENSE="GPL-2"
231 -SLOT="0"
232 -KEYWORDS="amd64 x86"
233 -
234 -COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python]
235 - >=sys-libs/glibc-2.4
236 - >=sys-libs/libcap-1.10-r10
237 - >=sys-libs/libsemanage-${SEMNG_VER}[python]
238 - sys-libs/libcap-ng
239 - >=sys-libs/libsepol-${SEPOL_VER}
240 - sys-devel/gettext
241 - dev-python/ipy
242 - dbus? (
243 - sys-apps/dbus
244 - dev-libs/dbus-glib
245 - )
246 - audit? ( >=sys-process/audit-1.5.1 )
247 - pam? ( sys-libs/pam )
248 - ${PYTHON_DEPS}"
249 -
250 -### libcgroup -> seunshare
251 -### dbus -> restorecond
252 -
253 -# pax-utils for scanelf used by rlpkg
254 -RDEPEND="${COMMON_DEPS}
255 - dev-python/sepolgen
256 - app-misc/pax-utils"
257 -
258 -DEPEND="${COMMON_DEPS}"
259 -
260 -S="${WORKDIR}/${MY_P}"
261 -S1="${WORKDIR}/${MY_P}"
262 -S2="${WORKDIR}/policycoreutils-extra"
263 -
264 -src_prepare() {
265 - # rlpkg is more useful than fixfiles
266 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
267 - || die "fixfiles sed 1 failed"
268 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
269 - || die "fixfiles sed 2 failed"
270 -
271 - EPATCH_MULTI_MSG="Applying policycoreutils patches ... " \
272 - EPATCH_SUFFIX="patch" \
273 - EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
274 - EPATCH_FORCE="yes" \
275 - epatch
276 -
277 - epatch_user
278 -
279 - python_copy_sources
280 - # Our extra code is outside the regular directory, so set it to the extra
281 - # directory. We really should optimize this as it is ugly, but the extra
282 - # code is needed for Gentoo at the same time that policycoreutils is present
283 - # (so we cannot use an additional package for now).
284 - S="${S2}"
285 - python_copy_sources
286 -}
287 -
288 -src_compile() {
289 - local use_audit="n";
290 - local use_pam="n";
291 - local use_dbus="n";
292 - local use_sesandbox="n";
293 -
294 - use audit && use_audit="y";
295 - use pam && use_pam="y";
296 - use dbus && use_dbus="y";
297 -
298 - building() {
299 - emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" || die
300 - }
301 - S="${S1}" # Regular policycoreutils
302 - python_foreach_impl building
303 - S="${S2}" # Extra set
304 - python_foreach_impl building
305 -}
306 -
307 -src_install() {
308 - local use_audit="n";
309 - local use_pam="n";
310 - local use_dbus="n";
311 - local use_sesandbox="n";
312 -
313 - use audit && use_audit="y";
314 - use pam && use_pam="y";
315 - use dbus && use_dbus="y";
316 -
317 - # Python scripts are present in many places. There are no extension modules.
318 - installation-policycoreutils() {
319 - einfo "Installing policycoreutils"
320 - emake -C "${BUILD_DIR}" DESTDIR="${D}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="${EPYTHON}" install || return 1
321 - python_optimize
322 - }
323 -
324 - installation-extras() {
325 - einfo "Installing policycoreutils-extra"
326 - emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="${use_dbus}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1
327 - python_optimize
328 - }
329 -
330 - S="${S1}" # policycoreutils
331 - python_foreach_impl installation-policycoreutils
332 - S="${S2}" # extras
333 - python_foreach_impl installation-extras
334 - S="${S1}" # back for later
335 -
336 - # remove redhat-style init script
337 - rm -fR "${D}/etc/rc.d"
338 -
339 - # compatibility symlinks
340 - dosym /sbin/setfiles /usr/sbin/setfiles
341 - dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
342 -
343 - # location for permissive definitions
344 - dodir /var/lib/selinux
345 - keepdir /var/lib/selinux
346 -
347 - # Set version-specific scripts
348 - for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
349 - python_replicate_script "${ED}/usr/bin/${pyscript}"
350 - done
351 - for pyscript in semanage rlpkg; do
352 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
353 - done
354 -
355 - dodir /usr/share/doc/${PF}/mcstrans/examples
356 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
357 -}
358
359 diff --git a/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild b/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild
360 deleted file mode 100644
361 index 0da6cda..00000000
362 --- a/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild
363 +++ /dev/null
364 @@ -1,159 +0,0 @@
365 -# Copyright 1999-2015 Gentoo Foundation
366 -# Distributed under the terms of the GNU General Public License v2
367 -# $Id$
368 -
369 -EAPI="5"
370 -PYTHON_COMPAT=( python2_7 )
371 -PYTHON_REQ_USE="xml"
372 -
373 -inherit multilib python-r1 toolchain-funcs eutils bash-completion-r1
374 -
375 -MY_P="${P//_/-}"
376 -
377 -MY_RELEASEDATE="20150202"
378 -EXTRAS_VER="1.34"
379 -SEMNG_VER="${PV}"
380 -SELNX_VER="${PV}"
381 -SEPOL_VER="${PV}"
382 -
383 -IUSE="audit pam dbus"
384 -
385 -DESCRIPTION="SELinux core utilities"
386 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
387 -SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
388 - https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
389 -
390 -LICENSE="GPL-2"
391 -SLOT="0"
392 -KEYWORDS="amd64 x86"
393 -
394 -DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
395 - >=sys-libs/glibc-2.4
396 - >=sys-libs/libcap-1.10-r10:=
397 - >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
398 - sys-libs/libcap-ng:=
399 - >=sys-libs/libsepol-${SEPOL_VER}:=
400 - sys-devel/gettext
401 - dev-python/ipy[${PYTHON_USEDEP}]
402 - dbus? (
403 - sys-apps/dbus
404 - dev-libs/dbus-glib:=
405 - )
406 - audit? ( >=sys-process/audit-1.5.1 )
407 - pam? ( sys-libs/pam:= )
408 - ${PYTHON_DEPS}"
409 -
410 -### libcgroup -> seunshare
411 -### dbus -> restorecond
412 -
413 -# pax-utils for scanelf used by rlpkg
414 -RDEPEND="${DEPEND}
415 - dev-python/sepolgen
416 - app-misc/pax-utils
417 - !<sys-apps/openrc-0.14"
418 -
419 -S1="${WORKDIR}/${MY_P}"
420 -S2="${WORKDIR}/policycoreutils-extra"
421 -S="${S1}"
422 -
423 -src_prepare() {
424 - epatch "${FILESDIR}/0010-remove-sesandbox-support.patch"
425 - epatch "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
426 - epatch "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
427 - epatch "${FILESDIR}/0040-reverse-access-check-in-run_init.patch"
428 - epatch "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
429 - epatch "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
430 - epatch "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
431 -
432 - # rlpkg is more useful than fixfiles
433 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
434 - || die "fixfiles sed 1 failed"
435 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
436 - || die "fixfiles sed 2 failed"
437 -
438 - epatch_user
439 -
440 - sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
441 -
442 - python_copy_sources
443 - # Our extra code is outside the regular directory, so set it to the extra
444 - # directory. We really should optimize this as it is ugly, but the extra
445 - # code is needed for Gentoo at the same time that policycoreutils is present
446 - # (so we cannot use an additional package for now).
447 - S="${S2}"
448 - python_copy_sources
449 -}
450 -
451 -src_compile() {
452 - building() {
453 - emake -C "${BUILD_DIR}" \
454 - AUDIT_LOG_PRIVS="y" \
455 - AUDITH="$(usex audit)" \
456 - PAMH="$(usex pam)" \
457 - INOTIFYH="$(usex dbus)" \
458 - SESANDBOX="n" \
459 - CC="$(tc-getCC)" \
460 - PYLIBVER="${EPYTHON}" \
461 - LIBDIR="\$(PREFIX)/$(get_libdir)"
462 - }
463 - S="${S1}" # Regular policycoreutils
464 - python_foreach_impl building
465 - S="${S2}" # Extra set
466 - python_foreach_impl building
467 -}
468 -
469 -src_install() {
470 - # Python scripts are present in many places. There are no extension modules.
471 - installation-policycoreutils() {
472 - einfo "Installing policycoreutils"
473 - emake -C "${BUILD_DIR}" DESTDIR="${D}" \
474 - AUDITH="$(usex audit)" \
475 - PAMH="$(usex pam)" \
476 - INOTIFYH="$(usex dbus)" \
477 - SESANDBOX="n" \
478 - AUDIT_LOG_PRIV="y" \
479 - PYLIBVER="${EPYTHON}" \
480 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
481 - install
482 - python_optimize
483 - }
484 -
485 - installation-extras() {
486 - einfo "Installing policycoreutils-extra"
487 - emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="$(usex dbus)" SHLIBDIR="${D}$(get_libdir)/rc" install
488 - python_optimize
489 - }
490 -
491 - S="${S1}" # policycoreutils
492 - python_foreach_impl installation-policycoreutils
493 - S="${S2}" # extras
494 - python_foreach_impl installation-extras
495 - S="${S1}" # back for later
496 -
497 - # remove redhat-style init script
498 - rm -fR "${D}/etc/rc.d" || die
499 -
500 - # compatibility symlinks
501 - dosym /sbin/setfiles /usr/sbin/setfiles
502 - bashcomp_alias setsebool getsebool
503 -
504 - # location for policy definitions
505 - dodir /var/lib/selinux
506 - keepdir /var/lib/selinux
507 -
508 - # Set version-specific scripts
509 - for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
510 - python_replicate_script "${ED}/usr/bin/${pyscript}"
511 - done
512 - for pyscript in semanage rlpkg; do
513 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
514 - done
515 -
516 - dodir /usr/share/doc/${PF}/mcstrans/examples
517 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" || die
518 -}
519 -
520 -pkg_postinst() {
521 - # The selinux_gentoo init script is no longer needed with recent OpenRC
522 - elog "The selinux_gentoo init script has been removed in this version as it is not required after OpenRC 0.13."
523 -}
524
525 diff --git a/sys-apps/policycoreutils/policycoreutils-2.4-r2.ebuild b/sys-apps/policycoreutils/policycoreutils-2.4-r2.ebuild
526 deleted file mode 100644
527 index 8102025..00000000
528 --- a/sys-apps/policycoreutils/policycoreutils-2.4-r2.ebuild
529 +++ /dev/null
530 @@ -1,190 +0,0 @@
531 -# Copyright 1999-2015 Gentoo Foundation
532 -# Distributed under the terms of the GNU General Public License v2
533 -# $Id$
534 -
535 -EAPI="5"
536 -PYTHON_COMPAT=( python2_7 )
537 -PYTHON_REQ_USE="xml"
538 -
539 -inherit multilib python-r1 toolchain-funcs eutils bash-completion-r1
540 -
541 -MY_P="${P//_/-}"
542 -
543 -MY_RELEASEDATE="20150202"
544 -EXTRAS_VER="1.34"
545 -SEMNG_VER="${PV}"
546 -SELNX_VER="${PV}"
547 -SEPOL_VER="${PV}"
548 -
549 -IUSE="audit pam dbus"
550 -
551 -DESCRIPTION="SELinux core utilities"
552 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
553 -
554 -if [[ ${PV} == 9999 ]] ; then
555 - inherit git-r3
556 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
557 - SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
558 - S1="${WORKDIR}/${MY_P}/${PN}"
559 - S2="${WORKDIR}/policycoreutils-extra"
560 - S="${S1}"
561 -else
562 - SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
563 - https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
564 - KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
565 - S1="${WORKDIR}/${MY_P}"
566 - S2="${WORKDIR}/policycoreutils-extra"
567 - S="${S1}"
568 -fi
569 -
570 -LICENSE="GPL-2"
571 -SLOT="0"
572 -
573 -DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
574 - >=sys-libs/glibc-2.4
575 - >=sys-libs/libcap-1.10-r10:=
576 - >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
577 - sys-libs/libcap-ng:=
578 - >=sys-libs/libsepol-${SEPOL_VER}:=
579 - sys-devel/gettext
580 - dev-python/ipy[${PYTHON_USEDEP}]
581 - dbus? (
582 - sys-apps/dbus
583 - dev-libs/dbus-glib:=
584 - )
585 - audit? ( >=sys-process/audit-1.5.1 )
586 - pam? ( sys-libs/pam:= )
587 - ${PYTHON_DEPS}"
588 -
589 -### libcgroup -> seunshare
590 -### dbus -> restorecond
591 -
592 -# pax-utils for scanelf used by rlpkg
593 -RDEPEND="${DEPEND}
594 - dev-python/sepolgen
595 - app-misc/pax-utils
596 - !<sys-apps/openrc-0.14"
597 -
598 -src_unpack() {
599 - # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
600 - default
601 - if [[ ${PV} == 9999 ]] ; then
602 - git-r3_src_unpack
603 - fi
604 -}
605 -
606 -src_prepare() {
607 - S="${S1}"
608 - cd "${S}" || die "Failed to switch to ${S}"
609 - if [[ ${PV} != 9999 ]] ; then
610 - # If needed for live ebuilds please use /etc/portage/patches
611 - epatch "${FILESDIR}/0010-remove-sesandbox-support.patch"
612 - epatch "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
613 - epatch "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
614 - epatch "${FILESDIR}/0040-reverse-access-check-in-run_init.patch"
615 - epatch "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
616 - epatch "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
617 - epatch "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
618 - epatch "${FILESDIR}/0130-Only-invoke-RPM-on-RPM-enabled-Linux-distributions-bug-534682.patch"
619 - epatch "${FILESDIR}/0140-Set-self.sename-to-sename-after-calling-semanage-bug-557370.patch"
620 - fi
621 -
622 - # rlpkg is more useful than fixfiles
623 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
624 - || die "fixfiles sed 1 failed"
625 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
626 - || die "fixfiles sed 2 failed"
627 -
628 - epatch_user
629 -
630 - sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
631 -
632 - python_copy_sources
633 - # Our extra code is outside the regular directory, so set it to the extra
634 - # directory. We really should optimize this as it is ugly, but the extra
635 - # code is needed for Gentoo at the same time that policycoreutils is present
636 - # (so we cannot use an additional package for now).
637 - S="${S2}"
638 - python_copy_sources
639 -}
640 -
641 -src_compile() {
642 - building() {
643 - emake -C "${BUILD_DIR}" \
644 - AUDIT_LOG_PRIVS="y" \
645 - AUDITH="$(usex audit)" \
646 - PAMH="$(usex pam)" \
647 - INOTIFYH="$(usex dbus)" \
648 - SESANDBOX="n" \
649 - CC="$(tc-getCC)" \
650 - PYLIBVER="${EPYTHON}" \
651 - LIBDIR="\$(PREFIX)/$(get_libdir)"
652 - }
653 - S="${S1}" # Regular policycoreutils
654 - python_foreach_impl building
655 - S="${S2}" # Extra set
656 - python_foreach_impl building
657 -}
658 -
659 -src_install() {
660 - # Python scripts are present in many places. There are no extension modules.
661 - installation-policycoreutils() {
662 - einfo "Installing policycoreutils"
663 - emake -C "${BUILD_DIR}" DESTDIR="${D}" \
664 - AUDITH="$(usex audit)" \
665 - PAMH="$(usex pam)" \
666 - INOTIFYH="$(usex dbus)" \
667 - SESANDBOX="n" \
668 - AUDIT_LOG_PRIV="y" \
669 - PYLIBVER="${EPYTHON}" \
670 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
671 - install
672 - python_optimize
673 - }
674 -
675 - installation-extras() {
676 - einfo "Installing policycoreutils-extra"
677 - emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="$(usex dbus)" SHLIBDIR="${D}$(get_libdir)/rc" install
678 - python_optimize
679 - }
680 -
681 - S="${S1}" # policycoreutils
682 - python_foreach_impl installation-policycoreutils
683 - S="${S2}" # extras
684 - python_foreach_impl installation-extras
685 - S="${S1}" # back for later
686 -
687 - # remove redhat-style init script
688 - rm -fR "${D}/etc/rc.d" || die
689 -
690 - # compatibility symlinks
691 - dosym /sbin/setfiles /usr/sbin/setfiles
692 - bashcomp_alias setsebool getsebool
693 -
694 - # location for policy definitions
695 - dodir /var/lib/selinux
696 - keepdir /var/lib/selinux
697 -
698 - # Set version-specific scripts
699 - for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
700 - python_replicate_script "${ED}/usr/bin/${pyscript}"
701 - done
702 - for pyscript in semanage rlpkg; do
703 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
704 - done
705 -
706 - dodir /usr/share/doc/${PF}/mcstrans/examples
707 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" || die
708 -}
709 -
710 -pkg_postinst() {
711 - # The selinux_gentoo init script is no longer needed with recent OpenRC
712 - elog "The selinux_gentoo init script has been removed in this version as it is not required after OpenRC 0.13."
713 -
714 - for POLICY_TYPE in ${POLICY_TYPES} ; do
715 - # There have been some changes to the policy store, rebuilding now.
716 - # https://marc.info/?l=selinux&m=143757277819717&w=2
717 - einfo "Rebuilding store ${POLICY_TYPE} (without re-loading)."
718 - semodule -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
719 - done
720 -}
721
722 diff --git a/sys-apps/policycoreutils/policycoreutils-2.4.ebuild b/sys-apps/policycoreutils/policycoreutils-2.4.ebuild
723 deleted file mode 100644
724 index 642ddd9..00000000
725 --- a/sys-apps/policycoreutils/policycoreutils-2.4.ebuild
726 +++ /dev/null
727 @@ -1,147 +0,0 @@
728 -# Copyright 1999-2015 Gentoo Foundation
729 -# Distributed under the terms of the GNU General Public License v2
730 -# $Id$
731 -
732 -EAPI="5"
733 -PYTHON_COMPAT=( python2_7 )
734 -PYTHON_REQ_USE="xml"
735 -
736 -inherit multilib python-r1 toolchain-funcs eutils
737 -
738 -MY_P="${P//_/-}"
739 -
740 -EXTRAS_VER="1.33"
741 -SEMNG_VER="${PV}"
742 -SELNX_VER="${PV}"
743 -SEPOL_VER="${PV}"
744 -
745 -IUSE="audit pam dbus"
746 -
747 -DESCRIPTION="SELinux core utilities"
748 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
749 -SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${MY_P}.tar.gz
750 - mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
751 -
752 -LICENSE="GPL-2"
753 -SLOT="0"
754 -KEYWORDS="amd64 x86"
755 -
756 -DEPEND=">=sys-libs/libselinux-${SELNX_VER}[python]
757 - >=sys-libs/glibc-2.4
758 - >=sys-libs/libcap-1.10-r10
759 - >=sys-libs/libsemanage-${SEMNG_VER}[python]
760 - sys-libs/libcap-ng
761 - >=sys-libs/libsepol-${SEPOL_VER}
762 - sys-devel/gettext
763 - dev-python/ipy[${PYTHON_USEDEP}]
764 - dbus? (
765 - sys-apps/dbus
766 - dev-libs/dbus-glib
767 - )
768 - audit? ( >=sys-process/audit-1.5.1 )
769 - pam? ( sys-libs/pam )
770 - ${PYTHON_DEPS}"
771 -
772 -### libcgroup -> seunshare
773 -### dbus -> restorecond
774 -
775 -# pax-utils for scanelf used by rlpkg
776 -RDEPEND="${DEPEND}
777 - dev-python/sepolgen
778 - app-misc/pax-utils"
779 -
780 -S="${WORKDIR}/${MY_P}"
781 -S1="${WORKDIR}/${MY_P}"
782 -S2="${WORKDIR}/policycoreutils-extra"
783 -
784 -src_prepare() {
785 - epatch "${FILESDIR}/0010-remove-sesandbox-support.patch"
786 - epatch "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
787 - epatch "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
788 - epatch "${FILESDIR}/0040-reverse-access-check-in-run_init.patch"
789 - epatch "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
790 - epatch "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
791 - epatch "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
792 -
793 - # rlpkg is more useful than fixfiles
794 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
795 - || die "fixfiles sed 1 failed"
796 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
797 - || die "fixfiles sed 2 failed"
798 -
799 - epatch_user
800 -
801 - python_copy_sources
802 - # Our extra code is outside the regular directory, so set it to the extra
803 - # directory. We really should optimize this as it is ugly, but the extra
804 - # code is needed for Gentoo at the same time that policycoreutils is present
805 - # (so we cannot use an additional package for now).
806 - S="${S2}"
807 - python_copy_sources
808 -}
809 -
810 -src_compile() {
811 - building() {
812 - emake -C "${BUILD_DIR}" \
813 - AUDIT_LOG_PRIVS="y" \
814 - AUDITH="$(usex audit)" \
815 - PAMH="$(usex pam)" \
816 - INOTIFYH="$(usex dbus)" \
817 - SESANDBOX="n" \
818 - CC="$(tc-getCC)" \
819 - PYLIBVER="${EPYTHON}" \
820 - LIBDIR="\$(PREFIX)/$(get_libdir)"
821 - }
822 - S="${S1}" # Regular policycoreutils
823 - python_foreach_impl building
824 - S="${S2}" # Extra set
825 - python_foreach_impl building
826 -}
827 -
828 -src_install() {
829 - # Python scripts are present in many places. There are no extension modules.
830 - installation-policycoreutils() {
831 - einfo "Installing policycoreutils"
832 - emake -C "${BUILD_DIR}" DESTDIR="${D}" AUDITH="$(usex audit)" PAMH="$(usex pam)" INOTIFYH="$(usex dbus)" SESANDBOX="n" AUDIT_LOG_PRIV="y" PYLIBVER="${EPYTHON}" install
833 - python_optimize
834 - }
835 -
836 - installation-extras() {
837 - einfo "Installing policycoreutils-extra"
838 - emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="$(usex dbus)" SHLIBDIR="${D}$(get_libdir)/rc" install
839 - python_optimize
840 - }
841 -
842 - S="${S1}" # policycoreutils
843 - python_foreach_impl installation-policycoreutils
844 - S="${S2}" # extras
845 - python_foreach_impl installation-extras
846 - S="${S1}" # back for later
847 -
848 - # remove redhat-style init script
849 - rm -fR "${D}/etc/rc.d"
850 -
851 - # compatibility symlinks
852 - dosym /sbin/setfiles /usr/sbin/setfiles
853 - dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
854 -
855 - # location for policy definitions
856 - dodir /var/lib/selinux
857 - keepdir /var/lib/selinux
858 -
859 - # Set version-specific scripts
860 - for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
861 - python_replicate_script "${ED}/usr/bin/${pyscript}"
862 - done
863 - for pyscript in semanage rlpkg; do
864 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
865 - done
866 -
867 - dodir /usr/share/doc/${PF}/mcstrans/examples
868 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
869 -}
870 -
871 -pkg_postinst() {
872 - # The selinux_gentoo init script is no longer needed with recent OpenRC
873 - elog "The selinux_gentoo init script will be removed in future versions since it is not needed with OpenRC 0.13."
874 -}