Accepting request 762228 from home:dimstar:Factory
- Switch to use python3 (upstream supported): + BuildRequire python3-tools instead of python-devel (for the 2to3 tool). + Drop the python-gamin dependency. + Replace all python-FOO deps for their python3-FOO counterpart. - removal of SuSEfirewall2-fail2ban for factory versions since SuSEfirewall2 - fail2ban-0.10.4-upstream-pid-file-location.patch changed fail2ban unit file OBS-URL: https://build.opensuse.org/request/show/762228 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=98
This commit is contained in:
parent
2ecebbda26
commit
d7376219ea
@ -3,7 +3,7 @@ diff -ur fail2ban-0.10.4-orig/config/filter.d/ignorecommands/apache-fakegooglebo
|
|||||||
+++ fail2ban-0.10.4/config/filter.d/ignorecommands/apache-fakegooglebot 2019-08-12 10:46:05.067842214 +0200
|
+++ fail2ban-0.10.4/config/filter.d/ignorecommands/apache-fakegooglebot 2019-08-12 10:46:05.067842214 +0200
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/bin/env fail2ban-python
|
-#!/usr/bin/env fail2ban-python
|
||||||
+#!/usr/bin/python
|
+#!/usr/bin/fail2ban-python
|
||||||
# Inspired by https://isc.sans.edu/forums/diary/When+Google+isnt+Google/15968/
|
# Inspired by https://isc.sans.edu/forums/diary/When+Google+isnt+Google/15968/
|
||||||
#
|
#
|
||||||
# Written in Python to reuse built-in Python batteries and not depend on
|
# Written in Python to reuse built-in Python batteries and not depend on
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 9 14:06:14 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Switch to use python3 (upstream supported):
|
||||||
|
+ BuildRequire python3-tools instead of python-devel (for the
|
||||||
|
2to3 tool).
|
||||||
|
+ Drop the python-gamin dependency.
|
||||||
|
+ Replace all python-FOO deps for their python3-FOO counterpart.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 12 09:10:37 UTC 2019 - Johannes Weberhofer <jweberhofer@weberhofer.at>
|
Mon Aug 12 09:10:37 UTC 2019 - Johannes Weberhofer <jweberhofer@weberhofer.at>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package fail2ban
|
# spec file for package fail2ban
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -53,23 +53,23 @@ Patch202: %{name}-0.10.4-upstream-pid-file-location.patch
|
|||||||
Patch300: fail2ban-opensuse-service-sfw.patch
|
Patch300: fail2ban-opensuse-service-sfw.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: logrotate
|
BuildRequires: logrotate
|
||||||
BuildRequires: python-devel
|
BuildRequires: python3-tools
|
||||||
# timezone package is required to run the tests
|
# timezone package is required to run the tests
|
||||||
BuildRequires: timezone
|
BuildRequires: timezone
|
||||||
Requires: cron
|
Requires: cron
|
||||||
Requires: ed
|
Requires: ed
|
||||||
Requires: iptables
|
Requires: iptables
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires: python >= 2.6
|
Requires: python3 >= 3.2
|
||||||
Requires: whois
|
Requires: whois
|
||||||
%if 0%{?suse_version} != 1110
|
%if 0%{?suse_version} != 1110
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1230
|
%if 0%{?suse_version} >= 1230
|
||||||
# systemd
|
# systemd
|
||||||
BuildRequires: python-systemd
|
BuildRequires: python3-systemd
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
Requires: python-systemd
|
Requires: python3-systemd
|
||||||
Requires: systemd > 204
|
Requires: systemd > 204
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%else
|
%else
|
||||||
@ -78,11 +78,8 @@ Requires: lsof
|
|||||||
Requires: syslog
|
Requires: syslog
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
||||||
BuildRequires: python-pyinotify >= 0.8.3
|
BuildRequires: python3-pyinotify >= 0.8.3
|
||||||
Requires: python-pyinotify >= 0.8.3
|
Requires: python3-pyinotify >= 0.8.3
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1220
|
|
||||||
Requires: python-gamin >= 0.0.21
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -129,9 +126,6 @@ install -m644 %{SOURCE8} config/paths-opensuse.conf
|
|||||||
# Use openSUSE paths
|
# Use openSUSE paths
|
||||||
sed -i -e 's/^before = paths-.*/before = paths-opensuse.conf/' config/jail.conf
|
sed -i -e 's/^before = paths-.*/before = paths-opensuse.conf/' config/jail.conf
|
||||||
|
|
||||||
# Remove shebang
|
|
||||||
sed -i -e '/^#!\/usr\/bin\/python$/d' fail2ban/client/fail2banregex.py
|
|
||||||
|
|
||||||
%patch100
|
%patch100
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%if 0%{?suse_version} < 1310
|
%if 0%{?suse_version} < 1310
|
||||||
@ -159,11 +153,12 @@ sed -i -e 's|^\([^_]*_backend = systemd\)|#\1|' config/paths-opensuse.conf
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
python setup.py build
|
./fail2ban-2to3
|
||||||
|
python3 setup.py build
|
||||||
gzip man/*.{1,5}
|
gzip man/*.{1,5}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install \
|
python3 setup.py install \
|
||||||
--root=%{buildroot} \
|
--root=%{buildroot} \
|
||||||
--prefix=%{_prefix}
|
--prefix=%{_prefix}
|
||||||
|
|
||||||
@ -224,7 +219,7 @@ install -D -m 755 files/nagios/check_fail2ban %{buildroot}%{nagios_plugindir}/ch
|
|||||||
rm -r %{buildroot}%{_docdir}/%{name}
|
rm -r %{buildroot}%{_docdir}/%{name}
|
||||||
|
|
||||||
# remove duplicates
|
# remove duplicates
|
||||||
%fdupes -s %{buildroot}%{python_sitelib}
|
%fdupes -s %{buildroot}%{python3_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
#stat /dev/log
|
#stat /dev/log
|
||||||
@ -315,9 +310,9 @@ export LANG=en_US.UTF-8
|
|||||||
%{_bindir}/%{name}-client
|
%{_bindir}/%{name}-client
|
||||||
%{_bindir}/%{name}-python
|
%{_bindir}/%{name}-python
|
||||||
%{_bindir}/%{name}-regex
|
%{_bindir}/%{name}-regex
|
||||||
%{python_sitelib}/%{name}
|
%{python3_sitelib}/%{name}
|
||||||
%exclude %{python_sitelib}/%{name}/tests
|
%exclude %{python3_sitelib}/%{name}/tests
|
||||||
%{python_sitelib}/%{name}-*
|
%{python3_sitelib}/%{name}-*
|
||||||
%{_fillupdir}/sysconfig.%{name}
|
%{_fillupdir}/sysconfig.%{name}
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
@ -326,7 +321,7 @@ export LANG=en_US.UTF-8
|
|||||||
|
|
||||||
# do not include tests as they are executed during the build process
|
# do not include tests as they are executed during the build process
|
||||||
%exclude %{_bindir}/%{name}-testcases
|
%exclude %{_bindir}/%{name}-testcases
|
||||||
%exclude %{python_sitelib}/%{name}/tests
|
%exclude %{python3_sitelib}/%{name}/tests
|
||||||
|
|
||||||
%if !0%{?suse_version} > 1500
|
%if !0%{?suse_version} > 1500
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
|
Loading…
Reference in New Issue
Block a user