From c9eb02ae41dd8a61efb997d7fb1dcefeb967bdb6 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 19 Aug 2026 12:23:41 +0300 Subject: [PATCH] Add python3 as BR --- SPECS/rsync.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec index dee388c..c917613 100644 --- a/SPECS/rsync.spec +++ b/SPECS/rsync.spec @@ -32,6 +32,13 @@ BuildRequires: lz4-devel BuildRequires: openssl-devel BuildRequires: libzstd-devel BuildRequires: xxhash-devel +# The test suite is a Python program since 3.5.0 and needs Python >= 3.7. +# On EL8 /usr/bin/python3 is 3.6, so pull in a versioned interpreter there. +%if 0%{?rhel} == 8 +BuildRequires: python3.11 +%else +BuildRequires: python3 +%endif #Added virtual provide for zlib due to https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries Provides: bundled(zlib) = 1.2.8 #rsync code is distributed under GPLv3+ license. There are files under popt/ directory @@ -67,6 +74,12 @@ package provides the anonymous rsync service. %autosetup -p1 %endif +%if 0%{?rhel} == 8 +# runtests.py runs every test through sys.executable, so its shebang decides +# the interpreter for the whole suite. On EL8 /usr/bin/python3 is 3.6. +sed -i '1s|.*|#!%{_bindir}/python3.11|' runtests.py +%endif + %build %configure \ --enable-openssl \