RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1061155 - Incorrect *.py[co] files placement
Summary: Incorrect *.py[co] files placement
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1062533 1062890
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-04 13:01 UTC by Branislav Náter
Modified: 2014-06-18 02:02 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.22.6-19.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 13:19:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Branislav Náter 2014-02-04 13:01:48 UTC
Description of problem:
We are doing checks regarding correct placement of *.py[co] files in rpm packages.

In your x86_64 package, we found *.py[co] files placed under /usr/lib/ directory. In 64bit package *.py[co] files are expected to be placed in /usr/lib64/ dir or package to be build as noarch package.

Could you please move files to /usr/lib64?
Or should this package be build as noarch?

Version-Release number of selected component (if applicable):
python-libguestfs-1.22.6-18.el7.x86_64.rpm

Actual results:
python-libguestfs-1.22.6-18.el7.x86_64.rpm]: /usr/lib/python2.7/site-packages/guestfs.py
python-libguestfs-1.22.6-18.el7.x86_64.rpm]: /usr/lib/python2.7/site-packages/guestfs.pyc
python-libguestfs-1.22.6-18.el7.x86_64.rpm]: /usr/lib/python2.7/site-packages/guestfs.pyo

Expected results:
Correct placement of files under /usr/lib64 or package built as noarch

Comment 1 Richard W.M. Jones 2014-02-04 13:54:00 UTC
So the problem turns out to be the RPM spec file which does:

# Move Python libraries to sitelib.
if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
   mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
   mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
     $RPM_BUILD_ROOT%{python_sitelib}/
fi

which is wrong since the Python package is not noarch.

I have removed this section from Rawhide now:

http://pkgs.fedoraproject.org/cgit/libguestfs.git/commit/?id=f36b756d0807ee958a6a60585fd520330033a56f

After the Rawhide fix:

$ rpm -qlp ./x86_64/python-libguestfs-1.25.32-2.fc21.x86_64.rpm 
/usr/lib64/python2.7/site-packages/guestfs.py
/usr/lib64/python2.7/site-packages/guestfs.pyc
/usr/lib64/python2.7/site-packages/guestfs.pyo
/usr/lib64/python2.7/site-packages/libguestfsmod.so
/usr/share/doc/python-libguestfs
/usr/share/doc/python-libguestfs/create_disk.py
/usr/share/doc/python-libguestfs/inspect_vm.py
/usr/share/man/man3/guestfs-python.3.gz

Comment 2 bfan 2014-02-06 02:37:48 UTC
Can reproduce with libguestfs-1.22.6-18.el7.x86_64

*.py file is in /usr/lib/python2.7/site-packages but not in /usr/lib64 now

Comment 4 bfan 2014-02-10 08:07:10 UTC
Verified with libguestfs-1.22.6-19.el7.x86_64

# rpm -qlp python-libguestfs-1.22.6-19.el7.x86_64.rpm
/usr/lib64/python2.7/site-packages/guestfs.py
/usr/lib64/python2.7/site-packages/guestfs.pyc
/usr/lib64/python2.7/site-packages/guestfs.pyo
/usr/lib64/python2.7/site-packages/libguestfsmod.so
/usr/share/doc/python-libguestfs-1.22.6
/usr/share/doc/python-libguestfs-1.22.6/create_disk.py
/usr/share/doc/python-libguestfs-1.22.6/inspect_vm.py
/usr/share/man/man3/guestfs-python.3.gz

Comment 5 Ludek Smid 2014-06-13 13:19:18 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.