Commit Graph

82 Commits (42714d0849cff8a1502e0fabfed376e40187fca8)

Author SHA1 Message Date
sebres 7bf5980def no root option if testing within virtualenv (fixed now). 2017-11-24 13:20:19 +01:00
sebres eac80966c5 Fix scripts-root within `fail2ban.service` (relative install root-base directory).
This is amend for e3b061e94b.
Closes gh-1964
2017-11-24 12:54:45 +01:00
sebres e3b061e94b - `files/fail2ban.service` renamed as template to `files/fail2ban.service.in`;
- setup process generates `build/fail2ban.service` from `files/fail2ban.service.in` using distribution related bin-path;
- bug-fixing by running setup with option `--dry-run` (note: specify option `--dry-run` before `install`, like `python setup.py --dry-run install`);
- test cases extended to cover dry-run.
2017-08-23 13:01:29 +02:00
sebres 0ae932ba5e setup fix for python3, bypass directories (__pycache__) created after ignore command was tested 2016-10-05 15:29:56 +02:00
sebres 83029b89b9 amend to 2e530fcf72c9e9bae321b37b625728bf9f88f71b: setuptools compatibility fix - just to be sure if install_scripts will be incompatible tomorrow 2016-08-12 21:48:40 +02:00
sebres 2e530fcf72 setuptools compatibility fix 2016-08-12 21:26:57 +02:00
sebres 461e9bab56 better handling of setup in test-cases (prevent execution of 2to3 twice, full logging in heavydebug, etc.) 2016-08-12 21:26:51 +02:00
sebres d71a525a85 Merge branch 'master' into 0.10 (resolve conflicts and cleaning tree points after back-porting gh-1508 0.10 -> 0.9) 2016-08-12 18:51:56 +02:00
sebres db30b7ce06 BF: prefer sys.argv[0] by retrieving of root resp. bin path: __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.) 2016-08-12 17:59:27 +02:00
sebres 6cdc1ce685 compatibility fix (virtualenv, running test cases in py3)
# Conflicts:
#	MANIFEST
2016-08-12 17:59:24 +02:00
sebres 38d53a72fd introduces new command "fail2ban-python", as automatically created symlink to python executable, where fail2ban currently installed (resp. its modules are located);
fixed pythonic filters and test scripts (running via "fail2ban-python" now);
fixed test case "testSetupInstallRoot" not for default python (also using direct call, out of virtualenv);

# Conflicts:
#	config/filter.d/ignorecommands/apache-fakegooglebot
#	fail2ban/tests/files/config/apache-auth/digest.py
#	fail2ban/tests/files/ignorecommand.py
#	fail2ban/tests/misctestcase.py
2016-08-12 17:58:37 +02:00
sebres c8e7c1f7f4 BF: prefer sys.argv[0] by retrieving of root resp. bin path: __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.) 2016-08-12 16:48:11 +02:00
sebres 08af8de981 compatibility fix (virtualenv, running test cases in py3) 2016-08-11 21:35:13 +02:00
sebres 77f451c4a3 introduces new command "fail2ban-python", as automatically created symlink to python executable, where fail2ban currently installed (resp. its modules are located);
fixed pythonic filters and test scripts (running via "fail2ban-python" now);
fixed test case "testSetupInstallRoot" not for default python (also using direct call, out of virtualenv);
2016-08-11 18:34:18 +02:00
Yaroslav Halchenko 9d70c49ea8 BF: install doc files only under Linuxes and other GNU systems (Closes #1233) (#1503) 2016-08-09 12:49:40 +02:00
Alexander Koeppe 975608dfb6 no hardcoded python interpreter path 2016-05-15 21:08:32 +02:00
Yaroslav Halchenko 776322cea3 BF: realpath for /var/run/fail2ban Closes #1142 2015-07-31 10:12:14 -04:00
Lee Clemens 1ebea39ec5 Merge pull request #1068 from yarikoptic/enh/var-run-fail2ban
BF: 'create' /var/run/fail2ban on systems with /var/run
2015-07-07 21:55:49 -04:00
Lee Clemens 7667712909 Fix pep8 E401 multiple imports on one line 2015-06-26 12:51:19 -04:00
Yaroslav Halchenko 2d9ece2d04 BF: 'create' /var/run/fail2ban on systems with /var/run
Should overcome problems of some users installing using setup.py install
2015-06-11 19:43:42 -10:00
Lee Clemens 38415d2cf1 Add trailing comma back to list 2015-02-02 11:29:27 -05:00
Lee Clemens af078532ac New jail: apache-fakegooglebot
Detects fake googlebot user agents in apache access log
2015-02-02 00:42:01 -05:00
Deyuan Deng 5e9619d4a4 Clean up setup.py 2014-04-04 02:54:53 +00:00
Steven Hiscocks 41cbbbc248 BF: Remove unused imports and variables.
All highlighted by using pyflakes.
2014-03-16 14:31:34 +00:00
Steven Hiscocks 3990a19fc7 BF: Remove "/var/run/fail2ban" from setup.py
As the contents of /var/run are lost on reboot, it doesn't make sense to
install it. This is already patched out in some distros (gentoo, arch,
debian, gentoo, …) as causes a headache with package managment tracking
installed files.
2014-03-16 10:47:40 +00:00
Daniel Black 4b2d8a8e51 BF: include test data 2014-03-15 10:28:04 +11:00
Daniel Black ce586b6e16 PKG: Documentation files 2014-03-14 23:58:55 +11:00
Steven Hiscocks 5630c56c75 ENH: Change logging levels and make info more verbose 2014-02-20 23:01:40 +00:00
Steven Hiscocks 8221c7ca71 TST+BF: Add tests for python actions, including test for smtp.py
Also fix bug when specifying multiple recipients for smtp.py action
2014-01-20 23:10:43 +00:00
Steven Hiscocks 80d6f74ee8 RF: Refactor actions further, include removing server proxy interface
This allows direct setting of action properties and calling of methods
from the fail2ban-client if so required.
2014-01-03 17:04:49 +00:00
Steven Hiscocks f37c90cdba ENH: Python based actions
Python actions are imported from action.d config folder, which have .py
file extension. This imports and creates an instance of the Action class
(Action can be a variable that points to a class of another name).
fail2ban.server.action.ActionBase is a base class which can be inherited
from or as a minimum has a subclass hook which is used to ensure any
imported actions implements the methods required.
All calls to the execAction are also wrapped in a try except such that
any errors won't cripple the jail.
Action is renamed CommandAction, to clearly distinguish it from other
actions.

Include is an example smtp.py python action for sending emails via smtp.
This is work in progress, as looking to add the <matches> and whois
elements, and also SSL/TLS support.
2013-12-31 18:54:34 +00:00
Steven Hiscocks bbadef847b ENH: Add fail2ban persistent data storage 2013-12-07 23:23:28 +00:00
Daniel Black 1f1a56174f MRG: merge from master 2013-09-08 21:02:35 +10:00
Orion Poplawski 71317332ec Install empty /etc/fail2ban/fail2ban.d directory 2013-08-28 11:33:05 -06:00
Orion Poplawski d3ce9e860f Install empty /etc/fail2ban/jail.d directory 2013-08-09 14:39:06 -06:00
Daniel Black 04ff9450b5 BF: testcases is a package that needs to be installed. Thanks to Michael Danko on irc 2013-07-29 10:45:15 +10:00
Steven Hiscocks 774c9ce4fd BF: setup.py build now includes sample log files for tests 2013-07-16 23:37:44 +01:00
Yaroslav Halchenko b65205d4ad Merge branch 'master' into 0.9
* master:
  ENH: "is None" instead of "== None" + tune ups in headers
  BF: log error only if there were missed config files that couldn't be read
  DOC: missing cinfo tags are ok. Log error for self referencing definitions
  DOC: s/defination/definition/g learn to spell
  Changelog entry for the previous commit and some untabify
  BF: pyinotify backend should also handle IN_MOVED_TO events
  ENH: remove stats of config files and use results of SafeConfigParserWithIncludes.read to facilitate meaningful error messages
  DOC: credits for gh-70 fix
  BF: ensure dates in email are in the C locale. Thanks iGeorgeX
  DOC: ChangeLog for recursive tag substition
  ENH: allow recursive tag substitution in action files.
  DOC: document <br> tag
  DOC: ChangeLog for named-refused entry
  ENH: Account for views in named filter. By Romain Riviere in gentoo bug #259458
  DOC: release documentation and distributor contacts
  DOC: changelog entry for enhanced ssh filter
  BF: Rename mentioning of README to README.md (Fixes #187)
  updated README.md to hyperlink, add travis and coversall
  Moving README into a markup README.md for github's goodnesses

Conflicts:
	DEVELOP
	README.md
	fail2ban/client/configreader.py
	fail2ban/server/datedetector.py
2013-05-02 23:55:26 -04:00
Yaroslav Halchenko c5287e3d9c BF: Rename mentioning of README to README.md (Fixes #187) 2013-04-26 22:51:59 -04:00
Steven Hiscocks 6f3c66f466 ENH: Reimplement warning suppression of setup.py test --quiet 2013-04-21 13:23:08 +01:00
Steven Hiscocks 9d2d907fc1 BF: Remove warnings handler which breaks setup.py python2<2.7 and python3<3.2 2013-04-21 10:59:14 +01:00
Yaroslav Halchenko 7341031a30 ENH: use os.path.join for consistency -- add "Contributors" to authors 2013-04-20 23:12:38 -04:00
Steven Hiscocks f07a92f0f7 RF: setup.py now imports version number again 2013-04-21 00:58:22 +01:00
Steven Hiscocks 55810a3c30 TST+RF: Add ability to execute test from setup.py with setuptools
Note that the fail2ban version can no longer be imported from
"fail2ban.version", as this breaks 2to3 conversion for tests
2013-04-20 20:17:36 +01:00
Steven Hiscocks 36097ffc3e DOC: Revert setup.py messages to use print statement 2013-04-14 10:18:22 +01:00
Steven Hiscocks fa0f8f9e6d Merge branch '0.9' into py3
Conflicts:
	.travis.yml
	MANIFEST
	bin/fail2ban-regex
	fail2ban/server/filter.py
	fail2ban/tests/servertestcase.py
	setup.py
2013-04-13 16:54:22 +01:00
Steven Hiscocks a33bf5baca ENH: setup.py now automatically runs 2to3 for python3.x 2013-04-09 19:40:54 +01:00
Steven Hiscocks 3a16ceed0a BF: Added test filter.d files to setup.py package data 2013-04-06 10:20:53 +01:00
Steven Hiscocks a153653a27 ENH+TST: Move fail2ban-* scripts to bin/ 2013-04-01 19:06:13 +01:00
Steven Hiscocks e3bd2042eb TST+ENH: Move testcases to part of fail2ban module
This allows fail2ban-testcases to be run on an installed fail2ban
instance.
TODO: Fix tests requiring config files
2013-04-01 11:22:40 +01:00