Bug 1590235

Summary: error: Bad exit status from /var/tmp/rpm-tmp.mH56aS (%install)
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python3Assignee: Charalampos Stratakis <cstratak>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: bkabrda, cstratak, dmalcolm, mcyprian, mhroncok, pviktori, python-maint, rkuska, shcherbina.iryna, tomspur, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-13 17:35: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 Miro Hrončok 2018-06-12 09:36:03 UTC
During a build of python37, this is is in the middle of the logs:

...
0:09:50 load avg: 0.79 [109/415] test_difflib
0:09:53 load avg: 0.79 [110/415] test_dis
0:09:56 load avg: 0.81 [111/415] test_distutils
find: ‘debug’: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
/usr/lib/rpm/brp-python-bytecompile: line 26: /usr/bin/python3.7: No such file or directory
cat: write error: Broken pipe
error: Bad exit status from /var/tmp/rpm-tmp.mH56aS (%install)
    Bad exit status from /var/tmp/rpm-tmp.mH56aS (%install)
find: ‘debug’: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
/usr/lib/rpm/brp-python-bytecompile: line 26: /usr/bin/python3.7: No such file or directory
cat: write error: Broken pipe
error: Bad exit status from /var/tmp/rpm-tmp.xkTqrO (%install)
    Bad exit status from /var/tmp/rpm-tmp.xkTqrO (%install)
0:10:00 load avg: 0.83 [112/415] test_docxmlrpc -- test_distutils failed
0:10:01 load avg: 0.83 [113/415] test_dtrace
0:10:01 load avg: 0.83 [114/415] test_dummy_thread
...

Yet the automatic bytecompilation is disabled:

# Disable automatic bytecompilation. The python3 binary is not yet be
# available in /usr/bin when Python is built. Also, the bytecompilation fails
# on files that test invalid syntax.
%undefine py_auto_byte_compile


And this happens before other brp scripts do:

...
/usr/lib/rpm/sepdebugcrcfix: Updated 73 CRC32s, 0 CRC32s did match.
cpio: build/optimized/Python/pydtrace.o.dtrace-temp.c: Cannot stat: No such file or directory
32570 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.PNYfDo


This always happens between test_distutils and test_docxmlrpc where test_distutils failed.

Also only with optimizations.

We skip -x test_distutils in %check, but when optimizing, we don't. This does not (yet) distrupt the build, but maybe it's masking something dangerous (such as calling rpm from within rpm?)

Comment 1 Miro Hrončok 2018-06-13 17:35:02 UTC
This is now a python3 bug.

Also, it's notabug I guess because once /usr/bin/python3.7 is in the buildroot, it works like this:

...
0:10:22 load avg: 0.94 [111/415] test_distutils
find: ‘debug’: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
find: ‘debug’: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
rectory
0:10:27 load avg: 0.95 [112/415] test_docxmlrpc
...

Comment 2 Miro Hrončok 2018-06-14 10:35:04 UTC
So this tests runs rpm/rpmbuild during rpmbuild. I was told told that that this is... well bad. If it ever hits us, we can just find:

    @unittest.skipIf(find_executable('rpm') is None,
                     'the rpm command is not found')
    @unittest.skipIf(find_executable('rpmbuild') is None,
                     'the rpmbuild command is not found')

And add a skip if RPM_BUILD_ROOT is defined. Probably upstream. However let's keep this closed as it "works" now.