commit:     54a8322d1885f7f1bfe2718fb731d6e195f86466
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  2 23:17:16 2022 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Jan  2 23:24:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54a8322d

sys-apps/policycoreutils: Specify policy root path correctly

Commit df72ab351f482dea63d27e447b2a93549a742ecd added support for
rebuilding the policy in a crossdev environment but the root needs to be
specified with -p instead of -S.
The policy dir (-S) defaults to (-p) + /var/lib/selinux/ + (-s).
Thanks to Feandil for reporting this issue.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild | 4 ++--
 sys-apps/policycoreutils/policycoreutils-3.2.ebuild    | 4 ++--
 sys-apps/policycoreutils/policycoreutils-3.3.ebuild    | 4 ++--
 sys-apps/policycoreutils/policycoreutils-9999.ebuild   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild 
b/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild
index e995a286771b..eea202ba8299 100644
--- a/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild
+++ b/sys-apps/policycoreutils/policycoreutils-3.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -163,6 +163,6 @@ pkg_postinst() {
                # There have been some changes to the policy store, rebuilding 
now.
                # https://marc.info/?l=selinux&m=143757277819717&w=2
                einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without 
re-loading)."
-               semodule -S "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
+               semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
        done
 }

diff --git a/sys-apps/policycoreutils/policycoreutils-3.2.ebuild 
b/sys-apps/policycoreutils/policycoreutils-3.2.ebuild
index 1c90708b2731..456189b1aac5 100644
--- a/sys-apps/policycoreutils/policycoreutils-3.2.ebuild
+++ b/sys-apps/policycoreutils/policycoreutils-3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -157,6 +157,6 @@ pkg_postinst() {
                # There have been some changes to the policy store, rebuilding 
now.
                # https://marc.info/?l=selinux&m=143757277819717&w=2
                einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without 
re-loading)."
-               semodule -S "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
+               semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
        done
 }

diff --git a/sys-apps/policycoreutils/policycoreutils-3.3.ebuild 
b/sys-apps/policycoreutils/policycoreutils-3.3.ebuild
index 1c90708b2731..456189b1aac5 100644
--- a/sys-apps/policycoreutils/policycoreutils-3.3.ebuild
+++ b/sys-apps/policycoreutils/policycoreutils-3.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -157,6 +157,6 @@ pkg_postinst() {
                # There have been some changes to the policy store, rebuilding 
now.
                # https://marc.info/?l=selinux&m=143757277819717&w=2
                einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without 
re-loading)."
-               semodule -S "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
+               semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
        done
 }

diff --git a/sys-apps/policycoreutils/policycoreutils-9999.ebuild 
b/sys-apps/policycoreutils/policycoreutils-9999.ebuild
index 6b00366fe883..e6ee13c43070 100644
--- a/sys-apps/policycoreutils/policycoreutils-9999.ebuild
+++ b/sys-apps/policycoreutils/policycoreutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -157,6 +157,6 @@ pkg_postinst() {
                # There have been some changes to the policy store, rebuilding 
now.
                # https://marc.info/?l=selinux&m=143757277819717&w=2
                einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without 
re-loading)."
-               semodule -S "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
+               semodule -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die 
"Failed to rebuild policy store ${POLICY_TYPE}"
        done
 }

Reply via email to