On Fri, Jan 05, 2024 at 01:30:19 -0800, Andrea Bolognani wrote: > On Fri, Jan 05, 2024 at 09:43:52AM +0100, Peter Krempa wrote: > > On Thu, Jan 04, 2024 at 23:39:38 +0100, Peter Krempa wrote: > > > On Thu, Jan 04, 2024 at 12:24:38 -0600, Jonathon Jongsma wrote: > > > > Currently when we build with nbdkit support, libvirt will always try to > > > > use nbdkit to access remote disk sources when it is available. But > > > > without an up-to-date selinux policy allowing this, it will fail. > > > > because the required selinux policies are not yet widely available, we > > > > have disabled nbdkit support on rpm builds for all distributions before > > > > Fedora 40. > > > > > > > > Unfortunately, this makes it more difficult to test nbdkit support. > > > > After someone updates to the necessary selinux policies, they would also > > > > need to rebuild libvirt to enable nbdkit support. By introducing a > > > > configure option (nbdkit_config_default), we can build packages with > > > > nbdkit support but have it disabled by default. > > > > > > > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> > > > > Suggested-by: Andrea Bolognani <abologna@xxxxxxxxxx> > > > > --- > > > > changes in v4 > > > > - squashed in Andrea's suggested changes > > > > - updated error message > > > > - Changed one instance of WITH_NDBKIT to WITH_NBDKIT :) > > > > - tested > > > > > > Looks like this broke the upstream CI on centos-stream-8 and mingw-fedoras: > > > > > > https://gitlab.com/libvirt/libvirt/-/jobs/5864171071 > > > > > > Run-time dependency libnbd found: YES 1.6.0 > > > meson.build:998:4: ERROR: Problem encountered: nbdkit support requires pidfd_open(2) > > > A full log can be found at /root/rpmbuild/BUILD/libvirt-10.0.0/x86_64-redhat-linux-gnu/meson-logs/meson-log.txt > > > error: Bad exit status from /var/tmp/rpm-tmp.HkQf7H (%build) > > > Bad exit status from /var/tmp/rpm-tmp.HkQf7H (%build) > > > > Okay there are two issues: > > > > - rhel-8 lacks pidfd_open() thus nbdkit support won't work there, and > > thus can't be force-enabled > > > > - mingw builds explicitly disable mingw, thus setting the new config > > option breaks as meson doesn't allow it if it's not used > > > > Patch will be posted soon after CI build succeeds. > > I'll wait for your patch instead of investigating myself then :) So, I've concluded the following: - rhel-8 build needs to be disabled, it was enabled explicitly by this patch, but the features are not there - mingw builds for some unkonwn-to-me reason use '--auto-features=enabled' which is weird - the logic handling errors in use of the 'nbdkit_config_default' meson option is a bit questionable: --auto-features=enabled -Dnbdkit=disabled -Dnbdkit_config_default=auto should NOT result in a failure even when the basic logic says so My patch is strictly fixing the build failure by explicitly disabling nbdkit_config_default on mingw and enabling 'nbdkit' only on rhel>=9. You can investigate how to improve the questionable logic in auto-selection of nbdkit_config_default. _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx