From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 32/41] selinux-policy-2.eclass: drop EAPI 6 support
Date: Sun, 25 Dec 2022 23:15:43 +0100 [thread overview]
Message-ID: <20221225221552.8023-32-soap@gentoo.org> (raw)
In-Reply-To: <20221225221552.8023-1-soap@gentoo.org>
Closes: https://bugs.gentoo.org/778812
Signed-off-by: David Seifert <soap@gentoo.org>
---
eclass/selinux-policy-2.eclass | 49 +++++++++++++++++-----------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index f00e3555b6b..84e95678a67 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -7,7 +7,7 @@
# @ECLASS: selinux-policy-2.eclass
# @MAINTAINER:
# selinux@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: This eclass supports the deployment of the various SELinux modules in sec-policy
# @DESCRIPTION:
# The selinux-policy-2.eclass supports deployment of the various SELinux modules
@@ -18,6 +18,14 @@
# Also, it supports for bundling patches to make the whole thing just a bit more
# manageable.
+case ${EAPI} in
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_SELINUX_POLICY_2_ECLASS} ]]; then
+_SELINUX_POLICY_2_ECLASS=1
+
# @ECLASS_VARIABLE: MODS
# @DESCRIPTION:
# This variable contains the (upstream) module name for the SELinux module.
@@ -74,12 +82,6 @@
# The default value is the 'master' branch.
: ${SELINUX_GIT_BRANCH:="master"};
-case "${EAPI:-0}" in
- 0|1|2|3|4|5) die "EAPI<6 is not supported";;
- 6|7) : ;;
- *) die "unknown EAPI" ;;
-esac
-
case ${BASEPOL} in
9999) inherit git-r3
EGIT_REPO_URI="${SELINUX_GIT_REPO}";
@@ -113,17 +115,12 @@ else
RDEPEND=">=sys-apps/policycoreutils-2.0.82
>=sec-policy/selinux-base-policy-${PV}"
fi
-if [[ ${EAPI} == 6 ]]; then
- DEPEND="${RDEPEND}
- sys-devel/m4
- >=sys-apps/checkpolicy-2.0.21"
-else
- DEPEND="${RDEPEND}"
- BDEPEND="sys-devel/m4
- >=sys-apps/checkpolicy-2.0.21"
-fi
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/m4
+ >=sys-apps/checkpolicy-2.0.21
+"
# @FUNCTION: selinux-policy-2_src_unpack
# @DESCRIPTION:
@@ -219,7 +216,7 @@ selinux-policy-2_src_compile() {
for i in ${POLICY_TYPES}; do
# Support USE flags in builds
export M4PARAM="${makeuse}"
- emake NAME=$i SHAREDIR="${ROOT%/}"/usr/share/selinux -C "${S}"/${i} || die "${i} compile failed"
+ emake NAME=$i SHAREDIR="${EPREFIX}"/usr/share/selinux -C "${S}"/${i}
done
}
@@ -255,8 +252,8 @@ selinux-policy-2_src_install() {
selinux-policy-2_pkg_postinst() {
# Set root path and don't load policy into the kernel when cross compiling
local root_opts=""
- if [[ "${ROOT%/}" != "" ]]; then
- root_opts="-p ${ROOT%/} -n"
+ if [[ -n ${ROOT} ]]; then
+ root_opts="-p ${ROOT} -n"
fi
# build up the command in the case of multiple modules
@@ -274,7 +271,7 @@ selinux-policy-2_pkg_postinst() {
einfo "Inserting the following modules into the $i module store: ${MODS}"
- cd "${ROOT%/}/usr/share/selinux/${i}" || die "Could not enter /usr/share/selinux/${i}"
+ cd "${ROOT}/usr/share/selinux/${i}" || die "Could not enter /usr/share/selinux/${i}"
for j in ${MODS} ; do
if [[ -f "${j}.pp" ]] ; then
COMMAND="${j}.pp ${COMMAND}"
@@ -323,7 +320,7 @@ selinux-policy-2_pkg_postinst() {
done
# Don't relabel when cross compiling
- if [[ "${ROOT%/}" == "" ]]; then
+ if [[ -z ${ROOT} ]]; then
# Relabel depending packages
local PKGSET="";
if [[ -x /usr/bin/qdepends ]] ; then
@@ -346,8 +343,8 @@ selinux-policy-2_pkg_postrm() {
if [[ -z "${REPLACED_BY_VERSION}" ]]; then
# Set root path and don't load policy into the kernel when cross compiling
local root_opts=""
- if [[ "${ROOT%/}" != "" ]]; then
- root_opts="-p ${ROOT%/} -n"
+ if [[ -n ${ROOT} ]]; then
+ root_opts="-p ${ROOT} -n"
fi
# build up the command in the case of multiple modules
@@ -368,3 +365,7 @@ selinux-policy-2_pkg_postrm() {
done
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm
--
2.39.0
next prev parent reply other threads:[~2022-12-25 22:24 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 22:15 [gentoo-dev] [PATCH 01/41] ada.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 02/41] alternatives.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 03/41] ant-tasks.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 04/41] apache-2.eclass: " David Seifert
2022-12-26 9:38 ` Hans de Graaff
2022-12-25 22:15 ` [gentoo-dev] [PATCH 05/41] aspell-dict-r1.eclass: drop EAPI 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 06/41] bazel.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 07/41] docs.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 08/41] dotnet.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 09/41] dune.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 10/41] fcaps.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 11/41] java-osgi.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 12/41] java-virtuals-2.eclass: drop EAPI 5-7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 13/41] libretro-core.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 14/41] linux-mod.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 15/41] llvm.eclass: canonicalize eclass structure David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 16/41] mozcoreconf-v6.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 17/41] mozextension.eclass: drop EAPI 0-7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 18/41] mozlinguas-v2.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 19/41] ninja-utils.eclass: drop EAPI 5, 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 20/41] php-ext-pecl-r3.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 21/41] php-ext-source-r3.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 22/41] postgres.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 23/41] postgres-multi.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 24/41] python-any-r1.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 25/41] python-r1.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 26/41] python-single-r1.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 27/41] python-utils-r1.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 28/41] rocm.eclass: drop EAPI 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 29/41] ruby-ng-gnome2.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 30/41] ruby-single.eclass: drop EAPI 4-6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 31/41] rust-toolchain.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` David Seifert [this message]
2022-12-25 22:15 ` [gentoo-dev] [PATCH 33/41] toolchain-autoconf.eclass: drop EAPI 6, add EAPI 8 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 34/41] user-info.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 35/41] usr-ldscript.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 36/41] waf-utils.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 37/41] xemacs-packages.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:35 ` Ulrich Mueller
2022-12-27 13:23 ` Ulrich Mueller
2022-12-25 22:15 ` [gentoo-dev] [PATCH 38/41] gnome2.eclass: remove useless || die on emake David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 39/41] gnustep-base.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 40/41] qmail.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 41/41] xorg-3.eclass: " David Seifert
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=20221225221552.8023-32-soap@gentoo.org \
--to=soap@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