diff options
Diffstat (limited to 'community/virtualbox-guest-additions')
14 files changed, 180 insertions, 161 deletions
diff --git a/community/virtualbox-guest-additions/60-vbox-guest.rules b/community/virtualbox-guest-additions/60-vbox-guest.rules new file mode 100644 index 00000000000..9edd66dd01f --- /dev/null +++ b/community/virtualbox-guest-additions/60-vbox-guest.rules @@ -0,0 +1,2 @@ +KERNEL=="vboxguest", ACTION=="add", OWNER="root", MODE="0600" +KERNEL=="vboxuser", ACTION=="add", OWNER="root", MODE="0666" diff --git a/community/virtualbox-guest-additions/APKBUILD b/community/virtualbox-guest-additions/APKBUILD index 570725e50ff..05535cf45c1 100644 --- a/community/virtualbox-guest-additions/APKBUILD +++ b/community/virtualbox-guest-additions/APKBUILD @@ -1,34 +1,42 @@ # Contributor: Ben Allen <bensallen@me.com> -# Maintainer: +# Maintainer: Peter Shkenev <santurysim@gmail.com> pkgname=virtualbox-guest-additions -pkgver=6.1.22 +pkgver=7.0.14 pkgrel=1 pkgdesc="VirtualBox Addtions userland components" arch='x86 x86_64' url='https://virtualbox.org/' license="GPL custom" install="$pkgname.pre-install" -makedepends="sed kbuild lvm2-dev yasm nasm zlib-dev openssl1.1-compat-dev curl-dev - libxslt libxrandr-dev libxt-dev libxmu-dev" -subpackages="$pkgname-x11 $pkgname-openrc" +makedepends="sed kbuild lvm2-dev yasm nasm zlib-dev openssl-dev>3 curl-dev + libxslt libxrandr-dev libxt-dev libxmu-dev linux-pam-dev utmps-dev" +subpackages="$pkgname-x11 $pkgname-openrc $pkgname-udev" source="https://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.tar.bz2 futimens.patch musl-no-glibc.patch musl-fix-stat-nsec.patch - musl-sched_yield.patch musl-off_t.patch glibc-symvers.patch VBoxClient.patch virtualbox-guest-additions-localconfig $pkgname.initd virtualbox-drm-client.initd + 60-vbox-guest.rules + VBoxClient-all + vboxclient.desktop + utmps.patch " builddir="$srcdir"/VirtualBox-$pkgver +# secfixes: +# 6.1.36-r0: +# - CVE-2022-21554 +# - CVE-2022-21571 + prepare() { default_prepare - rm -rf $builddir/kBuild/bin $builddir/tools + rm -rf $builddir/kBuild/bin cp $srcdir/$pkgname-localconfig LocalConfig.kmk } @@ -37,14 +45,16 @@ build() { --disable-dbus \ --disable-xpcom \ --disable-sdl-ttf \ + --disable-libvpx \ + --disable-libtpms \ --disable-pulse \ --disable-alsa \ --disable-kmods \ --build-headless # shellcheck disable=SC1091 - source ./env.sh + . ./env.sh # Build Guest Additions - kmk KBUILD_VERBOSE=2 + VBOX_ONLY_ADDITIONS=1 kmk KBUILD_VERBOSE=2 } package() { @@ -58,17 +68,30 @@ package() { x11() { install -v -Dm755 "$builddir"/out/linux.*/release/bin/additions/VBoxClient "$subpkgdir/usr/sbin/VBoxClient" install -v -Dm755 "$builddir"/out/linux.*/release/bin/additions/VBoxDRMClient "$subpkgdir/usr/sbin/VBoxDRMClient" - install -v -Dm755 "$srcdir"/virtualbox-drm-client.initd "$subpkgdir"/etc/init.d/virtualbox-drm-client + install -v -Dm755 "$srcdir"/VBoxClient-all "$subpkgdir"/usr/sbin/VBoxClient-all + install -v -Dm755 "$srcdir"/vboxclient.desktop "$subpkgdir"/etc/xdg/autostart/vboxclient.desktop + install -v -Dm755 "$srcdir"/virtualbox-drm-client.initd "$subpkgdir/etc/init.d/virtualbox-drm-client" +} + +udev() { + pkgdesc="VirtualBox guest rules" + install_if="$pkgname-x11=$pkgver-r$pkgrel udev" + install -D -m0644 60-vbox-guest.rules "$subpkgdir"/usr/lib/udev/rules.d/60-vbox-guest.rules } -sha512sums="ab0fc7cea455f74598d5da18528404405221e9c96a34f0355a39187524240596db4b54e1b1af5f152d5329b8e7977218819c0605f0d0ba0d83a1fb8f8487548d VirtualBox-6.1.22.tar.bz2 -1da850bc30399ecde501eba5403ef1add1ae108d38394b01cd7f5cdf0462b855793d564d3adc1f770983b36529d77f3f7b0269fb65152468084a0a44c38e1638 futimens.patch -b1c47cb910ac751df7bd4bc10c5501e91d88a9b3e4fe181b02755d433df8e89a160a38422912266f0cc51ba0c09854dad513ba6f2634fc76c59cee7989b259eb musl-no-glibc.patch -2c329085915f0ffa43828a14d8b29d0d876e48e18a0190ad146cd0731af7eca11cdf41d2e533c9cc73aa75506b9b91e3a08f2272cd8884e0d929722730b99862 musl-fix-stat-nsec.patch -56c5c3a0becd8f1886010f5f231aa1d2e129bf188f8220e111fb9d51c191a429940edec700f5286b46dadbb45b62e67ee4e09fec6bcea61a344fb65afcbd6756 musl-sched_yield.patch -09a0b5643e5c7d9e878131c5eb5abdec4f3e0626e1e7407dcbe9b295c8f0df972a4f3d43d8c3e99ff4f71d5ae4d5fa37e6cae516a780de384778fee71dfdcb26 musl-off_t.patch -2b907920c32b4385e80b81ec755cb0931d3bb1dff23184ddc49e457f9dfafb2ddbd810418c003c3be82433b06de800fce77a07883fa46e51e6870d565a485add glibc-symvers.patch -9e2da29de4767e1276fb11191641a4f0ecc133a2113b5dd3cc9e17e59cabd8f192d118680d014641b3cd819d6d6faefbf298c1f0891426e261a9b8a8c69c2c52 VBoxClient.patch -05aac36598cda11940a95c72045be78ec0fbcdfe95b7bd390229a85fb576ccfb6b5adcb479b361fa56755bea62deba4112b997c802d230c5f011c5a67e0c8f91 virtualbox-guest-additions-localconfig -ad6ff256def558f5c6b772c62a3e7a6ccd067ae208491e02ce6738a501d02bcac214056825b804c19fd21b33f3752c62bd8572eb8764f6c5eb10534fa668bd38 virtualbox-guest-additions.initd -44c900a4e96cde88521afaa3604a7e1fa28666196de2f86de02ef7e96d2a64c00f852f9ffb2d77be3a14e11d857d5baf37dec38dfce33ddef8e5518efd7532ed virtualbox-drm-client.initd" +sha512sums=" +6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73 VirtualBox-7.0.14.tar.bz2 +fe5003d340ef40490eec6746dbc79f1df89cccf55358ce8eef3cef7fcb8fac36c1223850109f1f3b8d3f8ea6f4183367579256ca0604cd98c893b98afa154a32 futimens.patch +7a97497605afe486d31b21b6fecd8e0763415983ea0259093ca9c4589046a9b7e87567bc16c3f5ff80407586aec709091f2f2b4493a8a6cee79311c67412a161 musl-no-glibc.patch +d5ea53cc11fd4a9f1a17f5c68ca3939004e178b11e105c61c8a49df456311633a9fe020d2773d37ee50e90c0a16f2c0c5f0944b2294ccaaafa099b86fe10fee0 musl-fix-stat-nsec.patch +b08e050c4738af121dfdb22ab2bdfe1dec3f27ac32d299ea9ca1130e15b4cd4a3619a9402012086f997fb56e3f9b5be3cddaf8f515ccf1e3014dc54d98bd2d6a musl-off_t.patch +4879003fbd7c4a93fe12019e507fca94290ebd5227af911838f346bdb9cb6ef1e36aa27d32b1e69fb1d95fd05ed1929c4e43ae43b1f11693c20b72ac08f7fa3d glibc-symvers.patch +922bb37d9b85daf1db469a6fc906539fbf8b99feee49e15a5df34ed5f5a223ee256786d5aca217a23adfd7e2e078b2f4f7a1843ecc405363659b7dd75b647a3e VBoxClient.patch +4b4709cb9c8ce9f29d3e62d64d5a9aef406799ff21e94bb6ec07eeb2b05e9481ac66a32cbcf42bd0738b7d1831e3ef2df84e8f77ad95fe5979f3984f5e61c4e1 virtualbox-guest-additions-localconfig +1f2cb419f6800cdeae9fcd0ec96a655e300e6dea228bb985dba040fc8748bc089ee47ee4e576a229bb2d15a207de912ce3de0571813ef10fe1e2cca500c75652 virtualbox-guest-additions.initd +44c900a4e96cde88521afaa3604a7e1fa28666196de2f86de02ef7e96d2a64c00f852f9ffb2d77be3a14e11d857d5baf37dec38dfce33ddef8e5518efd7532ed virtualbox-drm-client.initd +0e4fb3bca40ef6b049306c0859e95c02736b411c23028e1917dad01be4c234fd9fcf81e2a184c31e602df3a2a87dd06862e9083a2207731a4253ac8096a47715 60-vbox-guest.rules +ba085d6b52b9a15a3d521028d5c8508121c0a88b5859cf926955161a7178799eac90afe15bd61dde1a0c4f2aa42206ffffd1a18bf5812b5610d9ca76e139959b VBoxClient-all +93bf9be3e698766d4054cbf29b97754814dd4ab2c79d4e5b44d2a0338ade57d031f4747e8bd22dc7551c2d78fc522f26c817c1c1e1ca80f72d59a1f6f37288b1 vboxclient.desktop +f5ebc40b546f453d695dc84c82604355e73cb6797d546b7b6e08337a85c0b1db4663d2655055752e35954a9a1b3a494a6b6ddb5a54f3f0ff09ad44718a2d5b01 utmps.patch +" diff --git a/community/virtualbox-guest-additions/VBoxClient-all b/community/virtualbox-guest-additions/VBoxClient-all new file mode 100644 index 00000000000..4b1fcdf1755 --- /dev/null +++ b/community/virtualbox-guest-additions/VBoxClient-all @@ -0,0 +1,48 @@ +#!/bin/sh +## @file +# Start the Guest Additions X11 Client +# + +# +# Copyright (C) 2007-2023 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <https://www.gnu.org/licenses>. +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Sanity check: if non-writeable PID-files are present in the user home +# directory VBoxClient will fail to start. +for i in $HOME/.vboxclient-*.pid; do + test -w $i || rm -f $i +done + +if ! test -c /dev/vboxguest 2>/dev/null; then + # Do not start if the kernel module is not present. + # Execute notify-send in the back-ground to avoid racing with sddm, + # as notify-send may wait for sddm to start while it waits for us to exit. + notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting." & +elif test -z "${SSH_CONNECTION}"; then + # This script can also be triggered by a connection over SSH, which is not + # what we had in mind, so we do not start VBoxClient in that case. We do + # not use "exit" here as this script is "source"d, not executed. + /usr/sbin/VBoxClient --clipboard + /usr/sbin/VBoxClient --checkhostversion + /usr/sbin/VBoxClient --seamless + /usr/sbin/VBoxClient --draganddrop + /usr/sbin/VBoxClient --vmsvga-session # In case VMSVGA emulation is enabled +fi diff --git a/community/virtualbox-guest-additions/VBoxClient.patch b/community/virtualbox-guest-additions/VBoxClient.patch index 80e6707bfc0..29d7f550e86 100644 --- a/community/virtualbox-guest-additions/VBoxClient.patch +++ b/community/virtualbox-guest-additions/VBoxClient.patch @@ -1,25 +1,27 @@ -diff -rupN VirtualBox-6.0.4-bak/src/VBox/Additions/x11/VBoxClient/Makefile.kmk VirtualBox-6.0.4/src/VBox/Additions/x11/VBoxClient/Makefile.kmk ---- VirtualBox-6.0.4-bak/src/VBox/Additions/x11/VBoxClient/Makefile.kmk 2019-03-28 16:29:24.277508391 +0100 -+++ VirtualBox-6.0.4/src/VBox/Additions/x11/VBoxClient/Makefile.kmk 2019-03-28 16:30:24.893944894 +0100 -@@ -72,14 +72,6 @@ VBoxClient_LIBS += \ - supc++ \ - gcc_eh +diff --git a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk +index 1687b59..f37b791 100644 +--- a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk ++++ b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk +@@ -108,14 +108,6 @@ ifdef VBOX_WITH_DRAG_AND_DROP + endif + endif -# This forces the memcpy references in the static libraries to go to -# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know -# how else to do that without recompiling or implementing our own memcpy. -ifeq ($(KBUILD_TARGET),linux) --VBoxClient_LDFLAGS.amd64 += \ -- -Wl,--wrap=memcpy +- VBoxClient_LDFLAGS.amd64 += \ +- -Wl,--wrap=memcpy -endif - ifdef VBOX_WITH_GUEST_PROPS - VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS - endif -diff -rupN VirtualBox-6.0.4-bak/src/VBox/Additions/x11/VBoxClient/chk_stubs.c VirtualBox-6.0.4/src/VBox/Additions/x11/VBoxClient/chk_stubs.c ---- VirtualBox-6.0.4-bak/src/VBox/Additions/x11/VBoxClient/chk_stubs.c 2019-03-28 16:29:24.277508391 +0100 -+++ VirtualBox-6.0.4/src/VBox/Additions/x11/VBoxClient/chk_stubs.c 2019-03-28 16:29:52.860733197 +0100 -@@ -43,17 +43,3 @@ void __stack_chk_fail(void) + VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS + VBoxClient_SOURCES += \ +diff --git a/src/VBox/Additions/x11/VBoxClient/chk_stubs.c b/src/VBox/Additions/x11/VBoxClient/chk_stubs.c +index 9b5093e..cb14ada 100644 +--- a/src/VBox/Additions/x11/VBoxClient/chk_stubs.c ++++ b/src/VBox/Additions/x11/VBoxClient/chk_stubs.c +@@ -53,17 +53,3 @@ void __stack_chk_fail(void) fprintf(stderr, "Stack check failed!\n"); _exit(1); } diff --git a/community/virtualbox-guest-additions/futimens.patch b/community/virtualbox-guest-additions/futimens.patch index f85e1ae6e2e..0e124dd3993 100644 --- a/community/virtualbox-guest-additions/futimens.patch +++ b/community/virtualbox-guest-additions/futimens.patch @@ -1,6 +1,6 @@ ---- ./src/VBox/Runtime/r3/posix/fileio2-posix.cpp.orig -+++ ./src/VBox/Runtime/r3/posix/fileio2-posix.cpp -@@ -165,7 +165,12 @@ +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/r3/posix/fileio2-posix.cpp ++++ VirtualBox-7.0.0/src/VBox/Runtime/r3/posix/fileio2-posix.cpp +@@ -198,7 +198,12 @@ /* XXX this falls back to utimes("/proc/self/fd/...",...) for older kernels/glibcs and this * will not work for hardened builds where this directory is owned by root.root and mode 0500 */ diff --git a/community/virtualbox-guest-additions/glibc-symvers.patch b/community/virtualbox-guest-additions/glibc-symvers.patch index a95b7df34f1..29632f8f8ad 100644 --- a/community/virtualbox-guest-additions/glibc-symvers.patch +++ b/community/virtualbox-guest-additions/glibc-symvers.patch @@ -1,8 +1,6 @@ -diff --git a/include/iprt/linux/symvers.h b/include/iprt/linux/symvers.h -index 7d552b1..e5edbeb 100644 ---- a/include/iprt/linux/symvers.h -+++ b/include/iprt/linux/symvers.h -@@ -37,12 +37,14 @@ +--- VirtualBox-7.0.0.orig/include/iprt/linux/symvers.h ++++ VirtualBox-7.0.0/include/iprt/linux/symvers.h +@@ -49,12 +49,14 @@ /* Use versions of glibc symbols which are available in 32-bit EL3 or * 64-bit EL4. Currently only those symbols needed by the Additions, * though this could probably be extended to work for host builds too. */ @@ -17,7 +15,7 @@ index 7d552b1..e5edbeb 100644 /* Do not use *_chk functions */ #undef _FORTIFY_SOURCE -@@ -65,10 +67,12 @@ __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2"); +@@ -77,10 +79,12 @@ #ifdef fnctl # undef fcntl #endif @@ -26,7 +24,7 @@ index 7d552b1..e5edbeb 100644 __asm__(".symver fcntl64,fcntl@GLIBC_2.2.5"); #else __asm__(".symver fcntl64,fcntl@GLIBC_2.0"); - #endif +#endif + #endif - #endif /* ___iprt_linux_symvers_h */ + /* Do not use ISO C99 scanf which has a glibc 2.7 dependency. */ diff --git a/community/virtualbox-guest-additions/musl-fix-stat-nsec.patch b/community/virtualbox-guest-additions/musl-fix-stat-nsec.patch index d0d073e6515..f239dcdd563 100644 --- a/community/virtualbox-guest-additions/musl-fix-stat-nsec.patch +++ b/community/virtualbox-guest-additions/musl-fix-stat-nsec.patch @@ -1,6 +1,6 @@ ---- VirtualBox-5.0.12/src/VBox/Runtime/include/internal/fs.h.orig -+++ VirtualBox-5.0.12/src/VBox/Runtime/include/internal/fs.h -@@ -49,8 +49,6 @@ +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/include/internal/fs.h ++++ VirtualBox-7.0.0/src/VBox/Runtime/include/internal/fs.h +@@ -72,8 +72,6 @@ #ifdef RT_OS_LINUX # ifdef __USE_MISC # define HAVE_STAT_TIMESPEC_BRIEF diff --git a/community/virtualbox-guest-additions/musl-no-glibc.patch b/community/virtualbox-guest-additions/musl-no-glibc.patch index fe4cc79379c..22d505a343d 100644 --- a/community/virtualbox-guest-additions/musl-no-glibc.patch +++ b/community/virtualbox-guest-additions/musl-no-glibc.patch @@ -1,6 +1,28 @@ ---- ./src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp.orig -+++ ./src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp -@@ -32,6 +32,8 @@ +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/r3/linux/semevent-linux.cpp ++++ VirtualBox-7.0.0/src/VBox/Runtime/r3/linux/semevent-linux.cpp +@@ -35,7 +35,7 @@ + */ + + #include <features.h> +-#if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) ++#if defined(__GLIBC__) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) + + /* + * glibc 2.6 fixed a serious bug in the mutex implementation. We wrote this +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp ++++ VirtualBox-7.0.0/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp +@@ -36,7 +36,7 @@ + + + #include <features.h> +-#if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) ++#if defined(__GLIBC__) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) + + /* + * glibc 2.6 fixed a serious bug in the mutex implementation. We wrote this +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp ++++ VirtualBox-7.0.0/src/VBox/Runtime/r3/linux/thread-affinity-linux.cpp +@@ -42,6 +42,8 @@ # define _GNU_SOURCE #endif #include <features.h> @@ -9,7 +31,7 @@ #if __GLIBC_PREREQ(2,4) #include <sched.h> -@@ -87,6 +89,11 @@ +@@ -97,6 +99,11 @@ return VINF_SUCCESS; } @@ -21,25 +43,3 @@ #else # include "../../generic/RTThreadGetAffinity-stub-generic.cpp" ---- ./src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp.orig -+++ ./src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp -@@ -26,7 +26,7 @@ - - - #include <features.h> --#if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) -+#if defined(__GLIBC__) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) - - /* - * glibc 2.6 fixed a serious bug in the mutex implementation. We wrote this ---- ./src/VBox/Runtime/r3/linux/semevent-linux.cpp.orig -+++ ./src/VBox/Runtime/r3/linux/semevent-linux.cpp -@@ -25,7 +25,7 @@ - */ - - #include <features.h> --#if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) -+#if defined(__GLIBC__) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) - - /* - * glibc 2.6 fixed a serious bug in the mutex implementation. We wrote this diff --git a/community/virtualbox-guest-additions/musl-off_t.patch b/community/virtualbox-guest-additions/musl-off_t.patch index ba3f4af58f5..a334364e0e5 100644 --- a/community/virtualbox-guest-additions/musl-off_t.patch +++ b/community/virtualbox-guest-additions/musl-off_t.patch @@ -1,8 +1,6 @@ -diff --git a/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp b/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp -index 69cc3da..c58cb59 100644 ---- a/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp -+++ b/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp -@@ -63,8 +63,8 @@ +--- VirtualBox-7.0.0.orig/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp ++++ VirtualBox-7.0.0/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp +@@ -73,8 +73,8 @@ static int32_t volatile g_fCopyFileRangeSupported = -1; @@ -13,7 +11,7 @@ index 69cc3da..c58cb59 100644 { return syscall(__NR_copy_file_range, fdIn, poffIn, fdOut, poffOut, cbChunk, fFlags); } -@@ -144,8 +144,8 @@ RTDECL(int) RTFileCopyPartEx(RTFILE hFileSrc, RTFOFF offSrc, RTFILE hFileDst, RT +@@ -154,8 +154,8 @@ do { size_t cbThisCopy = (size_t)RT_MIN(cbToCopy - cbCopied, _1G); diff --git a/community/virtualbox-guest-additions/musl-sched_yield.patch b/community/virtualbox-guest-additions/musl-sched_yield.patch deleted file mode 100644 index 19680e539df..00000000000 --- a/community/virtualbox-guest-additions/musl-sched_yield.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- ./src/VBox/Runtime/r3/posix/thread2-posix.cpp.orig -+++ ./src/VBox/Runtime/r3/posix/thread2-posix.cpp -@@ -63,7 +63,7 @@ - #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) - sched_yield(); - #else -- if (!pthread_yield()) -+ if (!sched_yield()) - #endif - { - LogFlow(("RTThreadSleep: returning %Rrc (cMillies=%d)\n", VINF_SUCCESS, cMillies)); -@@ -100,7 +100,7 @@ - #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) - sched_yield(); - #else -- if (!pthread_yield()) -+ if (!sched_yield()) - #endif - return VINF_SUCCESS; - } -@@ -126,10 +126,8 @@ - #endif - #ifdef RT_OS_DARWIN - pthread_yield_np(); --#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) -- sched_yield(); - #else -- pthread_yield(); -+ sched_yield(); - #endif - #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) - u64TS = ASMReadTSC() - u64TS; -diff --git a/src/VBox/Runtime/r3/posix/semevent-posix.cpp b/src/VBox/Runtime/r3/posix/semevent-posix.cpp -index 80d5747..4f70841 100644 ---- a/src/VBox/Runtime/r3/posix/semevent-posix.cpp -+++ b/src/VBox/Runtime/r3/posix/semevent-posix.cpp -@@ -44,15 +44,7 @@ - #include <pthread.h> - #include <unistd.h> - #include <sys/time.h> -- --#ifdef RT_OS_DARWIN --# define pthread_yield() pthread_yield_np() --#endif -- --#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) --# include <sched.h> --# define pthread_yield() sched_yield() --#endif -+#include <sched.h> - - - /********************************************************************************************************************************* -@@ -317,7 +309,7 @@ DECL_FORCE_INLINE(int) rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillie - /* for fairness, yield before going to sleep. */ - if ( ASMAtomicIncU32(&pThis->cWaiters) > 1 - && pThis->u32State == EVENT_STATE_SIGNALED) -- pthread_yield(); -+ sched_yield(); - - /* take mutex */ - int rc = pthread_mutex_lock(&pThis->Mutex); -@@ -405,7 +397,7 @@ DECL_FORCE_INLINE(int) rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillie - - /* for fairness, yield before going to sleep. */ - if (ASMAtomicIncU32(&pThis->cWaiters) > 1 && cMillies) -- pthread_yield(); -+ sched_yield(); - - /* take mutex */ - int rc = pthread_mutex_lock(&pThis->Mutex); diff --git a/community/virtualbox-guest-additions/utmps.patch b/community/virtualbox-guest-additions/utmps.patch new file mode 100644 index 00000000000..5fc9bbb45c1 --- /dev/null +++ b/community/virtualbox-guest-additions/utmps.patch @@ -0,0 +1,13 @@ +--- VirtualBox-7.0.14.orig/src/VBox/Additions/common/VBoxService/Makefile.kmk ++++ VirtualBox-7.0.14/src/VBox/Additions/common/VBoxService/Makefile.kmk +@@ -215,6 +215,10 @@ + VBoxService_VBOX_IMPORT_CHECKER.win.x86 = nt31 + VBoxService_VBOX_IMPORT_CHECKER.win.amd64 = xp64 + ++# utmps libraries ++VBoxService_CFLAGS += -I/usr/include/utmps ++VBoxService_LIBS.linux += utmps skarnet ++ + $(call VBOX_SET_VER_INFO_EXE,VBoxService,VirtualBox Guest Additions Service,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description. + + include $(FILE_KBUILD_SUB_FOOTER) diff --git a/community/virtualbox-guest-additions/vboxclient.desktop b/community/virtualbox-guest-additions/vboxclient.desktop new file mode 100644 index 00000000000..2f6f147499d --- /dev/null +++ b/community/virtualbox-guest-additions/vboxclient.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Version=1.0 +Name=vboxclient +Name[C]=vboxclient +Comment[C]=VirtualBox User Session Services +Comment=VirtualBox User Session Services +Comment[it]=Servizi di sessione utente di VirtualBox +Comment[pl]=Usługi sesji użytkownika VirtualBox +Exec=/usr/sbin/VBoxClient-all +X-GNOME-Autostart-enabled=true +X-KDE-autostart-after=panel diff --git a/community/virtualbox-guest-additions/virtualbox-guest-additions-localconfig b/community/virtualbox-guest-additions/virtualbox-guest-additions-localconfig index 7637e255d98..4140b96241c 100644 --- a/community/virtualbox-guest-additions/virtualbox-guest-additions-localconfig +++ b/community/virtualbox-guest-additions/virtualbox-guest-additions-localconfig @@ -24,7 +24,6 @@ KBUILD_MSG_STYLE := brief ## paths, origin, hardening VBOX_WITH_HARDENING := 2 VBOX_WITH_ORIGIN := -VBOX_ONLY_ADDITIONS := 1 ## don't build with -Werror VBOX_WITH_WARNINGS_AS_ERRORS := diff --git a/community/virtualbox-guest-additions/virtualbox-guest-additions.initd b/community/virtualbox-guest-additions/virtualbox-guest-additions.initd index e43092f722c..a55c055f367 100755 --- a/community/virtualbox-guest-additions/virtualbox-guest-additions.initd +++ b/community/virtualbox-guest-additions/virtualbox-guest-additions.initd @@ -11,7 +11,8 @@ command_args="--foreground" start_stop_daemon_args="--make-pidfile --pidfile ${pidfile} --background" depend() { - need localmount + need localmount + want utmpd } start_pre() { @@ -26,10 +27,3 @@ stop_pre() { /bin/grep vboxsf /proc/mounts | /usr/bin/cut -f2 -d' ' | /usr/bin/xargs -n1 -r /bin/umount eend $? } - -stop_post() { - einfo "Removing kernel modules" - /sbin/modprobe -r vboxsf 2>&1 && \ - /sbin/modprobe -r vboxguest 2>&1 - eend $? -} |