KaOSx / apps

KDE SC and applications
https://kaosx.us/packages/packages.php?sortby=name&sordir=asc&repo=apps
27 stars 20 forks source link

flatpak installation gives warning: User flatpak does not exist in password file entry #211

Open Chevek opened 2 years ago

Chevek commented 2 years ago

Submission type

Package name & version you are having issues with or have a request for

flatpak Package version : 1.12.6-1

Used repositories

Default

Expected behaviour

Install any flatpak without being root and without warning.

Actual behaviour

Give warning on any installation. e.g. : KaOS flatpak bzflag

On any installation, there is this warning : Failed to get revokefs-fuse socket from system-helper: User flatpak does not exist in password file entry

Still, the flatpak works : $ flatpak run org.bzflag.BZFlag

Steps to reproduce the problem

Install flatpak, add flathub repository and try to install any flatpak you want : $ sudo pacman -S flatpak $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo $ flatpak install bzflag

System info link created by Octopi > Tools > SysInfo

Chevek commented 2 years ago

This seems to fix the issue: $ sudo useradd -c "Flatpak Daemon Owner" -d /usr/bin/flatpak -s /bin/false flatpak

demmm commented 2 years ago

Packaging issue, or should be added to: https://kaosx.us/docs/flatpak/ ?

Chevek commented 2 years ago

Seems to me a packaging issue.

demmm commented 2 years ago

There are two camps on this, one is adding a system user & group flatpak, other is to stop using flatpak as system, but move to as --user instead. Check that by "flatpak remotes" and see if the option says "system". To fix it delete the flathub remote "flatpak remote-delete flathub" and add it with the --user flag "flatpak remote-add --user --if-not-exists flathub

I'm inclined to use the latter as the best option and stop users from using flatpak as system. That would mean adjusting the doc & the message on install: https://github.com/KaOSx/apps/blob/master/flatpak/flatpak.install#L10

Chevek commented 2 years ago

The latter may confuse the user because it contradicts the default flatpak behaviour, which is "unless overridden with the --user or --installation options, this command changes the default system-wide installation." cf. https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-remote-add Thus the vast majority of documentation you'll find will assume this behaviour, starting with flathub.org.

Chevek commented 2 years ago

I confirm, adding --user to "flatpak remote-add" remove the warning as well.