[meta-security,master,1/2] python-fail2ban: solved the conflict with python3-fail2ban

Submitted by Zang Ruochen on June 13, 2019, 3:24 a.m. | Patch ID: 162165

Details

Message ID 20190613032417.9855-2-zangrc.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

Zang Ruochen June 13, 2019, 3:24 a.m.
-Use update-alternatives class to resolve conflicts with python3-fail2ban.

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
---
 recipes-security/fail2ban/python-fail2ban_0.10.4.0.bb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/recipes-security/fail2ban/python-fail2ban_0.10.4.0.bb b/recipes-security/fail2ban/python-fail2ban_0.10.4.0.bb
index 17a7dd8..3eea365 100644
--- a/recipes-security/fail2ban/python-fail2ban_0.10.4.0.bb
+++ b/recipes-security/fail2ban/python-fail2ban_0.10.4.0.bb
@@ -1,4 +1,13 @@ 
-inherit setuptools
+inherit setuptools update-alternatives
 require python-fail2ban.inc
 
 RDEPENDS_${PN}-ptest = "python python-modules python-fail2ban"
+
+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 = "30"