Pamac with systemd-nspawn

After a recent update to Python on unstable, the AUR helper I sometimes use - pikaur - was temporarily disabled. When I reported this somebody asked me why I didn’t use pamac for aur support. My answer to this was that I did use it when on Manjaro, but when I use Manjaro to update another arch based distro through systemd-nspawn, Pamac doesn’t work and I have to use pikaur which does.

This usage for pamac is such a niche case, that I have never bothered to report it before, but I decided to do so now. You might not think it worth the time and trouble to address the problem and to be quite honest I wouldn’t blame you especially as the workround is so easy - use pikaur (or something else possibly). The problem is this.

On Manjaro:

pamac update -a
Preparing…
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: manjaro
Password:

Supply the password and the job is done.

But on Manjaro terminal running through systemd-nspawn to Artix linux the result is:

pamac update -a

** (pamac:6): WARNING **: 12:30:05.522: transaction_interface_daemon.vala:47: failed to connect to dbus daemon: Could not connect: No such file or directory
Authorization not available. Check if polkit service is running or see debug message for more information.
Preparing…

** (pamac:6): CRITICAL **: 12:30:06.522: pamac_daemon_start_get_authorization: assertion ‘self != NULL’ failed

Obviously no authentication mechanism possible.

Same usage again but now using pikaur:

spawning container artix on /mnt/artix.
Press ^] three times within 1s to kill container.
[artix@artix ~]$ pikaur -Syu
[sudo] password for artix:

Password prompt now visible and command runs normally.

So that is the problem. Another problem is the missing man page for pamac, but I see that is under active discussion and somebody has actually written one.

Pamac uses polkit to ask for passwords. And as far as I know systemd-nspawn does not support polkit requests yet.

pikaur is not using polkit as far as I can see. It’s using pacman directly, where Pamac is using libalpm, just like pacman does.

Thanks for the explanation. I will stick with pikaur then for now.

Pamac can be run as root with sudo to avoid troubles with systemd-spawn but in this case it doesn’t support AUR.

1 Like

You are correct, but the lack of AUR support (packages cannot be built as root) means there is not much use doing so. Pikaur is the best answer at the moment unless things change in either systemd-nspawn or pamac.

Pamac 10 will be able to build from AUR as root

Interesting guinux, thanks for the heads up, I will give it a try when I get it.

This is the situation now with pamac 10 over systemd-nspawn - not quite there yet:

Bulding packages OK:

pamac build nordvpn-bin

** (pamac:20): WARNING **: 12:06:21.358: transaction_interface_daemon.vala:47: failed to connect to dbus daemon: Could not connect: No such file or directory
Authorization not available. Check if polkit service is running or see debug message for more information.
Preparing…
Cloning nordvpn-bin build files…
fatal: not a git repository (or any of the parent directories): .git
Checking nordvpn-bin dependencies…
Warning: nordvpn-bin-3.8.8-4 is up to date – reinstalling

But distro updates are still no go:

pamac update -a

** (pamac:99): WARNING **: 12:08:56.264: transaction_interface_daemon.vala:47: failed to connect to dbus daemon: Could not connect: No such file or directory
Authorization not available. Check if polkit service is running or see debug message for more information.
Preparing…

** (pamac:99): CRITICAL **: 12:08:57.302: pamac_daemon_start_get_authorization: assertion ‘self != NULL’ failed

sudo pamac update -a
Warning: Building packages as root is not allowed

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.