On 2/26/26 01:14, Jim Fehlig via Devel wrote:
> From: Jim Fehlig <[email protected]>
>
> Signed-off-by: Jim Fehlig <[email protected]>
> ---
> libvirt.spec.in | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 00316a03f2..e3869e0e92 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -31,7 +31,10 @@
> %define arches_numad %{arches_x86} %{power64} aarch64
> %define arches_ch x86_64 aarch64
>
> -# The hypervisor drivers that run in libvirtd
> +# The monolithic libvirtd
> +%define with_libvirtd 0%{!?_without_libvirtd:1}
> +
> +# The hypervisor drivers that run in monolithic libvirtd, or a modular daemon
> %define with_lxc 0%{!?_without_lxc:1}
> %define with_libxl 0%{!?_without_libxl:1}
> %define with_vbox 0%{!?_without_vbox:1}
> @@ -304,7 +307,9 @@ URL: https://libvirt.org/
> %endif
> Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz
>
> +%if %{with_libvirtd}
> Requires: libvirt-daemon = %{version}-%{release}
> +%endif
> Requires: libvirt-daemon-config-network = %{version}-%{release}
> Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
> %if %{with_libxl}
I believe you want to put something like:
Obsoletes: libvirt-daemon < %(version)-%(release)
into an %else branch so that systems with libvirt-daemon package
installed know the package is obsolete.
> @@ -1181,6 +1186,12 @@ echo "This RPM requires either Fedora >= %{min_fedora}
> or RHEL >= %{min_rhel}"
> exit 1
> %endif
>
> +%if %{with_libvirtd}
> + %define arg_libvirtd -Ddriver_libvirtd=enabled
> +%else
> + %define arg_libvirtd -Ddriver_libvirtd=disabled
> +%endif
> +
> %if %{with_qemu}
> %define arg_qemu -Ddriver_qemu=enabled
> %else
> @@ -1363,7 +1374,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y'
> %{_specdir}/libvirt.spec)
> %{?arg_libxl} \
> -Dsasl=enabled \
> -Dpolkit=enabled \
> - -Ddriver_libvirtd=enabled \
> + %{?arg_libvirtd} \
> -Ddriver_remote=enabled \
> -Ddriver_test=enabled \
> %{?arg_esx} \
> @@ -1542,6 +1553,14 @@ cp -a
> $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
> # libvirt saves these files with mode 600
> chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml
>
> + %if ! %{with_libvirtd}
> +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libvirtd.conf
> +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/apparmor.d/usr.sbin.libvirtd
> +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd
> +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd.aug
> +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
> + %endif
This only means that some WITH_LIBVIRTD from previous commit were
removed mistakenly, OR we're missing some checks when installing those
files.
Michal