flathub-infra / flatpak-builder-lint

A linter for flatpak-builder manifests
MIT License
50 stars 127 forks source link

Add xdg-cache exception to org.gnome.Contacts #337

Closed A6GibKm closed 6 months ago

A6GibKm commented 6 months ago

Fixes https://github.com/flathub/org.gnome.Contacts/pull/84.

cc @nielsdg

bbhtt commented 6 months ago

Something is likely wrong with xdg-data/pixmaps permission, contacts searcher for pixmaps under Environment.get_system_data_dirs() which gives it /app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share inside the sandbox, not sure why it is asking xdg-data/pixmaps since that is user_data_dir and not in the search path.

I see that permission in the manifest from the very first commit of contacts on Flathub, so something likely changed.

Otherwise, LGTM, eds runs on host and uses that as storage path, contacts uses the same thing.

bbhtt commented 6 months ago

oh woops the fixes thing closed the PR

A6GibKm commented 6 months ago

Something is likely wrong with xdg-data/pixmaps permission, contacts searcher for pixmaps under Environment.get_system_data_dirs() which gives it /app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share inside the sandbox, not sure why it is asking xdg-data/pixmaps since that is user_data_dir and not in the search path.

I see that permission in the manifest from the very first commit of contacts on Flathub, so something likely changed.

Otherwise, LGTM, eds runs on host and uses that as storage path, contacts uses the same thing.

A question for @nielsdg, but there was a good reason for it. Thanks!

nielsdg commented 6 months ago

Ehh, this is from a long time ago really :sweat_smile:

I can think of 2 possible reasons:

One was that it was a very liberal implementation of the icon theme spec a bit (see https://specifications.freedesktop.org/icon-theme-spec/latest/ar01s03.html), allowing several of the listed directories to be combined:

By default, apps should look in $HOME/.icons (for backwards compatibility), in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order)

The other possibility was that we just followed from wherever those avatars got installed. These days, I think it's coming from g-c-c, but in earlier times, IIRC we used to get it from somewhere else (although I don't recall the details of that anymore).