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