From: Daniel P. Berrangé Date: Thu, 5 Aug 2021 09:58:29 +0000 (+0100) Subject: rpm: add conditionals around post scripts X-Git-Tag: v7.7.0-rc1~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=821414f0cdec77e6d8d11a189e02197238df918d;p=thirdparty%2Flibvirt.git rpm: add conditionals around post scripts The hypervisor drivers can be disabled in certain build scenarios, so their corresponding post scripts need to match. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- diff --git a/libvirt.spec.in b/libvirt.spec.in index a162bc333d..c3f50224cc 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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