1 |
swift 12/03/31 11:01:41 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: policycoreutils-2.1.10.ebuild |
5 |
Log: |
6 |
Updating SELinux userspace utilities to support pending 2.20120215 policies |
7 |
|
8 |
(Portage version: 2.1.10.49/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.8 sys-apps/policycoreutils/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/metadata.xml?rev=1.8&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/metadata.xml?rev=1.8&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/metadata.xml?r1=1.7&r2=1.8 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/metadata.xml,v |
20 |
retrieving revision 1.7 |
21 |
retrieving revision 1.8 |
22 |
diff -u -r1.7 -r1.8 |
23 |
--- metadata.xml 14 Jan 2012 19:57:53 -0000 1.7 |
24 |
+++ metadata.xml 31 Mar 2012 11:01:41 -0000 1.8 |
25 |
@@ -16,5 +16,6 @@ |
26 |
</longdescription> |
27 |
<use> |
28 |
<flag name='audit'>Enable support for <pkg>sys-process/audit</pkg> and use the audit_* functions (like audit_getuid instead of getuid())</flag> |
29 |
+ <flag name='sesandbox'>Enable support for SELinux sandbox application</flag> |
30 |
</use> |
31 |
</pkgmetadata> |
32 |
|
33 |
|
34 |
|
35 |
1.97 sys-apps/policycoreutils/ChangeLog |
36 |
|
37 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.97&view=markup |
38 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?rev=1.97&content-type=text/plain |
39 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/ChangeLog?r1=1.96&r2=1.97 |
40 |
|
41 |
Index: ChangeLog |
42 |
=================================================================== |
43 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v |
44 |
retrieving revision 1.96 |
45 |
retrieving revision 1.97 |
46 |
diff -u -r1.96 -r1.97 |
47 |
--- ChangeLog 26 Feb 2012 10:06:04 -0000 1.96 |
48 |
+++ ChangeLog 31 Mar 2012 11:01:41 -0000 1.97 |
49 |
@@ -1,6 +1,11 @@ |
50 |
# ChangeLog for sys-apps/policycoreutils |
51 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
52 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.96 2012/02/26 10:06:04 swift Exp $ |
53 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.97 2012/03/31 11:01:41 swift Exp $ |
54 |
+ |
55 |
+*policycoreutils-2.1.10 (31 Mar 2012) |
56 |
+ |
57 |
+ 31 Mar 2012; <swift@g.o> +policycoreutils-2.1.10.ebuild, metadata.xml: |
58 |
+ Bump to version 2.1.10 |
59 |
|
60 |
26 Feb 2012; <swift@g.o> policycoreutils-2.1.0-r2.ebuild: |
61 |
Stabilization |
62 |
|
63 |
|
64 |
|
65 |
1.1 sys-apps/policycoreutils/policycoreutils-2.1.10.ebuild |
66 |
|
67 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.1.10.ebuild?rev=1.1&view=markup |
68 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.1.10.ebuild?rev=1.1&content-type=text/plain |
69 |
|
70 |
Index: policycoreutils-2.1.10.ebuild |
71 |
=================================================================== |
72 |
# Copyright 1999-2012 Gentoo Foundation |
73 |
# Distributed under the terms of the GNU General Public License v2 |
74 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.1.10.ebuild,v 1.1 2012/03/31 11:01:41 swift Exp $ |
75 |
|
76 |
EAPI="3" |
77 |
PYTHON_DEPEND="*" |
78 |
PYTHON_USE_WITH="xml" |
79 |
SUPPORT_PYTHON_ABIS="1" |
80 |
RESTRICT_PYTHON_ABIS="*-jython" |
81 |
|
82 |
inherit multilib python toolchain-funcs eutils |
83 |
|
84 |
EXTRAS_VER="1.21" |
85 |
SEMNG_VER="2.1.6" |
86 |
SELNX_VER="2.1.9" |
87 |
SEPOL_VER="2.1.4" |
88 |
|
89 |
IUSE="audit pam dbus sesandbox" |
90 |
|
91 |
DESCRIPTION="SELinux core utilities" |
92 |
HOMEPAGE="http://userspace.selinuxproject.org" |
93 |
SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz |
94 |
http://dev.gentoo.org/~swift/patches/policycoreutils/policycoreutils-2.1.10-sesandbox.patch.gz |
95 |
http://dev.gentoo.org/~swift/patches/policycoreutils/policycoreutils-2.1.10-fix-makefile-pam-audit.patch.gz |
96 |
http://dev.gentoo.org/~swift/patches/policycoreutils/policycoreutils-2.1.10-fix-seunshare.patch.gz |
97 |
http://dev.gentoo.org/~swift/patches/policycoreutils/policycoreutils-2.1.10-fix-nodbus_or_libcg.patch.gz |
98 |
mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2 |
99 |
mirror://gentoo/policycoreutils-2.0.85-python3.tar.gz" |
100 |
|
101 |
LICENSE="GPL-2" |
102 |
SLOT="0" |
103 |
KEYWORDS="~amd64 ~x86" |
104 |
|
105 |
COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python] |
106 |
>=sys-libs/glibc-2.4 |
107 |
>=sys-libs/libcap-1.10-r10 |
108 |
>=sys-libs/libsemanage-${SEMNG_VER}[python] |
109 |
sys-libs/libcap-ng |
110 |
>=sys-libs/libsepol-${SEPOL_VER} |
111 |
sys-devel/gettext |
112 |
sesandbox? ( dev-libs/libcgroup ) |
113 |
dbus? ( |
114 |
sys-apps/dbus |
115 |
dev-libs/dbus-glib |
116 |
) |
117 |
audit? ( >=sys-process/audit-1.5.1 ) |
118 |
pam? ( sys-libs/pam )" |
119 |
|
120 |
### libcgroup -> seunshare |
121 |
### dbus -> restorecond |
122 |
|
123 |
# pax-utils for scanelf used by rlpkg |
124 |
RDEPEND="${COMMON_DEPS} |
125 |
dev-python/sepolgen |
126 |
app-misc/pax-utils" |
127 |
|
128 |
DEPEND="${COMMON_DEPS}" |
129 |
|
130 |
S2=${WORKDIR}/policycoreutils-extra |
131 |
|
132 |
src_prepare() { |
133 |
# rlpkg is more useful than fixfiles |
134 |
sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \ |
135 |
|| die "fixfiles sed 1 failed" |
136 |
sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \ |
137 |
|| die "fixfiles sed 2 failed" |
138 |
# We currently do not support MCS, so the sandbox code in policycoreutils |
139 |
# is not usable yet. However, work for MCS is on the way and a reported |
140 |
# vulnerability (bug #374897) might go by unnoticed if we ignore it now. |
141 |
# As such, we will |
142 |
# - prepare support for switching name from "sandbox" to "sesandbox" |
143 |
epatch "${DISTDIR}/policycoreutils-2.1.10-sesandbox.patch.gz" |
144 |
# Disable auto-detection of PAM and audit related stuff and override |
145 |
epatch "${DISTDIR}/policycoreutils-2.1.10-fix-makefile-pam-audit.patch.gz" |
146 |
# - Fix build failure on seunshare |
147 |
epatch "${DISTDIR}/policycoreutils-2.1.10-fix-seunshare.patch.gz" |
148 |
# - Make sandbox & dbus-depending stuff (restorecond) USE-triggered |
149 |
epatch "${DISTDIR}/policycoreutils-2.1.10-fix-nodbus_or_libcg.patch.gz" |
150 |
# Overwrite gl.po, id.po and et.po with valid PO file |
151 |
cp "${S}/po/sq.po" "${S}/po/gl.po" || die "failed to copy ${S}/po/sq.po to gl.po" |
152 |
cp "${S}/po/sq.po" "${S}/po/id.po" || die "failed to copy ${S}/po/sq.po to id.po" |
153 |
cp "${S}/po/sq.po" "${S}/po/et.po" || die "failed to copy ${S}/po/sq.po to et.po" |
154 |
# Fixed scripts for Python 3 support |
155 |
cp "${WORKDIR}/seobject.py" "${S}/semanage/seobject.py" || die "failed to copy seobject.py" |
156 |
cp "${WORKDIR}/semanage" "${S}/semanage/semanage" || die "failed to copy semanage" |
157 |
cp "${WORKDIR}/chcat" "${S}/scripts/chcat" || die "failed to copy chcat" |
158 |
cp "${WORKDIR}/audit2allow" "${S}/audit2allow/audit2allow" || die "failed to copy audit2allow" |
159 |
} |
160 |
|
161 |
src_compile() { |
162 |
local use_audit="n"; |
163 |
local use_pam="n"; |
164 |
local use_dbus="n"; |
165 |
local use_sesandbox="n"; |
166 |
|
167 |
use audit && use_audit="y"; |
168 |
use pam && use_pam="y"; |
169 |
use dbus && use_dbus="y"; |
170 |
use sesandbox && use_sesandbox="y"; |
171 |
|
172 |
python_copy_sources semanage sandbox |
173 |
building() { |
174 |
einfo "Compiling policycoreutils" |
175 |
emake -C "${S}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" || die |
176 |
einfo "Compiling policycoreutils-extra " |
177 |
emake -C "${S2}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" || die |
178 |
} |
179 |
python_execute_function -s --source-dir semanage building |
180 |
} |
181 |
|
182 |
src_install() { |
183 |
local use_audit="n"; |
184 |
local use_pam="n"; |
185 |
local use_dbus="n"; |
186 |
local use_sesandbox="n"; |
187 |
|
188 |
use audit && use_audit="y"; |
189 |
use pam && use_pam="y"; |
190 |
use dbus && use_dbus="y"; |
191 |
use sesandbox && use_sesandbox="y"; |
192 |
|
193 |
# Python scripts are present in many places. There are no extension modules. |
194 |
installation() { |
195 |
einfo "Installing policycoreutils" |
196 |
emake -C "${S}" DESTDIR="${T}/images/${PYTHON_ABI}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="python$(python_get_version)" install || return 1 |
197 |
|
198 |
einfo "Installing policycoreutils-extra" |
199 |
emake -C "${S2}" DESTDIR="${T}/images/${PYTHON_ABI}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1 |
200 |
} |
201 |
python_execute_function installation |
202 |
python_merge_intermediate_installation_images "${T}/images" |
203 |
|
204 |
# remove redhat-style init script |
205 |
rm -fR "${D}/etc/rc.d" |
206 |
|
207 |
# compatibility symlinks |
208 |
dosym /sbin/setfiles /usr/sbin/setfiles |
209 |
dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so |
210 |
|
211 |
# location for permissive definitions |
212 |
dodir /var/lib/selinux |
213 |
keepdir /var/lib/selinux |
214 |
} |
215 |
|
216 |
pkg_postinst() { |
217 |
python_mod_optimize seobject.py |
218 |
} |
219 |
|
220 |
pkg_postrm() { |
221 |
python_mod_cleanup seobject.py |
222 |
} |