Ubuntu focal Template not building

Hello,

I tried building an Ubuntu focal template using the Qubes builder. But it seems like not all needed packages are installed during make template.

Articles I’ve read:

My steps:

  1. Created a new standalone Qube based on a Fedora 32 template. (40GB, 4cores, 16GB RAM)
  2. Installed dependencies: sudo dnf install git createrepo rpm-build rpm-sign make python3-sh rpmdevtools rpm-sign dialog perl-open python3-pyyaml perl-Digest-MD5 perl-Digest-SHA
  3. Imported and verified Qubes Master Signing Key and Qubes Developers Keys.
  4. Cloned and verified qubes-builder repo.
  5. Ran setup: Qubes 4.0, stable, clone faster, current pre-built packages, build templates only, selected focal template, builder plugins (builder-rpm, builder-debian and mgmt-salt).
  6. Ran make install-deps, make get-sources and make qubes-vm all ok.

Then I ran make template which errors out with:

-> Building template focal (logfile: build-logs/template-focal.log)...
make: *** [Makefile:346: template-local-focal+standard] Error 1

Unfortunately I can’t upload the full log (because I just registered). But here is the end of template-focal.log:


Configuration file ‘/etc/fstab’
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
==> Using new file as you requested.
Installing new version of config file /etc/fstab …
Running in chroot, ignoring request: daemon-reload
/etc/systemd/system/haveged.service:1: .include directives are deprecated, and support for them will be removed in a future version of systemd. Please use drop-in files instead.
/etc/systemd/system/haveged.service:1: .include directives are deprecated, and support for them will be removed in a future version of systemd. Please use drop-in files instead.
Removed /etc/systemd/system/multi-user.target.wants/haveged.service.
Removed /etc/systemd/system/default.target.wants/haveged.service.
Created symlink /etc/systemd/system/multi-user.target.wants/haveged.service → /etc/systemd/system/haveged.service.
Adding ‘diversion of /etc/init/plymouth-shutdown.conf to /etc/init/plymouth-shutdown.conf.qubes-disabled by qubes-core-agent’
Adding ‘diversion of /etc/init/prefdm.conf to /etc/init/prefdm.conf.qubes-disabled by qubes-core-agent’
Adding ‘diversion of /etc/init/splash-manager.conf to /etc/init/splash-manager.conf.qubes-disabled by qubes-core-agent’
Adding ‘diversion of /etc/init/start-ttys.conf to /etc/init/start-ttys.conf.qubes-disabled by qubes-core-agent’
Adding ‘diversion of /etc/init/tty.conf to /etc/init/tty.conf.qubes-disabled by qubes-core-agent’
Adding ‘diversion of /etc/init/serial.conf to /etc/init/serial.conf.qubes-orig by qubes-core-agent’
Failed connect to local daemon
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Running in chroot, ignoring request: is-active
Traceback (most recent call last):
File “/usr/bin/qvm-features-request”, line 88, in
sys.exit(main())
File “/usr/bin/qvm-features-request”, line 77, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, ‘No such file or directory’)
Setting up qubes-core-agent-nautilus (4.0.62-1+focalu1) …
Setting up libwww-perl (6.43-1) …
Setting up liblwp-protocol-https-perl (6.07-2ubuntu2) …
Setting up libxml-parser-perl (2.46-1) …
Setting up libxml-twig-perl (1:3.50-2) …
Setting up libnet-dbus-perl (1.2.0-1) …
Processing triggers for ufw (0.36-6) …
Processing triggers for systemd (245.4-4ubuntu3.11) …
Processing triggers for man-db (2.9.1-1) …
Processing triggers for install-info (6.7.0.dfsg.2-5) …
Processing triggers for desktop-file-utils (0.24-1ubuntu3) …
Processing triggers for mime-support (3.64ubuntu1) …
Processing triggers for hicolor-icon-theme (0.17-2) …
Processing triggers for gnome-menus (3.36.0-1ubuntu1) …
Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) …
Processing triggers for libc-bin (2.31-0ubuntu9.2) …
Setting up qubes-gui-agent (4.0.37-1+focalu1) …
Setting up qubes-core-agent-networking (4.0.62-1+focalu1) …
Setting up mate-notification-daemon (1.24.0-1) …
Setting up qubes-core-agent-network-manager (4.0.62-1+focalu1) …
Setting up qubes-vm-dependencies (4.0.11-1+focalu1) …
Reading package lists…
Building dependency tree…
Reading state information…
qubes-vm-dependencies is already the newest version (4.0.11-1+focalu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qubes-vm-recommended : Depends: qubes-core-agent-dom0-updates but it is not going to be installed
Depends: qubes-mgmt-salt-vm-connector but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Removing ‘local diversion of /sbin/initctl to /sbin/initctl.distrib’
make[1]: *** [Makefile:66: rootimg-build] Error 100

I searched for this error and found some topics in this forum but it never was this particular error or anything like it.

What I also found are the prebuilt template from @unman: https://qubes.3isec.org/
But I would like to build the template myself as he also suggests.

Does somebody now how to resolve the dependency problem?

That log tells you exactly what the problem is.
Focal doesnt have salt-ssh or yum, both required for
qubes-core-agent-dom0-updates and qubes-mgmt-salt-vm-connector.

Just go into meta-packages and edit debian/control to remove those
packages.
I’ve been meaning to fix this in GitHub for some time.

Ok it worked now.

But just to have it said: it’s not evident from the log alone that the problem actually is that focal doesn’t have salt-ssh or yum. It only tells that qubes-core-agent-dom0-updates and qubes-mgmt-salt-vm-connector are missing.