SPECS: fail2ban.spec (NEW) - added - needs PLD initscript - needs ...

aredridel aredridel at pld-linux.org
Thu Dec 15 21:49:15 CET 2005


Author: aredridel                    Date: Thu Dec 15 20:49:15 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added
- needs PLD initscript
- needs better default config

---- Files affected:
SPECS:
   fail2ban.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/fail2ban.spec
diff -u /dev/null SPECS/fail2ban.spec:1.1
--- /dev/null	Thu Dec 15 21:49:15 2005
+++ SPECS/fail2ban.spec	Thu Dec 15 21:49:08 2005
@@ -0,0 +1,74 @@
+# $Revision$, $Date$
+Summary:	Ban IPs that make too many password failures
+Name:		fail2ban
+Version:	0.6.0
+Release:	1
+License:	GPL
+Group:		Daemons
+URL:		http://fail2ban.sourceforge.net/
+Source0:	http://dl.sourceforge.net/fail2ban/%{name}-%{version}.tar.bz2
+# Source0-md5:	129c4e76539a22ab60d025fbf137f962
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires:	dos2unix
+Requires:	python-log4py
+BuildArch:	noarch
+
+%description
+Fail2Ban scans log files like /var/log/secure and bans IP that makes
+too many password failures. It updates firewall rules to reject the IP
+address. These rules can be defined by the user. Fail2Ban can read
+multiple log files including sshd or Apache web server logs.
+
+%prep
+%setup -q
+
+%build
+rm setup.cfg
+%{__python} setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
+PYTHONPATH=$RPM_BUILD_ROOT%{py_sitescriptdir}; export PYTHONPATH
+
+python setup.py install \
+  --optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm {} \;
+dos2unix config/redhat-initd
+install config/redhat-initd $RPM_BUILD_ROOT/etc/rc.d/init.d/fail2ban
+install config/fail2ban.conf.default $RPM_BUILD_ROOT%{_sysconfdir}/fail2ban.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+	%service -q %{name} stop
+	/sbin/chkconfig --del %{name}
+fi
+
+%files
+%doc CHANGELOG README TODO
+%defattr(644,root,root,755)
+%attr(755,root,root) /etc/rc.d/init.d/%{name}
+%attr(755,root,root) %{_bindir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}.conf
+%{py_sitescriptdir}/*
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2005/12/15 20:49:08  aredridel
+- added
+- needs PLD initscript
+- needs better default config
+
================================================================



More information about the pld-cvs-commit mailing list