Bug 71676 - %post-scriptlet fails on ro-mounted /usr/share
%post-scriptlet fails on ro-mounted /usr/share
Product: Red Hat Raw Hide
Classification: Retired
Component: fontconfig (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Owen Taylor
: 73321 (view as bug list)
Depends On: 51193
  Show dependency treegraph
Reported: 2002-08-16 12:20 EDT by Enrico Scholz
Modified: 2007-03-26 23:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-10 17:54:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2002-08-16 12:20:02 EDT
Description of Problem:

When having /usr shared between some hosts, the installation of fontconfig
fails in the %post scriptlet which results in multiple installed fontconfig

| $ rpm -U fontconfig-
| Fehler: execution of %post scriptlet from fontconfig-
failed, exit status 41
| $ rpm -q fontconfig
| fontconfig-
| fontconfig-

See bug #51193 also.

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


Steps to Reproduce:
1. setup system so that /usr is NFS-mounted (ro)
2. add /usr to rpm's %_netsharepath
3. try to install fontconfig
Comment 1 Owen Taylor 2002-10-31 19:38:58 EST
Wow, this would be really hard to fix, since you'd have make
fc-cache have a command line argument "ignore failures in these directories"
or something, which would be a bit crazy.

Probably easier to just move the cache files to /var/.

Comment 2 Owen Taylor 2002-10-31 19:39:40 EST
(There is some idea upstream of moving the cache files)
Comment 3 Owen Taylor 2002-10-31 20:33:02 EST
*** Bug 73321 has been marked as a duplicate of this bug. ***
Comment 4 Enrico Scholz 2003-01-16 09:38:31 EST
Still in fontconfig-2.1-2
Comment 5 Owen Taylor 2003-01-16 11:55:39 EST
I've filed an upstream bug: 


Just putting the cache files in /var seems like the right thing
to do to me.

Comment 6 Enrico Scholz 2003-01-16 12:15:25 EST
To prevent misunderstandings:

In the upstream report you are saying: "... if /usr is readonly, fontconfig
could create cache files in a different location". Although it would be wise to
use /var/cache for these cache-files, my initial report describes a packaging error.

/usr/.../fonts are shared between several hosts; exactly one host can write
there, the other ones have read-only access. When the host with the write-rights
installs the fontconfig package, it updates the cache-files and the other
clients can use them. These clients do not need to call 'fc-cache' or should
ignore failures.

I do not know which errors are detected by 'fc-cache' (the return values seems
to be the count of directories where it failed), but changing the %post scriptlet to

| %post
| ...
| HOME=/root fc-cache -f 2>/dev/null || true

seems to be sufficient. (Especially, because the corresponding error-messages
are thrown away and the user does not know why 'rpm' failed).
Comment 7 Owen Taylor 2003-06-10 16:50:53 EDT
fontconfig-2.2.1 in fact fixes - it won't try to write to directories
where it doesn't have write access. I should have a package in 
Rawhide later today.

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