summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenton Groombridge <concord@gentoo.org>2024-07-08 10:18:13 -0400
committerKenton Groombridge <concord@gentoo.org>2024-07-08 10:21:06 -0400
commit15c3a11ddcf78c4d9c17518378f5a4cced8ea16a (patch)
treee802eda4eb2e2b452aab795f2d4e614d8a81b9a5 /sys-apps/selinux-python
parentdev-cpp/robin-map: don't build tests w/ -Werror (diff)
downloadgentoo-15c3a11ddcf78c4d9c17518378f5a4cced8ea16a.tar.gz
gentoo-15c3a11ddcf78c4d9c17518378f5a4cced8ea16a.tar.bz2
gentoo-15c3a11ddcf78c4d9c17518378f5a4cced8ea16a.zip
sys-apps/selinux-python: fix sepolgen.conf install
sepolgen.conf will fail to install if /etc/selinux/config has not been created yet. Reorder the creation of the /etc/selinux directory during the install phase so that if this happens, sepolgen.conf can be installed correctly. Closes: https://bugs.gentoo.org/935158 Signed-off-by: Kenton Groombridge <concord@gentoo.org>
Diffstat (limited to 'sys-apps/selinux-python')
-rw-r--r--sys-apps/selinux-python/selinux-python-3.5.ebuild4
-rw-r--r--sys-apps/selinux-python/selinux-python-3.6.ebuild2
-rw-r--r--sys-apps/selinux-python/selinux-python-3.7.ebuild2
-rw-r--r--sys-apps/selinux-python/selinux-python-9999.ebuild2
4 files changed, 5 insertions, 5 deletions
diff --git a/sys-apps/selinux-python/selinux-python-3.5.ebuild b/sys-apps/selinux-python/selinux-python-3.5.ebuild
index 6a2211786b3f..5f77597217cc 100644
--- a/sys-apps/selinux-python/selinux-python-3.5.ebuild
+++ b/sys-apps/selinux-python/selinux-python-3.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -97,10 +97,10 @@ src_install() {
done
# Create sepolgen.conf with different devel location definition
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
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%% *}";
diff --git a/sys-apps/selinux-python/selinux-python-3.6.ebuild b/sys-apps/selinux-python/selinux-python-3.6.ebuild
index 778fb2919d09..402e855158f6 100644
--- a/sys-apps/selinux-python/selinux-python-3.6.ebuild
+++ b/sys-apps/selinux-python/selinux-python-3.6.ebuild
@@ -97,10 +97,10 @@ src_install() {
done
# Create sepolgen.conf with different devel location definition
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
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%% *}";
diff --git a/sys-apps/selinux-python/selinux-python-3.7.ebuild b/sys-apps/selinux-python/selinux-python-3.7.ebuild
index f772119ca1ee..25b1f079539b 100644
--- a/sys-apps/selinux-python/selinux-python-3.7.ebuild
+++ b/sys-apps/selinux-python/selinux-python-3.7.ebuild
@@ -97,10 +97,10 @@ src_install() {
done
# Create sepolgen.conf with different devel location definition
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
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 || die "Failed to generate sepolgen"
else
diff --git a/sys-apps/selinux-python/selinux-python-9999.ebuild b/sys-apps/selinux-python/selinux-python-9999.ebuild
index f772119ca1ee..25b1f079539b 100644
--- a/sys-apps/selinux-python/selinux-python-9999.ebuild
+++ b/sys-apps/selinux-python/selinux-python-9999.ebuild
@@ -97,10 +97,10 @@ src_install() {
done
# Create sepolgen.conf with different devel location definition
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
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 || die "Failed to generate sepolgen"
else