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: Sat, 09 Apr 2022 02:55:11
Message-Id: 1649472877.1e96f4dcbf27b8faf16a19b21d15d9ef95935bd9.perfinion@gentoo
1 commit: 1e96f4dcbf27b8faf16a19b21d15d9ef95935bd9
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 01:47:51 2022 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 02:54:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e96f4dc
7
8 sys-apps/policycoreutils: Drop old
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
12
13 sys-apps/policycoreutils/Manifest | 2 -
14 .../policycoreutils/policycoreutils-3.1-r2.ebuild | 168 ---------------------
15 .../policycoreutils/policycoreutils-3.2.ebuild | 162 --------------------
16 3 files changed, 332 deletions(-)
17
18 diff --git a/sys-apps/policycoreutils/Manifest b/sys-apps/policycoreutils/Manifest
19 index ca90fbb5a9d6..05b2edfb4b33 100644
20 --- a/sys-apps/policycoreutils/Manifest
21 +++ b/sys-apps/policycoreutils/Manifest
22 @@ -1,4 +1,2 @@
23 -DIST policycoreutils-3.1.tar.gz 2817914 BLAKE2B ef68bb5f9cf577164ead44803b6be2bd6401c9e923d2c775c7c8c47f0e803749feaec4247fec5cc1cb766314954402fd2506370bb397f746437ecfcf65b384f3 SHA512 0592f218563a99ba95d2cfd07fdc3761b61c1cc3c01a17ab89ad840169e1a7d4083521d5cacc72d1b76911d516bf592db7a3f90d9ef0cc11ceed007e4580e140
24 -DIST policycoreutils-3.2.tar.gz 2817961 BLAKE2B 747cbd7b84ffa9153067340f8f1dc5a652eaf85b037a6e10e116d3d0b31c8e7c9794bc6a46ae212848bef4887478ac167e359a387bebac49e0acd08b727808ce SHA512 d16781d2d61b8b78d6fc242f2b5c3a03f47ea524fb61655823b6b0f0327ff376c65fe7bdf7a53f5863c01e599cf4a7050f21fda0fe6a8f2c2c16f89b156a4346
25 DIST policycoreutils-3.3.tar.gz 2818092 BLAKE2B 0ed9f128a774176ebadb71f448af8dee8c616a706314783b646869e7ea91892e358d5bb03e3aece3d0e6dc3203852e4e2925482727df1e5c71e075236ee43e5c SHA512 db658990355f99a8e43f53d20cc67bf9e557b0a7837d1927c80f325b7f93ad47876382278a980b818484d6e31712a9b03e279f947ebc88c4be60a9f395607f98
26 DIST policycoreutils-extra-1.37.tar.bz2 8809 BLAKE2B a7f6122c2e27f54b018174e962bd7f4c14af04e09bbb5300bde6967ea7f2dc5cd03b5787919a4e7f5288bcbc6747922962b5bd3b588ab1e3a035fbff4910d8f5 SHA512 0a85cd7cf279256b5e1927f9dfdd89626a1c8b77b0aeb62b496e7e8d1dccbaa315e39f9308fb2df7270f0bc1c10787b19990e7365cad74b47b61e30394c8b23f
27
28 diff --git a/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild b/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild
29 deleted file mode 100644
30 index eea202ba8299..000000000000
31 --- a/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild
32 +++ /dev/null
33 @@ -1,168 +0,0 @@
34 -# Copyright 1999-2022 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI="7"
38 -PYTHON_COMPAT=( python{3_7,3_8,3_9} )
39 -PYTHON_REQ_USE="xml"
40 -
41 -inherit multilib python-r1 toolchain-funcs bash-completion-r1
42 -
43 -MY_P="${P//_/-}"
44 -
45 -MY_RELEASEDATE="20200710"
46 -EXTRAS_VER="1.37"
47 -SEMNG_VER="${PV}"
48 -SELNX_VER="${PV}"
49 -SEPOL_VER="${PV}"
50 -
51 -IUSE="audit pam split-usr"
52 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
53 -
54 -DESCRIPTION="SELinux core utilities"
55 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
56 -
57 -if [[ ${PV} == 9999 ]]; then
58 - inherit git-r3
59 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
60 - SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
61 - S1="${WORKDIR}/${MY_P}/${PN}"
62 - S2="${WORKDIR}/policycoreutils-extra"
63 - S="${S1}"
64 -else
65 - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz
66 - https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
67 - KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
68 - S1="${WORKDIR}/${MY_P}"
69 - S2="${WORKDIR}/policycoreutils-extra"
70 - S="${S1}"
71 -fi
72 -
73 -LICENSE="GPL-2"
74 -SLOT="0"
75 -
76 -DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python,${PYTHON_USEDEP}]
77 - >=sys-libs/libsemanage-${SEMNG_VER}:=[python(+),${PYTHON_USEDEP}]
78 - >=sys-libs/libsepol-${SEPOL_VER}:=
79 - sys-libs/libcap-ng:=
80 - >=app-admin/setools-4.2.0[${PYTHON_USEDEP}]
81 - audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] )
82 - pam? ( sys-libs/pam:= )
83 - ${PYTHON_DEPS}"
84 -
85 -# Avoid dependency loop in the cross-compile case, bug #755173
86 -# (Still exists in native)
87 -BDEPEND="sys-devel/gettext"
88 -
89 -# pax-utils for scanelf used by rlpkg
90 -RDEPEND="${DEPEND}
91 - app-misc/pax-utils"
92 -
93 -PDEPEND="sys-apps/semodule-utils
94 - sys-apps/selinux-python"
95 -
96 -src_unpack() {
97 - # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
98 - default
99 - if [[ ${PV} == 9999 ]] ; then
100 - git-r3_src_unpack
101 - fi
102 -}
103 -
104 -src_prepare() {
105 - S="${S1}"
106 - cd "${S}" || die "Failed to switch to ${S}"
107 - if [[ ${PV} != 9999 ]] ; then
108 - # If needed for live ebuilds please use /etc/portage/patches
109 - eapply "${FILESDIR}/policycoreutils-3.1-0001-newrole-not-suid.patch"
110 - fi
111 -
112 - # rlpkg is more useful than fixfiles
113 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
114 - || die "fixfiles sed 1 failed"
115 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
116 - || die "fixfiles sed 2 failed"
117 -
118 - eapply_user
119 -
120 - sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
121 -
122 - python_copy_sources
123 - # Our extra code is outside the regular directory, so set it to the extra
124 - # directory. We really should optimize this as it is ugly, but the extra
125 - # code is needed for Gentoo at the same time that policycoreutils is present
126 - # (so we cannot use an additional package for now).
127 - S="${S2}"
128 - python_copy_sources
129 -}
130 -
131 -src_compile() {
132 - building() {
133 - emake -C "${BUILD_DIR}" \
134 - AUDIT_LOG_PRIVS="y" \
135 - AUDITH="$(usex audit y n)" \
136 - PAMH="$(usex pam y n)" \
137 - SESANDBOX="n" \
138 - CC="$(tc-getCC)" \
139 - LIBDIR="\$(PREFIX)/$(get_libdir)"
140 - }
141 - S="${S1}" # Regular policycoreutils
142 - python_foreach_impl building
143 - S="${S2}" # Extra set
144 - python_foreach_impl building
145 -}
146 -
147 -src_install() {
148 - # Python scripts are present in many places. There are no extension modules.
149 - installation-policycoreutils() {
150 - einfo "Installing policycoreutils"
151 - emake -C "${BUILD_DIR}" DESTDIR="${D}" \
152 - AUDIT_LOG_PRIVS="y" \
153 - AUDITH="$(usex audit y n)" \
154 - PAMH="$(usex pam y n)" \
155 - SESANDBOX="n" \
156 - CC="$(tc-getCC)" \
157 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
158 - install
159 - python_optimize
160 - }
161 -
162 - installation-extras() {
163 - einfo "Installing policycoreutils-extra"
164 - emake -C "${BUILD_DIR}" \
165 - DESTDIR="${D}" \
166 - install
167 - python_optimize
168 - }
169 -
170 - S="${S1}" # policycoreutils
171 - python_foreach_impl installation-policycoreutils
172 - S="${S2}" # extras
173 - python_foreach_impl installation-extras
174 - S="${S1}" # back for later
175 -
176 - # remove redhat-style init script
177 - rm -fR "${D}/etc/rc.d" || die
178 -
179 - # compatibility symlinks
180 - use split-usr && dosym ../../sbin/setfiles /usr/sbin/setfiles
181 -
182 - bashcomp_alias setsebool getsebool
183 -
184 - # location for policy definitions
185 - dodir /var/lib/selinux
186 - keepdir /var/lib/selinux
187 -
188 - # Set version-specific scripts
189 - for pyscript in rlpkg; do
190 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
191 - done
192 -}
193 -
194 -pkg_postinst() {
195 - for POLICY_TYPE in ${POLICY_TYPES} ; do
196 - # There have been some changes to the policy store, rebuilding now.
197 - # https://marc.info/?l=selinux&m=143757277819717&w=2
198 - einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without re-loading)."
199 - semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
200 - done
201 -}
202
203 diff --git a/sys-apps/policycoreutils/policycoreutils-3.2.ebuild b/sys-apps/policycoreutils/policycoreutils-3.2.ebuild
204 deleted file mode 100644
205 index 456189b1aac5..000000000000
206 --- a/sys-apps/policycoreutils/policycoreutils-3.2.ebuild
207 +++ /dev/null
208 @@ -1,162 +0,0 @@
209 -# Copyright 1999-2022 Gentoo Authors
210 -# Distributed under the terms of the GNU General Public License v2
211 -
212 -EAPI="7"
213 -PYTHON_COMPAT=( python{3_7,3_8,3_9} )
214 -PYTHON_REQ_USE="xml"
215 -
216 -inherit multilib python-r1 toolchain-funcs bash-completion-r1
217 -
218 -EXTRAS_VER="1.37"
219 -
220 -IUSE="audit pam split-usr"
221 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
222 -
223 -DESCRIPTION="SELinux core utilities"
224 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
225 -
226 -if [[ ${PV} == 9999 ]]; then
227 - inherit git-r3
228 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
229 - SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
230 - S1="${WORKDIR}/${PN}"
231 - S2="${WORKDIR}/policycoreutils-extra"
232 - S="${S1}"
233 -else
234 - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${PV}/${P}.tar.gz
235 - https://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
236 - KEYWORDS="amd64 arm arm64 ~mips x86"
237 - S1="${WORKDIR}/${P}"
238 - S2="${WORKDIR}/policycoreutils-extra"
239 - S="${S1}"
240 -fi
241 -
242 -LICENSE="GPL-2"
243 -SLOT="0"
244 -
245 -DEPEND=">=sys-libs/libselinux-${PV}:=[python,${PYTHON_USEDEP}]
246 - >=sys-libs/libsemanage-${PV}:=[python(+),${PYTHON_USEDEP}]
247 - >=sys-libs/libsepol-${PV}:=
248 - sys-libs/libcap-ng:=
249 - >=app-admin/setools-4.2.0[${PYTHON_USEDEP}]
250 - audit? ( >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] )
251 - pam? ( sys-libs/pam:= )
252 - ${PYTHON_DEPS}"
253 -
254 -# Avoid dependency loop in the cross-compile case, bug #755173
255 -# (Still exists in native)
256 -BDEPEND="sys-devel/gettext"
257 -
258 -# pax-utils for scanelf used by rlpkg
259 -RDEPEND="${DEPEND}
260 - app-misc/pax-utils"
261 -
262 -PDEPEND="sys-apps/semodule-utils
263 - sys-apps/selinux-python"
264 -
265 -src_unpack() {
266 - # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
267 - default
268 - if [[ ${PV} == 9999 ]] ; then
269 - git-r3_src_unpack
270 - fi
271 -}
272 -
273 -src_prepare() {
274 - S="${S1}"
275 - cd "${S}" || die "Failed to switch to ${S}"
276 - if [[ ${PV} != 9999 ]] ; then
277 - # If needed for live ebuilds please use /etc/portage/patches
278 - eapply "${FILESDIR}/policycoreutils-3.1-0001-newrole-not-suid.patch"
279 - fi
280 -
281 - # rlpkg is more useful than fixfiles
282 - sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
283 - || die "fixfiles sed 1 failed"
284 - sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
285 - || die "fixfiles sed 2 failed"
286 -
287 - eapply_user
288 -
289 - sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
290 -
291 - python_copy_sources
292 - # Our extra code is outside the regular directory, so set it to the extra
293 - # directory. We really should optimize this as it is ugly, but the extra
294 - # code is needed for Gentoo at the same time that policycoreutils is present
295 - # (so we cannot use an additional package for now).
296 - S="${S2}"
297 - python_copy_sources
298 -}
299 -
300 -src_compile() {
301 - building() {
302 - emake -C "${BUILD_DIR}" \
303 - AUDIT_LOG_PRIVS="y" \
304 - AUDITH="$(usex audit y n)" \
305 - PAMH="$(usex pam y n)" \
306 - SESANDBOX="n" \
307 - CC="$(tc-getCC)" \
308 - LIBDIR="\$(PREFIX)/$(get_libdir)"
309 - }
310 - S="${S1}" # Regular policycoreutils
311 - python_foreach_impl building
312 - S="${S2}" # Extra set
313 - python_foreach_impl building
314 -}
315 -
316 -src_install() {
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}" \
321 - AUDIT_LOG_PRIVS="y" \
322 - AUDITH="$(usex audit y n)" \
323 - PAMH="$(usex pam y n)" \
324 - SESANDBOX="n" \
325 - CC="$(tc-getCC)" \
326 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
327 - install
328 - python_optimize
329 - }
330 -
331 - installation-extras() {
332 - einfo "Installing policycoreutils-extra"
333 - emake -C "${BUILD_DIR}" \
334 - DESTDIR="${D}" \
335 - install
336 - python_optimize
337 - }
338 -
339 - S="${S1}" # policycoreutils
340 - python_foreach_impl installation-policycoreutils
341 - S="${S2}" # extras
342 - python_foreach_impl installation-extras
343 - S="${S1}" # back for later
344 -
345 - # remove redhat-style init script
346 - rm -fR "${D}/etc/rc.d" || die
347 -
348 - # compatibility symlinks
349 - use split-usr && dosym ../../sbin/setfiles /usr/sbin/setfiles
350 -
351 - bashcomp_alias setsebool getsebool
352 -
353 - # location for policy definitions
354 - dodir /var/lib/selinux
355 - keepdir /var/lib/selinux
356 -
357 - # Set version-specific scripts
358 - for pyscript in rlpkg; do
359 - python_replicate_script "${ED}/usr/sbin/${pyscript}"
360 - done
361 -}
362 -
363 -pkg_postinst() {
364 - for POLICY_TYPE in ${POLICY_TYPES} ; do
365 - # There have been some changes to the policy store, rebuilding now.
366 - # https://marc.info/?l=selinux&m=143757277819717&w=2
367 - einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without re-loading)."
368 - semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
369 - done
370 -}