diff options
author | Chris PeBenito <pebenito@gentoo.org> | 2009-09-14 19:28:57 +0000 |
---|---|---|
committer | Chris PeBenito <pebenito@gentoo.org> | 2009-09-14 19:28:57 +0000 |
commit | 7e68edd6190862de8171ed039c697083d72e8d55 (patch) | |
tree | a57a38df61de94c128ab30edaac42527a1632c14 /sec-policy/selinux-base-policy | |
parent | [net-print/gutenprint] Version bump bug #276421 (diff) | |
download | historical-7e68edd6190862de8171ed039c697083d72e8d55.tar.gz historical-7e68edd6190862de8171ed039c697083d72e8d55.tar.bz2 historical-7e68edd6190862de8171ed039c697083d72e8d55.zip |
Update old selinux base policy to support ext4.
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'sec-policy/selinux-base-policy')
-rw-r--r-- | sec-policy/selinux-base-policy/ChangeLog | 8 | ||||
-rw-r--r-- | sec-policy/selinux-base-policy/Manifest | 9 | ||||
-rw-r--r-- | sec-policy/selinux-base-policy/selinux-base-policy-20080525-r1.ebuild | 119 |
3 files changed, 131 insertions, 5 deletions
diff --git a/sec-policy/selinux-base-policy/ChangeLog b/sec-policy/selinux-base-policy/ChangeLog index 955a95230116..a0c00dbf6024 100644 --- a/sec-policy/selinux-base-policy/ChangeLog +++ b/sec-policy/selinux-base-policy/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sec-policy/selinux-base-policy # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/ChangeLog,v 1.66 2009/08/14 21:19:21 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/ChangeLog,v 1.67 2009/09/14 19:28:57 pebenito Exp $ + +*selinux-base-policy-20080525-r1 (14 Sep 2009) + + 14 Sep 2009; Chris PeBenito <pebenito@gentoo.org> + +selinux-base-policy-20080525-r1.ebuild: + Update old base policy to support ext4. 14 Aug 2009; Chris PeBenito <pebenito@gentoo.org> -selinux-base-policy-20070329.ebuild, diff --git a/sec-policy/selinux-base-policy/Manifest b/sec-policy/selinux-base-policy/Manifest index 773df7829c31..96e4e913feab 100644 --- a/sec-policy/selinux-base-policy/Manifest +++ b/sec-policy/selinux-base-policy/Manifest @@ -16,13 +16,14 @@ DIST refpolicy-2.20090814.tar.bz2 490191 RMD160 a62b13cac598dcb83e9730d8fc3771f5 DIST refpolicy-20080525.tar.bz2 336603 RMD160 c4e846a5506164f8c89994df4bbd05b396f60639 SHA1 7764f2f6c60a530abb461256335b70a288bb65f9 SHA256 122a12924ef7b1348d676214590a0ed92960fbde053ea5a666e5179e0fd66ab2 EBUILD selinux-base-policy-2.20090730.ebuild 2940 RMD160 a4a6c14cda440566a2582c28ccf0e1b5474dbdb1 SHA1 1589347cce96ec35140db6eb6fb25604be63c846 SHA256 d5859b49ffa2e94a453facd23063b099e677418bbdeb7f7663198b261b34d592 EBUILD selinux-base-policy-2.20090814.ebuild 2940 RMD160 07e7a3c2fc462a44d02a2090311a116ec76e47ac SHA1 96662ce3d4751a4d4204e6dfe82e4441de231772 SHA256 aa324229c3858a542fe4826ffb3907ff438d37ff1da23dfc801d663f94dfa865 +EBUILD selinux-base-policy-20080525-r1.ebuild 3068 RMD160 f667dc4a3825a8f6b4c269e8012a9c8a6f764704 SHA1 232dd533252299a75f137258d2d7b3e239f8ea3f SHA256 14a6d7008cf023642fdd1478b746383abc8a0581e285d72804b4fbc60b5d7623 EBUILD selinux-base-policy-20080525.ebuild 2985 RMD160 42dc3b88d0f93c777f3e2485bd2c095e2a05a6e9 SHA1 36ec26261df5aef2804b4b79f74a2ff39691d550 SHA256 a0d78a4530639c47314b824e494b9b246a979995337703e1cc31946f82e34cce -MISC ChangeLog 14878 RMD160 82f33c1ca42b96c19133bf3b4f17b8b828562d1f SHA1 70739f95d7a3513d9c5d2e6034aefa6f81e588bc SHA256 02eab282d98fcffc375e18337e35badf862cbc8e584a1df5b04ea2c935052117 +MISC ChangeLog 15064 RMD160 b216b2f2989fa96016731532dd8ca88b0e975ec3 SHA1 776bdd11d1035481db0f6be6f63c77e4ba5f1ecd SHA256 a011d1cf6c759f45e3260b5e3c8a0736c59456860c92fa3848ad1ee1e3075507 MISC metadata.xml 473 RMD160 2bc7b92e3958e9371896025467bd896501fe19bf SHA1 e5a10b5fddb435fa3d58ef67a1952ae5a0262f72 SHA256 c45743d603ee47355e9d7b1b14d850678825e9c1252d96ec44ce21ac0b2a55b9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkqF1P8ACgkQWczwbOluxW+DfwCfe/qE/3T7G3HfadxOPvGeKNGd -ec8An3Dav1CJKCEBKvUEGhgmB4LqbBI0 -=81nk +iEYEARECAAYFAkqumYIACgkQWczwbOluxW9SEACfUwebIa2zPSF3OX4bOPRmDRMz +J3cAoKuDxAr0R89oHkOiUxCrgv8+tuNg +=aM3g -----END PGP SIGNATURE----- diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-20080525-r1.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-20080525-r1.ebuild new file mode 100644 index 000000000000..167fcccb122f --- /dev/null +++ b/sec-policy/selinux-base-policy/selinux-base-policy-20080525-r1.ebuild @@ -0,0 +1,119 @@ +# 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-20080525-r1.ebuild,v 1.1 2009/09/14 19:28:57 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="20080525" + + unpack ${A} + +# cd "${S}/refpolicy" +# epatch ${FILESDIR}/${PN}-${PV}.diff + + echo "fs_use_xattr ext4 gen_context(system_u:object_r:fs_t,s0);" \ + >> "${S}/refpolicy/policy/modules/kernel/filesystem.te" + + 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 +} |