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