Created
June 4, 2021 14:15
-
-
Save tormath1/a717cf9398ab1ee429ece5398ef83187 to your computer and use it in GitHub Desktop.
patch to fix POLICY_PATCH applying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass | |
index 5def86fbe..8f69847a9 100644 | |
--- a/eclass/selinux-policy-2.eclass | |
+++ b/eclass/selinux-policy-2.eclass | |
@@ -179,11 +179,12 @@ 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[@]}" | |
- else | |
- [[ -n ${POLICY_PATCH} ]] && eapply -d "${S}/refpolicy/policy/modules" ${POLICY_PATCH} | |
- fi | |
+ cd "${S}/refpolicy/policy/modules" | |
+ for POLPATCH in ${POLICY_PATCH[@]}; | |
+ do | |
+ einfo "Installing ${POLPATCH}" | |
+ eapply -p0 "${POLPATCH}" | |
+ done | |
# Collect only those files needed for this particular module | |
for i in ${MODS}; do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment