Gentoo Archives: gentoo-commits

From: "Jason Zaman (perfinion)" <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/policycoreutils: policycoreutils-2.4-r1.ebuild policycoreutils-9999.ebuild ChangeLog
Date: Sat, 04 Jul 2015 12:43:55
Message-Id: 20150704124344.01E14751@oystercatcher.gentoo.org
1 perfinion 15/07/04 12:43:43
2
3 Modified: policycoreutils-9999.ebuild ChangeLog
4 Added: policycoreutils-2.4-r1.ebuild
5 Log:
6 bump of policycoreutils-extra, fixes bugs 544598, 517456, 517450
7
8 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x7EF137EC935B0EAF)
9
10 Revision Changes Path
11 1.2 sys-apps/policycoreutils/policycoreutils-9999.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild?r1=1.1&r2=1.2
16
17 Index: policycoreutils-9999.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- policycoreutils-9999.ebuild 9 Jun 2015 15:38:25 -0000 1.1
24 +++ policycoreutils-9999.ebuild 4 Jul 2015 12:43:43 -0000 1.2
25 @@ -1,17 +1,17 @@
26 # Copyright 1999-2015 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild,v 1.1 2015/06/09 15:38:25 swift Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-9999.ebuild,v 1.2 2015/07/04 12:43:43 perfinion Exp $
30
31 EAPI="5"
32 PYTHON_COMPAT=( python2_7 )
33 PYTHON_REQ_USE="xml"
34
35 -inherit multilib python-r1 toolchain-funcs eutils
36 +inherit multilib python-r1 toolchain-funcs eutils bash-completion-r1
37
38 MY_P="${P//_/-}"
39 -MY_RELEASEDATE="20150202"
40
41 -EXTRAS_VER="1.33"
42 +MY_RELEASEDATE="20150202"
43 +EXTRAS_VER="1.34"
44 SEMNG_VER="${PV}"
45 SELNX_VER="${PV}"
46 SEPOL_VER="${PV}"
47 @@ -25,35 +25,35 @@
48 inherit git-r3
49 EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
50 SRC_URI="mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
51 - S="${WORKDIR}/${MY_P}/${PN}"
52 S1="${WORKDIR}/${MY_P}/${PN}"
53 S2="${WORKDIR}/policycoreutils-extra"
54 + S="${S1}"
55 else
56 - SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${MY_P}.tar.gz
57 - mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
58 + SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
59 + http://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
60 KEYWORDS="~amd64 ~x86"
61 - S="${WORKDIR}/${MY_P}"
62 S1="${WORKDIR}/${MY_P}"
63 S2="${WORKDIR}/policycoreutils-extra"
64 + S="${S1}"
65 fi
66
67 LICENSE="GPL-2"
68 SLOT="0"
69
70 -DEPEND=">=sys-libs/libselinux-${SELNX_VER}[python]
71 +DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
72 >=sys-libs/glibc-2.4
73 - >=sys-libs/libcap-1.10-r10
74 - >=sys-libs/libsemanage-${SEMNG_VER}[python]
75 - sys-libs/libcap-ng
76 - >=sys-libs/libsepol-${SEPOL_VER}
77 + >=sys-libs/libcap-1.10-r10:=
78 + >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
79 + sys-libs/libcap-ng:=
80 + >=sys-libs/libsepol-${SEPOL_VER}:=
81 sys-devel/gettext
82 dev-python/ipy[${PYTHON_USEDEP}]
83 dbus? (
84 sys-apps/dbus
85 - dev-libs/dbus-glib
86 + dev-libs/dbus-glib:=
87 )
88 audit? ( >=sys-process/audit-1.5.1 )
89 - pam? ( sys-libs/pam )
90 + pam? ( sys-libs/pam:= )
91 ${PYTHON_DEPS}"
92
93 ### libcgroup -> seunshare
94 @@ -62,7 +62,8 @@
95 # pax-utils for scanelf used by rlpkg
96 RDEPEND="${DEPEND}
97 dev-python/sepolgen
98 - app-misc/pax-utils"
99 + app-misc/pax-utils
100 + !<sys-apps/openrc-0.14"
101
102 src_unpack() {
103 # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds
104 @@ -97,6 +98,8 @@
105
106 epatch_user
107
108 + sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
109 +
110 python_copy_sources
111 # Our extra code is outside the regular directory, so set it to the extra
112 # directory. We really should optimize this as it is ugly, but the extra
113 @@ -153,11 +156,11 @@
114 S="${S1}" # back for later
115
116 # remove redhat-style init script
117 - rm -fR "${D}/etc/rc.d"
118 + rm -fR "${D}/etc/rc.d" || die
119
120 # compatibility symlinks
121 dosym /sbin/setfiles /usr/sbin/setfiles
122 - dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
123 + bashcomp_alias setsebool getsebool
124
125 # location for policy definitions
126 dodir /var/lib/selinux
127 @@ -172,10 +175,10 @@
128 done
129
130 dodir /usr/share/doc/${PF}/mcstrans/examples
131 - cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples"
132 + cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" || die
133 }
134
135 pkg_postinst() {
136 # The selinux_gentoo init script is no longer needed with recent OpenRC
137 - elog "The selinux_gentoo init script will be removed in future versions since it is not needed with OpenRC 0.13."
138 + elog "The selinux_gentoo init script has been removed in this version as it is not required after OpenRC 0.13."
139 }
140
141
142
143 1.155 sys-apps/policycoreutils/ChangeLog
144
145 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.155&view=markup
146 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.155&content-type=text/plain
147 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?r1=1.154&r2=1.155
148
149 Index: ChangeLog
150 ===================================================================
151 RCS file: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v
152 retrieving revision 1.154
153 retrieving revision 1.155
154 diff -u -r1.154 -r1.155
155 --- ChangeLog 9 Jun 2015 15:38:25 -0000 1.154
156 +++ ChangeLog 4 Jul 2015 12:43:43 -0000 1.155
157 @@ -1,6 +1,12 @@
158 # ChangeLog for sys-apps/policycoreutils
159 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
160 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.154 2015/06/09 15:38:25 swift Exp $
161 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.155 2015/07/04 12:43:43 perfinion Exp $
162 +
163 +*policycoreutils-2.4-r1 (04 Jul 2015)
164 +
165 + 04 Jul 2015; Jason Zaman <perfinion@g.o>
166 + +policycoreutils-2.4-r1.ebuild, policycoreutils-9999.ebuild:
167 + bump of policycoreutils-extra, fixes bugs 544598, 517456, 517450
168
169 *policycoreutils-9999 (09 Jun 2015)
170
171
172
173
174 1.1 sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild
175
176 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild?rev=1.1&view=markup
177 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild?rev=1.1&content-type=text/plain
178
179 Index: policycoreutils-2.4-r1.ebuild
180 ===================================================================
181 # Copyright 1999-2015 Gentoo Foundation
182 # Distributed under the terms of the GNU General Public License v2
183 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.4-r1.ebuild,v 1.1 2015/07/04 12:43:43 perfinion Exp $
184
185 EAPI="5"
186 PYTHON_COMPAT=( python2_7 )
187 PYTHON_REQ_USE="xml"
188
189 inherit multilib python-r1 toolchain-funcs eutils bash-completion-r1
190
191 MY_P="${P//_/-}"
192
193 MY_RELEASEDATE="20150202"
194 EXTRAS_VER="1.34"
195 SEMNG_VER="${PV}"
196 SELNX_VER="${PV}"
197 SEPOL_VER="${PV}"
198
199 IUSE="audit pam dbus"
200
201 DESCRIPTION="SELinux core utilities"
202 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
203 SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz
204 http://dev.gentoo.org/~perfinion/distfiles/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
205
206 LICENSE="GPL-2"
207 SLOT="0"
208 KEYWORDS="~amd64 ~x86"
209
210 DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
211 >=sys-libs/glibc-2.4
212 >=sys-libs/libcap-1.10-r10:=
213 >=sys-libs/libsemanage-${SEMNG_VER}:=[python]
214 sys-libs/libcap-ng:=
215 >=sys-libs/libsepol-${SEPOL_VER}:=
216 sys-devel/gettext
217 dev-python/ipy[${PYTHON_USEDEP}]
218 dbus? (
219 sys-apps/dbus
220 dev-libs/dbus-glib:=
221 )
222 audit? ( >=sys-process/audit-1.5.1 )
223 pam? ( sys-libs/pam:= )
224 ${PYTHON_DEPS}"
225
226 ### libcgroup -> seunshare
227 ### dbus -> restorecond
228
229 # pax-utils for scanelf used by rlpkg
230 RDEPEND="${DEPEND}
231 dev-python/sepolgen
232 app-misc/pax-utils
233 !<sys-apps/openrc-0.14"
234
235 S1="${WORKDIR}/${MY_P}"
236 S2="${WORKDIR}/policycoreutils-extra"
237 S="${S1}"
238
239 src_prepare() {
240 epatch "${FILESDIR}/0010-remove-sesandbox-support.patch"
241 epatch "${FILESDIR}/0020-disable-autodetection-of-pam-and-audit.patch"
242 epatch "${FILESDIR}/0030-make-inotify-check-use-flag-triggered.patch"
243 epatch "${FILESDIR}/0040-reverse-access-check-in-run_init.patch"
244 epatch "${FILESDIR}/0070-remove-symlink-attempt-fails-with-gentoo-sandbox-approach.patch"
245 epatch "${FILESDIR}/0110-build-mcstrans-bug-472912.patch"
246 epatch "${FILESDIR}/0120-build-failure-for-mcscolor-for-CONTEXT__CONTAINS.patch"
247
248 # rlpkg is more useful than fixfiles
249 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
250 || die "fixfiles sed 1 failed"
251 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
252 || die "fixfiles sed 2 failed"
253
254 epatch_user
255
256 sed -i 's/-Werror//g' "${S1}"/*/Makefile || die "Failed to remove Werror"
257
258 python_copy_sources
259 # Our extra code is outside the regular directory, so set it to the extra
260 # directory. We really should optimize this as it is ugly, but the extra
261 # code is needed for Gentoo at the same time that policycoreutils is present
262 # (so we cannot use an additional package for now).
263 S="${S2}"
264 python_copy_sources
265 }
266
267 src_compile() {
268 building() {
269 emake -C "${BUILD_DIR}" \
270 AUDIT_LOG_PRIVS="y" \
271 AUDITH="$(usex audit)" \
272 PAMH="$(usex pam)" \
273 INOTIFYH="$(usex dbus)" \
274 SESANDBOX="n" \
275 CC="$(tc-getCC)" \
276 PYLIBVER="${EPYTHON}" \
277 LIBDIR="\$(PREFIX)/$(get_libdir)"
278 }
279 S="${S1}" # Regular policycoreutils
280 python_foreach_impl building
281 S="${S2}" # Extra set
282 python_foreach_impl building
283 }
284
285 src_install() {
286 # Python scripts are present in many places. There are no extension modules.
287 installation-policycoreutils() {
288 einfo "Installing policycoreutils"
289 emake -C "${BUILD_DIR}" DESTDIR="${D}" \
290 AUDITH="$(usex audit)" \
291 PAMH="$(usex pam)" \
292 INOTIFYH="$(usex dbus)" \
293 SESANDBOX="n" \
294 AUDIT_LOG_PRIV="y" \
295 PYLIBVER="${EPYTHON}" \
296 LIBDIR="\$(PREFIX)/$(get_libdir)" \
297 install
298 python_optimize
299 }
300
301 installation-extras() {
302 einfo "Installing policycoreutils-extra"
303 emake -C "${BUILD_DIR}" DESTDIR="${D}" INOTIFYH="$(usex dbus)" SHLIBDIR="${D}$(get_libdir)/rc" install
304 python_optimize
305 }
306
307 S="${S1}" # policycoreutils
308 python_foreach_impl installation-policycoreutils
309 S="${S2}" # extras
310 python_foreach_impl installation-extras
311 S="${S1}" # back for later
312
313 # remove redhat-style init script
314 rm -fR "${D}/etc/rc.d" || die
315
316 # compatibility symlinks
317 dosym /sbin/setfiles /usr/sbin/setfiles
318 bashcomp_alias setsebool getsebool
319
320 # location for policy definitions
321 dodir /var/lib/selinux
322 keepdir /var/lib/selinux
323
324 # Set version-specific scripts
325 for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
326 python_replicate_script "${ED}/usr/bin/${pyscript}"
327 done
328 for pyscript in semanage rlpkg; do
329 python_replicate_script "${ED}/usr/sbin/${pyscript}"
330 done
331
332 dodir /usr/share/doc/${PF}/mcstrans/examples
333 cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" || die
334 }
335
336 pkg_postinst() {
337 # The selinux_gentoo init script is no longer needed with recent OpenRC
338 elog "The selinux_gentoo init script has been removed in this version as it is not required after OpenRC 0.13."
339 }