Bug 1334447

Summary: leftovers after the un-install
Product: Red Hat Software Collections Reporter: Branislav Náter <bnater>
Component: python-pipAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED ERRATA QA Contact: Branislav Náter <bnater>
Severity: medium Docs Contact:
Priority: unspecified    
Version: python27CC: cstratak, kanderso, pviktori
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python27-python-pip-7.1.0-2.el6 python27-python-pip-7.1.0-2.el7 Doc Type: Bug Fix
Doc Text:
Cause: %license macro while defined on rpm level, they are not owned from the collection as scl-utils-build does not define permissions for the directories created. Consequence: a directory is created under /opt/rh/<collection_name>/root/usr/share/licenses/<package_name>/ where the files tagged with %license are being placed, which directory is not owned by the collection. As a result when uninstalling the collection or a specific package of it, the directory and the license files are not removed. Fix: Replace the %license tag with the %doc tag until directory permissions are defined in scl-utils-build Result: License files and directories are owned by the collection.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 10:26:15 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 Branislav Náter 2016-05-09 15:59:48 UTC
Description of problem:
When trying to uninstall whole python27 collection, there seem to be leftovers.
Caught by /CoreOS/scl-utils/Sanity/general-ownership test
Related to new pytho27-python-pip package. But reproduced only on RHEL-7!

Version-Release number of selected component (if applicable):
python27-python-pip-7.1.0-1.el7

Steps to Reproduce:
1. try to remove whole collection

Actual results:
:: [   FAIL   ] :: No files left after the yum remove 
:: [ 00:49:53 ] :: /opt/rh/python27/root/usr/share/licenses

Expected results:
No files present.

Additional info:
Directory /opt/rh/python27/root/usr/share/licenses is not removed. Content of directory:

# ll /opt/rh/python27/root/usr/share/licenses
drwxr-xr-x. 2 root root 4096 May  6 08:52 python27-python-pip-7.1.0

Comment 2 Charalampos Stratakis 2016-05-10 09:23:05 UTC
The issue here (and the similar one that was opened for rh-python35-python-pymongo) is that rpm-4.11.3 introduced the %license tag for RHEL 7, however scl-utils-build package was not modified in regards to the addition of %license and %_licensedir macros.

As a result the macros are being expanded but the directories are not owned by the collection. This should be fixed in scl-utils-build but for the moment the workaround for that would be to use the %doc tag for the license files.

Comment 7 errata-xmlrpc 2016-05-31 10:26:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:1166