Using Qubes-Builderv2 to generate an r4.2 iso from an Ubuntu host

I’ve been attempting to follow the README instructions to build the qube-os-r4.2.yml example config from a debian host, but I’ve been running into a recurring problem where components use the %patchN syntax which is no longer supported as of RPM 4.20

Now I can fix these as they pop up but I’ve got an entirely different build failure now.

10:22:46 [qb.build_rpm.core-admin.host-fc37.build] DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/builder/build/fedora-37-x86_64/root/proc'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'C.UTF-8'} and shell False
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] DEBUG: Child return code was: 0
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] DEBUG: child environment: None
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/builder/build/fedora-37-x86_64/root/proc'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'C.UTF-8'} and shell False
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] DEBUG: Child return code was: 0
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] ERROR: Command failed:
10:22:46 [qb.build_rpm.core-admin.host-fc37.build]  # bash --login -c '/usr/bin/rpmbuild -bb --noclean --target x86_64 --nodeps /builddir/build/SPECS/core-dom0.spec'
10:22:46 [qb.build_rpm.core-admin.host-fc37.build] 
10:22:46 [qb] An error occurred: core-admin:host-fedora-37.x86_64:rpm_spec/core-dom0.spec: Failed to build RPMs: Cannot connect to container client..
10:22:46 [qb] 
Traceback (most recent call last):

Does this instead indicate an improperly configured environment/executor?

As far as I can tell ./tools/generate-container-image.sh docker, changing the executor in the r4.2 .yml followed by ./qb --builder--conf example-configs/qubes-os-r4.2.yml package fetch prep build should build all of the components, but I’ve had a bear of a time getting this to work.

1 Like

Update: I was able to build an iso based off r4.2.yml by commenting out

- xorg-x11-server
- xorg-x11-drv-intel
- xorg-x11-drv-amdgpu
- linux-pvgrub2

as well as all of the templates except for fedora-41-xfce. Later I was able to add those templates back in with the exception of whonix-gateway-17 which still will not build properly.

Additionally I needed to modify line 120 of qubesbuilder/plugins/installer/__init__.py to use a hardcoded string that looked like the desired date format instead of throwing an error like so:

if not iso_timestamp_file.exists():
    self.iso_timestamp = "%2025%4%23%6%37"
    return self.iso_timestamp
1 Like