]> git.pld-linux.org Git - packages/fail2ban.git/blame - fail2ban.spec
up to 0.10.3.1
[packages/fail2ban.git] / fail2ban.spec
CommitLineData
465f8f11 1Summary: Ban IPs that make too many password failures
f4d4d197 2Summary(pl.UTF-8): Blokowanie IP powodujących zbyt dużo prób logowań z błędnym hasłem
465f8f11 3Name: fail2ban
d22c2530 4Version: 0.10.3.1
f493e11c 5Release: 1
465f8f11 6License: GPL
7Group: Daemons
ef99c638 8Source0: https://github.com/fail2ban/fail2ban/archive/%{version}.tar.gz
d22c2530 9# Source0-md5: d47e854378cf0458ddcdc5786768d226
8a5385b5 10Source1: %{name}.init
06aca71d 11Source2: %{name}.logrotate
ce81aec7 12Source3: paths-pld.conf
0563dd14 13Source4: %{name}.sysconfig
7037c24e 14Patch0: logifiles.patch
d22c2530 15Patch1: version.patch
823ffa17 16URL: http://fail2ban.sourceforge.net/
80cab974 17BuildRequires: python-devel
4e631b74 18BuildRequires: python-modules
823ffa17 19BuildRequires: rpm-pythonprov
e50e7043 20BuildRequires: rpmbuild(macros) >= 1.710
56c86c91 21Requires(post,preun): /sbin/chkconfig
40211b80 22Requires(post,preun,postun): systemd-units >= 38
465f8f11 23Requires: python-log4py
179323c4 24Requires: python-modules-sqlite
56c86c91 25Requires: rc-scripts
40211b80 26Requires: systemd-units >= 38
465f8f11 27BuildArch: noarch
80cab974 28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
465f8f11 29
30%description
31Fail2Ban scans log files like /var/log/secure and bans IP that makes
32too many password failures. It updates firewall rules to reject the IP
33address. These rules can be defined by the user. Fail2Ban can read
34multiple log files including sshd or Apache web server logs.
35
2312737e
JR
36%description -l pl.UTF-8
37Fail2Ban skanuje pliki logów takie jak /var/log/secure i blokuje IP
38powodujące zbyt dużo prób logowań z błędnym hasłem. Uaktualnia regułki
39firewalla, aby odrzucić adres IP. Regułki te mogą być definiowane
40przez użytkownika. Fail2Ban potrafi czytać wiele plików logów włącznie
41z sshd czy plikami logów serwera WWW Apache.
cac37698 42
465f8f11 43%prep
44%setup -q
7037c24e 45%patch0 -p1
d22c2530 46%patch1 -p0
ddeb0306 47rm setup.cfg
465f8f11 48
49%build
f7c0846c 50%py_build
465f8f11 51
52%install
53rm -rf $RPM_BUILD_ROOT
0563dd14 54install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
ce81aec7 55 $RPM_BUILD_ROOT{%{_mandir}/man1,/var/{log,run/fail2ban}} \
40211b80 56 $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
3f2a7d0f 57
f7c0846c 58%py_install \
ef99c638 59 --install-lib=%{py_sitescriptdir} \
465f8f11 60 --root=$RPM_BUILD_ROOT
61
06aca71d
JR
62install -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
63
64install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/fail2ban
65install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/fail2ban
ef99c638 66install -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/fail2ban/paths-pld.conf
0563dd14 67install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
ef189e0e 68
40211b80 69install -p files/fail2ban-tmpfiles.conf $RPM_BUILD_ROOT%{systemdtmpfilesdir}/fail2ban.conf
f493e11c 70install -p build-2/fail2ban.service $RPM_BUILD_ROOT%{systemdunitdir}/fail2ban.service
fad935ea 71
06aca71d
JR
72:> $RPM_BUILD_ROOT/var/log/fail2ban.log
73
823ffa17 74%py_postclean
465f8f11 75
76%clean
77rm -rf $RPM_BUILD_ROOT
78
79%post
80/sbin/chkconfig --add %{name}
81%service %{name} restart
40211b80 82%systemd_post fail2ban.service
465f8f11 83
84%preun
85if [ "$1" = "0" ]; then
86 %service -q %{name} stop
87 /sbin/chkconfig --del %{name}
88fi
40211b80
JR
89%systemd_preun fail2ban.service
90
91%postun
92%systemd_reload
93
94%triggerpostun -- fail2ban < 0.8.11-3
95%systemd_trigger fail2ban.service
465f8f11 96
97%files
465f8f11 98%defattr(644,root,root,755)
d22c2530 99%doc CONTRIBUTING.md ChangeLog DEVELOP FILTERS README.md RELEASE THANKS TODO COPYING FILTERS
40211b80
JR
100%attr(754,root,root) /etc/rc.d/init.d/fail2ban
101%attr(755,root,root) %{_bindir}/fail2ban-client
7572e05e 102%attr(755,root,root) %{_bindir}/fail2ban-python
40211b80
JR
103%attr(755,root,root) %{_bindir}/fail2ban-regex
104%attr(755,root,root) %{_bindir}/fail2ban-server
ce81aec7 105%attr(755,root,root) %{_bindir}/fail2ban-testcases
40211b80
JR
106%{systemdunitdir}/fail2ban.service
107%{systemdtmpfilesdir}/fail2ban.conf
108%dir /var/run/fail2ban
109%dir %{_sysconfdir}/fail2ban
110%dir %{_sysconfdir}/fail2ban/action.d
ce81aec7
AM
111%attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/badips.py
112%attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/smtp.py
40211b80
JR
113%dir %{_sysconfdir}/fail2ban/fail2ban.d
114%dir %{_sysconfdir}/fail2ban/filter.d
7572e05e
AM
115%dir %{_sysconfdir}/fail2ban/filter.d/ignorecommands
116%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/filter.d/ignorecommands/apache-fakegooglebot
40211b80
JR
117%dir %{_sysconfdir}/fail2ban/jail.d
118%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/*.conf
119%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/*/*.conf
06aca71d 120%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/fail2ban
d22c2530 121%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
5d66b381 122%{py_sitescriptdir}/%{name}
50db387a 123%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
40211b80
JR
124%{_mandir}/man1/fail2ban-client.1*
125%{_mandir}/man1/fail2ban-regex.1*
126%{_mandir}/man1/fail2ban-server.1*
7572e05e 127%{_mandir}/man1/fail2ban-testcases.1*
40211b80 128%{_mandir}/man1/fail2ban.1*
179323c4 129%attr(750,root,root) %dir /var/lib/%{name}
06aca71d 130%attr(640,root,logs) %ghost /var/log/fail2ban.log
This page took 0.049791 seconds and 4 git commands to generate.