Bug 669753

Summary: Subscription Manager has non-equal .pyc/.pyo files between 32bit and 64-bit multilib peers (embedded timestamps)
Product: Red Hat Enterprise Linux 6 Reporter: Bryan Kearney <bkearney>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: bkearney, borgan, dmalcolm, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:38:54 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: 639436    

Comment 2 James Bowes 2011-01-17 13:15:00 UTC
rpmdiff's complaint is that our byte compiled .pyc and .pyo files are not the same across multilib capable arches (x86 vs i386). iirc, this is because the byte compiled files contain a timestamp. I don't think it's a big deal, because our rpms don't contain any .so files, so nobody's going to try and use them multilib, but if they did, the python code would still run.

As I see it, our options are:
- waive the errors. this is the easiest right now, but we'll have to do it every  
  time rpmdiff runs.
- mark all our .pyc and .pyo files in the spec's %files section as %ghost. this  
  means the rpm takes ownership of them, but doesn't create them (it will remove 
  them, however). the .pyc and pyo files will be made by python on first 
  execution. The drawback of this is since they aren't shipped in the rpm, rpm 
  can't do any checksum verification of them during rpm -V
- make two srpms, one for noarch code, and one for arch specific code. I was 
  hoping to mangle our existing spec enough to include a noarch/arch combo of 
  generated rpms, but it's not possible while still maintaining the name 
  'subscription-manager' as our toplevel cli rpm.

I'm partial to 1 or 3 (or 1 now, and 3 later).

Comment 3 Jesus M. Rodriguez 2011-01-17 13:29:40 UTC
1 for now, 3 later is my thought.

Comment 4 Dave Malcolm 2011-01-18 16:56:24 UTC
Adding:
  touch -r %{SOURCE1} foo.py

to either the %build/%install will mark foo.py with the timestamp of SOURCE1, which is hopefully the same across all architectures, and should lead to the .pyc/.pyo being the same across all builds.

Comment 5 James Bowes 2011-01-18 17:21:43 UTC
(In reply to comment #4)
> Adding:
>   touch -r %{SOURCE1} foo.py
> 
> to either the %build/%install will mark foo.py with the timestamp of SOURCE1,
> which is hopefully the same across all architectures, and should lead to the
> .pyc/.pyo being the same across all builds.

Thanks, I'll give that a try!

Comment 6 James Bowes 2011-01-19 13:46:30 UTC
I switched the Makefile to use install -p rather than cp. That should keep the timestamps the same across arches. We'll see on the next rebuild.

Comment 15 errata-xmlrpc 2011-05-19 13:38:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html