clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Font cache files created under `/usr/share/fonts/` #517

Open hnanni opened 5 years ago

hnanni commented 5 years ago

Describe the bug .uuid files under /usr/share/fonts/ are constantly being regenerated, potentially causing problems to stateless segregation

To Reproduce issue swupd verify --fix --picky twice. It will report removal of the files the two times it is executed

Expected behavior files under /usr/share/fonts/ should not change between swupdates

Screenshots screenshot from 2019-03-08 11-20-59

ahkok commented 5 years ago

@mrkz @thiagomacieira didn't we already fix this?

thiagomacieira commented 5 years ago

I don't remember anything about fonts. My work was on mime types.

My guess: swupd did remove those files/dirs, but a subsequent post-update trigger recreated them.

hnanni commented 5 years ago

Yes @thiagomacieira . This is the case, update-triggers triggers the re-creation

cat /usr/lib/systemd/system/fontconfig-trigger.service
[Unit]
Description=Update font cache
BindsTo=update-triggers.target

[Service]
Type=oneshot
ExecStart=/usr/bin/fc-cache
UPDATE-TRIGGERS.TARGET(4)                                                                                                                                        
NAME
       update-triggers.target - Provides post OS software-update actions

SYNOPSIS
       update-triggers.target
       /usr/lib/systemd/system/update-triggers.target
thiagomacieira commented 5 years ago

What needs these files?

ahkok commented 5 years ago

I thnk, reading the code, that fc-cache just uses them to determine whether the cache is still valid or not (I'm looking into this).

ahkok commented 5 years ago

Relevant thread:

https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/130

It looks like code is progressing to obsolete .uuid files really well, and a PR is pending for merge upstream. Because of the complexity, I think we should stand by and let the fontconfig team review and merge this.

https://gitlab.freedesktop.org/tagoh/fontconfig/commit/2d81470b513b247767e3bb56f2a29d94ce7a16ca

tpleavitt commented 5 years ago

per @ahkok , wait for upstream commit

rossburton commented 4 years ago

Good news is that the commit mentioned in https://github.com/clearlinux/distribution/issues/517#issuecomment-472088356 is now upstream:

https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/c4324f54ee16e648ba91f3e9c66af13ab3b1754c

Bad news is that it's only in the 2.13.91 and 2.13.92 release candidates so far. 2.14 is taking a long time to ship...