Enable GNU/Hurd build
Refactor the package so that it's possible to produce minimal, client-only libvirt builds on non-Linux architectures.
According to this page libvirt has never been successfully built on GNU/Hurd, so this is quite exciting!
In the process of achieving this, I've ended up either enabling or disabling all libvirt features explicitly. This is a significant improvement on its own: autodetection is useful for end users, but in the context of a distro we want predictability and to have complete, fine-grained control over what ends up in the package. Any mistake we make, such as forgetting to declaring a new Build-Depends
, should ideally result in a failed build rather than the feature being silently disabled.
Demo session, in which I use virsh
inside a GNU/Hurd VM to connect to the libvirtd
instance that's running on the underlying host:
$ uname -a
GNU hurd 0.9 GNU-Mach 1.8+git20230526-486/Hurd-0.9 i686-AT386 GNU
$ dpkg -l | grep libvirt
ii libvirt-clients 9.8.0-1 hurd-i386 Programs for the libvirt library
ii libvirt0:hurd-i386 9.8.0-1 hurd-i386 library for interfacing with different virtualization systems
$ ifconfig /dev/eth0
/dev/eth0 (2):
inet address 192.168.122.124
netmask 255.255.255.0
broadcast 192.168.122.255
flags UP BROADCAST RUNNING ALLMULTI MULTICAST
mtu 1500
link encap Ethernet
hardware addr 52:54:00:EB:68:D7
$ virsh -c qemu+ssh://192.168.122.1/system list
Id Name State
----------------------
15 hurd running
$ virsh -c qemu+ssh://192.168.122.1/system dumpxml hurd | grep 'mac address'
<mac address='52:54:00:eb:68:d7'/>
Notice how the MAC address reported by ifconfig
matches the one configured in the libvirt XML for the VM, just as you would expect :)