Merge branch 'f23' into epel7

i9ce
Orion Poplawski 9 years ago
commit 685dee2d09

1
.gitignore vendored

@ -10,3 +10,4 @@ fail2ban-0.8.4.tar.bz2
/fail2ban-0.9.1.tar.gz /fail2ban-0.9.1.tar.gz
/fail2ban-0.9.2.tar.gz /fail2ban-0.9.2.tar.gz
/fail2ban-0.9.3.tar.gz /fail2ban-0.9.3.tar.gz
/fail2ban-0.9.4.tar.gz

@ -1,50 +0,0 @@
From 3187de29336b4a01e4dcd20f98253e1db913ee7a Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Sat, 12 Sep 2015 14:15:10 -0400
Subject: [PATCH] BF(TST): allow exception and False for executeCmd due to
inconsistent behavior across bash/dash
Temporary minimalistic fix to the test
---
fail2ban/tests/actiontestcase.py | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/fail2ban/tests/actiontestcase.py b/fail2ban/tests/actiontestcase.py
index febbc61..73dee12 100644
--- a/fail2ban/tests/actiontestcase.py
+++ b/fail2ban/tests/actiontestcase.py
@@ -222,17 +222,28 @@ def getnastypid():
return int(f.read())
# First test if can kill the bastard
- self.assertRaises(
- RuntimeError, CommandAction.executeCmd, 'bash %s' % tmpFilename, timeout=.1)
+ try:
+ self.assertFalse(
+ CommandAction.executeCmd('bash %s' % tmpFilename, timeout=.1))
+ except RuntimeError:
+ # this one is expected behavior, see
+ # https://github.com/fail2ban/fail2ban/issues/1155#issuecomment-139799958
+ pass
# Verify that the proccess itself got killed
self.assertFalse(pid_exists(getnastypid())) # process should have been killed
self.assertTrue(self._is_logged('timed out'))
- self.assertTrue(self._is_logged('killed with SIGTERM'))
+ self.assertTrue(self._is_logged('Terminated'))
# A bit evolved case even though, previous test already tests killing children processes
- self.assertRaises(
- RuntimeError, CommandAction.executeCmd, 'out=`bash %s`; echo ALRIGHT' % tmpFilename,
- timeout=.2)
+ try:
+ self.assertFalse(
+ CommandAction.executeCmd('out=`bash %s`; echo ALRIGHT' % tmpFilename,
+ timeout=.2))
+ except RuntimeError:
+ # this one is expected behavior, see
+ # https://github.com/fail2ban/fail2ban/issues/1155#issuecomment-139799958
+ pass
+
# Verify that the proccess itself got killed
self.assertFalse(pid_exists(getnastypid()))
self.assertTrue(self._is_logged('timed out'))

@ -0,0 +1,13 @@
diff --git a/config/paths-fedora.conf b/config/paths-fedora.conf
index b3c978c..e91845a 100644
--- a/config/paths-fedora.conf
+++ b/config/paths-fedora.conf
@@ -34,7 +34,7 @@ apache_access_log = /var/log/httpd/*access_log
exim_main_log = /var/log/exim/main.log
-mysql_log = /var/lib/mysql/mysqld.log
+mysql_log = /var/log/mariadb/mariadb.log
roundcube_errors_log = /var/log/roundcubemail/errors

@ -0,0 +1,12 @@
diff -up fail2ban-0.9.4/fail2ban/tests/clientreadertestcase.py.test fail2ban-0.9.4/fail2ban/tests/clientreadertestcase.py
--- fail2ban-0.9.4/fail2ban/tests/clientreadertestcase.py.test 2016-03-09 10:43:53.649645648 -0700
+++ fail2ban-0.9.4/fail2ban/tests/clientreadertestcase.py 2016-03-09 11:00:19.208546116 -0700
@@ -632,8 +632,6 @@ class JailsReaderTest(LogCaptureTestCase
# and we know even some of them by heart
for j in ['sshd', 'recidive']:
- # by default we have 'auto' backend ATM
- self.assertTrue(['add', j, 'auto'] in comm_commands)
# and warn on useDNS
self.assertTrue(['set', j, 'usedns', 'warn'] in comm_commands)
self.assertTrue(['start', j] in comm_commands)

@ -1,13 +1,17 @@
Summary: Daemon to ban hosts that cause multiple authentication errors Summary: Daemon to ban hosts that cause multiple authentication errors
Name: fail2ban Name: fail2ban
Version: 0.9.3 Version: 0.9.4
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://fail2ban.sourceforge.net/ URL: http://fail2ban.sourceforge.net/
Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
#Source0: https://github.com/sebres/%{name}/archive/f2b-perfom-prepare-716-cs.tar.gz#/%{name}-test.tar.gz
# Fix failing test # Fix failing test
# https://github.com/fail2ban/fail2ban/issues/1155 # https://github.com/fail2ban/fail2ban/issues/1353
Patch0: https://github.com/yarikoptic/fail2ban/commit/3187de29336b4a01e4dcd20f98253e1db913ee7a.patch Patch0: fail2ban-test.patch
# Fix mysql log path
# https://github.com/fail2ban/fail2ban/issues/1354
Patch1: fail2ban-mysql.patch
BuildRequires: python-devel BuildRequires: python-devel
# For testcases # For testcases
@ -141,6 +145,7 @@ by default.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .test %patch0 -p1 -b .test
%patch1 -p1 -b .mysql
# Use Fedora paths # Use Fedora paths
sed -i -e 's/^before = paths-.*/before = paths-fedora.conf/' config/jail.conf sed -i -e 's/^before = paths-.*/before = paths-fedora.conf/' config/jail.conf
# Start after firewalld (https://bugzilla.redhat.com/show_bug.cgi?id=1067147) # Start after firewalld (https://bugzilla.redhat.com/show_bug.cgi?id=1067147)
@ -270,6 +275,13 @@ fi
%changelog %changelog
* Wed Mar 9 2016 Orion Poplawski <orion@cora.nwra.com> - 0.9.4-1
- Update to 0.9.4
- Use mariadb log path by default
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Sep 12 2015 Orion Poplawski <orion@cora.nwra.com> - 0.9.3-1 * Sat Sep 12 2015 Orion Poplawski <orion@cora.nwra.com> - 0.9.3-1
- Update to 0.9.3 - Update to 0.9.3
- Cleanup spec, use new python macros - Cleanup spec, use new python macros

@ -1 +1 @@
73c87c545cc6474de984b5a05e64ecab fail2ban-0.9.3.tar.gz 2dc93dff03c4da9fb95d4695e07b65d8 fail2ban-0.9.4.tar.gz

Loading…
Cancel
Save