1 |
swift |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
|
# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-apache/selinux-apache-2.20110726-r2.ebuild,v 1.2 2012/02/23 18:44:00 swift Exp $ |
4 |
|
|
IUSE="kerberos" |
5 |
|
|
MODS="apache" |
6 |
|
|
BASEPOL="2.20120215-r1" |
7 |
|
|
|
8 |
|
|
inherit selinux-policy-2 |
9 |
|
|
|
10 |
|
|
DESCRIPTION="SELinux policy for Apache HTTPD" |
11 |
|
|
DEPEND="${DEPEND} |
12 |
|
|
kerberos? ( sec-policy/selinux-kerberos )" |
13 |
|
|
RDEPEND="${DEPEND}" |
14 |
|
|
|
15 |
|
|
KEYWORDS="~amd64 ~x86" |
16 |
|
|
S="${WORKDIR}/" |
17 |
|
|
|
18 |
|
|
src_unpack() { |
19 |
|
|
selinux-policy-2_src_unpack |
20 |
|
|
if ! use kerberos ; then |
21 |
|
|
[ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted mcs mls"; |
22 |
|
|
for i in ${POLICY_TYPES}; do |
23 |
|
|
sed -i -e "/httpd_keytab_t/d" \ |
24 |
|
|
"${S}/${i}/apache.fc" |
25 |
|
|
done |
26 |
|
|
fi |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
pkg_postinst() { |
30 |
|
|
selinux-policy-2_pkg_postinst |
31 |
|
|
if use kerberos ; then |
32 |
|
|
einfo "If you decide to uninstall Kerberos, you should clear the" |
33 |
|
|
einfo "kerberos use flag here, and then emerge this module again." |
34 |
|
|
einfo "Failure to do so may result in policy compile errors in the" |
35 |
|
|
einfo "future." |
36 |
|
|
else |
37 |
|
|
einfo "If you install Kerberos later, you should set the kerberos" |
38 |
|
|
einfo "use flag here, and then emerge this module again in order to" |
39 |
|
|
einfo "get all of the relevant policy changes. Failure to do so may" |
40 |
|
|
einfo "result in errors authenticating against kerberos servers by" |
41 |
|
|
einfo "Apache." |
42 |
|
|
fi |
43 |
|
|
} |