]> git.pld-linux.org Git - packages/fail2ban.git/blob - fail2ban.spec
- alter source files in prep
[packages/fail2ban.git] / fail2ban.spec
1 Summary:        Ban IPs that make too many password failures
2 Summary(pl):    Blokowanie IP powoduj±cych zbyt du¿o prób logowañ z b³êdnym has³em
3 Name:           fail2ban
4 Version:        0.6.0
5 Release:        1
6 License:        GPL
7 Group:          Daemons
8 URL:            http://fail2ban.sourceforge.net/
9 Source0:        http://dl.sourceforge.net/fail2ban/%{name}-%{version}.tar.bz2
10 # Source0-md5:  129c4e76539a22ab60d025fbf137f962
11 BuildRequires:  dos2unix
12 BuildRequires:  python-devel
13 BuildRequires:  rpmbuild(macros) >= 1.219
14 Requires:       python-log4py
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 Fail2Ban scans log files like /var/log/secure and bans IP that makes
20 too many password failures. It updates firewall rules to reject the IP
21 address. These rules can be defined by the user. Fail2Ban can read
22 multiple log files including sshd or Apache web server logs.
23
24 %description -l pl
25 Fail2Ban skanuje pliki logów takie jak /var/log/secure i blokuje IP
26 powoduj±ce zbyt du¿o prób logowañ z b³êdnym has³em. Uaktualnia regu³ki
27 firewalla, aby odrzuciæ adres IP. Regu³ki te mog± byæ definiowane
28 przez u¿ytkownika. Fail2Ban potrafi czytaæ wiele plików logów w³±cznie
29 z sshd czy plikami logów serwera WWW Apache.
30
31 %prep
32 %setup -q
33 dos2unix config/redhat-initd
34 rm setup.cfg
35
36 %build
37 %{__python} setup.py build
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
42
43 PYTHONPATH=$RPM_BUILD_ROOT%{py_sitescriptdir}; export PYTHONPATH
44
45 python setup.py install \
46         --optimize=2 \
47         --root=$RPM_BUILD_ROOT
48
49 %{py_postclean}
50 install config/redhat-initd $RPM_BUILD_ROOT/etc/rc.d/init.d/fail2ban
51 install config/fail2ban.conf.default $RPM_BUILD_ROOT%{_sysconfdir}/fail2ban.conf
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 /sbin/chkconfig --add %{name}
58 %service %{name} restart
59
60 %preun
61 if [ "$1" = "0" ]; then
62         %service -q %{name} stop
63         /sbin/chkconfig --del %{name}
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc CHANGELOG README TODO
69 %attr(754,root,root) /etc/rc.d/init.d/%{name}
70 %attr(755,root,root) %{_bindir}/%{name}
71 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
72 %{py_sitescriptdir}/*
This page took 0.143263 seconds and 3 git commands to generate.