]> git.pld-linux.org Git - packages/fail2ban.git/commitdiff
Up to 1.0.2; switch to python3 auto/th/fail2ban-1.0.2-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 1 Feb 2023 08:04:28 +0000 (09:04 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 1 Feb 2023 08:04:28 +0000 (09:04 +0100)
fail2ban.spec

index fd08247b362c989b7781851f913485d9d1cbcb01..7de053ddaff9c960acb9d0004367582a331fa324 100644 (file)
@@ -1,28 +1,27 @@
 Summary:       Ban IPs that make too many password failures
 Summary(pl.UTF-8):     Blokowanie IP powodujących zbyt dużo prób logowań z błędnym hasłem
 Name:          fail2ban
-Version:       0.11.2
+Version:       1.0.2
 Release:       1
 License:       GPL
 Group:         Daemons
 Source0:       https://github.com/fail2ban/fail2ban/archive/%{version}.tar.gz
-# Source0-md5: dbeaad971a1127320b949b0f29d7b1f9
+# Source0-md5: 96582af04e60bf56617da9f9cbda0aa7
 Source1:       %{name}.init
 Source2:       %{name}.logrotate
 Source3:       paths-pld.conf
 Source4:       %{name}.sysconfig
 Patch0:                logifiles.patch
 URL:           http://fail2ban.sourceforge.net/
-BuildRequires: python-devel
-BuildRequires: python-modules
+BuildRequires: python3-2to3
+BuildRequires: python3-devel
+BuildRequires: python3-modules
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.710
 Requires(post,preun):  /sbin/chkconfig
 Requires(post,preun,postun):   systemd-units >= 38
-Requires:      python-dns
-Requires:      python-log4py
-Requires:      python-modules-sqlite
-Requires:      python-pyinotify >= 0.8.3
+Requires:      python3-dns
+Requires:      python3-pyinotify >= 0.8.3
 Requires:      rc-scripts
 Requires:      systemd-units >= 38
 BuildArch:     noarch
@@ -46,7 +45,7 @@ z sshd czy plikami logów serwera WWW Apache.
 %patch0 -p1
 rm setup.cfg
 
-sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
+sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python3}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python3}\1,' \
       bin/fail2ban-client \
       bin/fail2ban-regex \
       bin/fail2ban-server \
@@ -58,8 +57,11 @@ sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
       fail2ban/tests/files/config/apache-auth/digest.py \
       fail2ban/tests/files/ignorecommand.py
 
+sed -i -e 's#2to3#2to3-%{py3_ver}#g' fail2ban-2to3
+./fail2ban-2to3
+
 %build
-%py_build
+%py3_build
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -67,8 +69,8 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
        $RPM_BUILD_ROOT{%{_mandir}/man1,/var/{log,run/fail2ban}} \
        $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
 
-%py_install \
-       --install-lib=%{py_sitescriptdir} \
+%py3_install \
+       --install-lib=%{py3_sitescriptdir} \
        --root=$RPM_BUILD_ROOT
 
 install -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -79,7 +81,7 @@ install -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/fail2ban/paths-pld.conf
 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 sed -e 's# /run# /var/run#g' files/fail2ban-tmpfiles.conf > $RPM_BUILD_ROOT%{systemdtmpfilesdir}/fail2ban.conf
-install -p build-2/fail2ban.service $RPM_BUILD_ROOT%{systemdunitdir}/fail2ban.service
+install -p build-3/fail2ban.service $RPM_BUILD_ROOT%{systemdunitdir}/fail2ban.service
 
 :> $RPM_BUILD_ROOT/var/log/fail2ban.log
 
@@ -121,7 +123,6 @@ fi
 %dir /var/run/fail2ban
 %dir %{_sysconfdir}/fail2ban
 %dir %{_sysconfdir}/fail2ban/action.d
-%attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/badips.py
 %attr(755,root,root) %{_sysconfdir}/fail2ban/action.d/smtp.py
 %dir %{_sysconfdir}/fail2ban/fail2ban.d
 %dir %{_sysconfdir}/fail2ban/filter.d
@@ -132,8 +133,8 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fail2ban/*/*.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/fail2ban
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
-%{py_sitescriptdir}/%{name}
-%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
+%{py3_sitescriptdir}/%{name}
+%{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info
 %{_mandir}/man1/fail2ban-client.1*
 %{_mandir}/man1/fail2ban-python.1*
 %{_mandir}/man1/fail2ban-regex.1*
This page took 0.159491 seconds and 4 git commands to generate.