flathub-infra / flatpak-builder-lint

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

Add exception for com.teamspeak.TeamSpeak #396

Closed Zlopez closed 4 months ago

Zlopez commented 4 months ago

This is to solve https://github.com/flathub/com.teamspeak.TeamSpeak/issues/57

bbhtt commented 4 months ago

I see ~/.config/TeamSpeak was merged in https://github.com/flathub/com.teamspeak.TeamSpeak/pull/58

Do you still need this?

Zlopez commented 4 months ago

I see ~/.config/TeamSpeak was merged in flathub/com.teamspeak.TeamSpeak#58

Do you still need this?

Yes, the flathub builder doesn't allow me to publish the changes if there is no exception.

bbhtt commented 4 months ago

Ok then the issue you linked needs to be updated. The PR is https://github.com/flathub/com.teamspeak.TeamSpeak/pull/60

I see you are trying to solve https://github.com/flathub/com.teamspeak.TeamSpeak/issues/59

where the suggestion was to use --persist

Why are you switching to --filesystem=xdg-config?

Zlopez commented 4 months ago

I was referencing to ~/.config/TeamSpeak originally, so I though that using xdg-config will be more clean. I'm still kind of confused by the permissions.

bbhtt commented 4 months ago

If --filesystem=~/.config/TeamSpeak worked all you need is --persist=.config/TeamSpeak. This does not require any exceptions.

xdg-config is for when you want ~/.config/TeamSpeak available under $XDG_CONFIG_HOME

Zlopez commented 4 months ago

Hm, in this case let me try the persist first before merging this.

Zlopez commented 4 months ago

It seems that changing to --persist=.config/TeamSpeak really makes the linter happy.

I'm closing this as it is no longer needed.

Zlopez commented 4 months ago

I was too fast, the --persist=.config/TeamSpeak doesn't change the application to use ~/.config as default. So I tested it with --filesystem=xdg-onfig/TeamSpeak and it worked as it should. That means that I really need the exception to be there.

hfiguiere commented 4 months ago

What is it that you are trying to do? --persist will make sure that whatever the app that do not follow the XDG spec write in that location WILL be written and persisted. This is the desired effect. This will keep it INSIDE the sandbox.

Zlopez commented 4 months ago

The issue is that when installing add-ons or themes for TeamSpeak the installation scripts are using .config/TeamSpeak/Default/extensions which is not visible in flatpak TeamSpeak.

bbhtt commented 4 months ago

when installing add-ons or themes for TeamSpeak

Are these installed outside of the Flatpak? Manually or is there some kind of setup?

If it is manual it should be installed to ~/.var/app/com.teamspeak.TeamSpeak/config instead.

Zlopez commented 4 months ago

when installing add-ons or themes for TeamSpeak

Are these installed outside of the Flatpak? Manually or is there some kind of setup?

If it is manual it should be installed to ~/.var/app/com.teamspeak.TeamSpeak/config instead.

I found few that had their own installer on the TeamSpeak forum (for example https://community.teamspeak.com/t/skin-colorful-teamspeak-a-teamspeak-5-extension/24082)

So they are installed outside of flatpak by their own means. It will be easier for users to just read them from default location than doing a specific way for flatpak only.

bbhtt commented 4 months ago

Ok thanks I can now understand it. It'd be better if the scripts supported an extra install location for Flatpak-ed TeamSpeak.

Did --filesystem=~/.config/TeamSpeak solve the issue of reading addons? If so you can use that.

bbhtt commented 4 months ago

Did --filesystem=~/.config/TeamSpeak solve the issue of reading addons? If so you can use that.

If it doesn't and you need ~/.config/TeamSpeak available under $XDG_CONFIG_HOME I'll merge this instead.

Zlopez commented 4 months ago

What is the difference between --filesystem=~/.config/TeamSpeak and --filesystem=xdg-config/TeamSpeak. I tested it with the later, which worked.

bbhtt commented 4 months ago

What is the difference between --filesystem=~/.config/TeamSpeak and --filesystem=xdg-config/TeamSpeak. I tested it with the later, which worked.

xdg-config/TeamSpeak will bind mount ~/.config/TeamSpeak to $HOME/.var/app/com.teamspeak.TeamSpeak/config and $XDG_CONFIG_HOME=~/.var/app/com.teamspeak.TeamSpeak/config inside the sandbox. If the application searches for the plugin path relative to $XDG_CONFIG_HOME then it needs that.

--filesystem=~/.config/TeamSpeak just gives a direct access. If the application is not XDG Dir aware and searches for the directory relative to $HOME, that one is enough.

Zlopez commented 4 months ago

I need to test it with the --filesystem=~/.config/TeamSpeak then, so I can see if that is enough.

Zlopez commented 4 months ago

It seems that the --filesystem=~/.config/TeamSpeak doesn't work.

bbhtt commented 4 months ago

Ok thanks. Hard to verify what it is doing since it is closed source, but I assume this will work.

The exception will be up in a few hours. You can check if it is up: https://docs.flathub.org/docs/for-app-authors/linter/#check-currently-published-exceptions

Zlopez commented 4 months ago

Thanks for help