Bug 143841 - [fixfiles] Should apply to installed files only
[fixfiles] Should apply to installed files only
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-29 15:14 EST by Enrico Scholz
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.19.2-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-04 19:30:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2004-12-29 15:14:33 EST
Description of problem:

'fixfiles -R ...' should visit only installed files. Currently, it
handles all files shipped by an rpm.

Reasons, why files are not installed, can be:

* a set '%_install_langs' macro
* a set '%_netsharedpath'
* manual '--exclude*' options


E.g. on a machine where '/usr' is in %_netsharedpath

| # fixfiles -R coreutils relabel
| restorecon get context on /usr/bin/[ failed: 'Operation not supported'
| ...
| restorecon get context on /usr/share/man/man1/yes.1.gz failed: 'Operation not supported'


or when only some languages are installed:

| # fixfiles -R coreutils relabel
| lstat(/usr/share/locale/af/LC_MESSAGES/coreutils.mo) failed: No such file or directory
| ...
| lstat(/usr/share/locale/zh_TW/LC_TIME/coreutils.mo) failed: No such file or directory



Such files can be identified with the '-qs' switch

| # rpm -qs coreutils
| normal        /sbin/runuser
| net shared    /usr/bin/[
| ...
| net shared    /usr/share/man/man1/yes.1.gz

resp.

| normal        /usr/share/info/coreutils.info.gz
| not installed /usr/share/locale/af/LC_MESSAGES/coreutils.mo
| ...
| not installed /usr/share/locale/zh_TW/LC_TIME/coreutils.mo
| normal        /usr/share/man/man1/basename.1.gz



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

policycoreutils-1.19.1-1


How reproducible:

100%


Steps to Reproduce:
1. echo '%_install_langs C' >>/etc/rpm/macros
2. install/upgrade an rpm package with %lang(...) specifiers
3. run 'fixfiles -R ...' on this package


Actual results:

lots of bogus warnings and errors
Comment 1 Enrico Scholz 2004-12-29 15:50:26 EST
A selector for all "good" files would be

| rpm -q --qf '[%{FILESTATES} %{FILENAMES}\n]' "$package" | grep '^0 ' | cut -f2- -d ' '
Comment 2 Daniel Walsh 2005-01-03 13:54:30 EST
Added to policycoreutils-1.19.2-2

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