From: "Sven Vermeulen" <sven.vermeulen@siphos.be>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-dev:master commit in: eclass/
Date: Tue, 1 May 2012 11:26:49 +0000 (UTC) [thread overview]
Message-ID: <1335871580.36526e28cee3266ed5e62b56933fbc41e1ef3410.SwifT@gentoo> (raw)
commit: 36526e28cee3266ed5e62b56933fbc41e1ef3410
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
AuthorDate: Tue May 1 11:26:20 2012 +0000
Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
CommitDate: Tue May 1 11:26:20 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=36526e28
Simplify eclass further, drop use of trigger file
---
eclass/selinux-policy-2.eclass | 37 +++++++++----------------------------
1 files changed, 9 insertions(+), 28 deletions(-)
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index c6f993a..07ee6c2 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -138,44 +138,27 @@ selinux-policy-2_src_prepare() {
fi
# Copy additional files to the 3rd_party/ location
- if [[ "$(declare -p POLICY_FILES 2>/dev/null 2>&1)" == "declare -a"* ]];
+ if [[ "$(declare -p POLICY_FILES 2>/dev/null 2>&1)" == "declare -a"* ]] ||
+ [[ -n ${POLICY_FILES} ]];
then
- add_interfaces=1;
+ add_interfaces=1;
cd "${S}/refpolicy/policy/modules"
- for POLFILE in "${POLICY_FILES[@]}";
+ for POLFILE in ${POLICY_FILES[@]};
do
- cp "${FILESDIR}/${POLFILE}" 3rd_party/ || die "Could not copy over ${POLFILE} to 3rd_party/ location";
+ cp "${FILESDIR}/${POLFILE}" 3rd_party/ || die "Could not copy ${POLFILE} to 3rd_party/ location";
done
- else
- if [[ -n ${POLICY_FILES} ]];
- then
- add_interfaces=1;
- cd "${S}/refpolicy/policy/modules"
- for POLFILE in ${POLICY_FILES};
- do
- cp "${FILESDIR}/${POLFILE}" 3rd_party/ || die "Could not copy ${POLFILE} into 3rd_party/ location";
- done
- fi
fi
# Apply the additional patches refered to by the module ebuild.
# But first some magic to differentiate between bash arrays and strings
- if [[ "$(declare -p POLICY_PATCH 2>/dev/null 2>&1)" == "declare -a"* ]];
+ if [[ "$(declare -p POLICY_PATCH 2>/dev/null 2>&1)" == "declare -a"* ]] ||
+ [[ -n ${POLICY_PATCH} ]];
then
cd "${S}/refpolicy/policy/modules"
- for POLPATCH in "${POLICY_PATCH[@]}";
+ for POLPATCH in ${POLICY_PATCH[@]};
do
epatch "${POLPATCH}"
done
- else
- if [[ -n ${POLICY_PATCH} ]];
- then
- cd "${S}/refpolicy/policy/modules"
- for POLPATCH in ${POLICY_PATCH};
- do
- epatch "${POLPATCH}"
- done
- fi
fi
# Collect only those files needed for this particular module
@@ -195,8 +178,6 @@ selinux-policy-2_src_prepare() {
cp ${modfiles} "${S}"/${i} \
|| die "Failed to copy the module files to ${S}/${i}"
-
- [ ${add_interfaces} -eq 1 ] && touch "${S}"/${i}/.install_interfaces;
done
}
@@ -224,7 +205,7 @@ selinux-policy-2_src_install() {
insinto ${BASEDIR}/${i}
doins "${S}"/${i}/${j}.pp || die "Failed to add ${j}.pp to ${i}"
- if [[ -f "${S}/${i}/.install_interfaces" ]];
+ if [[ "${POLICY_FILES[@]}" == *"${j}.if"* ]];
then
insinto ${BASEDIR}/${i}/include/3rd_party
doins "${S}"/${i}/${j}.if || die "Failed to add ${j}.if to ${i}"
next reply other threads:[~2012-05-01 11:26 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 11:26 Sven Vermeulen [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-01 23:52 [gentoo-commits] proj/hardened-dev:master commit in: eclass/ Anthony G. Basile
2016-05-01 19:51 Anthony G. Basile
2016-05-01 19:42 Magnus Granberg
2016-04-23 18:23 Magnus Granberg
2016-04-23 18:23 Magnus Granberg
2013-04-05 2:13 Anthony G. Basile
2013-04-02 11:30 Anthony G. Basile
2013-03-28 18:04 Anthony G. Basile
2013-03-18 21:16 Anthony G. Basile
2013-03-18 3:21 Anthony G. Basile
2013-02-10 11:26 Anthony G. Basile
2013-02-10 11:21 Anthony G. Basile
2013-02-10 1:56 Anthony G. Basile
2013-02-09 20:30 Anthony G. Basile
2012-12-30 1:29 Anthony G. Basile
2012-09-08 19:57 Sven Vermeulen
2012-05-15 18:11 Sven Vermeulen
2012-05-15 17:58 Sven Vermeulen
2012-05-06 14:14 Sven Vermeulen
2012-04-22 19:35 Sven Vermeulen
2012-04-22 19:35 Sven Vermeulen
2012-04-22 18:07 Sven Vermeulen
2012-04-22 18:00 Sven Vermeulen
2011-08-07 10:47 Anthony G. Basile
2011-08-03 19:16 Sven Vermeulen
2011-08-03 19:16 Sven Vermeulen
2011-08-03 19:01 Sven Vermeulen
2011-08-03 19:01 Sven Vermeulen
2011-08-03 13:14 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 11:58 Sven Vermeulen
2011-08-03 8:29 Sven Vermeulen
2011-05-15 13:33 Sven Vermeulen
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=1335871580.36526e28cee3266ed5e62b56933fbc41e1ef3410.SwifT@gentoo \
--to=sven.vermeulen@siphos.be \
--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