commit: 15c3a11ddcf78c4d9c17518378f5a4cced8ea16a Author: Kenton Groombridge <concord <AT> gentoo <DOT> org> AuthorDate: Mon Jul 8 14:18:13 2024 +0000 Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org> CommitDate: Mon Jul 8 14:21:06 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15c3a11d
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 <AT> gentoo.org> sys-apps/selinux-python/selinux-python-3.5.ebuild | 4 ++-- sys-apps/selinux-python/selinux-python-3.6.ebuild | 2 +- sys-apps/selinux-python/selinux-python-3.7.ebuild | 2 +- sys-apps/selinux-python/selinux-python-9999.ebuild | 2 +- 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
