summaryrefslogtreecommitdiff
path: root/sys-apps/selinux-python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sys-apps/selinux-python
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-apps/selinux-python')
-rw-r--r--sys-apps/selinux-python/Manifest3
-rw-r--r--sys-apps/selinux-python/selinux-python-3.1-r1.ebuild95
-rw-r--r--sys-apps/selinux-python/selinux-python-9999.ebuild1
3 files changed, 98 insertions, 1 deletions
diff --git a/sys-apps/selinux-python/Manifest b/sys-apps/selinux-python/Manifest
index 70f2343a1565..9904de74f117 100644
--- a/sys-apps/selinux-python/Manifest
+++ b/sys-apps/selinux-python/Manifest
@@ -3,6 +3,7 @@ DIST selinux-python-3.0.tar.gz 2100098 BLAKE2B 6949911020139378e9bdcc2b7c01c067d
DIST selinux-python-3.1.tar.gz 2100549 BLAKE2B c5d207bad60c379259e3bfc8f029f76d4572818cdd41a263498ed4434a70eaf7ff51af7772cfb27de0e9e4af03bcf9906ab0f6a59e88de10e81cbe0e8c5928b8 SHA512 5dd98f77ae8ea8bac6a89ec7def76e12496b9a9f8c9612c4cc1dac7a8e8c60380a00c857426bfefbcb4273706addd2594e9b467f69408ef284f082a09d45bd49
EBUILD selinux-python-2.9.ebuild 2552 BLAKE2B c3a46c9b484dd134426ee1cfecdcd0caedefa0d02cb1071789ca62c7a2ad860c12f770bd8130ed25f660b70e352ca2c65b062ee6bf9ac2b185e651ccfd44e861 SHA512 2d896bb07f08d2def9eceebfaf0aad8fa27e3041ca44e04c3e936502d9323b48a0d8c89c5611ea9885c90d90a9c0823f3c8786bec5520857b20ad4f18461fe61
EBUILD selinux-python-3.0.ebuild 2558 BLAKE2B c390f92149cd44b5443867439f64d0e71b75c9614e7d3115008b57b04d0307dfc36fa4c4a43ca725a9b5a723c12091c9496257dc0f4c31908a52c922a943c348 SHA512 5c4533c9bf0545c13881c7b2f4281c4e3e14498f4e5def1285843b0464d232e6f6bdaaf49cbd9b3ffd3b72e07f03659d56405e2431b5f195dd27f592c42aff61
+EBUILD selinux-python-3.1-r1.ebuild 2594 BLAKE2B 253043520f734e82b27141c2e2d1088dbccb3ca016f35607ace5808f365498060400500172e7c5bd217168464f5fd14c09328ab3b19df47ad29ef74692aaa4eb SHA512 8814d31ee68f9bb1ca40b354b4f955982eff55f13a4f8022d433083cc9316e2fa3f32d799c8157e2a5573f6f083c3ef5c6794be8f812bafb6b5c803439bb4ce9
EBUILD selinux-python-3.1.ebuild 2542 BLAKE2B 617dde2527956f09f532fc118ef84962fc384a78c647aeec98f2f6e2f40da23f562aae4afd2c6c90ab66a19e1ea10d1af03cf7c8265b59519898d86f276b95b2 SHA512 f2e98e15ed3c1b91498d829b7938473bf73b780cff4bd6d2a559b8b12b4e63de88cc19e8208ad94a7260c0ea316ca16299ff6bedb618651ae0fff2bc0c4a6461
-EBUILD selinux-python-9999.ebuild 2542 BLAKE2B 617dde2527956f09f532fc118ef84962fc384a78c647aeec98f2f6e2f40da23f562aae4afd2c6c90ab66a19e1ea10d1af03cf7c8265b59519898d86f276b95b2 SHA512 f2e98e15ed3c1b91498d829b7938473bf73b780cff4bd6d2a559b8b12b4e63de88cc19e8208ad94a7260c0ea316ca16299ff6bedb618651ae0fff2bc0c4a6461
+EBUILD selinux-python-9999.ebuild 2594 BLAKE2B 253043520f734e82b27141c2e2d1088dbccb3ca016f35607ace5808f365498060400500172e7c5bd217168464f5fd14c09328ab3b19df47ad29ef74692aaa4eb SHA512 8814d31ee68f9bb1ca40b354b4f955982eff55f13a4f8022d433083cc9316e2fa3f32d799c8157e2a5573f6f083c3ef5c6794be8f812bafb6b5c803439bb4ce9
MISC metadata.xml 557 BLAKE2B 40a5075b9313be98cc5566696ebdf42dfa77814d2c5907832c06b8f846cb902023949bca3aa1b37a03a756649c6025f5f91357c0f6c73292b864396ea1c118cd SHA512 248d0177b4794bd342b35ce901f91a67227f1d8b256f6a56f06b3d424e94dbfb48b8500623bdccc2e0650402276cc1e50d1a7f475e2b04505ec0d4b4f2b590fe
diff --git a/sys-apps/selinux-python/selinux-python-3.1-r1.ebuild b/sys-apps/selinux-python/selinux-python-3.1-r1.ebuild
new file mode 100644
index 000000000000..e3fe4738a86b
--- /dev/null
+++ b/sys-apps/selinux-python/selinux-python-3.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+PYTHON_REQ_USE="xml"
+
+inherit python-r1 toolchain-funcs
+
+MY_P="${P//_/-}"
+
+MY_RELEASEDATE="20200710"
+SEPOL_VER="${PV}"
+SELNX_VER="${PV}"
+SEMNG_VER="${PV}"
+
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN#selinux-}"
+else
+ SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~mips ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
+ >=sys-libs/libsemanage-${SEMNG_VER}:=[python(+)]
+ >=sys-libs/libsepol-${SEPOL_VER}:=
+ >=app-admin/setools-4.2.0[${PYTHON_USEDEP}]
+ dev-python/ipy[${PYTHON_USEDEP}]
+ >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror"
+
+ python_copy_sources
+}
+
+src_compile() {
+ building() {
+ emake -C "${BUILD_DIR}" \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)"
+ }
+ python_foreach_impl building
+}
+
+src_install() {
+ installation() {
+ emake -C "${BUILD_DIR}" \
+ DESTDIR="${D}" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Set version-specific scripts
+ for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do
+ python_replicate_script "${ED}/usr/bin/${pyscript}"
+ done
+ for pyscript in semanage; do
+ python_replicate_script "${ED}/usr/sbin/${pyscript}"
+ done
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}
diff --git a/sys-apps/selinux-python/selinux-python-9999.ebuild b/sys-apps/selinux-python/selinux-python-9999.ebuild
index d890afd5e440..e3fe4738a86b 100644
--- a/sys-apps/selinux-python/selinux-python-9999.ebuild
+++ b/sys-apps/selinux-python/selinux-python-9999.ebuild
@@ -38,6 +38,7 @@ DEPEND=">=sys-libs/libselinux-${SELNX_VER}:=[python]
>=sys-libs/libsepol-${SEPOL_VER}:=
>=app-admin/setools-4.2.0[${PYTHON_USEDEP}]
dev-python/ipy[${PYTHON_USEDEP}]
+ >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}]
${PYTHON_DEPS}"
RDEPEND="${DEPEND}"