@@ -16,54 +16,24 @@ Source0: https://github.com/oVirt/%{name}/releases/download/v%{version}/%{name
1616%global admin_confdir %{_sysconfdir}/%{name}
1717%global vendor_confdir %{_prefix}/lib/%{name}
1818
19- # We need to have Python 3.11 support of imageio client for oVirt Ansible
20- # Collection running with ansible-core-2.14, which uses non-standard Python 3.11
21- # on EL8 platform
22-
23- %if "%{?rhel}" == "9" || "%{?rhel}" == "8"
24- %global with_python311 1
25- %global python3_name python3.11
26- %undefine __brp_mangle_shebangs
27- %else
28- %global with_python311 0
29- %endif
30-
3119%description
3220Transfer disk images on oVirt system.
3321
3422%prep
3523%setup -q
3624
37- %build
3825
26+ %build
3927%define python3_pkgversion 3
4028%define __python3 /usr/bin/python3
4129%py3_build
4230
43- %if %{with_python311}
44- %define python3_pkgversion 3.11
45- %define __python3 /usr/bin/python3.11
46- %py3_build "--executable=%{quote:/usr/bin/python3 -s}"
47- %endif
48-
49- %define python3_pkgversion 3
50- %define __python3 /usr/bin/python3
5131
5232%install
53-
5433%define python3_pkgversion 3
5534%define __python3 /usr/bin/python3
5635%py3_install
5736
58- %if %{with_python311}
59- %define python3_pkgversion 3.11
60- %define __python3 /usr/bin/python3.11
61- %py3_install
62- %endif
63-
64- %define python3_pkgversion 3
65- %define __python3 /usr/bin/python3
66-
6737install -D -m 0755 --directory %{buildroot}%{logdir}
6838# Create a dummy log file to make rpm happy during build
6939touch %{buildroot}%{logdir}/daemon.log
@@ -185,59 +155,6 @@ if systemctl is-active ovirt-imageio-daemon.service >/dev/null; then
185155 systemctl stop ovirt-imageio-daemon.service
186156fi
187157
188- %if %{with_python311}
189-
190- %package -n %{python3_name}-%{name}-common
191- Summary: oVirt imageio common resources
192-
193- BuildRequires: gcc
194- BuildRequires: %{python3_name}-devel
195- BuildRequires: %{python3_name}-setuptools
196-
197- Requires: %{python3_name}
198-
199- %description -n %{python3_name}-%{name}-common
200- Common resources used by oVirt imageio server and client
201-
202-
203- %if %{with_python311}
204- %define python3_pkgversion 3.11
205- %define __python3 /usr/bin/python3.11
206- %files -n %{python3_name}-%{name}-common
207- %license LICENSES/GPL-2.0-or-later.txt
208- %{python3_sitearch}/%{srcname}
209- %{python3_sitearch}/%{srcname}-*.egg-info
210- %exclude %{python3_sitearch}/%{srcname}/client
211- %exclude %{python3_sitearch}/%{srcname}/admin
212- %endif
213-
214-
215- %package -n %{python3_name}-%{name}-client
216- Summary: oVirt imageio client library
217-
218- Requires: %{python3_name}-%{name}-common = %{version}-%{release}
219-
220- %if 0%{?rhel}
221- # RHEL 8.4 version. Some features require qemu-nbd 5.2.0 and are disabled when
222- # using older qemu-nbd.
223- Requires: qemu-img >= 15:4.2.0
224- Requires: %{python3_name}-ovirt-engine-sdk4
225- %else
226- # Fedora.
227- Requires: qemu-img
228- %endif
229-
230- %description -n %{python3_name}-%{name}-client
231- Python client library for accessing imageio server on oVirt hosts.
232-
233- %if %{with_python311}
234- %define python3_pkgversion 3.11
235- %define __python3 /usr/bin/python3.11
236- %files -n %{python3_name}-%{name}-client
237- %{python3_sitearch}/%{srcname}/client
238- %endif
239-
240- %endif
241158
242159%changelog
243160
0 commit comments