[140986] trunk/dports/security/fail2ban

khindenburg at macports.org khindenburg at macports.org
Wed Oct 7 08:02:12 PDT 2015


Revision: 140986
          https://trac.macports.org/changeset/140986
Author:   khindenburg at macports.org
Date:     2015-10-07 08:02:12 -0700 (Wed, 07 Oct 2015)
Log Message:
-----------
fail2ban: update to 0.9.3 maintainer #49026

Modified Paths:
--------------
    trunk/dports/security/fail2ban/Portfile
    trunk/dports/security/fail2ban/files/patch-config-fail2ban.conf.diff
    trunk/dports/security/fail2ban/files/patch-config-jail.conf.diff
    trunk/dports/security/fail2ban/files/patch-setup.py.diff

Added Paths:
-----------
    trunk/dports/security/fail2ban/files/patch-bin-fail2ban-client.diff
    trunk/dports/security/fail2ban/files/patch-bin-fail2ban-server.diff
    trunk/dports/security/fail2ban/files/patch-config-action.d-osx-afctl.conf.diff
    trunk/dports/security/fail2ban/files/patch-config-paths-common.conf.diff
    trunk/dports/security/fail2ban/files/patch-config-paths-osx.conf.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-client-configreader.py.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-server-filterpoll.py.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-tests-misctestcase.py.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-tests-utils.py.diff

Removed Paths:
-------------
    trunk/dports/security/fail2ban/files/patch-client-csocket.py.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-client.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-regex.diff
    trunk/dports/security/fail2ban/files/patch-fail2ban-server.diff
    trunk/dports/security/fail2ban/files/patch-server-server.py.diff
    trunk/dports/security/fail2ban/files/patch-server__filterpoll.py-increase-error-threshold.diff
    trunk/dports/security/fail2ban/files/patch-setup.cfg.diff

Modified: trunk/dports/security/fail2ban/Portfile
===================================================================
--- trunk/dports/security/fail2ban/Portfile	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/Portfile	2015-10-07 15:02:12 UTC (rev 140986)
@@ -5,8 +5,7 @@
 PortGroup               github 1.0
 PortGroup               python 1.0
 
-github.setup            fail2ban fail2ban 0.8.10
-revision                1
+github.setup            fail2ban fail2ban 0.9.3
 categories              security python
 license                 GPL-2+
 maintainers             free.fr:fclaire openmaintainer
@@ -25,9 +24,11 @@
 
 homepage                http://www.fail2ban.org/
 
-checksums               rmd160 17f3535a4b92740f5203dfdee874d71d2377e5c9 \
-                        sha256 7bed38372a24e35268d9c9ff5b272f7e88e91074f9bb24d5be5c70196f19e7be
+distname                ${version}
 
+checksums               rmd160  1f1f1b7a504cbade13a3363cc9143d909168f062 \
+                        sha256  146811530b7acf706db6d28068ee60806f6e0c80da14d89b732955a696728c46
+
 python.default_version  27
 
 set f2bconfdir          ${prefix}/etc/${name}
@@ -39,30 +40,31 @@
 python.link_binaries_suffix
 
 patchfiles              patch-setup.py.diff \
-                        patch-setup.cfg.diff \
-                        patch-fail2ban-client.diff \
-                        patch-fail2ban-regex.diff \
-                        patch-fail2ban-server.diff \
+                        patch-fail2ban-client-configreader.py.diff \
+                        patch-fail2ban-tests-misctestcase.py.diff \
+                        patch-fail2ban-tests-utils.py.diff \
                         patch-config-fail2ban.conf.diff \
                         patch-config-jail.conf.diff \
-                        patch-client-csocket.py.diff \
-                        patch-server-server.py.diff \
-                        patch-server__filterpoll.py-increase-error-threshold.diff
-# See #46546 for patch-server__filterpoll.py-increase-error-threshold.diff
+                        patch-config-paths-common.conf.diff \
+                        patch-config-paths-osx.conf.diff \
+                        patch-config-action.d-osx-afctl.conf.diff \
+                        patch-bin-fail2ban-client.diff \
+                        patch-bin-fail2ban-server.diff \
+                        patch-fail2ban-server-filterpoll.py.diff
 
 post-patch   {
     reinplace "s|@@PREFIX@@|${prefix}|g"    ${worksrcpath}/setup.py \
-                                            ${worksrcpath}/setup.cfg \
-                                            ${worksrcpath}/fail2ban-client \
-                                            ${worksrcpath}/fail2ban-regex \
-                                            ${worksrcpath}/fail2ban-server \
-                                            ${worksrcpath}/client/csocket.py \
+                                            ${worksrcpath}/fail2ban/client/configreader.py \
+                                            ${worksrcpath}/fail2ban/tests/misctestcase.py \
+                                            ${worksrcpath}/fail2ban/tests/utils.py \
                                             ${worksrcpath}/config/fail2ban.conf \
-                                            ${worksrcpath}/server/server.py
+                                            ${worksrcpath}/config/paths-common.conf \
+                                            ${worksrcpath}/bin/fail2ban-client \
+                                            ${worksrcpath}/bin/fail2ban-server
 }
 
 startupitem.create      yes
-startupitem.start       "if \[ -r ${f2bsock} && ! -r ${f2bpid} \]; then rm ${f2bsock}; fi; ${f2bbindir}/${name}-client start"
+startupitem.start       "export LANG=en_GB.UTF-8; if \[ -r ${f2bsock} -a ! -r ${f2bpid} \]; then rm ${f2bsock}; fi; ${f2bbindir}/${name}-client start"
 startupitem.stop        "${f2bbindir}/${name}-client stop"
 
 destroot.keepdirs       ${destroot}${f2brundir}
@@ -88,6 +90,18 @@
     }
 }
 
+notes "
+Next step is to configure fail2ban.
+Start to read:
+${f2bconfdir}/fail2ban.conf
+${f2bconfdir}/jail.conf
+and create your own fail2ban.local and jail.local
+
+Start/stop fail2ban with: sudo port \[un\]load fail2ban
+
+More info at ${homepage}
+"
+
 livecheck.type          regexm
 livecheck.url           ${homepage}wiki/index.php/Downloads
 livecheck.regex         <i>stable</i>.*?>${name}-(\[0-9.\]+)<

Added: trunk/dports/security/fail2ban/files/patch-bin-fail2ban-client.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-bin-fail2ban-client.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-bin-fail2ban-client.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,11 @@
+--- bin/fail2ban-client.orig	2015-09-28 17:02:05.000000000 +0200
++++ bin/fail2ban-client	2015-09-28 17:02:37.000000000 +0200
+@@ -58,7 +58,7 @@
+ 		self.__stream = None
+ 		self.__configurator = Configurator()
+ 		self.__conf = dict()
+-		self.__conf["conf"] = "/etc/fail2ban"
++		self.__conf["conf"] = "@@PREFIX@@/etc/fail2ban"
+ 		self.__conf["dump"] = False
+ 		self.__conf["force"] = False
+ 		self.__conf["background"] = True

Added: trunk/dports/security/fail2ban/files/patch-bin-fail2ban-server.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-bin-fail2ban-server.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-bin-fail2ban-server.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,13 @@
+--- bin/fail2ban-server.orig	2015-09-29 09:12:55.000000000 +0200
++++ bin/fail2ban-server	2015-09-29 09:13:30.000000000 +0200
+@@ -49,8 +49,8 @@
+ 		self.__conf = dict()
+ 		self.__conf["background"] = True
+ 		self.__conf["force"] = False
+-		self.__conf["socket"] = "/var/run/fail2ban/fail2ban.sock"
+-		self.__conf["pidfile"] = "/var/run/fail2ban/fail2ban.pid"
++		self.__conf["socket"] = "@@PREFIX@@/var/run/fail2ban/fail2ban.sock"
++		self.__conf["pidfile"] = "@@PREFIX@@/var/run/fail2ban/fail2ban.pid"
+ 
+ 	def dispVersion(self):
+ 		print "Fail2Ban v" + version

Deleted: trunk/dports/security/fail2ban/files/patch-client-csocket.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-client-csocket.py.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-client-csocket.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,11 +0,0 @@
---- client/csocket.py.orig	2012-04-26 13:21:29.000000000 +0200
-+++ client/csocket.py	2012-04-26 13:21:45.000000000 +0200
-@@ -35,7 +35,7 @@
- 	
- 	END_STRING = "<F2B_END_COMMAND>"
- 	
--	def __init__(self, sock = "/var/run/fail2ban/fail2ban.sock"):
-+	def __init__(self, sock = "@@PREFIX@@/var/run/fail2ban/fail2ban.sock"):
- 		# Create an INET, STREAMing socket
- 		#self.csock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- 		self.__csock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

Added: trunk/dports/security/fail2ban/files/patch-config-action.d-osx-afctl.conf.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-config-action.d-osx-afctl.conf.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-config-action.d-osx-afctl.conf.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,13 @@
+--- config/action.d/osx-afctl.conf.orig	2015-09-28 16:50:03.000000000 +0200
++++ config/action.d/osx-afctl.conf	2015-09-28 16:51:07.000000000 +0200
+@@ -9,8 +9,8 @@
+ actionstart = 
+ actionstop = 
+ actioncheck = 
+-actionban = /usr/libexec/afctl -a <ip> -t <bantime>
+-actionunban = /usr/libexec/afctl -r <ip>
++actionban = /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -a <ip> -t <bantime>
++actionunban = /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -r <ip>
+ 
+ [Init]
+ bantime = 2880

Modified: trunk/dports/security/fail2ban/files/patch-config-fail2ban.conf.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-config-fail2ban.conf.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-config-fail2ban.conf.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,9 +1,28 @@
---- config/fail2ban.conf.orig	2012-07-31 20:45:04.000000000 -0500
-+++ config/fail2ban.conf	2012-08-27 18:20:53.000000000 -0500
-@@ -34,5 +34,5 @@
+--- config/fail2ban.conf.orig	2015-09-28 15:42:15.000000000 +0200
++++ config/fail2ban.conf	2015-09-28 15:44:48.000000000 +0200
+@@ -46,14 +46,14 @@
  #         communicate with the server afterwards.
- # Values: FILE  Default:  /var/run/fail2ban/fail2ban.sock
+ # Values: [ FILE ]  Default: /var/run/fail2ban/fail2ban.sock
  #
 -socket = /var/run/fail2ban/fail2ban.sock
 +socket = @@PREFIX@@/var/run/fail2ban/fail2ban.sock
  
+ # Option: pidfile
+ # Notes.: Set the PID file. This is used to store the process ID of the
+ #         fail2ban server.
+ # Values: [ FILE ]  Default: /var/run/fail2ban/fail2ban.pid
+ #
+-pidfile = /var/run/fail2ban/fail2ban.pid
++pidfile = @@PREFIX@@/var/run/fail2ban/fail2ban.pid
+ 
+ # Options: dbfile
+ # Notes.: Set the file for the fail2ban persistent data to be stored.
+@@ -61,7 +61,7 @@
+ #         and data is lost when fail2ban is stopped.
+ #         A value of "None" disables the database.
+ # Values: [ None :memory: FILE ] Default: /var/lib/fail2ban/fail2ban.sqlite3
+-dbfile = /var/lib/fail2ban/fail2ban.sqlite3
++dbfile = @@PREFIX@@/var/run/fail2ban/fail2ban.sqlite3
+ 
+ # Options: dbpurgeage
+ # Notes.: Sets age at which bans should be purged from the database

Modified: trunk/dports/security/fail2ban/files/patch-config-jail.conf.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-config-jail.conf.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-config-jail.conf.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,21 +1,11 @@
---- config/jail.conf.orig	2013-02-20 06:00:19.000000000 +0100
-+++ config/jail.conf	2013-02-20 06:07:15.000000000 +0100
-@@ -226,6 +226,18 @@
- logpath  = /var/log/auth.log
- ignoreip = 168.192.0.1
+--- config/jail.conf.orig	2015-09-30 08:30:02.000000000 +0200
++++ config/jail.conf	2015-09-30 08:30:13.000000000 +0200
+@@ -33,7 +33,7 @@
+ [INCLUDES]
  
-+# This jail uses pf, the standard firewall of Mac OS X (>=10.7). It uses
-+# the table called "bruteforce" in the IceFloor firewall main anchor.
-+# To be used with icefloor: http://www.hanynet.com/icefloor/
-+
-+[ssh-pf]
-+
-+enabled  = false
-+filter   = sshd
-+action   = pf-icefloor
-+	   sendmail-whois[name="SSH,PF", dest=you at example.com]
-+logpath  = /var/log/system.log
-+
- # These jails block attacks against named (bind9). By default, logging is off
- # with bind9 installation. You will need something like this:
- #
+ #before = paths-distro.conf
+-before = paths-debian.conf
++before = paths-osx.conf
+ 
+ # The DEFAULT allows a global definition of the options. They can be overridden
+ # in each jail afterwards.

Added: trunk/dports/security/fail2ban/files/patch-config-paths-common.conf.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-config-paths-common.conf.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-config-paths-common.conf.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,8 @@
+--- config/paths-common.conf.orig	2015-09-28 15:51:50.000000000 +0200
++++ config/paths-common.conf	2015-09-28 15:51:58.000000000 +0200
+@@ -65,4 +65,4 @@
+ roundcube_errors_log = /var/log/roundcube/errors
+ 
+ # Directory with ignorecommand scripts
+-ignorecommands_dir = /etc/fail2ban/filter.d/ignorecommands
++ignorecommands_dir = @@PREFIX@@/etc/fail2ban/filter.d/ignorecommands

Added: trunk/dports/security/fail2ban/files/patch-config-paths-osx.conf.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-config-paths-osx.conf.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-config-paths-osx.conf.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,30 @@
+--- config/paths-osx.conf.orig	2015-09-28 16:05:39.000000000 +0200
++++ config/paths-osx.conf	2015-09-30 16:50:31.000000000 +0200
+@@ -12,16 +12,20 @@
+ 
+ syslog_mail = /var/log/mail.log
+ 
+-syslog_mail_warn = /var/log/mail.warn
++syslog_mail_warn = /var/log/mail.log
+ 
+-syslog_authpriv = /var/log/secure.log
+-#syslog_auth = 
++syslog_authpriv = /var/log/system.log
++syslog_auth = /var/log/system.log
+ 
+-#syslog_user = 
++syslog_user = /var/log/system.log
+ 
+-#syslog_ftp = 
++syslog_ftp = /var/log/system.log
+ 
+-#syslog_daemon = 
++syslog_daemon = /var/log/system.log
+ 
+-#syslog_local0 =
++syslog_local0 = /var/log/system.log
++
++apache_error_log = /private/var/log/apache2/error_log
++
++apache_access_log = /private/var/log/apache2/access_log
+ 

Added: trunk/dports/security/fail2ban/files/patch-fail2ban-client-configreader.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-client-configreader.py.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-client-configreader.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,11 @@
+--- fail2ban/client/configreader.py.orig	2015-09-28 15:24:44.000000000 +0200
++++ fail2ban/client/configreader.py	2015-09-28 15:25:23.000000000 +0200
+@@ -145,7 +145,7 @@
+ 	Use ConfigReader instead.
+ 	"""
+ 
+-	DEFAULT_BASEDIR = '/etc/fail2ban'
++	DEFAULT_BASEDIR = '@@PREFIX@@/etc/fail2ban'
+ 	
+ 	def __init__(self, basedir=None, *args, **kwargs):
+ 		SafeConfigParserWithIncludes.__init__(self, *args, **kwargs)

Deleted: trunk/dports/security/fail2ban/files/patch-fail2ban-client.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-client.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-client.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,20 +0,0 @@
---- fail2ban-client.orig	2013-06-12 19:21:12.000000000 +0200
-+++ fail2ban-client	2013-08-15 23:38:31.000000000 +0200
-@@ -30,7 +30,7 @@
- try:
- 	from common.version import version
- except ImportError, e:
--	sys.path.insert(1, "/usr/share/fail2ban")
-+	sys.path.insert(1, "@@PREFIX@@/share/fail2ban")
- 	from common.version import version
- 
- # Now we can import the rest of modules
-@@ -56,7 +56,7 @@
- 		self.__stream = None
- 		self.__configurator = Configurator()
- 		self.__conf = dict()
--		self.__conf["conf"] = "/etc/fail2ban"
-+		self.__conf["conf"] = "@@PREFIX@@/etc/fail2ban"
- 		self.__conf["dump"] = False
- 		self.__conf["force"] = False
- 		self.__conf["verbose"] = 1

Deleted: trunk/dports/security/fail2ban/files/patch-fail2ban-regex.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-regex.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-regex.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,29 +0,0 @@
---- fail2ban-regex.orig	2013-06-12 19:21:12.000000000 +0200
-+++ fail2ban-regex	2013-08-15 23:36:34.000000000 +0200
-@@ -29,7 +29,7 @@
- try:
- 	from common.version import version
- except ImportError, e:
--	sys.path.insert(1, "/usr/share/fail2ban")
-+	sys.path.insert(1, "@@PREFIX@@/share/fail2ban")
- 	from common.version import version
- 
- from client.configparserinc import SafeConfigParserWithIncludes
-@@ -70,7 +70,7 @@
- 
- 	test = None
- 
--	CONFIG_DEFAULTS = {'configpath' : "/etc/fail2ban/"}
-+	CONFIG_DEFAULTS = {'configpath' : "@@PREFIX@@/etc/fail2ban/"}
- 
- 	def __init__(self):
- 		self.__filter = Filter(None)
-@@ -116,7 +116,7 @@
- 		print
- 		print "Log:"
- 		print "    string                  a string representing a log line"
--		print "    filename                path to a log file (/var/log/auth.log)"
-+		print "    filename                path to a log file (/var/log/secure.log)"
- 		print
- 		print "Regex:"
- 		print "    string                  a string representing a 'failregex'"

Added: trunk/dports/security/fail2ban/files/patch-fail2ban-server-filterpoll.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-server-filterpoll.py.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-server-filterpoll.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,11 @@
+--- fail2ban/server/filterpoll.py.orig	2015-09-29 09:37:10.000000000 +0200
++++ fail2ban/server/filterpoll.py	2015-09-29 09:37:45.000000000 +0200
+@@ -142,7 +142,7 @@
+ 			logSys.error("Unable to get stat on %s because of: %s"
+ 						 % (filename, e))
+ 			self.__file404Cnt[filename] += 1
+-			if self.__file404Cnt[filename] > 2:
++			if self.__file404Cnt[filename] > 20:
+ 				logSys.warning("Too many errors. Setting the jail idle")
+ 				if self.jail is not None:
+ 					self.jail.idle = True

Deleted: trunk/dports/security/fail2ban/files/patch-fail2ban-server.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-server.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-server.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,22 +0,0 @@
---- fail2ban-server.orig	2013-06-12 19:21:12.000000000 +0200
-+++ fail2ban-server	2013-08-15 23:33:56.000000000 +0200
-@@ -29,7 +29,7 @@
- try:
- 	from common.version import version
- except ImportError, e:
--	sys.path.insert(1, "/usr/share/fail2ban")
-+	sys.path.insert(1, "@@PREFIX@@/share/fail2ban")
- 	from common.version import version
- 
- from server.server import Server
-@@ -53,8 +53,8 @@
- 		self.__conf = dict()
- 		self.__conf["background"] = True
- 		self.__conf["force"] = False
--		self.__conf["socket"] = "/var/run/fail2ban/fail2ban.sock"
--		self.__conf["pidfile"] = "/var/run/fail2ban/fail2ban.pid"
-+		self.__conf["socket"] = "@@PREFIX@@/var/run/fail2ban/fail2ban.sock"
-+		self.__conf["pidfile"] = "@@PREFIX@@/var/run/fail2ban/fail2ban.pid"
- 
- 	def dispVersion(self):
- 		print "Fail2Ban v" + version

Added: trunk/dports/security/fail2ban/files/patch-fail2ban-tests-misctestcase.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-tests-misctestcase.py.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-tests-misctestcase.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,13 @@
+--- fail2ban/tests/misctestcase.py.orig	2015-09-28 15:31:16.000000000 +0200
++++ fail2ban/tests/misctestcase.py	2015-09-28 15:32:59.000000000 +0200
+@@ -107,8 +107,8 @@
+ 					% (got, need, tmp, files))
+ 
+ 			# Assure presence of some files we expect to see in the installation
+-			for f in ('etc/fail2ban/fail2ban.conf',
+-					  'etc/fail2ban/jail.conf'):
++			for f in ('@@PREFIX@@/etc/fail2ban/fail2ban.conf',
++					  '@@PREFIX@@/etc/fail2ban/jail.conf'):
+ 				self.assertTrue(os.path.exists(os.path.join(tmp, f)),
+ 								msg="Can't find %s" % f)
+ 		finally:

Added: trunk/dports/security/fail2ban/files/patch-fail2ban-tests-utils.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-fail2ban-tests-utils.py.diff	                        (rev 0)
+++ trunk/dports/security/fail2ban/files/patch-fail2ban-tests-utils.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -0,0 +1,18 @@
+--- fail2ban/tests/utils.py.orig	2015-09-28 15:34:25.000000000 +0200
++++ fail2ban/tests/utils.py	2015-09-28 15:36:10.000000000 +0200
+@@ -42,7 +42,7 @@
+ 	if os.path.exists(os.path.join('config','fail2ban.conf')):
+ 		CONFIG_DIR = 'config'
+ 	else:
+-		CONFIG_DIR = '/etc/fail2ban'
++		CONFIG_DIR = '@@PREFIX@@/etc/fail2ban'
+ 
+ 
+ def mtimesleep():
+@@ -263,4 +263,4 @@
+ 			kernel32.CloseHandle(process)
+ 			return True
+ 		else:
+-			return False
+\ No newline at end of file
++			return False

Deleted: trunk/dports/security/fail2ban/files/patch-server-server.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-server-server.py.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-server-server.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,11 +0,0 @@
---- server/server.py.orig	2013-06-12 19:21:12.000000000 +0200
-+++ server/server.py	2013-08-15 21:54:21.000000000 +0200
-@@ -352,7 +352,7 @@
- 				# Syslog daemons already add date to the message.
- 				formatter = logging.Formatter("%(name)-16s: %(levelname)-6s %(message)s")
- 				facility = logging.handlers.SysLogHandler.LOG_DAEMON
--				hdlr = logging.handlers.SysLogHandler("/dev/log", 
-+				hdlr = logging.handlers.SysLogHandler("/var/run/syslog", 
- 													  facility = facility)
- 			elif target == "STDOUT":
- 				hdlr = logging.StreamHandler(sys.stdout)

Deleted: trunk/dports/security/fail2ban/files/patch-server__filterpoll.py-increase-error-threshold.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-server__filterpoll.py-increase-error-threshold.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-server__filterpoll.py-increase-error-threshold.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,11 +0,0 @@
---- server/filterpoll.py	2013-06-12 13:21:12.000000000 -0400
-+++ server/filterpoll.py	2015-01-07 09:22:13.000000000 -0500
-@@ -129,7 +129,7 @@
- 			logSys.error("Unable to get stat on %s because of: %s"
- 						 % (filename, e))
- 			self.__file404Cnt[filename] += 1
--			if self.__file404Cnt[filename] > 2:
-+			if self.__file404Cnt[filename] > 20:
- 				logSys.warn("Too many errors. Setting the jail idle")
- 				if self.jail is not None:
- 					self.jail.setIdle(True)

Deleted: trunk/dports/security/fail2ban/files/patch-setup.cfg.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-setup.cfg.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-setup.cfg.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,9 +0,0 @@
---- setup.cfg.orig	2012-04-26 11:04:26.000000000 +0200
-+++ setup.cfg	2012-04-26 11:04:40.000000000 +0200
-@@ -1,5 +1,5 @@
- [install]
--install-purelib=/usr/share/fail2ban
-+install-purelib=@@PREFIX@@/share/fail2ban
- 
- [sdist]
- formats=bztar

Modified: trunk/dports/security/fail2ban/files/patch-setup.py.diff
===================================================================
--- trunk/dports/security/fail2ban/files/patch-setup.py.diff	2015-10-07 13:58:59 UTC (rev 140985)
+++ trunk/dports/security/fail2ban/files/patch-setup.py.diff	2015-10-07 15:02:12 UTC (rev 140986)
@@ -1,79 +1,81 @@
---- setup.py.orig	2013-06-12 19:21:12.000000000 +0200
-+++ setup.py	2013-08-15 22:51:49.000000000 +0200
-@@ -29,8 +29,8 @@
- from glob import glob
- 
- longdesc = '''
--Fail2Ban scans log files like /var/log/pwdfail or
--/var/log/apache/error_log and bans IP that makes
-+Fail2Ban scans log files like @@PREFIX@@/var/log/pwdfail or
-+@@PREFIX@@/var/log/apache/error_log and bans IP that makes
- too many password failures. It updates firewall rules
- to reject the IP address or executes user defined
- commands.'''
-@@ -56,19 +56,19 @@
- 					'server'
- 				],
- 	data_files =	[
--						('/etc/fail2ban',
-+						('@@PREFIX@@/etc/fail2ban',
- 							glob("config/*.conf")
- 						),
--						('/etc/fail2ban/filter.d',
-+						('@@PREFIX@@/etc/fail2ban/filter.d',
- 							glob("config/filter.d/*.conf")
- 						),
--						('/etc/fail2ban/action.d',
-+						('@@PREFIX@@/etc/fail2ban/action.d',
- 							glob("config/action.d/*.conf")
- 						),
--						('/var/run/fail2ban',
-+						('@@PREFIX@@/var/run/fail2ban',
- 							''
- 						),
--						('/usr/share/doc/fail2ban',
-+						('@@PREFIX@@/share/doc/fail2ban',
- 							['README.md', 'DEVELOP', 'doc/run-rootless.txt']
- 						)
- 					]
-@@ -78,15 +78,15 @@
+--- setup.py.orig	2015-09-28 15:10:23.000000000 +0200
++++ setup.py	2015-10-07 15:39:54.000000000 +0200
+@@ -126,29 +126,29 @@
+ 				for f in w[2]]
+ 	},
+ 	data_files = [
+-		('/etc/fail2ban',
++		('@@PREFIX@@/etc/fail2ban',
+ 			glob("config/*.conf")
+ 		),
+-		('/etc/fail2ban/filter.d',
++		('@@PREFIX@@/etc/fail2ban/filter.d',
+ 			glob("config/filter.d/*.conf")
+ 		),
+-		('/etc/fail2ban/filter.d/ignorecommands',
++		('@@PREFIX@@/etc/fail2ban/filter.d/ignorecommands',
+ 			glob("config/filter.d/ignorecommands/*")
+ 		),
+-		('/etc/fail2ban/action.d',
++		('@@PREFIX@@/etc/fail2ban/action.d',
+ 			glob("config/action.d/*.conf") +
+ 			glob("config/action.d/*.py")
+ 		),
+-		('/etc/fail2ban/fail2ban.d',
++		('@@PREFIX@@/etc/fail2ban/fail2ban.d',
+ 			''
+ 		),
+-		('/etc/fail2ban/jail.d',
++		('@@PREFIX@@/etc/fail2ban/jail.d',
+ 			''
+ 		),
+-		('/var/lib/fail2ban',
++		('@@PREFIX@@/var/lib/fail2ban',
+ 			''
+ 		),
+-		('/usr/share/doc/fail2ban',
++		('@@PREFIX@@/share/doc/fail2ban',
+ 			['README.md', 'README.Solaris', 'DEVELOP', 'FILTERS',
+ 			 'doc/run-rootless.txt']
+ 		)
+@@ -160,15 +160,15 @@
  # Search for obsolete files.
  obsoleteFiles = []
- elements =	{
--				"/etc/":
-+				"@@PREFIX@@/etc/":
- 					[
- 						"fail2ban.conf"
- 					],
--				"/usr/bin/":
-+				"@@PREFIX@@/usr/bin/":
- 					[
- 						"fail2ban.py"
- 					], 
--				"/usr/lib/fail2ban/":
-+				"@@PREFIX@@/usr/lib/fail2ban/":
- 					[
- 						"version.py",
- 						"protocol.py"
-@@ -109,16 +109,16 @@
- 		print "\t" + f
- 	print
+ elements = {
+-	"/etc/":
++	"@@PREFIX@@/etc/":
+ 		[
+ 			"fail2ban.conf"
+ 		],
+-	"/usr/bin/":
++	"@@PREFIX@@/usr/bin/":
+ 		[
+ 			"fail2ban.py"
+ 		],
+-	"/usr/lib/fail2ban/":
++	"@@PREFIX@@/usr/lib/fail2ban/":
+ 		[
+ 			"version.py",
+ 			"protocol.py"
+@@ -191,16 +191,16 @@
+ 		print("\t" + f)
+ 	print("")
  
 -if isdir("/usr/lib/fail2ban"):
-+if isdir("@@PREFIX@@/lib/fail2ban"):
- 	print
--	print "Fail2ban is not installed under /usr/lib anymore. The new " \
--		  "location is under /usr/share. Please remove the directory " \
--		  "/usr/lib/fail2ban and everything under this directory."
-+	print "Fail2ban is not installed under @@PREFIX@@/lib anymore. The new " \
-+		  "location is under @@PREFIX@@/share. Please remove the directory " \
-+		  "@@PREFIX@@/lib/fail2ban and everything under this directory."
- 	print
++if isdir("@@PREFIX@@/usr/lib/fail2ban"):
+ 	print("")
+-	print("Fail2ban is not installed under /usr/lib anymore. The new "
+-		  "location is under /usr/share. Please remove the directory "
+-		  "/usr/lib/fail2ban and everything under this directory.")
++	print("Fail2ban is not installed under @@PREFIX@@/usr/lib anymore. The new "
++		  "location is under @@PREFIX@@/usr/share. Please remove the directory "
++		  "@@PREFIX@@/usr/lib/fail2ban and everything under this directory.")
+ 	print("")
  
  # Update config file
- if argv[1] == "install":
- 	print
- 	print "Please do not forget to update your configuration files."
--	print "They are in /etc/fail2ban/."
-+	print "They are in @@PREFIX@@/etc/fail2ban/."
- 	print
+ if sys.argv[1] == "install":
+ 	print("")
+ 	print("Please do not forget to update your configuration files.")
+-	print("They are in /etc/fail2ban/.")
++	print("They are in @@PREFIX@@/etc/fail2ban/.")
+ 	print("")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151007/09fbe78a/attachment-0001.html>


More information about the macports-changes mailing list