diff options
author | Sven Vermeulen <swift@gentoo.org> | 2011-11-12 20:53:53 +0000 |
---|---|---|
committer | Sven Vermeulen <swift@gentoo.org> | 2011-11-12 20:53:53 +0000 |
commit | c9a92a863c67335aaab995f3a7fa3cb2374103cd (patch) | |
tree | c40a6f1a1345f8826a762554a8b4478ce9f1798d /sec-policy/selinux-base-policy | |
parent | whitespace (diff) | |
download | gentoo-2-c9a92a863c67335aaab995f3a7fa3cb2374103cd.tar.gz gentoo-2-c9a92a863c67335aaab995f3a7fa3cb2374103cd.tar.bz2 gentoo-2-c9a92a863c67335aaab995f3a7fa3cb2374103cd.zip |
Removing the SELinux 2.20101213 policies
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'sec-policy/selinux-base-policy')
13 files changed, 14 insertions, 1458 deletions
diff --git a/sec-policy/selinux-base-policy/ChangeLog b/sec-policy/selinux-base-policy/ChangeLog index 7d2334b83b5b..a62d89a0725c 100644 --- a/sec-policy/selinux-base-policy/ChangeLog +++ b/sec-policy/selinux-base-policy/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sec-policy/selinux-base-policy # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/ChangeLog,v 1.86 2011/10/23 12:42:53 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/ChangeLog,v 1.87 2011/11/12 20:53:21 swift Exp $ + + 12 Nov 2011; <swift@gentoo.org> -selinux-base-policy-2.20090730.ebuild, + -selinux-base-policy-2.20090814.ebuild, + -selinux-base-policy-2.20091215.ebuild, + -selinux-base-policy-2.20101213-r16.ebuild, + -selinux-base-policy-2.20101213-r17.ebuild, + -selinux-base-policy-2.20101213-r18.ebuild, + -selinux-base-policy-2.20101213-r20.ebuild, + -selinux-base-policy-2.20101213-r21.ebuild, + -selinux-base-policy-2.20101213-r22.ebuild, + -selinux-base-policy-2.20110726-r3.ebuild, + -files/modules.conf.strict.20090730, -files/modules.conf.targeted.20090730: + Removing old policies 23 Oct 2011; <swift@gentoo.org> selinux-base-policy-2.20110726-r4.ebuild: Stabilization (tracker #384231) diff --git a/sec-policy/selinux-base-policy/files/modules.conf.strict.20090730 b/sec-policy/selinux-base-policy/files/modules.conf.strict.20090730 deleted file mode 100644 index fcb3fd8a94ff..000000000000 --- a/sec-policy/selinux-base-policy/files/modules.conf.strict.20090730 +++ /dev/null @@ -1,49 +0,0 @@ -application = base -authlogin = base -bootloader = base -clock = base -consoletype = base -corecommands = base -corenetwork = base -cron = base -devices = base -dmesg = base -domain = base -files = base -filesystem = base -fstools = base -getty = base -hostname = base -hotplug = base -init = base -iptables = base -kernel = base -libraries = base -locallogin = base -logging = base -lvm = base -miscfiles = base -mcs = base -mls = base -modutils = base -mount = base -mta = base -netutils = base -nscd = base -portage = base -raid = base -rsync = base -selinux = base -selinuxutil = base -ssh = base -staff = base -storage = base -su = base -sysadm = base -sysnetwork = base -terminal = base -ubac = base -udev = base -userdomain = base -usermanage = base -unprivuser = base diff --git a/sec-policy/selinux-base-policy/files/modules.conf.targeted.20090730 b/sec-policy/selinux-base-policy/files/modules.conf.targeted.20090730 deleted file mode 100644 index ee8a14c4b1dd..000000000000 --- a/sec-policy/selinux-base-policy/files/modules.conf.targeted.20090730 +++ /dev/null @@ -1,50 +0,0 @@ -application = base -authlogin = base -bootloader = base -clock = base -consoletype = base -corecommands = base -corenetwork = base -cron = base -devices = base -dmesg = base -domain = base -files = base -filesystem = base -fstools = base -getty = base -hostname = base -hotplug = base -init = base -iptables = base -kernel = base -libraries = base -locallogin = base -logging = base -lvm = base -miscfiles = base -mcs = base -mls = base -modutils = base -mount = base -mta = base -netutils = base -nscd = base -portage = base -raid = base -rsync = base -selinux = base -selinuxutil = base -ssh = base -staff = base -storage = base -su = base -sysadm = base -sysnetwork = base -terminal = base -ubac = base -udev = base -unconfined = base -userdomain = base -usermanage = base -unprivuser = base diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20090730.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20090730.ebuild deleted file mode 100644 index d2d50ea5569a..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20090730.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20090730.ebuild,v 1.1 2009/08/05 13:35:11 pebenito Exp $ - -IUSE="" - -inherit eutils - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - -# cd "${S}/refpolicy" -# epatch ${FILESDIR}/${PN}-${PV}.diff - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - - # add compat - sed -i -e '/user_u/s/user_r/user_r system_r/' "${S}/${i}/policy/users" \ - || die "targeted user compat failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - if has "loadpolicy" $FEATURES ; then - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp - 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 -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20090814.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20090814.ebuild deleted file mode 100644 index 3f434d019bd7..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20090814.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20090814.ebuild,v 1.1 2009/08/14 18:58:38 pebenito Exp $ - -IUSE="" - -inherit eutils - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - -# cd "${S}/refpolicy" -# epatch ${FILESDIR}/${PN}-${PV}.diff - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - - # add compat - sed -i -e '/user_u/s/user_r/user_r system_r/' "${S}/${i}/policy/users" \ - || die "targeted user compat failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - if has "loadpolicy" $FEATURES ; then - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp - 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 -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20091215.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20091215.ebuild deleted file mode 100644 index 59bae9a0a5e6..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20091215.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20091215.ebuild,v 1.1 2009/12/16 02:53:36 pebenito Exp $ - -EAPI="1" -IUSE="+peer_perms open_perms" - -inherit eutils - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - -# cd "${S}/refpolicy" -# epatch ${FILESDIR}/${PN}-${PV}.diff - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - if has "loadpolicy" $FEATURES ; then - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp - 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 -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r16.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r16.ebuild deleted file mode 100644 index 72c82e47b7fe..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r16.ebuild +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r16.ebuild,v 1.3 2011/07/03 00:33:35 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" - -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="amd64 x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "${i} reconfiguration failed" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r17.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r17.ebuild deleted file mode 100644 index e1fe64b4c532..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r17.ebuild +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r17.ebuild,v 1.2 2011/07/03 00:33:35 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" - -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r18.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r18.ebuild deleted file mode 100644 index 27f3f69b95b6..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r18.ebuild +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r18.ebuild,v 1.1 2011/07/10 02:30:17 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - MOD_CONF_VER="20090730" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - cp "${FILESDIR}/modules.conf.${i}.${MOD_CONF_VER}" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="strict targeted" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r20.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r20.ebuild deleted file mode 100644 index 02e56d27717a..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r20.ebuild +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r20.ebuild,v 1.1 2011/07/25 22:13:22 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - # Define what we see as "base" and what we want to remain modular - cp "${FILESDIR}/modules.conf" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - if [[ "${i}" == "targeted" ]]; - then - echo "unconfined = base" >> "${S}/${i}/policy/modules.conf" - fi - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if [[ "${i}" == "mls" ]] || [[ "${i}" == "mcs" ]]; - then - # MCS/MLS require additional settings - sed -i -e "/^TYPE/s/standard/${i}/" "${S}/${i}/build.conf" \ - || die "failed to set type to mls" - fi - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r21.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r21.ebuild deleted file mode 100644 index 9c58b4c643e0..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r21.ebuild +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r21.ebuild,v 1.1 2011/07/25 22:13:22 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mls/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mcs/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - # Define what we see as "base" and what we want to remain modular - cp "${FILESDIR}/modules.conf" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - if [[ "${i}" == "targeted" ]]; - then - echo "unconfined = base" >> "${S}/${i}/policy/modules.conf" - fi - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if [[ "${i}" == "mls" ]] || [[ "${i}" == "mcs" ]]; - then - # MCS/MLS require additional settings - sed -i -e "/^TYPE/s/standard/${i}/" "${S}/${i}/build.conf" \ - || die "failed to set type to mls" - fi - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r22.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r22.ebuild deleted file mode 100644 index 81187fe31067..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r22.ebuild +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20101213-r22.ebuild,v 1.1 2011/08/07 10:53:56 blueness Exp $ - -EAPI="1" -IUSE="+peer_perms +open_perms +ubac" - -inherit eutils - -#PATCHBUNDLE="${FILESDIR}/patchbundle-${PF}.tar.bz2" -PATCHBUNDLE="${DISTDIR}/patchbundle-${PF}.tar.bz2" -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -#SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~blueness/patchbundle-selinux-base-policy/patchbundle-${PF}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_unpack() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - unpack ${A} - - cd "${S}" - epatch "${PATCHBUNDLE}" - cd "${S}/refpolicy" - # Fix bug 257111 - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mls/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mcs/default_contexts" - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - # Define what we see as "base" and what we want to remain modular - cp "${FILESDIR}/modules.conf" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - if [[ "${i}" == "targeted" ]]; - then - echo "unconfined = base" >> "${S}/${i}/policy/modules.conf" - fi - sed -i -e '/^QUIET/s/n/y/' -e '/^MONOLITHIC/s/y/n/' \ - -e "/^NAME/s/refpolicy/$i/" "${S}/${i}/build.conf" \ - || die "build.conf setup failed." - - if [[ "${i}" == "mls" ]] || [[ "${i}" == "mcs" ]]; - then - # MCS/MLS require additional settings - sed -i -e "/^TYPE/s/standard/${i}/" "${S}/${i}/build.conf" \ - || die "failed to set type to mls" - fi - - if ! use ubac; then - sed -i -e 's:^UBAC = y:UBAC = n:g' "${S}/${i}/build.conf" - fi - - echo "DISTRO = gentoo" >> "${S}/${i}/build.conf" - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20110726-r3.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20110726-r3.ebuild deleted file mode 100644 index 17885cb86d8e..000000000000 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20110726-r3.ebuild +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-2.20110726-r3.ebuild,v 1.1 2011/08/28 21:12:32 swift Exp $ - -EAPI="4" -IUSE="+peer_perms +open_perms +ubac doc" - -inherit eutils - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/" -SRC_URI="http://oss.tresys.com/files/refpolicy/refpolicy-${PV}.tar.bz2 - http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${PF}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=sys-apps/policycoreutils-1.30.30 - >=sys-fs/udev-151" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-1.30.12" - -S=${WORKDIR}/ - -src_prepare() { - # Apply the gentoo patches to the policy. These patches are only necessary - # for base policies, or for interface changes on modules. - EPATCH_MULTI_MSG="Applying SELinux policy updates ... " \ - EPATCH_SUFFIX="patch" \ - EPATCH_SOURCE="${WORKDIR}" \ - EPATCH_FORCE="yes" \ - epatch - - cd "${S}/refpolicy" - # Fix bug 257111 - Correct the initial sid for cron-started jobs in the - # system_r role - sed -i -e 's:system_crond_t:system_cronjob_t:g' \ - "${S}/refpolicy/config/appconfig-standard/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mls/default_contexts" - sed -i -e 's|system_r:cronjob_t|system_r:system_cronjob_t|g' \ - "${S}/refpolicy/config/appconfig-mcs/default_contexts" -} - -src_configure() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - # Update the SELinux refpolicy capabilities based on the users' USE flags. - - if ! use peer_perms; then - sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" - fi - - if ! use ubac; then - sed -i -e '/^UBAC/s/y/n/' "${S}/refpolicy/build.conf" \ - || die "Failed to disable User Based Access Control" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" - - # Setup the policies based on the types delivered by the end user. - # These types can be "targeted", "strict", "mcs" and "mls". - for i in ${POLICY_TYPES}; do - cp -a "${S}/refpolicy" "${S}/${i}" - - cd "${S}/${i}"; - make conf || die "Make conf in ${i} failed" - - # Define what we see as "base" and what we want to remain modular. - cp "${FILESDIR}/modules.conf" \ - "${S}/${i}/policy/modules.conf" \ - || die "failed to set up modules.conf" - # In case of "targeted", we add the "unconfined" to the base policy - if [[ "${i}" == "targeted" ]]; - then - echo "unconfined = base" >> "${S}/${i}/policy/modules.conf" - fi - - sed -i -e '/^QUIET/s/n/y/' -e "/^NAME/s/refpolicy/$i/" \ - "${S}/${i}/build.conf" || die "build.conf setup failed." - - if [[ "${i}" == "mls" ]] || [[ "${i}" == "mcs" ]]; - then - # MCS/MLS require additional settings - sed -i -e "/^TYPE/s/standard/${i}/" "${S}/${i}/build.conf" \ - || die "failed to set type to mls" - fi - - if [ "${i}" == "targeted" ]; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-standard/seusers" \ - || die "targeted seusers setup failed." - fi - done -} - -src_compile() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - make base || die "${i} compile failed" - if use doc; then - make html || die - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - - make DESTDIR="${D}" install \ - || die "${i} install failed." - - make DESTDIR="${D}" install-headers \ - || die "${i} headers install failed." - - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - insinto /etc/selinux - doins "${FILESDIR}/config" -} - -pkg_preinst() { - has_version "<${CATEGORY}/${PN}-2.20101213-r13" - previous_less_than_r13=$? -} - -pkg_postinst() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - einfo "Inserting base module into ${i} module store." - - cd "${ROOT}/usr/share/selinux/${i}" - semodule -s "${i}" -b base.pp || die "Could not load in new base policy" - done - elog "Updates on policies might require you to relabel files. If you, after" - elog "installing new SELinux policies, get 'permission denied' errors," - elog "relabelling your system using 'rlpkg -a -r' might resolve the issues." -} |