View Issue Details

IDProjectCategoryView StatusLast Update
0017555CentOS-7pythonpublic2020-07-01 06:10
Reporterdaniel_letai 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.8-2003 
Target VersionFixed in Version 
Summary0017555: Building python3 rpm from source as flatpackage fails
DescriptionUsing source rpm python3-3.6.8-13.el7.src.rpm, trying to build it as flatpackage fails on missing file 2to3

Error:
+ mv /usr/src/redhat/BUILDROOT/python3-3.6.8-13.el7.x86_64/usr/bin/2to3 /usr/src/redhat/BUILDROOT/python3-3.6.8-13.el7.x86_64/usr/bin/2to3-3
mv: cannot stat '/usr/src/redhat/BUILDROOT/python3-3.6.8-13.el7.x86_64/usr/bin/2to3': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.pdtnTm (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.pdtnTm (%install)


I expect this happens due to line 1081 in the spec file:
%if %{with flatpackage}
# Remove stuff that would conflict with python3 package
rm %{buildroot}%{_bindir}/python3
rm %{buildroot}%{_bindir}/pydoc3
rm %{buildroot}%{_bindir}/pathfix.py
rm %{buildroot}%{_bindir}/idle3
rm %{buildroot}%{_bindir}/python3-*
rm %{buildroot}%{_bindir}/pyvenv
rm %{buildroot}%{_bindir}/2to3*
rm %{buildroot}%{_libdir}/libpython3.so
rm %{buildroot}%{_mandir}/man1/python3.1*
rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
%endif

# RHEL7: rename 2to3 to 2to3-3 to avoid conflicting with python-devel
mv %{buildroot}%{_bindir}/2to3 %{buildroot}%{_bindir}/2to3-3
Steps To Reproduce1. rpm -i python3-3.6.8-13.el7.src.rpm
2. rpmbuild -ba ~/rpmbuild/SPECS/python3.spec --with flatpackage
Additional InformationI think easiest solution would be to do:

%if %{with flatpackage}
# Remove stuff that would conflict with python3 package
rm %{buildroot}%{_bindir}/python3
rm %{buildroot}%{_bindir}/pydoc3
rm %{buildroot}%{_bindir}/pathfix.py
rm %{buildroot}%{_bindir}/idle3
rm %{buildroot}%{_bindir}/python3-*
rm %{buildroot}%{_bindir}/pyvenv
rm %{buildroot}%{_bindir}/2to3*
rm %{buildroot}%{_libdir}/libpython3.so
rm %{buildroot}%{_mandir}/man1/python3.1*
rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
-%endif
+%else

# RHEL7: rename 2to3 to 2to3-3 to avoid conflicting with python-devel
mv %{buildroot}%{_bindir}/2to3 %{buildroot}%{_bindir}/2to3-3
+%endif
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-07-01 06:10 daniel_letai New Issue