Bug 200859

Summary: fixfiles -R doesn't like rpm %ghost files
Product: [Fedora] Fedora Reporter: Wart <wart>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-21 15:52:12 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:

Description Wart 2006-07-31 23:29:01 UTC
Description of problem:
When running 'fixfiles -R <packagename>' on a package with %ghost files,
fixfiles will generate a line of stderr for every %ghost'ed file:

/sbin/restorecon:  error while labeling files under /usr/share/rpmlint/rpmlint.pyo

Version-Release number of selected component (if applicable):
policycoreutils-1.30.17-5

How reproducible:
Always

Steps to Reproduce:
1. Install rpmlint:  yum install rpmlint
2. Run 'fixfiles -R rpmlint restore'
  
Actual results:
The files are relabeled but many lines of stderr are displayed that look like:
/sbin/restorecon:  error while labeling files under /usr/share/rpmlint/rpmlint.pyo
This happens once for each file marked as a %ghost in the rpm spec file.

Expected results:
The files are relabeled and no output is generated.

Additional info:

It is pretty common to use %ghost with *.pyc and *.pyo python files.  As a
result, running fixfiles -R on most python packages will generate these error
messages.

Comment 1 Wart 2006-07-31 23:31:53 UTC
I forgot to mention that I had to remove the extra '-p -q' arguments to
restorecon in fixfiles to get it to work on rawhide.  However, the bug is still
valid and has also been observed on FC5 (policycoreutils-1.30.10-2.fc5).

Comment 2 Daniel Walsh 2006-08-31 15:11:14 UTC
Fixed in policycoreutis-1.30.27-4

Comment 3 Wart 2006-09-04 04:32:01 UTC
I didn't get a chance to test 1.30.27-4, but the problem still exists in
policycoreutils-1.30.28-1 in FC-6.

Comment 4 Wart 2006-09-17 01:35:54 UTC
This is now working correctly (without warnings) in FC6-test3 with
policycoreutils-1.30.29-1