summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzesimir Nowak <knowak@microsoft.com>2022-06-29 17:05:23 +0200
committerKenton Groombridge <concord@gentoo.org>2022-06-30 13:03:24 -0400
commita0be96d697774e1d79685290f3a0547dba118673 (patch)
tree0a543dcf5e56bc05bbd35be1d8d716c686db126d /eclass/selinux-policy-2.eclass
parentdev-python/QtPy: allow Python 3.11 for pyside2/shiboken (diff)
downloadgentoo-a0be96d697774e1d79685290f3a0547dba118673.tar.gz
gentoo-a0be96d697774e1d79685290f3a0547dba118673.tar.bz2
gentoo-a0be96d697774e1d79685290f3a0547dba118673.zip
eclass/selinux-policy-2: fix POLICY_PATCH applying
eapply as implemented in portage has some heuristics to find out where the parameters that should be passed to patch utility end and actual diff/patch files begin. It first tries to find -- which is the explicit way of separating parameters from input files. Since there's none, it tries to find a first non-option. And it finds the refpolicy directory as a first non-option, while it is supposed to be a value of the -d parameter. The said directory is then treated as an input directory, which is expected to contain at least one patch or diff file. Since there's none, eapply fails. Help eapply's heuristics by explicitly delimiting the parameters from input files with --. Bug: https://bugs.gentoo.org/794682 Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/gentoo/pull/26148 Signed-off-by: Kenton Groombridge <concord@gentoo.org>
Diffstat (limited to 'eclass/selinux-policy-2.eclass')
-rw-r--r--eclass/selinux-policy-2.eclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index 81d982f749c1..b2d53a2aac0b 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -159,7 +159,7 @@ selinux-policy-2_src_prepare() {
if [[ -n ${BASEPOL} ]] && [[ "${BASEPOL}" != "9999" ]]; then
cd "${S}"
einfo "Applying SELinux policy updates ... "
- eapply -p0 "${WORKDIR}/0001-full-patch-against-stable-release.patch"
+ eapply -p0 -- "${WORKDIR}/0001-full-patch-against-stable-release.patch"
fi
# Call in eapply_user. We do this early on as we start moving
@@ -180,9 +180,9 @@ selinux-policy-2_src_prepare() {
# Apply the additional patches refered to by the module ebuild.
# But first some magic to differentiate between bash arrays and strings
if [[ "$(declare -p POLICY_PATCH 2>/dev/null 2>&1)" == "declare -a"* ]]; then
- [[ -n ${POLICY_PATCH[*]} ]] && eapply -d "${S}/refpolicy/policy/modules" "${POLICY_PATCH[@]}"
+ [[ -n ${POLICY_PATCH[*]} ]] && eapply -d "${S}/refpolicy/policy/modules" -- "${POLICY_PATCH[@]}"
else
- [[ -n ${POLICY_PATCH} ]] && eapply -d "${S}/refpolicy/policy/modules" ${POLICY_PATCH}
+ [[ -n ${POLICY_PATCH} ]] && eapply -d "${S}/refpolicy/policy/modules" -- ${POLICY_PATCH}
fi
# Collect only those files needed for this particular module