14 |
|
|
15 |
# Please submit bugfixes or comments via http://bugs.opensuse.org/ |
# Please submit bugfixes or comments via http://bugs.opensuse.org/ |
16 |
# |
# |
17 |
|
%define release 11 |
18 |
|
%define _unitdir /usr/lib/systemd/system/ |
19 |
%if 0%{?suse_version} < 1120 |
%global with_systemd 1 |
|
%define python_sitelib %{py_sitedir} |
|
|
%endif |
|
|
|
|
|
%if 0%{?suse_version} >= 1210 |
|
|
%bcond_without systemd |
|
|
%else |
|
|
%bcond_with systemd |
|
|
%endif |
|
|
|
|
20 |
|
|
21 |
Name: denyhosts |
Name: denyhosts |
22 |
Version: 3.1 |
Version: 3.1 |
23 |
Release: lp152.1.1 |
Release: %{release}%{?dist} |
24 |
Summary: Utility to help system administrators thwart brute-force ssh hackers |
Summary: Utility to help system administrators thwart brute-force ssh hackers |
25 |
License: GPL-2.0-only |
License: GPL-2.0-only |
26 |
Group: Productivity/Networking/Security |
Group: Productivity/Networking/Security |
37 |
Requires: logrotate |
Requires: logrotate |
38 |
Requires: python |
Requires: python |
39 |
Requires: rsyslog |
Requires: rsyslog |
40 |
%if %{with systemd} |
BuildRequires: python-rpm-macros |
41 |
BuildRequires: systemd-rpm-macros |
#BuildRequires: systemd-rpm-macros |
42 |
|
BuildRequires: systemd |
43 |
%{?systemd_requires} |
%{?systemd_requires} |
|
%else |
|
|
PreReq: %insserv_prereq |
|
|
%endif |
|
|
%py_requires |
|
|
%if 0%{?suse_version} > 1110 |
|
44 |
BuildArch: noarch |
BuildArch: noarch |
|
%endif |
|
45 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
46 |
|
|
47 |
|
|
84 |
sed -i "s|/usr/bin/env python|%{_bindir}/python|g" %{buildroot}%{_sbindir}/daemon-control-dist |
sed -i "s|/usr/bin/env python|%{_bindir}/python|g" %{buildroot}%{_sbindir}/daemon-control-dist |
85 |
|
|
86 |
# init script / systemd service |
# init script / systemd service |
87 |
%if %{with systemd} |
%if %{with_systemd} |
88 |
install -D -m644 denyhosts.service %{buildroot}%{_unitdir}/denyhosts.service |
install -D -m644 denyhosts.service %{buildroot}%{_unitdir}/denyhosts.service |
89 |
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcdenyhosts |
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcdenyhosts |
90 |
%else |
%else |
119 |
install -m0644 *.md %{buildroot}%{_defaultdocdir}/%{name}/ |
install -m0644 *.md %{buildroot}%{_defaultdocdir}/%{name}/ |
120 |
install -m0644 *.conf %{buildroot}%{_defaultdocdir}/%{name}/ |
install -m0644 *.conf %{buildroot}%{_defaultdocdir}/%{name}/ |
121 |
|
|
122 |
%if %{with systemd} |
%if %{with_systemd} |
123 |
%pre |
%pre |
124 |
%service_add_pre %{name}.service |
%service_add_pre %{name}.service |
125 |
%endif |
%endif |
126 |
|
|
127 |
%post |
%post |
128 |
%if %{with systemd} |
%if %{with_systemd} |
129 |
%service_add_post %{name}.service |
%service_add_post %{name}.service |
130 |
%else |
%else |
131 |
%{fillup_and_insserv -f denyhosts} |
%{fillup_and_insserv -f denyhosts} |
132 |
%endif |
%endif |
133 |
|
|
134 |
%preun |
%preun |
135 |
%if %{with systemd} |
%if %{with_systemd} |
136 |
%service_del_preun %{name}.service |
%service_del_preun %{name}.service |
137 |
%else |
%else |
138 |
%stop_on_removal denyhosts |
%stop_on_removal denyhosts |
139 |
%endif |
%endif |
140 |
|
|
141 |
%postun |
%postun |
142 |
%if %{with systemd} |
%if %{with_systemd} |
143 |
%service_del_postun %{name}.service |
%service_del_postun %{name}.service |
144 |
%else |
%else |
145 |
%insserv_cleanup |
%insserv_cleanup |
163 |
%ghost %config(noreplace) %{_sysconfdir}/blacklist |
%ghost %config(noreplace) %{_sysconfdir}/blacklist |
164 |
%config(noreplace) %{_sysconfdir}/logrotate.d/denyhosts |
%config(noreplace) %{_sysconfdir}/logrotate.d/denyhosts |
165 |
%config(noreplace) %{_sysconfdir}/denyhosts.conf |
%config(noreplace) %{_sysconfdir}/denyhosts.conf |
166 |
%if %{with systemd} |
%if %{with_systemd} |
167 |
%{_unitdir}/denyhosts.service |
%{_unitdir}/denyhosts.service |
168 |
%else |
%else |
169 |
%attr(755,root,root) %{_sysconfdir}/init.d/denyhosts |
%attr(755,root,root) %{_sysconfdir}/init.d/denyhosts |
170 |
%endif |
%endif |
171 |
|
|
172 |
%changelog |
%changelog |
173 |
|
* Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 3.1-11.sme |
174 |
|
- First release for SME10 [SME: 11459] |
175 |
|
imported from opensuse, reworked spec file to build it on CentOS 7 / SME 10 |
176 |
|
|
177 |
* Sat Aug 11 2018 javier@opensuse.org |
* Sat Aug 11 2018 javier@opensuse.org |
178 |
- Update to 3.1 |
- Update to 3.1 |
179 |
+ Fixes a bug when moving between Python 2 and Python 3 |
+ Fixes a bug when moving between Python 2 and Python 3 |