]> git.pld-linux.org Git - packages/fail2ban.git/blame - fail2ban.spec
automatic change: use py_build/py_install macros
[packages/fail2ban.git] / fail2ban.spec
CommitLineData
ce81aec7
AM
1# TODO:
2# - resurrect ipv6 support
465f8f11 3Summary: Ban IPs that make too many password failures
f4d4d197 4Summary(pl.UTF-8): Blokowanie IP powodujących zbyt dużo prób logowań z błędnym hasłem
465f8f11 5Name: fail2ban
ce81aec7
AM
6Version: 0.9.1
7Release: 0.1
465f8f11 8License: GPL
9Group: Daemons
ef99c638 10Source0: https://github.com/fail2ban/fail2ban/archive/%{version}.tar.gz
ce81aec7 11# Source0-md5: 3554cc3de3f06ddfd7f90f8305b765b8
8a5385b5 12Source1: %{name}.init
06aca71d 13Source2: %{name}.logrotate
ce81aec7 14Source3: paths-pld.conf
896749cf 15Patch0: ipv6.patch
ce81aec7 16Patch1: logifiles.patch
823ffa17 17URL: http://fail2ban.sourceforge.net/
80cab974 18BuildRequires: python-devel
4e631b74 19BuildRequires: python-modules
823ffa17 20BuildRequires: rpm-pythonprov
40211b80 21BuildRequires: rpmbuild(macros) >= 1.671
56c86c91 22Requires(post,preun): /sbin/chkconfig
40211b80 23Requires(post,preun,postun): systemd-units >= 38
465f8f11 24Requires: python-log4py
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
ce81aec7 45#%patch0 -p1
5d66b381 46%patch1 -p1
ddeb0306 47rm setup.cfg
465f8f11 48
49%build
f7c0846c 50%py_build
465f8f11 51
52%install
53rm -rf $RPM_BUILD_ROOT
06aca71d 54install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d} \
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
ef189e0e 67
40211b80
JR
68install -p files/fail2ban-tmpfiles.conf $RPM_BUILD_ROOT%{systemdtmpfilesdir}/fail2ban.conf
69install -p files/fail2ban.service $RPM_BUILD_ROOT%{systemdunitdir}/fail2ban.service
fad935ea 70
06aca71d
JR
71:> $RPM_BUILD_ROOT/var/log/fail2ban.log
72
823ffa17 73%py_postclean
465f8f11 74
75%clean
76rm -rf $RPM_BUILD_ROOT
77
78%post
79/sbin/chkconfig --add %{name}
80%service %{name} restart
40211b80 81%systemd_post fail2ban.service
465f8f11 82
83%preun
84if [ "$1" = "0" ]; then
85 %service -q %{name} stop
86 /sbin/chkconfig --del %{name}
87fi
40211b80
JR
88%systemd_preun fail2ban.service
89
90%postun
91%systemd_reload
92
93%triggerpostun -- fail2ban < 0.8.11-3
94%systemd_trigger fail2ban.service
465f8f11 95
96%files
465f8f11 97%defattr(644,root,root,755)
ce81aec7 98%doc CONTRIBUTING.md ChangeLog DEVELOP FILTERS README.md RELEASE THANKS TODO COPYING
40211b80
JR
99%attr(754,root,root) /etc/rc.d/init.d/fail2ban
100%attr(755,root,root) %{_bindir}/fail2ban-client
40211b80
JR
101%attr(755,root,root) %{_bindir}/fail2ban-regex
102%attr(755,root,root) %{_bindir}/fail2ban-server
ce81aec7 103%attr(755,root,root) %{_bindir}/fail2ban-testcases
40211b80
JR
104%{systemdunitdir}/fail2ban.service
105%{systemdtmpfilesdir}/fail2ban.conf
106%dir /var/run/fail2ban
107%dir %{_sysconfdir}/fail2ban
108%dir %{_sysconfdir}/fail2ban/action.d
ce81aec7
AM
109%attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/badips.py
110%attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/smtp.py
40211b80
JR
111%dir %{_sysconfdir}/fail2ban/fail2ban.d
112%dir %{_sysconfdir}/fail2ban/filter.d
113%dir %{_sysconfdir}/fail2ban/jail.d
114%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/*.conf
115%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/*/*.conf
06aca71d 116%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/fail2ban
5d66b381 117%{py_sitescriptdir}/%{name}
50db387a 118%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
40211b80
JR
119%{_mandir}/man1/fail2ban-client.1*
120%{_mandir}/man1/fail2ban-regex.1*
121%{_mandir}/man1/fail2ban-server.1*
122%{_mandir}/man1/fail2ban.1*
06aca71d 123%attr(640,root,logs) %ghost /var/log/fail2ban.log
This page took 0.065183 seconds and 4 git commands to generate.