diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-02-05 11:28:10 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-02-05 11:28:10 +0000 |
commit | 084c0491c40a5171def00b8d292e8041dd8fb684 (patch) | |
tree | e8dcf2d03657fe8bf5c28f680bdea0a88357a39e /eclass/selinux-policy-2.eclass | |
parent | Fix building with x11-libs/libnotify >= 0.7. (diff) | |
download | gentoo-2-084c0491c40a5171def00b8d292e8041dd8fb684.tar.gz gentoo-2-084c0491c40a5171def00b8d292e8041dd8fb684.tar.bz2 gentoo-2-084c0491c40a5171def00b8d292e8041dd8fb684.zip |
Fixed policy patching.
Diffstat (limited to 'eclass/selinux-policy-2.eclass')
-rw-r--r-- | eclass/selinux-policy-2.eclass | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass index f49ca9e83975..cc3d05b881b5 100644 --- a/eclass/selinux-policy-2.eclass +++ b/eclass/selinux-policy-2.eclass @@ -1,9 +1,9 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.4 2009/08/02 02:58:25 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.5 2011/02/05 11:28:10 blueness Exp $ # Eclass for installing SELinux policy, and optionally -# reloading the reference-policy based modules +# reloading the reference-policy based modules. inherit eutils @@ -32,7 +32,6 @@ selinux-policy-2_src_unpack() { for i in ${MODS}; do modfiles="`find ${S}/refpolicy/policy/modules -iname $i.te` $modfiles" modfiles="`find ${S}/refpolicy/policy/modules -iname $i.fc` $modfiles" - # use .if from headers done for i in ${POLICY_TYPES}; do @@ -42,8 +41,12 @@ selinux-policy-2_src_unpack() { cp ${modfiles} "${S}"/${i} if [ -n "${POLICY_PATCH}" ]; then - cd "${S}"/${i} - epatch "${POLICY_PATCH}" || die "failed patch ${i}" + for POLPATCH in "${POLICY_PATCH}"; + do + cd "${S}"/${i} + einfo "Patching ${i}" + epatch "${POLPATCH}" || die "failed patch ${POLPATCH}" + done fi done @@ -78,26 +81,12 @@ selinux-policy-2_pkg_postinst() { done [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - if has "loadpolicy" $FEATURES ; then - for i in ${POLICY_TYPES}; do - einfo "Inserting the following modules into the $i module store: ${MODS}" + for i in ${POLICY_TYPES}; do + einfo "Inserting the following modules into the $i module store: ${MODS}" - cd /usr/share/selinux/${i} - semodule -s ${i} ${COMMAND} - done - else - echo - echo - eerror "Policy has not been loaded. It is strongly suggested" - eerror "that the policy be loaded before continuing!!" - echo - einfo "Automatic policy loading can be enabled by adding" - einfo "\"loadpolicy\" to the FEATURES in make.conf." - echo - echo - ebeep 4 - epause 4 - fi + cd /usr/share/selinux/${i} + semodule -s ${i} ${COMMAND} + done } EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst |