All pastes #435527 Raw Edit

foxhacker

public text v1 · immutable
·published 2007-04-11 23:39 UTC
rendered paste body
%define name DenyHosts
%define version 2.6
%define release 1

Summary: DenyHosts is a utility to help sys admins thwart ssh hackers
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: GPL v2
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
BuildArchitectures: noarch
Vendor: Phil Schwartz <phil_schwartz@users.sourceforge.net>
Url: http://denyhosts.sourceforge.net

%description

DenyHosts is a python program that automatically blocks ssh attacks by adding entries to
/etc/hosts.deny. DenyHosts will also inform Linux administrators about offending hosts, attacked
users and suspicious logins.


%prep
%setup

%build
python setup.py build

%install
%{__install} -m 0700
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%{__cp} $RPM_BUILD_ROOT/usr/share/denyhosts/denyhosts.cfg-dist $RPM_BUILD_ROOT/usr/share/denyhosts/denyhosts.cfg
%{__cp} $RPM_BUILD_ROOT/usr/share/denyhosts/daemon-control-dist $RPM_BUILD_ROOT/usr/share/denyhosts/daemon-control
%{__ln -s} $RPM_BUILD_ROOT/usr/share/denyhosts/daemon-control $RPM_BUILD_ROOT/etc/init.d/denyhosts

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root)
/usr/lib/python2.4/site-packages/DenyHosts
/usr/share/denyhosts

%post
chkconfig --add denyhosts
chkconfig denyhosts on
$RPM_BUILD_ROOT/usr/share/denyhosts/daemon-control start