[libvirt PATCH 4/8] rpm: Reduce use of with_modular_daemons

Andrea Bolognani abologna at redhat.com
Fri Jul 14 14:39:38 UTC 2023


The current implementation pretty much assumes that targets
where modular daemons are the default will stick with that
configuration, as will targets where they're not, or that
changes to these defaults will be performed by the admin after
the packages have been installed.

This is unnecessarily limiting: for example, on a target that
defaults to using the monolithic daemon, it's entirely possible
to create a local preset such as

  # /etc/systemd/system-preset/00-virt.preset
  disable libvirtd.service
  disable libvirtd*.socket
  enable virtqemud.service

to opt into a modular daemon deployment. The opposite is of
course also true. We shouldn't get in the way of these
reasonable use cases.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 libvirt.spec.in | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index db8d9158ae..c9317ed0cc 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1487,9 +1487,7 @@ fi \
 %libvirt_sysconfig_pre libvirtd
 
 %post daemon
-%if ! %{with_modular_daemons}
 %libvirt_daemon_systemd_post_inet libvirtd
-%endif
 %libvirt_daemon_schedule_restart libvirtd
 
 %posttrans daemon
@@ -1591,9 +1589,7 @@ fi
 %libvirt_sysconfig_pre virtproxyd
 
 %post daemon-proxy
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post_inet virtproxyd
-%endif
 
 %posttrans daemon-proxy
 %libvirt_sysconfig_posttrans virtproxyd
@@ -1609,9 +1605,7 @@ fi
     %firewalld_reload
 %endif
 
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtnetworkd
-%endif
 %libvirt_daemon_schedule_restart virtnetworkd
 
 %posttrans daemon-driver-network
@@ -1630,9 +1624,7 @@ fi
 %libvirt_sysconfig_pre virtnwfilterd
 
 %post daemon-driver-nwfilter
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtnwfilterd
-%endif
 %libvirt_daemon_schedule_restart virtnwfilterd
 
 %posttrans daemon-driver-nwfilter
@@ -1646,9 +1638,7 @@ fi
 %libvirt_sysconfig_pre virtnodedevd
 
 %post daemon-driver-nodedev
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtnodedevd
-%endif
 %libvirt_daemon_schedule_restart virtnodedevd
 
 %posttrans daemon-driver-nodedev
@@ -1662,9 +1652,7 @@ fi
 %libvirt_sysconfig_pre virtinterfaced
 
 %post daemon-driver-interface
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtinterfaced
-%endif
 %libvirt_daemon_schedule_restart virtinterfaced
 
 %posttrans daemon-driver-interface
@@ -1678,9 +1666,7 @@ fi
 %libvirt_sysconfig_pre virtsecretd
 
 %post daemon-driver-secret
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtsecretd
-%endif
 %libvirt_daemon_schedule_restart virtsecretd
 
 %posttrans daemon-driver-secret
@@ -1694,9 +1680,7 @@ fi
 %libvirt_sysconfig_pre virtstoraged
 
 %post daemon-driver-storage-core
-%if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtstoraged
-%endif
 %libvirt_daemon_schedule_restart virtstoraged
 
 %posttrans daemon-driver-storage-core
@@ -1724,9 +1708,7 @@ fi
 exit 0
 
 %post daemon-driver-qemu
-    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtqemud
-    %endif
 %libvirt_daemon_schedule_restart virtqemud
 
 %posttrans daemon-driver-qemu
@@ -1742,9 +1724,7 @@ exit 0
 %libvirt_sysconfig_pre virtlxcd
 
 %post daemon-driver-lxc
-    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtlxcd
-    %endif
 %libvirt_daemon_schedule_restart virtlxcd
 
 %posttrans daemon-driver-lxc
@@ -1760,9 +1740,7 @@ exit 0
 %libvirt_sysconfig_pre virtvboxd
 
 %post daemon-driver-vbox
-    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtvboxd
-    %endif
 %libvirt_daemon_schedule_restart virtvboxd
 
 %posttrans daemon-driver-vbox
@@ -1778,9 +1756,7 @@ exit 0
 %libvirt_sysconfig_pre virtxend
 
 %post daemon-driver-libxl
-    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtxend
-    %endif
 %libvirt_daemon_schedule_restart virtxend
 
 %posttrans daemon-driver-libxl
-- 
2.41.0



More information about the libvir-list mailing list