[yocto] [meta-security][master][PATCH 2/2] python3-fail2ban: solved the conflict with python-fail2ban
Zang Ruochen
zangrc.fnst at cn.fujitsu.com
Wed Jun 12 20:24:17 PDT 2019
-Use update-alternatives class to resolve conflicts with python-fail2ban
Signed-off-by: Zang Ruochen <zangrc.fnst at cn.fujitsu.com>
---
recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb b/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb
index 23ef027..e01482c 100644
--- a/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb
+++ b/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb
@@ -1,4 +1,4 @@
-inherit setuptools3
+inherit setuptools3 update-alternatives
require python-fail2ban.inc
RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
@@ -6,3 +6,11 @@ RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban
SRC_URI += " \
file://0001-To-fix-build-error-of-xrang.patch \
"
+
+ALTERNATIVE_${PN} = "fail2ban-client fail2ban-regex fail2ban-server fail2ban-testcases"
+ALTERNATIVE_TARGET[fail2ban-client] = "${bindir}/fail2ban-client"
+ALTERNATIVE_TARGET[fail2ban-regex] = "${bindir}/fail2ban-regex"
+ALTERNATIVE_TARGET[fail2ban-server] = "${bindir}/fail2ban-server"
+ALTERNATIVE_TARGET[fail2ban-testcases] = "${bindir}/fail2ban-testcases"
+
+ALTERNATIVE_PRIORITY = "60"
--
2.20.1
More information about the yocto
mailing list