Spec file cleanup.

i9ce
Richard Shaw 4 years ago
parent b65dff671c
commit 48c7cf6380

@ -29,15 +29,20 @@ Patch5: https://patch-diff.githubusercontent.com/raw/fail2ban/fail2ban/pull/2605
# https://bugzilla.redhat.com/show_bug.cgi?id=1808347 # https://bugzilla.redhat.com/show_bug.cgi?id=1808347
Patch6: https://patch-diff.githubusercontent.com/raw/fail2ban/fail2ban/pull/2651.patch Patch6: https://patch-diff.githubusercontent.com/raw/fail2ban/fail2ban/pull/2651.patch
Patch7: https://github.com/fail2ban/fail2ban/commit/343ec1cdd296530f331637c725bd2bb0549e01e6.patch Patch7: https://github.com/fail2ban/fail2ban/commit/343ec1cdd296530f331637c725bd2bb0549e01e6.patch
# In Fedora 32 and EL 8 nftables is the default firewall and does not accept ":" for port ranges.
# https://bugzilla.redhat.com/show_bug.cgi?id=1850164
Patch8: https://github.com/fail2ban/fail2ban/commit/309c8dddd7adc2de140ed5a72088cd4f2dcc9b91.patch
BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: /usr/bin/2to3 BuildRequires: /usr/bin/2to3
# For testcases # For testcases
BuildRequires: python3-inotify BuildRequires: python3-inotify
BuildRequires: sqlite BuildRequires: sqlite
BuildArch: noarch
BuildRequires: systemd BuildRequires: systemd
BuildRequires: selinux-policy-devel BuildRequires: selinux-policy-devel
# Default components # Default components
Requires: %{name}-firewalld = %{version}-%{release} Requires: %{name}-firewalld = %{version}-%{release}
Requires: %{name}-sendmail = %{version}-%{release} Requires: %{name}-sendmail = %{version}-%{release}
@ -45,6 +50,7 @@ Requires: %{name}-server = %{version}-%{release}
# Currently this breaks jails that don't log to the journal # Currently this breaks jails that don't log to the journal
#Requires: %{name}-systemd = %{version}-%{release} #Requires: %{name}-systemd = %{version}-%{release}
%description %description
Fail2Ban scans log files and bans IP addresses that makes too many password Fail2Ban scans log files and bans IP addresses that makes too many password
failures. It updates firewall rules to reject the IP address. These rules can failures. It updates firewall rules to reject the IP address. These rules can
@ -79,6 +85,7 @@ Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
Requires: ipset Requires: ipset
Requires: iptables Requires: iptables
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
%description server %description server
@ -185,11 +192,6 @@ find -type f -exec sed -i -e '1s,^#!/usr/bin/python *,#!/usr/bin/python%{python3
# SELinux sources # SELinux sources
cp -p %SOURCE1 %SOURCE2 %SOURCE3 . cp -p %SOURCE1 %SOURCE2 %SOURCE3 .
# In Fedora 32 and EL 8 nftables is the default firewall and does not accept ":" for port ranges.
# https://bugzilla.redhat.com/show_bug.cgi?id=1850164
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8
sed -i "s/port = 0:65535/port = 0-65535/" config/jail.conf
%endif
%build %build

Loading…
Cancel
Save