Bug 1085143 - X11:XOrg/xorg-x11-fonts requires some cleanup
X11:XOrg/xorg-x11-fonts requires some cleanup
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X.Org
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Stefan Dirsch
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2018-03-13 19:08 UTC by Stefan Brüns
Modified: 2018-04-18 13:20 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Brüns 2018-03-13 19:08:17 UTC
1. Remove handling for oS <= 12.2
(trivial, remove conditionals, remove %run_suseconfig_fonts)

2. use %ghost instead of %config
- rpmlint dislikes config files outside /var, /etc
- %config creates *.rpmsave files
- *.rpmsave is not removed when package is removed, as a result, also the dir is kept
- %config ships data inside the rpm which is altered/created with %posttrans anyway

3. track all files
fonts.{scale,dir}, encodings.dir, .fonts-config-timestamp are created as a result of %posttrans resp. fonts-config. Track these files so on package removal the files and the containing directory can be removed

3a. ignore mode for .fonts-config-timestamp
The file is only created when mkfontdir + mkfontscale are installed (optional). If the file does not exist, rpm -V reports a mismatching mode

In case a package is removed, fonts.dir etc. may also be removed for non-empty dirs (e.g. truetype), but these are automatically recreated by %posttrans. This is inverse to the current problem the files will be overwritten during package install and only corrected during %posttrans.
Comment 1 Stefan Dirsch 2018-03-14 09:58:29 UTC
Related submit request:

Comment 2 Stefan Dirsch 2018-03-14 11:06:55 UTC
Ok. Just had a try with your package. Appears to work, even if mkfontscale and mkfontdir are not installed. I would have expected a naked Xserver not being able to load the cursor font during startup, since it's not being referenced an empty /misc/fonts.dir, but it magically works. Xserver can even load without any font being installed. I'm not sure why/how this works, but it works. You can break it manually though.

  X -retro -fc cursor

works, whereas

  X -retro -fc cursor2

does not.

Anyway, I'm meanwhile convinced of your changes/cleanup. 

In a totally minimalistic system with only xorg-x11-fonts-core fonts package installed and recommends to mkfontdir/mkfontscale being ignored you may run into issues though with X clients/frameworks only using X core fonts. But I would say in such case you should better know what you're doing anyway. ;-)
Comment 3 Stefan Dirsch 2018-03-14 11:08:11 UTC
Could you please redo the submit request and refer to this bugreport? I'm goint to accept it then. Thanks a lot!
Comment 4 Stefan Dirsch 2018-03-16 10:26:28 UTC
Just accepted Stefan B.'s submit request. :-) Closing ...