From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 36BBF13888F for ; Mon, 26 Oct 2015 05:52:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2656DE07F1; Mon, 26 Oct 2015 05:52:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AB284E07F1 for ; Mon, 26 Oct 2015 05:52:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 42A2334084C for ; Mon, 26 Oct 2015 05:52:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 586D91921 for ; Mon, 26 Oct 2015 05:52:25 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1445838675.f92f6a99787e10d1713ab2b81892ece30573d474.perfinion@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-base/ X-VCS-Repository: repo/gentoo X-VCS-Files: sec-policy/selinux-base/selinux-base-9999.ebuild X-VCS-Directories: sec-policy/selinux-base/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: f92f6a99787e10d1713ab2b81892ece30573d474 X-VCS-Branch: master Date: Mon, 26 Oct 2015 05:52:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3081ba17-d020-41d0-be20-99784c4d20b4 X-Archives-Hash: b920db4382b76211544e21f936925224 commit: f92f6a99787e10d1713ab2b81892ece30573d474 Author: Jason Zaman gentoo org> AuthorDate: Mon Oct 26 05:50:25 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Oct 26 05:51:15 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f92f6a99 sec-policy/selinux-base: Add selinux useflag to live ebuild Package-Manager: portage-2.2.20.1 sec-policy/selinux-base/selinux-base-9999.ebuild | 39 ++++++++++++------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/sec-policy/selinux-base/selinux-base-9999.ebuild b/sec-policy/selinux-base/selinux-base-9999.ebuild index c67def2..d86db33 100644 --- a/sec-policy/selinux-base/selinux-base-9999.ebuild +++ b/sec-policy/selinux-base/selinux-base-9999.ebuild @@ -20,7 +20,7 @@ else KEYWORDS="~amd64 ~x86" fi -IUSE="+peer_perms +open_perms +ubac +unconfined doc" +IUSE="doc +open_perms +peer_perms systemd +ubac +unconfined" DESCRIPTION="Gentoo base policy for SELinux" HOMEPAGE="https://www.gentoo.org/proj/en/hardened/selinux/" @@ -36,10 +36,6 @@ DEPEND="${RDEPEND} S=${WORKDIR}/ -#src_unpack() { -# git-2_src_unpack -#} - src_prepare() { if [[ ${PV} != 9999* ]]; then # Apply the gentoo patches to the policy. These patches are only necessary @@ -64,12 +60,12 @@ src_configure() { if ! use peer_perms; then sed -i -e '/network_peer_controls/d' \ - "${S}/refpolicy/policy/policy_capabilities" + "${S}/refpolicy/policy/policy_capabilities" || die fi if ! use open_perms; then sed -i -e '/open_perms/d' \ - "${S}/refpolicy/policy/policy_capabilities" + "${S}/refpolicy/policy/policy_capabilities" || die fi if ! use ubac; then @@ -77,20 +73,25 @@ src_configure() { || die "Failed to disable User Based Access Control" fi - echo "DISTRO = gentoo" >> "${S}/refpolicy/build.conf" + 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"; + 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}" - cd "${S}/${i}"; + 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" + 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." @@ -120,10 +121,10 @@ src_compile() { [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" for i in ${POLICY_TYPES}; do - cd "${S}/${i}" - emake base || die "${i} compile failed" + cd "${S}/${i}" || die + emake base if use doc; then - make html || die + emake html fi done } @@ -132,7 +133,7 @@ src_install() { [ -z "${POLICY_TYPES}" ] && local POLICY_TYPES="targeted strict mls mcs" for i in ${POLICY_TYPES}; do - cd "${S}/${i}" + cd "${S}/${i}" || die make DESTDIR="${D}" install \ || die "${i} install failed." @@ -140,9 +141,9 @@ src_install() { make DESTDIR="${D}" install-headers \ || die "${i} headers install failed." - echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" + echo "run_init_t" > "${D}/etc/selinux/${i}/contexts/run_init_type" || die - echo "textrel_shlib_t" >> "${D}/etc/selinux/${i}/contexts/customizable_types" + 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" @@ -164,5 +165,5 @@ src_install() { doins "${FILESDIR}/config" insinto /usr/share/portage/config/sets - doins "${FILESDIR}/selinux.conf" || die "failed to install selinux-rebuild portage set" + doins "${FILESDIR}/selinux.conf" }