diff --git a/fail2ban.spec b/fail2ban.spec index 6ca2a95..6ca56b5 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -8,13 +8,10 @@ %if %{defined rhel} && 0%{?rhel} < 10 %define legacy_var_run 1 %endif -%if %{defined fedora} && 0%{?fedora} < 40 -%define legacy_var_run 1 -%endif Name: fail2ban Version: 1.1.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Daemon to ban hosts that cause multiple authentication errors License: GPL-2.0-or-later @@ -53,7 +50,7 @@ Patch4: https://patch-diff.githubusercontent.com/raw/fail2ban/fail2ban/pull/3728 # Upstream fix to also catch sshd-session logs # https://bugzilla.redhat.com/show_bug.cgi?id=2332945 Patch5: https://github.com/fail2ban/fail2ban/commit/54c0effceb998b73545073ac59c479d9d9bf19a4.patch -# Needed for Dovecot change to loging format in 2.4 but has not fail2ban version 1.1.0 +# Needed for Dovecot change to loging format in 2.4, fixed in f2b version 1.1.1. # https://bugzilla.redhat.com/show_bug.cgi?id=2426440 Patch6: https://github.com/fail2ban/fail2ban/commit/04ff4c060cdc233af9a6deeb85a6523da0416f31.patch @@ -64,13 +61,25 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools # For testcases BuildRequires: python3-inotify +# using a python3_version-based conditional does not work here, so +# this is a proxy for "Python version greater than 3.12". asyncore +# and asynchat were dropped from cpython core in 3.12, these modules +# make them available again. See: +# https://github.com/fail2ban/fail2ban/issues/3487 +# https://bugzilla.redhat.com/show_bug.cgi?id=2219991 +%if 0%{?fedora} || 0%{?rhel} >= 10 BuildRequires: python3-pyasyncore BuildRequires: python3-pyasynchat +%endif BuildRequires: sqlite BuildRequires: systemd BuildRequires: selinux-policy-devel BuildRequires: make +%if 0%{?fedora} || 0%{?rhel} >= 11 BuildRequires: bash-completion-devel +%else +BuildRequires: bash-completion +%endif BuildRequires: gnupg2 # Default components @@ -114,8 +123,10 @@ Requires(preun): systemd Requires(postun): systemd Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) # see note above in BuildRequires section +%if 0%{?fedora} || 0%{?rhel} >= 10 Requires: python3-pyasyncore Requires: python3-pyasynchat +%endif %description server This package contains the core server components for Fail2Ban with minimal @@ -224,9 +235,6 @@ by default. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 -# this test uses smtpd which is removed in Python 3.12, rewriting it -# isn't trivial -rm -f fail2ban/tests/action_d/test_smtp.py # Use Fedora paths sed -i -e 's/^before = paths-.*/before = paths-fedora.conf/' config/jail.conf @@ -420,9 +428,12 @@ fi %changelog -* Wed Dec 31 2025 Richard Shaw - 1.1.0-14 +* Wed Dec 31 2025 Richard Shaw - 1.1.0-15 - Add patch for Dovecot 2.4 jail. Fixes BZ#2426440. +* Sat Oct 11 2025 Orion Poplawski - 1.1.0-14 +- Cleanup old conditionals + * Fri Oct 10 2025 Orion Poplawski - 1.1.0-13 - Fix paths in fail2ban.service (rhbz#2399981)