]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
rpm: add conditionals around post scripts
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 5 Aug 2021 09:58:29 +0000 (10:58 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Aug 2021 11:00:53 +0000 (12:00 +0100)
The hypervisor drivers can be disabled in certain build scenarios, so
their corresponding post scripts need to match.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
libvirt.spec.in

index a162bc333d7a6f26c358537bcd1021d348165b0f..c3f50224cc84245a462e5dec2aeb5c00c48079ab 100644 (file)
@@ -1458,10 +1458,11 @@ fi
 %libvirt_daemon_perform_restart virtstoraged
 
 
+%if %{with_qemu}
 %post daemon-driver-qemu
-%if %{with_modular_daemons}
+    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtqemud
-%endif
+    %endif
 %libvirt_daemon_schedule_restart virtqemud
 
 %preun daemon-driver-qemu
@@ -1469,12 +1470,14 @@ fi
 
 %posttrans daemon-driver-qemu
 %libvirt_daemon_perform_restart virtqemud
+%endif
 
 
+%if %{with_lxc}
 %post daemon-driver-lxc
-%if %{with_modular_daemons}
+    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtlxcd
-%endif
+    %endif
 %libvirt_daemon_schedule_restart virtlxcd
 
 %preun daemon-driver-lxc
@@ -1482,12 +1485,14 @@ fi
 
 %posttrans daemon-driver-lxc
 %libvirt_daemon_perform_restart virtlxcd
+%endif
 
 
+%if %{with_vbox}
 %post daemon-driver-vbox
-%if %{with_modular_daemons}
+    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtvboxd
-%endif
+    %endif
 %libvirt_daemon_schedule_restart virtvboxd
 
 %preun daemon-driver-vbox
@@ -1495,12 +1500,14 @@ fi
 
 %posttrans daemon-driver-vbox
 %libvirt_daemon_perform_restart virtvboxd
+%endif
 
 
+%if %{with_libxl}
 %post daemon-driver-libxl
-%if %{with_modular_daemons}
+    %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtxend
-%endif
+    %endif
 %libvirt_daemon_schedule_restart virtxend
 
 %preun daemon-driver-libxl
@@ -1508,6 +1515,7 @@ fi
 
 %posttrans daemon-driver-libxl
 %libvirt_daemon_perform_restart virtxend
+%endif
 
 
 %post daemon-config-network