1
0
forked from pool/virtualbox

Accepting request 835468 from home:lwfinger:branches:Virtualization

- %service_del_postun_without_restart is not yet available in Leap 15.{1,2} of SLE15_SP1.
  For that reason, a workaround is added. 
- Make use of %service_del_postun_without_restart

  And stop using DISABLE_RESTART_ON_UPDATE as this interface is
  obsolete.

OBS-URL: https://build.opensuse.org/request/show/835468
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=574
This commit is contained in:
Larry Finger 2020-09-18 18:53:04 +00:00 committed by Git OBS Bridge
parent 19c33a8c33
commit af28aadc8c
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 18 16:36:31 UTC 2020 - Larry Finger <Larry.Finger@gmail.com>
- %service_del_postun_without_restart is not yet available in Leap 15.{1,2} of SLE15_SP1.
For that reason, a workaround is added.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 11 17:58:07 UTC 2020 - Franck Bui <fbui@suse.com> Fri Sep 11 17:58:07 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -543,7 +543,7 @@ echo "SED = $RPM_BUILD_DIR/VirtualBox-%{version}/kmk_sed" >> LocalConfig.kmk
# fix build of vboxvideo kernel module: replace relative drm include path with absolute include path # fix build of vboxvideo kernel module: replace relative drm include path with absolute include path
sed -i 's:include/drm:/usr/src/linux/include/drm:' src/VBox/Additions/linux/drm/Makefile.module.kms sed -i 's:include/drm:/usr/src/linux/include/drm:' src/VBox/Additions/linux/drm/Makefile.module.kms
### %build, %install, and %file sections for virtualbox ### ### %%build, %%install, and %%file sections for virtualbox ###
%if %{main_package} %if %{main_package}
%build %build
# Disable LTO - Link Time Optimization # Disable LTO - Link Time Optimization
@ -899,8 +899,14 @@ exit 0
%restart_on_update vboxdrv %restart_on_update vboxdrv
%restart_on_update vboxautostart %restart_on_update vboxautostart
# immediately restarting virtualbox may not work. As such wait for the next reboot to restart # immediately restarting virtualbox may not work. As such wait for the next reboot to restart
%if ! %{defined service_del_postun_without_restart}
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun vboxautostart.service
%service_del_postun vboxdrv.service
%else
%service_del_postun_without_restart vboxautostart.service %service_del_postun_without_restart vboxautostart.service
%service_del_postun_without_restart vboxdrv.service %service_del_postun_without_restart vboxdrv.service
%endif
%postun guest-tools %postun guest-tools
%restart_on_update vboxadd %restart_on_update vboxadd
@ -989,7 +995,7 @@ exit 0
%attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSUIDMessage %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSUIDMessage
%attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxUSB_DevRules %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxUSB_DevRules
%attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBox6 %attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBox6
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBoxVM %verify(not mode) %attr(0750,root,vboxusers) %{_vbox_instdir}/VirtualBoxVM
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSDL %verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSDL
%{_vbox_instdir}/VirtualBox %{_vbox_instdir}/VirtualBox
#wrapper script is in bindir #wrapper script is in bindir
@ -1091,7 +1097,7 @@ exit 0
# main_package # main_package
%endif %endif
### %build and %install sections of virtualbox-kmp ### ### %%build and %%install sections of virtualbox-kmp ###
%if %{kmp_package} %if %{kmp_package}
%build %build
# Disable LTO - Link Time Optimization # Disable LTO - Link Time Optimization