From 49aafa1d0e90f92241409b1d8b4f81c23e1c42e5 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Nov 25 2013 17:37:59 +0000 Subject: Update to 0.8.11 (#1034355) - drop part of the fail2ban-0.8.3-init.patch (merged) - fail2ban-hostsdeny.patch has been merged - fail2ban-mailx.patch has been merged - fail2ban-notmp.patch has been merged Signed-off-by: Adam Tkac --- diff --git a/fail2ban-0.8.3-init.patch b/fail2ban-0.8.3-init.patch index 3ed8609..c40256a 100644 --- a/fail2ban-0.8.3-init.patch +++ b/fail2ban-0.8.3-init.patch @@ -1,20 +1,11 @@ ---- fail2ban-0.8.3/files/redhat-initd.init 2008-03-10 23:36:22.000000000 +0100 -+++ fail2ban-0.8.3/files/redhat-initd 2008-08-24 20:46:01.000000000 +0200 +diff -up fail2ban-0.8.11/files/redhat-initd.init fail2ban-0.8.11/files/redhat-initd +--- fail2ban-0.8.11/files/redhat-initd.init 2013-11-25 18:07:00.191938851 +0100 ++++ fail2ban-0.8.11/files/redhat-initd 2013-11-25 18:07:49.576801893 +0100 @@ -1,6 +1,6 @@ #!/bin/bash # -# chkconfig: 345 92 08 +# chkconfig: - 92 08 - # description: Fail2ban daemon - # http://fail2ban.sourceforge.net/wiki/index.php/Main_Page - # process name: fail2ban-server -@@ -27,8 +27,7 @@ - echo -n $"Starting fail2ban: " - getpid - if [ -z "$pid" ]; then -- rm -rf /var/run/fail2ban/fail2ban.sock # in case of unclean shutdown -- $FAIL2BAN start > /dev/null -+ $FAIL2BAN -x start > /dev/null - RETVAL=$? - fi - if [ $RETVAL -eq 0 ]; then + # processname: fail2ban-server + # config: /etc/fail2ban/fail2ban.conf + # pidfile: /var/run/fail2ban/fail2ban.pid diff --git a/fail2ban-0.8.7.1-sshd.patch b/fail2ban-0.8.7.1-sshd.patch index aa3773e..1d7fe5f 100644 --- a/fail2ban-0.8.7.1-sshd.patch +++ b/fail2ban-0.8.7.1-sshd.patch @@ -1,7 +1,7 @@ -diff -up fail2ban-0.8.7.1/config/jail.conf.sshd fail2ban-0.8.7.1/config/jail.conf ---- fail2ban-0.8.7.1/config/jail.conf.sshd 2012-07-31 19:45:04.000000000 -0600 -+++ fail2ban-0.8.7.1/config/jail.conf 2012-10-11 11:47:33.131451895 -0600 -@@ -62,11 +62,11 @@ usedns = warn +diff -up fail2ban-0.8.11/config/jail.conf.sshd fail2ban-0.8.11/config/jail.conf +--- fail2ban-0.8.11/config/jail.conf.sshd 2013-11-25 18:08:08.034123038 +0100 ++++ fail2ban-0.8.11/config/jail.conf 2013-11-25 18:16:28.107917373 +0100 +@@ -71,11 +71,11 @@ usedns = warn [ssh-iptables] @@ -9,9 +9,9 @@ diff -up fail2ban-0.8.7.1/config/jail.conf.sshd fail2ban-0.8.7.1/config/jail.con +enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] -- sendmail-whois[name=SSH, dest=you@example.com, sender=fail2ban@example.com] +- sendmail-whois[name=SSH, dest=you@example.com, sender=fail2ban@example.com, sendername="Fail2Ban"] -logpath = /var/log/sshd.log -+ sendmail-whois[name=SSH, dest=root, sender=fail2ban@example.com] ++ sendmail-whois[name=SSH, dest=root, sender=fail2ban@example.com, sendername="Fail2Ban"] +logpath = /var/log/secure maxretry = 5 diff --git a/fail2ban-hostsdeny.patch b/fail2ban-hostsdeny.patch deleted file mode 100644 index 73a771f..0000000 --- a/fail2ban-hostsdeny.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit aebd24ec5485dacc5146728fa22387340b51099e -Author: Daniel Black -Date: Tue Jul 2 20:09:27 2013 +1000 - - BF: replace with ed so its cross platform, fixes permission problem gh-266, and Yaroslav doesn't revert to perl - -diff --git a/config/action.d/hostsdeny.conf b/config/action.d/hostsdeny.conf -index 50a4545..36e3494 100644 ---- a/config/action.d/hostsdeny.conf -+++ b/config/action.d/hostsdeny.conf -@@ -39,7 +39,7 @@ actionban = IP= && - # Tags: See jail.conf(5) man page - # Values: CMD - # --actionunban = IP= && sed /ALL:\ $IP/d > .new && mv .new -+actionunban = echo "/ALL: $/
d
w
q" | ed - - [Init] - diff --git a/fail2ban-log2syslog.patch b/fail2ban-log2syslog.patch index 49c220d..3646a8a 100644 --- a/fail2ban-log2syslog.patch +++ b/fail2ban-log2syslog.patch @@ -1,9 +1,9 @@ -diff -up fail2ban-0.8.10/config/fail2ban.conf.log2syslog fail2ban-0.8.10/config/fail2ban.conf ---- fail2ban-0.8.10/config/fail2ban.conf.log2syslog 2013-06-12 11:21:12.000000000 -0600 -+++ fail2ban-0.8.10/config/fail2ban.conf 2013-06-12 16:12:48.233512068 -0600 +diff -up fail2ban-0.8.11/config/fail2ban.conf.log2syslog fail2ban-0.8.11/config/fail2ban.conf +--- fail2ban-0.8.11/config/fail2ban.conf.log2syslog 2013-11-25 18:23:28.627391472 +0100 ++++ fail2ban-0.8.11/config/fail2ban.conf 2013-11-25 18:24:57.633978793 +0100 @@ -30,7 +30,7 @@ loglevel = 3 - # (e.g. /etc/logrotate.d/fail2ban on Debian systems) - # Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log + # (e.g. /etc/logrotate.d/fail2ban on Debian systems) + # Values: [ STDOUT | STDERR | SYSLOG | FILE ] Default: STDERR # -logtarget = /var/log/fail2ban.log +logtarget = SYSLOG diff --git a/fail2ban-mailx.patch b/fail2ban-mailx.patch deleted file mode 100644 index 9801c58..0000000 --- a/fail2ban-mailx.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -U0 fail2ban-0.8.10/ChangeLog.mailx fail2ban-0.8.10/ChangeLog ---- fail2ban-0.8.10/ChangeLog.mailx 2013-08-28 11:57:02.631137995 -0600 -+++ fail2ban-0.8.10/ChangeLog 2013-08-28 11:58:10.150945945 -0600 -@@ -23,0 +24,3 @@ -+ Rolf Fokkens -+ * action.d/dshield.conf and complain.conf -- reorder mailx arguements. -+ https://bugzilla.redhat.com/show_bug.cgi?id=998020 -diff -up fail2ban-0.8.10/config/action.d/complain.conf.mailx fail2ban-0.8.10/config/action.d/complain.conf ---- fail2ban-0.8.10/config/action.d/complain.conf.mailx 2013-06-12 11:21:12.000000000 -0600 -+++ fail2ban-0.8.10/config/action.d/complain.conf 2013-08-28 11:57:02.631137995 -0600 -@@ -58,7 +58,7 @@ actioncheck = - actionban = ADDRESSES=`whois | perl -e 'while () { next if /^changed|@(ripe|apnic)\.net/io; $m += (/abuse|trouble:|report|spam|security/io?3:0); if (/([a-z0-9_\-\.+]+@[a-z0-9\-]+(\.[[a-z0-9\-]+)+)/io) { while (s/([a-z0-9_\-\.+]+@[a-z0-9\-]+(\.[[a-z0-9\-]+)+)//io) { if ($m) { $a{lc($1)}=$m } else { $b{lc($1)}=$m } } $m=0 } else { $m && --$m } } if (%%a) {print join(",",keys(%%a))} else {print join(",",keys(%%b))}'` - IP= - if [ ! -z "$ADDRESSES" ]; then -- (printf %%b "\n"; date '+Note: Local timezone is %%z (%%Z)'; grep '' ) | "Abuse from " $ADDRESSES -+ (printf %%b "\n"; date '+Note: Local timezone is %%z (%%Z)'; grep '' ) | "Abuse from " $ADDRESSES - fi - - # Option: actionunban -diff -up fail2ban-0.8.10/config/action.d/dshield.conf.mailx fail2ban-0.8.10/config/action.d/dshield.conf ---- fail2ban-0.8.10/config/action.d/dshield.conf.mailx 2013-06-12 11:21:12.000000000 -0600 -+++ fail2ban-0.8.10/config/action.d/dshield.conf 2013-08-28 11:57:02.632137993 -0600 -@@ -39,7 +39,7 @@ actionstart = - # Values: CMD - # - actionstop = if [ -f .buffer ]; then -- cat .buffer | "FORMAT DSHIELD USERID TZ `date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` Fail2Ban" -+ cat .buffer | "FORMAT DSHIELD USERID TZ `date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` Fail2Ban" - date +%%s > .lastsent - fi - rm -f .buffer .first -@@ -80,7 +80,7 @@ actionban = TZONE=`date +%%z | sed 's/\( - LASTREPORT=$(($NOW - `cat .lastsent`)) - LINES=$( wc -l .buffer | awk '{ print $1 }' ) - if [ $LINES -ge && $LASTREPORT -gt ] || [ $LOGAGE -gt ]; then -- cat .buffer | "FORMAT DSHIELD USERID TZ $TZONE Fail2Ban" -+ cat .buffer | "FORMAT DSHIELD USERID TZ $TZONE Fail2Ban" - rm -f .buffer .first - echo $NOW > .lastsent - fi -@@ -95,7 +95,7 @@ actionunban = if [ -f .first ]; - NOW=`date +%%s` - LOGAGE=$(($NOW - `cat .first`)) - if [ $LOGAGE -gt ]; then -- cat .buffer | "FORMAT DSHIELD USERID TZ `date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` Fail2Ban" -+ cat .buffer | "FORMAT DSHIELD USERID TZ `date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` Fail2Ban" - rm -f .buffer .first - echo $NOW > .lastsent - fi -diff -up fail2ban-0.8.10/THANKS.mailx fail2ban-0.8.10/THANKS ---- fail2ban-0.8.10/THANKS.mailx 2013-08-28 11:57:02.631137995 -0600 -+++ fail2ban-0.8.10/THANKS 2013-08-28 11:58:34.542879375 -0600 -@@ -38,6 +38,7 @@ Patrick Börjesson - Raphaël Marichez - René Berber - Robert Edeker -+Rolf Fokkens - Russell Odom - Sireyessire - silviogarbes diff --git a/fail2ban-notmp.patch b/fail2ban-notmp.patch deleted file mode 100644 index 8799101..0000000 --- a/fail2ban-notmp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up fail2ban-0.8.10/client/fail2banreader.py.notmp fail2ban-0.8.10/client/fail2banreader.py ---- fail2ban-0.8.10/client/fail2banreader.py.notmp 2013-06-12 11:21:12.000000000 -0600 -+++ fail2ban-0.8.10/client/fail2banreader.py 2013-06-12 16:17:43.820837700 -0600 -@@ -39,7 +39,7 @@ class Fail2banReader(ConfigReader): - ConfigReader.read(self, "fail2ban") - - def getEarlyOptions(self): -- opts = [["string", "socket", "/tmp/fail2ban.sock"], -+ opts = [["string", "socket", "/var/run/fail2ban/fail2ban.sock"], - ["string", "pidfile", "/var/run/fail2ban/fail2ban.pid"]] - return ConfigReader.getOptions(self, "Definition", opts) - diff --git a/fail2ban.spec b/fail2ban.spec index 977830f..0f34d7a 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -1,7 +1,7 @@ Summary: Ban IPs that make too many password failures Name: fail2ban -Version: 0.8.10 -Release: 3%{?dist} +Version: 0.8.11 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://fail2ban.sourceforge.net/ @@ -9,16 +9,7 @@ Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-% Source1: fail2ban-logrotate Patch0: fail2ban-0.8.3-init.patch Patch1: fail2ban-0.8.7.1-sshd.patch -# Upstream patch to fix hostsdeny permission issue -# https://github.com/fail2ban/fail2ban/issues/266 -# https://bugzilla.redhat.com/show_bug.cgi?id=997863 -Patch2: fail2ban-hostsdeny.patch -# Upstream patch to fix mailx argument ordering -# https://github.com/fail2ban/fail2ban/issues/328 -# https://bugzilla.redhat.com/show_bug.cgi?id=998020 -Patch3: fail2ban-mailx.patch Patch6: fail2ban-log2syslog.patch -Patch8: fail2ban-notmp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.3 # For testcases @@ -53,10 +44,7 @@ and shorewall respectively. %setup -q %patch0 -p1 -b .init %patch1 -p1 -b .sshd -%patch2 -p1 -b .hostsdeny -%patch3 -p1 -b .mailx %patch6 -p1 -b .log2syslog -%patch8 -p1 -b .notmp %build python setup.py build @@ -138,6 +126,13 @@ fi %dir %{_localstatedir}/lib/fail2ban/ %changelog +* Mon Nov 25 2013 Adam Tkac - 0.8.11-1 +- update to 0.8.11 (#1034355) +- drop part of the fail2ban-0.8.3-init.patch (merged) +- fail2ban-hostsdeny.patch has been merged +- fail2ban-mailx.patch has been merged +- fail2ban-notmp.patch has been merged + * Wed Aug 28 2013 Orion Poplawski - 0.8.10-3 - Add upstream patch to fix mailx argument ordering (bug #998020)