Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 748483 - selinux-policy-2.eclass : port to EAPI=7
Summary: selinux-policy-2.eclass : port to EAPI=7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-13 13:36 UTC by David Michael
Modified: 2020-11-05 09:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-10-13 13:36:02 UTC
Can the SELinux policy eclass be updated to support EAPI 7 so that the policy ebuilds can eventually be updated?  There are dependency issues when cross-compiling that tend to be fixed by EAPI 7.

This change seems to work.  The only real difference is moving the build-time executable dependencies to BDEPEND.

--- eclass/selinux-policy-2.eclass
+++ eclass/selinux-policy-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Eclass for installing SELinux policy, and optionally
@@ -7,7 +7,7 @@
 # @ECLASS: selinux-policy-2.eclass
 # @MAINTAINER:
 # selinux@gentoo.org
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 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
@@ -76,7 +76,7 @@
 
 case "${EAPI:-0}" in
 	0|1|2|3|4) die "EAPI<5 is not supported";;
-	5|6) : ;;
+	5|6|7) : ;;
 	*) die "unknown EAPI" ;;
 esac
 
@@ -117,9 +117,15 @@
 	RDEPEND=">=sys-apps/policycoreutils-2.0.82
 		>=sec-policy/selinux-base-policy-${PV}"
 fi
-DEPEND="${RDEPEND}
-	sys-devel/m4
-	>=sys-apps/checkpolicy-2.0.21"
+if [[ ${EAPI:-0} == [56] ]]; 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
Comment 1 Larry the Git Cow gentoo-dev 2020-11-05 09:39:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e35dbf724e9a4e2530e9c8708256af7343ec5f1

commit 8e35dbf724e9a4e2530e9c8708256af7343ec5f1
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2020-11-02 21:46:03 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2020-11-05 09:38:54 +0000

    selinux-policy-2.eclass: add EAPI 7
    
    Closes: https://bugs.gentoo.org/748483
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 eclass/selinux-policy-2.eclass | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)