Can't build Certbot snap

I have trouble compiling the existing Certbot plugins with snap/snapcraft. I seem to run into a pending upstream-issue with the core24 snapcraft image. But maybe folks working on this here have some form of workaround?

$ snapcraft --use-lxd
Launching managed ubuntu 24.04 instance
...
failed to setup systemd-resolved.
* Command that failed: 'lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl restart systemd-resolved'
* Command exit code: 1
* Command standard error output: b'Job for systemd-resolved.service failed because the control process exited with error code.\nSee "systemctl status systemd-resolved.service" and "journalctl -xeu systemd-resolved.service" for details.\n'

This error message leads to `build-base: devel` fails due to `systemd-resolved` issue in Ubuntu 24.10 · Issue #4921 · canonical/snapcraft · GitHub, which in turn leads to a "Won't fix" at Canonical (aparently this base-image isn't supposed to have networking).

Turns out the root-cause seems to be a different one than the one in canonical/snapcraft. After figuring out how to read the log inside the container, I find:

Jan 21 20:13:37 ubuntu (resolved)[104]: systemd-resolved.service: Failed to set up mount namespacing: /tmp: Permission denied
Jan 21 20:13:37 ubuntu systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE

Didn't find a solution to this yet, though.

1 Like

Aaaaaand scratch that, it seems specific to my Debian buster. Using LXC on another machine works just fine. le sigh