1 |
swift 14/03/21 19:13:35 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: selinux-base-2.20140311-r1.ebuild |
5 |
Log: |
6 |
New upstream refpolicy release |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47) |
9 |
|
10 |
Revision Changes Path |
11 |
1.39 sec-policy/selinux-base/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sec-policy/selinux-base/ChangeLog?rev=1.39&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sec-policy/selinux-base/ChangeLog?rev=1.39&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sec-policy/selinux-base/ChangeLog?r1=1.38&r2=1.39 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sec-policy/selinux-base/ChangeLog,v |
20 |
retrieving revision 1.38 |
21 |
retrieving revision 1.39 |
22 |
diff -u -r1.38 -r1.39 |
23 |
--- ChangeLog 12 Jan 2014 20:22:22 -0000 1.38 |
24 |
+++ ChangeLog 21 Mar 2014 19:13:35 -0000 1.39 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sec-policy/selinux-base |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base/ChangeLog,v 1.38 2014/01/12 20:22:22 swift Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base/ChangeLog,v 1.39 2014/03/21 19:13:35 swift Exp $ |
30 |
+ |
31 |
+*selinux-base-2.20140311-r1 (21 Mar 2014) |
32 |
+ |
33 |
+ 21 Mar 2014; Sven Vermeulen <swift@g.o> |
34 |
+ +selinux-base-2.20140311-r1.ebuild: |
35 |
+ New upstream refpolicy release |
36 |
|
37 |
12 Jan 2014; Sven Vermeulen <swift@g.o> |
38 |
selinux-base-2.20130424-r4.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 sec-policy/selinux-base/selinux-base-2.20140311-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sec-policy/selinux-base/selinux-base-2.20140311-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sec-policy/selinux-base/selinux-base-2.20140311-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: selinux-base-2.20140311-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2014 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base/selinux-base-2.20140311-r1.ebuild,v 1.1 2014/03/21 19:13:35 swift Exp $ |
52 |
EAPI="4" |
53 |
|
54 |
inherit eutils |
55 |
|
56 |
IUSE="+peer_perms +open_perms +ubac +unconfined doc" |
57 |
|
58 |
DESCRIPTION="Gentoo base policy for SELinux" |
59 |
HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" |
60 |
SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 |
61 |
http://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" |
62 |
LICENSE="GPL-2" |
63 |
SLOT="0" |
64 |
|
65 |
KEYWORDS="~amd64 ~x86" |
66 |
|
67 |
RDEPEND=">=sys-apps/policycoreutils-2.1.10 |
68 |
virtual/udev |
69 |
!<=sec-policy/selinux-base-policy-2.20130424" |
70 |
DEPEND="${RDEPEND} |
71 |
sys-devel/m4 |
72 |
>=sys-apps/checkpolicy-2.1.8" |
73 |
|
74 |
S=${WORKDIR}/ |
75 |
|
76 |
src_prepare() { |
77 |
# Apply the gentoo patches to the policy. These patches are only necessary |
78 |
# for base policies, or for interface changes on modules. |
79 |
EPATCH_MULTI_MSG="Applying SELinux policy updates ... " \ |
80 |
EPATCH_SUFFIX="patch" \ |
81 |
EPATCH_SOURCE="${WORKDIR}" \ |
82 |
EPATCH_FORCE="yes" \ |
83 |
epatch |
84 |
|
85 |
cd "${S}/refpolicy" |
86 |
make bare |
87 |
# Fix bug 257111 - Correct the initial sid for cron-started jobs in the |
88 |
# system_r role |
89 |
sed -i -e 's:system_crond_t:system_cronjob_t:g' \ |
90 |
"${S}/refpolicy/config/appconfig-standard/default_contexts" |
91 |
sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ |
92 |
"${S}/refpolicy/config/appconfig-mls/default_contexts" |
93 |
sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ |
94 |
"${S}/refpolicy/config/appconfig-mcs/default_contexts" |
95 |
|
96 |
epatch_user |
97 |
} |
98 |
|
99 |
src_configure() { |
100 |
[ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" |
101 |
|
102 |
# Update the SELinux refpolicy capabilities based on the users' USE flags. |
103 |
|
104 |
if ! use peer_perms; then |
105 |
sed -i -e '/network_peer_controls/d' \ |
106 |
"${S}/refpolicy/policy/policy_capabilities" |
107 |
fi |
108 |
|
109 |
if ! use open_perms; then |
110 |
sed -i -e '/open_perms/d' \ |
111 |
"${S}/refpolicy/policy/policy_capabilities" |
112 |
fi |
113 |
|
114 |
if ! use ubac; then |
115 |
sed -i -e '/^UBAC/s/y/n/' "${S}/refpolicy/build.conf" \ |
116 |
|| die "Failed to disable User Based Access Control" |
117 |
fi |
118 |
|
119 |
echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" |
120 |
|
121 |
# Prepare initial configuration |
122 |
cd "${S}/refpolicy"; |
123 |
make conf || die "Make conf failed" |
124 |
|
125 |
# Setup the policies based on the types delivered by the end user. |
126 |
# These types can be "targeted", "strict", "mcs" and "mls". |
127 |
for i in ${POLICY_TYPES}; do |
128 |
cp -a "${S}/refpolicy" "${S}/${i}" |
129 |
cd "${S}/${i}"; |
130 |
|
131 |
#cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" |
132 |
sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" |
133 |
|
134 |
sed -i -e '/^QUIET/s/n/y/' -e "/^NAME/s/refpolicy/$i/" \ |
135 |
"${S}/${i}/build.conf" || die "build.conf setup failed." |
136 |
|
137 |
if [[ "${i}" == "mls" ]] || [[ "${i}" == "mcs" ]]; |
138 |
then |
139 |
# MCS/MLS require additional settings |
140 |
sed -i -e "/^TYPE/s/standard/${i}/" "${S}/${i}/build.conf" \ |
141 |
|| die "failed to set type to mls" |
142 |
fi |
143 |
|
144 |
if [ "${i}" == "targeted" ]; then |
145 |
sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ |
146 |
"${S}/${i}/config/appconfig-standard/seusers" \ |
147 |
|| die "targeted seusers setup failed." |
148 |
fi |
149 |
|
150 |
if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then |
151 |
sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ |
152 |
"${S}/${i}/config/appconfig-${i}/seusers" \ |
153 |
|| die "policy seusers setup failed." |
154 |
fi |
155 |
done |
156 |
} |
157 |
|
158 |
src_compile() { |
159 |
[ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" |
160 |
|
161 |
for i in ${POLICY_TYPES}; do |
162 |
cd "${S}/${i}" |
163 |
make base || die "${i} compile failed" |
164 |
if use doc; then |
165 |
make html || die |
166 |
fi |
167 |
done |
168 |
} |
169 |
|
170 |
src_install() { |
171 |
[ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" |
172 |
|
173 |
for i in ${POLICY_TYPES}; do |
174 |
cd "${S}/${i}" |
175 |
|
176 |
make DESTDIR="${D}" install \ |
177 |
|| die "${i} install failed." |
178 |
|
179 |
make DESTDIR="${D}" install-headers \ |
180 |
|| die "${i} headers install failed." |
181 |
|
182 |
echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" |
183 |
|
184 |
echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" |
185 |
|
186 |
# libsemanage won't make this on its own |
187 |
keepdir "/etc/selinux/${i}/policy" |
188 |
|
189 |
if use doc; then |
190 |
dohtml doc/html/*; |
191 |
fi |
192 |
|
193 |
insinto /usr/share/selinux/devel; |
194 |
doins doc/policy.xml; |
195 |
|
196 |
done |
197 |
|
198 |
dodoc doc/Makefile.example doc/example.{te,fc,if} |
199 |
|
200 |
doman man/man8/*.8; |
201 |
|
202 |
insinto /etc/selinux |
203 |
doins "${FILESDIR}/config" |
204 |
} |
205 |
|
206 |
pkg_preinst() { |
207 |
has_version "<${CATEGORY}/${PN}-2.20101213-r13" |
208 |
previous_less_than_r13=$? |
209 |
} |