public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jason Zaman" <perfinion@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-base/
Date: Mon, 26 Oct 2015 05:52:25 +0000 (UTC)	[thread overview]
Message-ID: <1445838675.f92f6a99787e10d1713ab2b81892ece30573d474.perfinion@gentoo> (raw)

commit:     f92f6a99787e10d1713ab2b81892ece30573d474
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 05:50:25 2015 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> 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"
 }


             reply	other threads:[~2015-10-26  5:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  5:52 Jason Zaman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-19 19:50 [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-base/ Jakov Smolić
2024-07-08 13:33 Kenton Groombridge
2023-03-31 18:23 Kenton Groombridge
2022-09-07  7:52 Michał Górny
2021-11-02 14:50 Sam James
2020-11-03  5:28 Jason Zaman
2019-12-21 14:11 Jason Zaman
2019-04-20  8:24 Jason Zaman
2018-07-12 15:30 Jason Zaman
2018-07-12 15:30 Jason Zaman
2018-02-18 17:16 Patrice Clement
2018-01-18 17:47 Sven Vermeulen
2017-08-27 14:58 Jason Zaman
2016-12-11 20:01 Jason Zaman
2016-06-05  8:48 Sven Vermeulen
2016-03-23 22:37 Jason Zaman
2016-02-18 19:57 Mike Frysinger
2015-09-09 13:48 Jason Zaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445838675.f92f6a99787e10d1713ab2b81892ece30573d474.perfinion@gentoo \
    --to=perfinion@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox