]> git.pld-linux.org Git - packages/DenyHosts.git/blame - DenyHosts.spec
BR: rpmbuild(macros) >= 1.710
[packages/DenyHosts.git] / DenyHosts.spec
CommitLineData
b2157cc2 1Summary: Script to help thwart SSH server attacks
688ab4ae 2Summary(pl.UTF-8): Skrypt do blokowania ataków na serwery SSH
cb64b9ac 3Name: DenyHosts
0477d14c 4Version: 2.6
1853dae1 5Release: 8
bb66a4c6 6License: GPL v2
cb64b9ac 7Group: Applications/System
01268ebb 8Source0: http://downloads.sourceforge.net/denyhosts/%{name}-%{version}.tar.gz
0477d14c 9# Source0-md5: fc2365305a9402886a2b0173d1beb7df
cb64b9ac 10Source1: %{name}.cron
11Source2: %{name}.cfg
75d37289 12Source3: %{name}.init
01268ebb 13Patch0: silentpurge.patch
acd29740 14URL: http://denyhosts.sourceforge.net/
0477d14c 15BuildRequires: python-devel >= 1:2.5
711ced82 16BuildRequires: python-modules
17BuildRequires: rpm-pythonprov
91264714 18BuildRequires: rpmbuild(macros) >= 1.710
66c5315b 19Requires(post,preun): /sbin/chkconfig
acd29740 20Requires: libwrap
b711731f 21Requires: python
288da489 22Requires: python-modules
66c5315b 23Requires: rc-scripts
1853dae1 24Suggests: crondaemon
cb64b9ac 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28DenyHosts is a script intended to be run by Linux system
b2157cc2 29administrators to help thwart SSH server attacks.
cb64b9ac 30
b2157cc2 31If you've ever looked at your SSH log (/var/log/secure on Redhat,
cb64b9ac 32/var/log/auth.log on Mandrake, etc...) you may be alarmed to see how
33many hackers attempted to gain access to your server. Hopefully, none
34of them were successful (but then again, how would you know?).
35Wouldn't it be better to automatically prevent that attacker from
36continuing to gain entry into your system?
37
6aea5cf1
JR
38%description -l pl.UTF-8
39DenyHosts jest skryptem dla administratorów systemów Linux, którego
40zadaniem jest odparcie ataków na serwery SSH.
cb64b9ac 41
6aea5cf1
JR
42W logach SSH można znaleźć wiele informacji o próbach uzyskania
43dostępu do serwera poprzez usługę SSH. Dobrze jest zapobiec kolejnym
44próbom włamania przez odcięcie włamywaczom dostępu do serwera.
cb64b9ac 45
46%prep
47%setup -q
01268ebb
ER
48%patch0 -p1
49
50grep -r '/usr/bin/env python' -l . | xargs %{__sed} -i -e 's,/usr/bin/env python,%{__python},'
cb64b9ac 51
52%build
cb64b9ac 53echo 'VERSION="%{version}"' > version.py
536be0d3 54%py_build
cb64b9ac 55
56%install
57rm -rf $RPM_BUILD_ROOT
75d37289 58install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}}
536be0d3 59%py_install
cb64b9ac 60
01268ebb
ER
61%py_postclean
62
63cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
64cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
65install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
75d37289 66mv $RPM_BUILD_ROOT%{_datadir}/denyhosts/daemon-control-dist $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
75d37289 67rm -r $RPM_BUILD_ROOT%{_datadir}/denyhosts
68echo "127.0.0.1" > $RPM_BUILD_ROOT/var/lib/%{name}/allowed-hosts
cb64b9ac 69
cb64b9ac 70%clean
71rm -rf $RPM_BUILD_ROOT
72
75d37289 73%post
74/sbin/chkconfig --add %{name}
4cfdae93 75%service DenyHosts restart
75d37289 76
77%preun
78if [ "$1" = "0" ]; then
4cfdae93 79 %service DenyHosts stop
711ced82 80 /sbin/chkconfig --del %{name}
75d37289 81fi
82
cb64b9ac 83%files
84%defattr(644,root,root,755)
75d37289 85%doc README.txt CHANGELOG.txt
cb64b9ac 86%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
f7f90951 87%config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron.d/%{name}
cb64b9ac 88%attr(755,root,root) %{_bindir}/*
75d37289 89%attr(755,root,root) %{_sbindir}/*
caefdfa1 90%attr(754,root,root) /etc/rc.d/init.d/%{name}
75d37289 91%dir /var/lib/%{name}
132d470c 92%config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/allowed-hosts
0477d14c 93%{py_sitescriptdir}/DenyHosts-*.egg-info
75d37289 94%dir %{py_sitescriptdir}/%{name}
95%{py_sitescriptdir}/%{name}/*.py[co]
This page took 0.092568 seconds and 4 git commands to generate.