flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

flatpak-builder --install leads to "error: Flatpak system operation ConfigureRemote not allowed for user"

Open mwleeds opened this issue 5 years ago • 14 comments

Linux distribution and version

Endless OS 3.6.0 and Fedora Silverblue 31

Flatpak-builder version

1.0.6 and 1.0.7

Flatpak version

1.4.0

Description of the problem

Using the --install option with flatpak-builder leads to an error (unless --user is used) instead of actually installing the flatpak.

Steps to reproduce

  1. git clone https://github.com/flathub/org.kde.kwordquiz
  2. cd org.kde.kwordquiz
  3. flatpak-builder --force-clean --install --install-deps-from=flathub _build org.kde.kwordquiz.json At the end of the output is:
error: Flatpak system operation ConfigureRemote not allowed for user
Install failed: Child process exited with code 1

mwleeds avatar Jun 11 '19 19:06 mwleeds

Looks like the ConfigureRemote operation being attempted is to add a kwordquiz-origin remote.

mwleeds avatar Jun 11 '19 21:06 mwleeds

We're passing -y --noninteractive to the flatpak install command in builder-main.c. If I remove those I get an authentication prompt and then the install fails when there's no input to this prompt: Proceed with these changes to the Default system installation? [Y/n]: n

So I guess there are three options: we either

  1. document that --install doesn't work with system installations that require authentication, or
  2. change the rules in the system helper so that you don't need to authenticate to add an origin remote (which could pose a security risk), or
  3. if flatpak-builder can be interactive, allow the authentication prompt through while still passing -y to flatpak install (which would require changes to how -y is interpreted).

mwleeds avatar Jun 11 '19 21:06 mwleeds

Random thought, option 1 could be a bit inconsistent since of course it works if you're in the wheel group.

refi64 avatar Jun 12 '19 03:06 refi64

Random thought, option 1 could be a bit inconsistent since of course it works if you're in the wheel group.

No, by default even sudoers can't add a remote without authenticating. They can only install from existing remotes.

mwleeds avatar Jun 12 '19 17:06 mwleeds

Hmm that's odd, I'm quite sure I've run flatpak-builder --install several times without needing to auth, unless it's changed since then or it's a Fedora-ism?

refi64 avatar Jun 13 '19 03:06 refi64

Did you mean --install?

mwleeds avatar Jun 13 '19 18:06 mwleeds

Sorry, yeah.

refi64 avatar Jun 14 '19 00:06 refi64

There have been relatively recent changes to how Flatpak handles non-interactive installs, so it might be that you're not on 1.4.x

mwleeds avatar Jun 14 '19 01:06 mwleeds

@mwleeds I just hit the same issue. Did you found any workaround for installing flatpak system-wide?

Erick555 avatar Feb 08 '20 16:02 Erick555

I ended up with creating bundle and installing it with flatpak install.

Erick555 avatar Feb 08 '20 17:02 Erick555

I've added --user argument and it worked.

I'm running:

$ flatpak --version
Flatpak 1.6.2
$ flatpak-builder --version
flatpak-builder 1.0.9

gnumoksha avatar Apr 06 '20 22:04 gnumoksha

@gnumoksha yes, --user works but this issue is about system installations.

Erick555 avatar Apr 07 '20 10:04 Erick555

I ended up with creating bundle and installing it with flatpak install.

How did you do that?

Newbytee avatar Jul 21 '21 13:07 Newbytee

You need to use flatpak build-bundle command. See manpage for available options.

Erick555 avatar Jul 27 '21 17:07 Erick555