Bug 1715039

Summary: Set proper build flags for libvirt-python due to changes in distutils
Product: Red Hat Enterprise Linux 8 Reporter: Charalampos Stratakis <cstratak>
Component: libvirt-pythonAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: lcheng
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: ehadley, jdenemar, lmen, tzheng, yalzhang
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-python-6.0.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:53:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charalampos Stratakis 2019-05-29 12:45:45 UTC
https://fedoraproject.org/wiki/Changes/Python_Extension_Flags will be backported to RHEL 8.1.0 and libvirt-python will be affected during a rebuild as noted here [0]. The fix from Fedora needs to be backported [1].

[0] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/UMTLCOFU27SVIVEML7LLAU3WL362AF5Y/
[1] https://src.fedoraproject.org/rpms/libvirt-python/c/6fdd2fc47121433d527672415a744d5d989ef3a6?branch=master

Comment 2 Pavel Hrdina 2020-03-09 12:29:51 UTC
Fixed in upstream v5.2.0-1-gda3391a so moving to post.

Comment 6 lcheng 2020-08-21 08:39:44 UTC
Verified on libvirt-python-6.6.0-1.module+el8.3.0+7572+bcbf6b90.src.rpm. In libvirt-python.spec, the new %py{2,3}_{build,install} are used when building python modules.


libvirt-python.spec:
...
%build
%if ! %{supported_platform}
echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
exit 1
%endif

%if 0%{?fedora} || 0%{?rhel} >= 8
%py3_build
%else
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%endif

%install
%if 0%{?fedora} || 0%{?rhel} >= 8
%py3_install
%else
%{__python3} setup.py install --skip-build --root=%{buildroot}
%endif
...

Move to VERIFIED.

Comment 11 errata-xmlrpc 2020-11-04 02:53:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4676