Re: Next steps for a reproducible Fontconfig?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 30, 2019 at 5:02 AM Keith Packard <keithp@xxxxxxxxxx> wrote:
> Yes, that was the plan. Alexander suggested the following syntax:
>
>      <salt id="randomdata">/usr/share/fonts</salt>
>
> I think this will work, although it seems a bit fragile. In particular,
> if the host has salt for some directories, those will be defined
> relative to the host paths, not the flatpak paths.

Right. though this syntax looks primitive. it might manages to be done
if one writes everything for what they want. but if we can have easier
way - which can be done with minimal effort and inheritance for others
from host - that may be better.

> Do we need to process the 'salt' elements and 'remap-dir' elements in
> order and remap old salt elements as remap-dir elements get loaded? That
> also seems fragile to me.

Hm, to deal with more complicated cases, I guess we may need to have
one global salt to affect everything and a path-specific salt for
remapped path. for flatpak case, they want to have a global salt to
change a salt in sandbox (for /usr/share/fonts in sandbox etc) and set
salt from host in 'remap-dir' to build cache filenames on host (for
/run/host/fonts and so on).
This would avoid collision between one and origins. and assuming that
flatpaks can load config from host too, we could have:

10-salt.conf (from host):
<salt id="default"/>

50-flatpak.conf (sandbox specific):
<remap-dir as-path="/usr/share/fonts">/run/host/fonts</remap-dir>
<salt id="randomdata"/>
<dir>/usr/share/fonts</dir>

First salt element affects to 'remap-dir' and second one overrides it
for paths and change a salt in sandbox.
To make things easier, we may also want to export all of dir elements
from fonts.conf to the separate file. flatpak can replace it with
50-flatpak.conf in this case. or the file operation isn't desirable,
let's implement dir-reset element or something like that.

>
> Perhaps some command that the flatpak could run to generate host salt
> values so that it could remap them into new salt elements using the
> mapped paths?
>
> Alternatively, we could just assume that only flatpak will use the salt
> mechanism and leave this for a future enhancement?
>
> --
> -keith



-- 
Akira TAGOH
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux