diff options
Diffstat (limited to 'sec-policy/selinux-base')
-rw-r--r-- | sec-policy/selinux-base/Manifest | 6 | ||||
-rw-r--r-- | sec-policy/selinux-base/selinux-base-2.20141203-r10.ebuild | 167 | ||||
-rw-r--r-- | sec-policy/selinux-base/selinux-base-2.20151208-r1.ebuild | 167 | ||||
-rw-r--r-- | sec-policy/selinux-base/selinux-base-2.20151208-r2.ebuild | 167 | ||||
-rw-r--r-- | sec-policy/selinux-base/selinux-base-2.20151208-r3.ebuild | 167 | ||||
-rw-r--r-- | sec-policy/selinux-base/selinux-base-2.20151208-r5.ebuild | 166 |
6 files changed, 0 insertions, 840 deletions
diff --git a/sec-policy/selinux-base/Manifest b/sec-policy/selinux-base/Manifest index 3abad3f77163..b3f58dd826ef 100644 --- a/sec-policy/selinux-base/Manifest +++ b/sec-policy/selinux-base/Manifest @@ -1,12 +1,6 @@ -DIST patchbundle-selinux-base-policy-2.20141203-r10.tar.bz2 311358 SHA256 0b8275a8b1d0b6813d7d4c0cd353d11250bc7c9db8511bbf4697a6e693022f57 SHA512 76a41ea273833fd55cbe911b4d0afb7038948d37bd313939dcb23dc75159b8d494ebd687184f7099b6274c0f8de25d64970695e6cb96e2708049f0f5110d48e0 WHIRLPOOL d1e603009276306c24b9cdab40de81ddbbf6707afb44a08047e1d2f852b1f26ffdbd4551514718ab76462fb8ad87f04bc4b36150b7b32f7f09d60808904dd574 -DIST patchbundle-selinux-base-policy-2.20151208-r1.tar.bz2 281828 SHA256 08884d11088f7c9120692c27477b2b43a25a6ad013a87d663697c17209ee9418 SHA512 a2c51b41c1ac909a31e89f52ee7661a22af1ae7950383cd63c7f7bcd1cabac062221a5bac27d12d1ea63a0c30f834ea13c0c75df4bc8b08d8eb31b89a8cc7f02 WHIRLPOOL 87807f84ce7d2207434b2f7f1216f769a50d72960d3999e11f877795c46dcd7ba66e750a8365f5efa3616816aa81585bb921862bb61d9b75b34d4cb744d8748d -DIST patchbundle-selinux-base-policy-2.20151208-r2.tar.bz2 288485 SHA256 ffacc59c80b9bd1cfbe715fdf6d517ba7cf3ccf07c9614c884ba66705c4efdd8 SHA512 6ebd72539362e96711686ea1a5579fd911d5cff53ea1cf7dd910208b2afb07a9f80a8d6c2e7580e1ac996d767dc91440b2eb2781cc3583e070bc9bd34e2cce42 WHIRLPOOL 7492d5b699d9ec0d50bcb03fefd315d0d132c7f087d44c5b6ab5fb36c5f310df5835f544e39428fb749a4f6e6de62badc3e2f13b10dd6f498d994744aa3d30df -DIST patchbundle-selinux-base-policy-2.20151208-r3.tar.bz2 290741 SHA256 79dd5b3ea3fd9d5d98eadb480aa34e7f1c35bf7c8930f21926548eb8e473afce SHA512 44ea5e699fa22d476c9b0f74eb32154d44bdaa556a107ab42fe3fa528a836e640ee211ab7030ec2aa6dd3e7e900ec365af5c919edc2fe83506e59828cb649ed8 WHIRLPOOL 4275979995e90022959732fa3f292d9e19bd810fda888d8e2e8635c42263efd752087a466e2841f8e9d68693aa537a1b16275cdeafb72c05cd3220e5bb7947d6 DIST patchbundle-selinux-base-policy-2.20151208-r4.tar.bz2 294731 SHA256 ee21453bd30cad08d53ad9aa4d2e3f09f53e46ec0f0e8f64b371f33d24665132 SHA512 49304f485b0f231dd66551332d829388d27f0cd2e28acf22afff9457c4de7d20e8a137147e9bb16c6327031980f7fa52541ce62338ba2f3415f8623ed50ab35f WHIRLPOOL be5014c71f0f287193c8b1a70f908825637d3649b7dafae562260c03550a0b33ced1fd32dcc6b5feef62e00cc28a38847a5df8466d805be2c89c4cba531f844f -DIST patchbundle-selinux-base-policy-2.20151208-r5.tar.bz2 304623 SHA256 90bbbebb900b440b1ca555b5460ec304b063904d245487433cd6bc5604df5606 SHA512 4e420b476edd635693763476add1e2ede80653e2910fcbde3723557101ecf33c969d8528d19344b03e2a4fde407a6231fc6a5e8feb6fd3db9ab4ad190989714b WHIRLPOOL c40bc7e06ccdf7bd799e619c7918b15d538f2eba68122ed754f76b144c8227e7e9106651e077265aebc2e0dca5da5769145c98972b75802e101fb04cd6031d30 DIST patchbundle-selinux-base-policy-2.20151208-r6.tar.bz2 307239 SHA256 dd8cbe50f5fff68af543062157c778cb026f1bbacfb5825dbdb1121be757c5ec SHA512 22758f5fa1d4058cc34613d61271ddf0947a4d21f4ee9b298b290ef17f0bdbbb6f389577c0c3c4f5625d8ef599bb8f1a91c8c5a9cf372a7c07ae5784385130b4 WHIRLPOOL a8500aae051924d1cc646f080f2e511ee6cbea493efea699afc4b7a0d7bfb6365bd862cea5134fe81c11c26923ffef2d7424eb4a262263e8eb7590970f4c3283 DIST patchbundle-selinux-base-policy-2.20161023-r1.tar.bz2 298107 SHA256 fa5be024a7f3b59b155f3cb3852d8b4124f4e75112cd42014090146221169660 SHA512 f8720e4998023aa5186dd5fdebeb41eb998992fd629dd3ae369c855c00308a0aa47761b7a0fb4638893d7b3d8ef42e11b1ca7c5010cfc055258a3077d83f396d WHIRLPOOL 2cfcb976a2beb5e55049e562d75bb3887ca0cbeac9bc630df23a4456f4026f31673b0be012c8ffda89af9b7417b7202089607cd79e6804f69fa826dd017779f4 DIST patchbundle-selinux-base-policy-2.20161023-r3.tar.bz2 321394 SHA256 76521408b62a17120072cd0db5e037f4b7b967be4340985ce354786e5d2948f7 SHA512 2e9ca3be900c549ddbcd306f1bf5483934d7baf23ffd66a2172d26bcb81b4aa768596555dd8d362398013778e7a127024ec2468d6bf1b487f0c4a14e479e53f4 WHIRLPOOL 246399de9a96f3605fd490cd118f4301b19935990705ab87133911ad3e4befb5aa6d412e5e43b2e2c60936bc485969f55406316c3d37c2a2e8676642153231dd -DIST refpolicy-2.20141203.tar.bz2 680243 SHA256 f438209c430d8a2d4ddcbe4bdd3edb46f6af7dc4913637af0b73c635e40c1522 SHA512 682e4280c5799e4c12ec7594afc1389f67be35055748d2e0dbdc3419159a16c96d4946ca6178daee8370515951f8653b2e452efe8c962b8d7f9bc192f0b15a0c WHIRLPOOL 74bca232534e7af9051bb1ab9f77c1ff6c425781cf4561f781d6e9a40cc5ca0d9add540249ea5493e8782a9372aea296ead6c165c6c440ae1509eb319d151ee5 DIST refpolicy-2.20151208.tar.bz2 698182 SHA256 2dd2f45a7132137afe8302805c3b7839739759b9ab73dd1815c01afe34ac99de SHA512 cbefe117f143adea834065949e24e9fe86336c049e9e0518026597d5b0a18c482a9717422bd39b7fb0012d19df00365c969d87e1f13a7bb9dcb9996313ed6cf8 WHIRLPOOL cb843a602dde4234a62e6f92001bff689a457796215b015bcccce79e7aa73bfe875a82bdbdbf59236f218eb41aaf665fcc5753c42d86eb3ed1caa1b69ddc2efa DIST refpolicy-2.20161023.tar.bz2 1768667 SHA256 14c9576e2cdf0ecf656134bc59cba99589dbba2895344d2fc226bdb5d8e541c7 SHA512 3201ca3c6cada1053343d3763d36072cf40afa46bf5343087a8254320879cb61fef539dc7742e04e5645d0c886b8f4bf552bf502e9716f7a3282efc0b0ed970d WHIRLPOOL 3f44955c3b13f5a6152d8ca8b75b3c8d52becc1c47b3b0126f5c86fbdad8bf6a1ae72c42e0b130352e139f987340b3c0d3d37aac5b80c5e3d731fcd666b88504 diff --git a/sec-policy/selinux-base/selinux-base-2.20141203-r10.ebuild b/sec-policy/selinux-base/selinux-base-2.20141203-r10.ebuild deleted file mode 100644 index 5ce1035e9abc..000000000000 --- a/sec-policy/selinux-base/selinux-base-2.20141203-r10.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" - -inherit eutils - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="${SELINUX_GIT_REPO:-git://anongit.gentoo.org/proj/hardened-refpolicy.git https://anongit.gentoo.org/git/proj/hardened-refpolicy.git}" - EGIT_BRANCH="${SELINUX_GIT_BRANCH:-master}" - EGIT_CHECKOUT_DIR="${WORKDIR}/refpolicy" - - inherit git-r3 -else - SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2 - https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" - - KEYWORDS="amd64 x86" -fi - -IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=">=sys-apps/policycoreutils-2.3 - virtual/udev - !<=sec-policy/selinux-base-policy-2.20120725" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-2.3" - -S=${WORKDIR}/ - -src_prepare() { - if [[ ${PV} != 9999* ]]; then - # 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 - fi - - cd "${S}/refpolicy" - make bare - - epatch_user -} - -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" || die - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" || die - 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 - - if use systemd; then - sed -i -e '/^SYSTEMD/s/n/y/' "${S}/refpolicy/build.conf" \ - || die "Failed to enable SystemD" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" || die - - # Prepare initial configuration - cd "${S}/refpolicy" || die - make conf || die "Make conf failed" - - # 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}" || die - cd "${S}/${i}" || die - - #cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" - sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" || die - - 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 - - if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-${i}/seusers" \ - || die "policy 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}" || die - emake base - if use doc; then - emake html - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" || die - - 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" || die - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" || die - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - - insinto /usr/share/selinux/devel; - doins doc/policy.xml; - - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - doman man/man8/*.8; - - insinto /etc/selinux - doins "${FILESDIR}/config" - - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" -} diff --git a/sec-policy/selinux-base/selinux-base-2.20151208-r1.ebuild b/sec-policy/selinux-base/selinux-base-2.20151208-r1.ebuild deleted file mode 100644 index 050025762aff..000000000000 --- a/sec-policy/selinux-base/selinux-base-2.20151208-r1.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" - -inherit eutils - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="${SELINUX_GIT_REPO:-git://anongit.gentoo.org/proj/hardened-refpolicy.git https://anongit.gentoo.org/git/proj/hardened-refpolicy.git}" - EGIT_BRANCH="${SELINUX_GIT_BRANCH:-master}" - EGIT_CHECKOUT_DIR="${WORKDIR}/refpolicy" - - inherit git-r3 -else - SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2 - https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" - - KEYWORDS="amd64 ~arm ~arm64 ~mips x86" -fi - -IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=">=sys-apps/policycoreutils-2.3 - virtual/udev - !<=sec-policy/selinux-base-policy-2.20120725" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-2.3" - -S=${WORKDIR}/ - -src_prepare() { - if [[ ${PV} != 9999* ]]; then - # 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 - fi - - cd "${S}/refpolicy" - make bare - - epatch_user -} - -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" || die - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" || die - 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 - - if use systemd; then - sed -i -e '/^SYSTEMD/s/n/y/' "${S}/refpolicy/build.conf" \ - || die "Failed to enable SystemD" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" || die - - # Prepare initial configuration - cd "${S}/refpolicy" || die - make conf || die "Make conf failed" - - # 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}" || die - cd "${S}/${i}" || die - - #cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" - sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" || die - - 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 - - if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-${i}/seusers" \ - || die "policy 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}" || die - emake base - if use doc; then - emake html - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" || die - - 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" || die - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" || die - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - - insinto /usr/share/selinux/devel; - doins doc/policy.xml; - - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - doman man/man8/*.8; - - insinto /etc/selinux - doins "${FILESDIR}/config" - - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" -} diff --git a/sec-policy/selinux-base/selinux-base-2.20151208-r2.ebuild b/sec-policy/selinux-base/selinux-base-2.20151208-r2.ebuild deleted file mode 100644 index 050025762aff..000000000000 --- a/sec-policy/selinux-base/selinux-base-2.20151208-r2.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" - -inherit eutils - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="${SELINUX_GIT_REPO:-git://anongit.gentoo.org/proj/hardened-refpolicy.git https://anongit.gentoo.org/git/proj/hardened-refpolicy.git}" - EGIT_BRANCH="${SELINUX_GIT_BRANCH:-master}" - EGIT_CHECKOUT_DIR="${WORKDIR}/refpolicy" - - inherit git-r3 -else - SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2 - https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" - - KEYWORDS="amd64 ~arm ~arm64 ~mips x86" -fi - -IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=">=sys-apps/policycoreutils-2.3 - virtual/udev - !<=sec-policy/selinux-base-policy-2.20120725" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-2.3" - -S=${WORKDIR}/ - -src_prepare() { - if [[ ${PV} != 9999* ]]; then - # 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 - fi - - cd "${S}/refpolicy" - make bare - - epatch_user -} - -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" || die - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" || die - 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 - - if use systemd; then - sed -i -e '/^SYSTEMD/s/n/y/' "${S}/refpolicy/build.conf" \ - || die "Failed to enable SystemD" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" || die - - # Prepare initial configuration - cd "${S}/refpolicy" || die - make conf || die "Make conf failed" - - # 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}" || die - cd "${S}/${i}" || die - - #cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" - sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" || die - - 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 - - if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-${i}/seusers" \ - || die "policy 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}" || die - emake base - if use doc; then - emake html - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" || die - - 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" || die - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" || die - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - - insinto /usr/share/selinux/devel; - doins doc/policy.xml; - - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - doman man/man8/*.8; - - insinto /etc/selinux - doins "${FILESDIR}/config" - - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" -} diff --git a/sec-policy/selinux-base/selinux-base-2.20151208-r3.ebuild b/sec-policy/selinux-base/selinux-base-2.20151208-r3.ebuild deleted file mode 100644 index 78c628e5e862..000000000000 --- a/sec-policy/selinux-base/selinux-base-2.20151208-r3.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" - -inherit eutils - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="${SELINUX_GIT_REPO:-git://anongit.gentoo.org/proj/hardened-refpolicy.git https://anongit.gentoo.org/git/proj/hardened-refpolicy.git}" - EGIT_BRANCH="${SELINUX_GIT_BRANCH:-master}" - EGIT_CHECKOUT_DIR="${WORKDIR}/refpolicy" - - inherit git-r3 -else - SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2 - https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" - - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" -fi - -IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=">=sys-apps/policycoreutils-2.3 - virtual/udev - !<=sec-policy/selinux-base-policy-2.20120725" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-2.3" - -S=${WORKDIR}/ - -src_prepare() { - if [[ ${PV} != 9999* ]]; then - # 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 - fi - - cd "${S}/refpolicy" - make bare - - epatch_user -} - -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" || die - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" || die - 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 - - if use systemd; then - sed -i -e '/^SYSTEMD/s/n/y/' "${S}/refpolicy/build.conf" \ - || die "Failed to enable SystemD" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" || die - - # Prepare initial configuration - cd "${S}/refpolicy" || die - make conf || die "Make conf failed" - - # 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}" || die - cd "${S}/${i}" || die - - #cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" - sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" || die - - 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 - - if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-${i}/seusers" \ - || die "policy 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}" || die - emake base - if use doc; then - emake html - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" || die - - 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" || die - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" || die - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - - insinto /usr/share/selinux/devel; - doins doc/policy.xml; - - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - doman man/man8/*.8; - - insinto /etc/selinux - doins "${FILESDIR}/config" - - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" -} diff --git a/sec-policy/selinux-base/selinux-base-2.20151208-r5.ebuild b/sec-policy/selinux-base/selinux-base-2.20151208-r5.ebuild deleted file mode 100644 index ca37206598fd..000000000000 --- a/sec-policy/selinux-base/selinux-base-2.20151208-r5.ebuild +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" - -inherit eutils - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="${SELINUX_GIT_REPO:-git://anongit.gentoo.org/proj/hardened-refpolicy.git https://anongit.gentoo.org/git/proj/hardened-refpolicy.git}" - EGIT_BRANCH="${SELINUX_GIT_BRANCH:-master}" - EGIT_CHECKOUT_DIR="${WORKDIR}/refpolicy" - - inherit git-r3 -else - SRC_URI="https://raw.githubusercontent.com/wiki/TresysTechnology/refpolicy/files/refpolicy-${PV}.tar.bz2 - https://dev.gentoo.org/~swift/patches/selinux-base-policy/patchbundle-selinux-base-policy-${PVR}.tar.bz2" - - KEYWORDS="amd64 ~arm ~arm64 ~mips x86" -fi - -IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" - -DESCRIPTION="Gentoo base policy for SELinux" -HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=">=sys-apps/policycoreutils-2.3 - virtual/udev" -DEPEND="${RDEPEND} - sys-devel/m4 - >=sys-apps/checkpolicy-2.3" - -S=${WORKDIR}/ - -src_prepare() { - if [[ ${PV} != 9999* ]]; then - # 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 - fi - - cd "${S}/refpolicy" - make bare - - epatch_user -} - -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" || die - fi - - if ! use open_perms; then - sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" || die - 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 - - if use systemd; then - sed -i -e '/^SYSTEMD/s/n/y/' "${S}/refpolicy/build.conf" \ - || die "Failed to enable SystemD" - fi - - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" || die - - # Prepare initial configuration - cd "${S}/refpolicy" || die - make conf || die "Make conf failed" - - # 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}" || die - cd "${S}/${i}" || die - - #cp "${FILESDIR}/modules-2.20120215.conf" "${S}/${i}/policy/modules.conf" - sed -i -e "/= module/d" "${S}/${i}/policy/modules.conf" || die - - 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 - - if [ "${i}" != "targeted" ] && [ "${i}" != "strict" ] && use unconfined; then - sed -i -e '/root/d' -e 's/user_u/unconfined_u/' \ - "${S}/${i}/config/appconfig-${i}/seusers" \ - || die "policy 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}" || die - emake base - if use doc; then - emake html - fi - done -} - -src_install() { - [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" - - for i in ${POLICY_TYPES}; do - cd "${S}/${i}" || die - - 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" || die - - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" || die - - # libsemanage won't make this on its own - keepdir "/etc/selinux/${i}/policy" - - if use doc; then - dohtml doc/html/*; - fi - - insinto /usr/share/selinux/devel; - doins doc/policy.xml; - - done - - dodoc doc/Makefile.example doc/example.{te,fc,if} - - doman man/man8/*.8; - - insinto /etc/selinux - doins "${FILESDIR}/config" - - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" -} |