diff --git a/VirtualBox.spec b/VirtualBox.spec index 236ebf3..4c7a7f8 100644 --- a/VirtualBox.spec +++ b/VirtualBox.spec @@ -18,7 +18,7 @@ Name: VirtualBox Version: 7.0.6 -Release: 1mamba +Release: 2mamba Summary: A general-purpose full virtualizer for x86 hardware Group: Graphical Desktop/Applications/Utilities Vendor: openmamba @@ -429,6 +429,14 @@ _EOF install -d -m0755 %{buildroot}%{_includedir}/virtualbox cp -a include/{VBox,iprt} %{buildroot}%{_includedir}/virtualbox/ +# guest: enable services preset +install -d -m0755 %{buildroot}%{_presetdir} +cat > %{buildroot}%{_presetdir}/86-virtualbox-guest-additions.preset << EOF +enable vboxadd.service +enable vboxdrmclient.service +enable vboxdrmclient.path +EOF + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -495,6 +503,21 @@ KERNEL=/boot/vmlinuz-$KVER %systed_postun_with_restart wboxweb.service : +%post guest +%systemd_post vboxdrmclient.path +%systemd_post vboxservice.service +: + +%preun guest +%systemd_preun vboxdrmclient.path +%systemd_preun vboxservice.service +: + +%postun guest +%systed_postun vboxdrmclient.path +%systed_postun vboxservice.service +: + %files %defattr(-,root,root) %config %{_sysconfdir}/vbox/vbox.cfg @@ -620,6 +643,7 @@ KERNEL=/boot/vmlinuz-$KVER %files guest %defattr(-,root,root) %{_sysconfdir}/xdg/autostart/vboxclient.desktop +%{_presetdir}/86-virtualbox-guest-additions.preset %{_sbindir}/VBoxClient-all %{_unitdir}/vboxservice.service %{_unitdir}/vboxdrmclient.path @@ -642,6 +666,9 @@ KERNEL=/boot/vmlinuz-$KVER %{_libdir}/%{name}/additions/VBoxGuestAdditions.iso %changelog +* Fri Jan 27 2023 Silvan Calarco 7.0.6-2mamba +- update vboxdrmclient.[path|service] with [Install] section to fix autostart at boot + * Wed Jan 18 2023 Automatic Build System 7.0.6-1mamba - automatic version update by autodist diff --git a/vboxdrmclient.path b/vboxdrmclient.path index e1cf64d..f0ca6c2 100644 --- a/vboxdrmclient.path +++ b/vboxdrmclient.path @@ -4,3 +4,6 @@ ConditionVirtualization=oracle [Path] PathExistsGlob=/dev/dri/renderD* + +[Install] +WantedBy=multi-user.target diff --git a/vboxdrmclient.service b/vboxdrmclient.service index be43d66..63ba3f3 100644 --- a/vboxdrmclient.service +++ b/vboxdrmclient.service @@ -1,7 +1,11 @@ [Unit] -Description=VirtualBox Guest VMSVGA resize client +Description=VBoxDRMClient Guest Service ConditionVirtualization=oracle ConditionPathExistsGlob=/dev/dri/renderD* +BindsTo=display-manager.service [Service] ExecStart=/usr/bin/VBoxDRMClient + +[Install] +WantedBy=multi-user.target diff --git a/vboxservice.service b/vboxservice.service index 50749fe..1727f70 100644 --- a/vboxservice.service +++ b/vboxservice.service @@ -2,6 +2,7 @@ Description=VirtualBox Guest Service ConditionVirtualization=oracle Wants=vboxdrmclient.path +Before=display-manager.service [Service] ExecStartPre=-/usr/bin/modprobe vboxguest