--install (which implies --system) breaks under a regular user
Linux distribution and version
Fedora 34
Flatpak-builder version
flatpak-builder-1.0.12-3.fc34.x86_64
Flatpak version
flatpak-1.10.2-1.fc34.x86_64
Description of the problem
When I want to install the built flatpak under a regular user, the --install option doesn't work:
$ flatpak-builder builddir org.freefilesync.FreeFileSync.yml --force-clean --install
Emptying app dir 'builddir'
Downloading sources
Starting build of org.freefilesync.FreeFileSync
Cache hit for intltool, skipping build
Cache hit for gtk2, skipping build
Cache hit for ibus-gtk2, skipping build
Cache hit for gnome-themes-extra, skipping build
Cache hit for freefilesync, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Exporting org.freefilesync.FreeFileSync to repo
Commit: d00c573055ea87c5e86ad8fc91148ddc836cd2684b5b14de10ce8467becef6f5
Metadata Total: 309
Metadata Written: 1
Content Total: 513
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Exporting org.freefilesync.FreeFileSync.Locale to repo
Commit: 1633c6865903992c521da0dceabde5c2203e4e12b26c3df73708e2e405948eaf
Metadata Total: 845
Metadata Written: 1
Content Total: 207
Content Written: 0
Content Bytes Written: 0 (0 bytes)
error: Flatpak system operation ConfigureRemote not allowed for user
Install failed: Child process exited with code 1
However, --install --user works fine:
$ flatpak-builder builddir org.freefilesync.FreeFileSync.yml --force-clean --install --user
Emptying app dir 'builddir'
Downloading sources
Starting build of org.freefilesync.FreeFileSync
Cache hit for intltool, skipping build
Cache hit for gtk2, skipping build
Cache hit for ibus-gtk2, skipping build
Cache hit for gnome-themes-extra, skipping build
Cache hit for freefilesync, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Exporting org.freefilesync.FreeFileSync to repo
Commit: 10d60a724da5f63af2daca2964893d4883a96e8ace1c6a358003556745d5612b
Metadata Total: 309
Metadata Written: 1
Content Total: 513
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Exporting org.freefilesync.FreeFileSync.Locale to repo
Commit: 5c9c2e80cad30601b4b902a46e7a22db809164a8f8a0a4507a63f947a7695f7e
Metadata Total: 845
Metadata Written: 1
Content Total: 207
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Installing runtime/org.freefilesync.FreeFileSync.Locale/x86_64/master
Installing app/org.freefilesync.FreeFileSync/x86_64/master
Pruning cache
You might say this is expected, but it's not. I can install flatpaks using the flaptak command even into system-wide directories just fine. I just get a polkit auth dialog to confirm. With flatpak-builder --install, I don't receive that dialog. Internally, flatpak-builder seems to call the following command (which fails with the same error):
$ flatpak install --system -y --noninteractive --reinstall /home/kparal/devel/flatpak/org.freefilesync.FreeFileSync/.flatpak-builder/cache org.freefilesync.FreeFileSync/x86_64/master
error: Flatpak system operation ConfigureRemote not allowed for user
The problem is likely in the --noninteractive option. If I remove it, I receive Authentication is required to configure system repositories polkit dialog (which I didn't receive before).
Either flatpak-builder should allow regular users to use --install (--system) by allowing polkit dialogs, or flatpak-builder's manpage should document that --install (--system) can only be used under certain circumstances (building as root, it seems).
Steps to reproduce
Build some repo and try to install it using flatpak-builder, when running as a regular user: flatpak-builder builddir manifest.yml --install