2009-02-11 04:32:18 +01:00
|
|
|
#
|
2010-01-12 15:46:47 +01:00
|
|
|
# spec file for package fail2ban (Version 0.8.4)
|
2009-02-11 04:32:18 +01:00
|
|
|
#
|
2010-01-12 15:46:47 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-02-11 04:32:18 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
|
|
|
|
Name: fail2ban
|
2010-01-12 15:46:47 +01:00
|
|
|
License: GPLv2+
|
2009-02-11 04:32:18 +01:00
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Requires: python >= 2.5, logrotate, cron
|
|
|
|
BuildRequires: python-devel
|
|
|
|
PreReq: %fillup_prereq
|
|
|
|
AutoReqProv: on
|
2010-01-12 15:46:47 +01:00
|
|
|
Version: 0.8.4
|
|
|
|
Release: 1
|
2009-02-11 04:32:18 +01:00
|
|
|
Url: http://www.fail2ban.org/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Summary: fail2ban scans log files and bans IP addresses that makes too many failures
|
|
|
|
Source0: http://download.sourceforge.net/sourceforge/fail2ban/%{name}-%{version}.tar.bz2
|
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: %{name}.sysconfig
|
|
|
|
# Patch0: fail2ban-0.8.3-config.patch
|
|
|
|
|
|
|
|
%description
|
|
|
|
fail2ban scans log files like /var/log/messages and bans IP addresses
|
|
|
|
that makes too many password failures. It updates firewall rules to
|
|
|
|
reject the IP address, can send e-mails, or set host.deny entries.
|
|
|
|
These rules can be defined by the user. Fail2Ban can read multiple log
|
|
|
|
files such as sshd or Apache web server ones.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Cyril Jaquier <cyril.jaquier@fail2ban.org>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup
|
|
|
|
# %patch0 -p1 -b _orig
|
|
|
|
perl -pi -e 's;/usr/local/;/usr/;g' files/suse-initd
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
python setup.py build
|
|
|
|
gzip man/*.1
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install \
|
|
|
|
--root=$RPM_BUILD_ROOT \
|
|
|
|
--prefix=%{_prefix}
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
|
|
for i in fail2ban-client fail2ban-regex fail2ban-server; do
|
|
|
|
install -m644 man/${i}.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
|
|
done
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT/usr/sbin
|
|
|
|
install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/%{name}
|
|
|
|
ln -sf /etc/init.d/%{name} ${RPM_BUILD_ROOT}/usr/sbin/rc%{name}
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_only}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal %{name}
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%insserv_cleanup
|
|
|
|
|
|
|
|
%clean
|
|
|
|
# [ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%dir %{_sysconfdir}/%{name}/action.d
|
|
|
|
%dir %{_sysconfdir}/%{name}/filter.d
|
|
|
|
%config %{_sysconfdir}/%{name}/*.conf
|
|
|
|
%config %{_sysconfdir}/%{name}/action.d/*.conf
|
|
|
|
%config %{_sysconfdir}/%{name}/filter.d/*.conf
|
|
|
|
%{_sysconfdir}/init.d/%{name}
|
|
|
|
/usr/bin/%{name}*
|
|
|
|
/usr/sbin/rc%{name}
|
|
|
|
/usr/share/%{name}
|
|
|
|
%dir /var/run/%{name}
|
|
|
|
/var/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
%doc %{_mandir}/man1/*
|
|
|
|
%doc COPYING ChangeLog README TODO files/cacti
|
|
|
|
|
|
|
|
%changelog
|