From 0156e67ee63485b181c738605125a9c9342881f4ac315d8159832ce7ab970469 Mon Sep 17 00:00:00 2001 From: Johannes Weberhofer Date: Thu, 23 Jan 2014 21:59:39 +0000 Subject: [PATCH] Accepting request 214983 from home:weberho:branches:security - action firewallcmd-ipset had non-working actioncheck. Removed. rh#1046816 - lsof was required for fail2ban's SysVinit scripts only. Not longer used for newer versions of openSUSE OBS-URL: https://build.opensuse.org/request/show/214983 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=41 --- fail2ban.changes | 8 +++++++ fail2ban.spec | 6 ++++- fix-for-upstream-firewallcmd-ipset.conf.patch | 23 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 fix-for-upstream-firewallcmd-ipset.conf.patch diff --git a/fail2ban.changes b/fail2ban.changes index 38d6489..418f4b0 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jan 23 21:35:27 UTC 2014 - jweberhofer@weberhofer.at + +- action firewallcmd-ipset had non-working actioncheck. Removed. rh#1046816 + +- lsof was required for fail2ban's SysVinit scripts only. Not longer used for + newer versions of openSUSE + ------------------------------------------------------------------- Thu Jan 23 08:40:40 UTC 2014 - jweberhofer@weberhofer.at diff --git a/fail2ban.spec b/fail2ban.spec index c7fec0a..f4ae0c1 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -27,6 +27,8 @@ License: GPL-2.0+ Group: Productivity/Networking/Security Source0: https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 %if 0%{?suse_version} < 1230 +# the init-script requires lsof +Requires: lsof Source1: %{name}.init %endif Source2: %{name}.sysconfig @@ -35,10 +37,11 @@ Source3: %{name}.logrotate Source4: %{name}.service Source5: %{name}.tmpfiles %endif +# PATCH-FIX-UPSTREAM fix-for-upstream-firewallcmd-ipset.conf.patch rh#1046816 +Patch0: fix-for-upstream-firewallcmd-ipset.conf.patch Requires: cron Requires: iptables Requires: logrotate -Requires: lsof Requires: python >= 2.5 %if 0%{?suse_version} >= 1140 && 0%{?sles_version} == 0 Requires: python-pyinotify @@ -62,6 +65,7 @@ files such as sshd or Apache web server ones. %prep %setup +%patch0 -p1 # correct doc-path sed -i -e 's|/usr/share/doc/fail2ban|%{_docdir}/%{name}|' setup.py diff --git a/fix-for-upstream-firewallcmd-ipset.conf.patch b/fix-for-upstream-firewallcmd-ipset.conf.patch new file mode 100644 index 0000000..5cffb45 --- /dev/null +++ b/fix-for-upstream-firewallcmd-ipset.conf.patch @@ -0,0 +1,23 @@ +diff -ur fail2ban-0.8.12.orig/config/action.d/firewallcmd-ipset.conf fail2ban-0.8.12/config/action.d/firewallcmd-ipset.conf +--- fail2ban-0.8.12.orig/config/action.d/firewallcmd-ipset.conf 2014-01-16 09:20:14.000000000 +0100 ++++ fail2ban-0.8.12/config/action.d/firewallcmd-ipset.conf 2014-01-23 22:43:53.115263616 +0100 +@@ -25,8 +25,6 @@ + ipset flush fail2ban- + ipset destroy fail2ban- + +-actioncheck = firewall-cmd --direct --get-chains ipv4 filter | grep -q '^fail2ban-$' +- + actionban = ipset add fail2ban- timeout -exist + + actionunban = ipset del fail2ban- -exist +diff -ur fail2ban-0.8.12.orig/THANKS fail2ban-0.8.12/THANKS +--- fail2ban-0.8.12.orig/THANKS 2014-01-21 21:59:49.000000000 +0100 ++++ fail2ban-0.8.12/THANKS 2014-01-23 22:43:53.115263616 +0100 +@@ -30,6 +30,7 @@ + Daniel B. + Daniel Black + David Nutter ++Derek Atkins + Eric Gerbier + Enrico Labedzki + ftoppi