RPM

Comment 1 for bug 651452

Revision history for this message
In , Rich (rich-redhat-bugs) wrote :

Description of problem:
Occasional failure packaging python files.
I suspect brp-python-bytecompile. This also may be related to bug 468179

The symptom is not 100% reproducible.

Version-Release number of selected component (if applicable):
-bash-3.2$ rpmbuild --version
RPM version 4.4.2.3

How reproducible:
Create an architecture specific rpm delivering at least one python file.
rpmbuild. In this case it is the file /usr/lib/yum-plugins/ft-reboot-tracking.py.

Steps to Reproduce:
1.
2.
3.

Actual results:

buildrpm reports:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /auto/svn/rjohnson/linux/trunk/ftl_linux/build/BUILDROOT/lsb-ft-cstools-7.0.3-104
error: Installed (but unpackaged) file(s) found:
   /usr/lib/yum-plugins/ft-reboot-tracking.pyc
   /usr/lib/yum-plugins/ft-reboot-tracking.pyo

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/lib/yum-plugins/ft-reboot-tracking.pyc
   /usr/lib/yum-plugins/ft-reboot-tracking.pyo

Expected results:

Since the offending files were created during %__os_install_post processing
The expected behavior is that any files created by rpmbuild's macros are either:
a) added to the %files set for management by rpm
b) ignored during packaging

Any notice of the additional files should be informational only. It should not raise an error.

Additional info:
The lack of 100% repeatability is pernicious because if one adds the .pyc and .pyo files a subsequent rpmbuild may fail to create them and then fail complaining that that specified files are missing.

One avoidance is to recast the __os_install_post macro; skipping brp_python_bytecompile

%define __os_install_post /usr/lib/rpm/redhat/brp-compress
    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}}
    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip}
    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump}
    /usr/lib/rpm/redhat/brp-java-repack-jars
%{nil}