flathub-infra / flatpak-builder-lint

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

Add xdg-config exception of dev.k8slens.OpenLens #278

Closed proletarius101 closed 8 months ago

proletarius101 commented 8 months ago

Related to https://github.com/flathub/dev.k8slens.OpenLens/issues/146

bbhtt commented 8 months ago

Does it actually need xdg-config or can ~/.config/gcloud work? https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html#f5 I can't find where the path is defined, presumably some closed source google's component that the app is bundling?

proletarius101 commented 8 months ago

Does it actually need xdg-config or can ~/.config/gcloud work? https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html#f5 I can't find where the path is defined, presumably some closed source google's component that the app is bundling?

I'm actually requesting for xdg-config/gcloud and I thought it was a more resilient way to write ~/.config/gcloud?

proletarius101 commented 8 months ago

Does it actually need xdg-config or can ~/.config/gcloud work? https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html#f5 I can't find where the path is defined, presumably some closed source google's component that the app is bundling?

I'm actually requesting for xdg-config/gcloud and I thought it was a more resilient way to write ~/.config/gcloud?

It is needed to read the configuration file created by gcloud cli in the host system.

bbhtt commented 8 months ago

I'm actually requesting for xdg-config/gcloud and I thought it was a more resilient way to write ~/.config/gcloud?

xdg-config will mount the directory to the XDG_CONFIG_HOME directory inside flatpak. If the program doesn't search relative to XDG_CONFIG_HOME but hardcodes $HOME for example, you don't need that and ~/.config/gcloud is enough.

bbhtt commented 8 months ago

It's definitely not following the XDG path:

flatpak run --command=gcloud dev.k8slens.OpenLens info|grep "Active Configuration Path"

Active Configuration Path: [/home/bbhtt/.config/gcloud/configurations/config_default]

flatpak run --command=gcloud dev.k8slens.OpenLens info --format='value(config.paths.global_config_dir)'
/home/bbhtt/.config/gcloud

Updates are available for some Google Cloud CLI components.  To install them,
please run:
  $ gcloud components update

You need --filestsystem=~/.config/gcloud:create otherwise it doesn't seem to initiate the directory on host's config's folder. Then run gcloud config configurations create testconfig inside the sandbox to create a sample config and check ~/.config/gcloud

You can also override it with an env var https://cloud.google.com/sdk/docs/configurations

bbhtt commented 8 months ago

I assume this won't be needed anymore. But feel free to reopen or ping me, if it is needed.