Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 505658

Summary: [Stratus 5.6 bug] rpmbuild fails reporting unpackaged .pyo and .pyc files
Product: Red Hat Enterprise Linux 5 Reporter: Rich Johnson <richard.johnson>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: andriusb, cward, ffesti, jparadis, robert.evans
Target Milestone: alphaKeywords: OtherQA
Target Release: 5.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-30 17:24:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 557597    

Description Rich Johnson 2009-06-12 19:21:51 UTC
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}

Comment 1 Rich Johnson 2009-06-12 19:31:31 UTC
Probably not relevant, but the symptom arose creating a sub-package for an x86_64 package.

Comment 2 Andrius Benokraitis 2009-06-23 04:32:49 UTC
Proposing for RHEL 5.5, unless there is an extenuating business case for this to be proposed for RHEL 5.4 by Stratus.

Comment 3 Nate Straz 2009-09-30 20:25:03 UTC
Related to bug 236535

Comment 4 Chris Ward 2009-10-13 15:05:11 UTC
@Stratus,

We would like to confirm that there is commitment to test 
for the resolution of this request during the RHEL 5.5 test
phase, if it is accepted into the release. 

Please post a confirmation before Oct 16th, 2009, 
including the contact information for testing engineers.

Comment 5 Rich Johnson 2009-10-14 11:45:55 UTC
I am signed up to test from the Stratus side.

Comment 6 RHEL Program Management 2009-11-06 19:13:01 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 7 Andrius Benokraitis 2009-11-10 17:55:22 UTC
Deferring to RHEL 5.6 with OK from Stratus.

Comment 9 Andrius Benokraitis 2010-07-30 15:06:24 UTC
Rich @ Stratus: I'm getting word that this probably won't ever get fixed in RHEL 5. What's your take on this?

Comment 10 Rich Johnson 2010-07-30 16:56:43 UTC
(In reply to comment #9)
> Rich @ Stratus: I'm getting word that this probably won't ever get fixed in
> RHEL 5. What's your take on this?    

Not getting a fix in RHEL 5 is fine.  We have a workaround.