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