Bug 71676

Summary: %post-scriptlet fails on ro-mounted /usr/share
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: fontconfigAssignee: Owen Taylor <otaylor>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-10 21:54:11 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:
Bug Depends On: 51193    
Bug Blocks:    

Description Enrico Scholz 2002-08-16 16:20:02 UTC
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
packages:

| $ rpm -U fontconfig-0.0.1.020811.1151-4.i386.rpm
| Fehler: execution of %post scriptlet from fontconfig-0.0.1.020811.1151-4
failed, exit status 41
| $ rpm -q fontconfig
| fontconfig-0.0.1.020626.1517-6
| fontconfig-0.0.1.020811.1151-4

See bug #51193 also.


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

fontconfig-0.0.1.020811.1151-4


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-11-01 00:38:58 UTC
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-11-01 00:39:40 UTC
(There is some idea upstream of moving the cache files)

Comment 3 Owen Taylor 2002-11-01 01:33:02 UTC
*** Bug 73321 has been marked as a duplicate of this bug. ***

Comment 4 Enrico Scholz 2003-01-16 14:38:31 UTC
Still in fontconfig-2.1-2


Comment 5 Owen Taylor 2003-01-16 16:55:39 UTC
I've filed an upstream bug: 

 http://fontconfig.org/cgi-bin/bugzilla/show_bug.cgi?id=9

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




Comment 6 Enrico Scholz 2003-01-16 17:15:25 UTC
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 20:50:53 UTC
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.