|
@@ -1,11 +1,11 @@
|
|
|
%bcond_with systemd
|
|
|
%bcond_with tests
|
|
|
|
|
|
-%global py2to3 /usr/bin/2to3-3.8
|
|
|
+%global py2to3 /usr/bin/2to3-3.11
|
|
|
|
|
|
Summary: Ban IPs that make too many password failures
|
|
|
Name: fail2ban
|
|
|
-Version: 0.11.2
|
|
|
+Version: 1.0.2
|
|
|
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
Group: system
|
|
|
Vendor: Project Vine
|
|
@@ -16,11 +16,12 @@ URL: https://github.com/fail2ban/fail2ban
|
|
|
Source0: https://github.com/fail2ban/fail2ban/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
Source1: fail2ban-logrotate
|
|
|
|
|
|
-# Fixes century selector for tests
|
|
|
-# https://bugzilla.redhat.com/show_bug.cgi?id=1912472
|
|
|
-Patch1: https://github.com/fail2ban/fail2ban/commit/f259dac74721c00f0184bf45277137771fc747fe.patch
|
|
|
-
|
|
|
-Patch1000: CVE-2021-32749.patch
|
|
|
+# Give up being PartOf iptables and ipset for now
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1379141
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1573185
|
|
|
+Patch0: fail2ban-partof.patch
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=2034205
|
|
|
+Patch1: fail2ban-python311.patch
|
|
|
|
|
|
BuildArch: noarch
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
@@ -31,6 +32,7 @@ Requires: iptables, ipset
|
|
|
#Requires: tcp_wrappers
|
|
|
Requires: python3-inotify
|
|
|
%if %{with systemd}
|
|
|
+Requires: python3-systemd
|
|
|
%{?systemd_requires}
|
|
|
%else
|
|
|
Requires: initscripts
|
|
@@ -47,19 +49,33 @@ failures. It updates firewall rules to reject the IP address.
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
-%autosetup -p1
|
|
|
+%autopatch -p1 -m 1
|
|
|
|
|
|
%{py2to3} --write --nobackups .
|
|
|
find -type f -exec sed -i -e '1s,^#!/usr/bin/python *,#!/usr/bin/python%{python3_version},' {} +
|
|
|
|
|
|
+# 2to3 has been removed from setuptools and we already use the binary in
|
|
|
+# %%prep.
|
|
|
+sed -i "/use_2to3/d" setup.py
|
|
|
+
|
|
|
+sed -i -e 's|@BINDIR@|%{_bindir}|' \
|
|
|
+ files/fail2ban.service.in
|
|
|
+
|
|
|
|
|
|
%build
|
|
|
-%{py3_build}
|
|
|
+%pip3_build_wheel
|
|
|
|
|
|
|
|
|
%install
|
|
|
rm -rf %{buildroot}
|
|
|
-%{py3_install}
|
|
|
+%pip3_install_wheel
|
|
|
+
|
|
|
+ln -fs python3 %{buildroot}%{_bindir}/fail2ban-python
|
|
|
+
|
|
|
+mv %{buildroot}%{python3_sitelib}%{_sysconfdir} %{buildroot}%{_sysconfdir}
|
|
|
+rm -rf %{buildroot}%{python3_sitelib}%{_prefix}
|
|
|
+
|
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}/jail.d
|
|
|
|
|
|
%if %{with systemd}
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
@@ -143,6 +159,7 @@ fi
|
|
|
%{_bindir}/fail2ban-testcases
|
|
|
#%{_datadir}/fail2ban
|
|
|
%{python3_sitelib}/fail2ban*
|
|
|
+%exclude %{python3_sitelib}/fail2ban/tests
|
|
|
%{_mandir}/man1/*.1*
|
|
|
%{_mandir}/man5/*.5*
|
|
|
%dir %{_sysconfdir}/fail2ban
|
|
@@ -169,6 +186,15 @@ fi
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Nov 10 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.2-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
+* Tue Nov 08 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.1-2
|
|
|
+- fixed unit file for systemd.
|
|
|
+
|
|
|
+* Fri Oct 28 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.1-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Wed Jul 28 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.11.2-1
|
|
|
- new upstream release.
|
|
|
- imported Patch1000 from upstream to fix CVE-2021-32749.
|