summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-22 16:27:58 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-22 20:06:17 -0500
commitc625abdb5f8b5a58059517c69e6ddebfd6b9710e (patch)
treebbeb335c3c8a351118ffc2838c0cd0bf1d3216d4 /user
parentb264031d6c87b70151b3c4c93b8d029cf7a903e6 (diff)
downloadpackages-c625abdb5f8b5a58059517c69e6ddebfd6b9710e.tar.gz
packages-c625abdb5f8b5a58059517c69e6ddebfd6b9710e.tar.bz2
packages-c625abdb5f8b5a58059517c69e6ddebfd6b9710e.tar.xz
packages-c625abdb5f8b5a58059517c69e6ddebfd6b9710e.zip
user/open-vm-tools: New package
Diffstat (limited to 'user')
-rw-r--r--user/open-vm-tools/APKBUILD109
-rw-r--r--user/open-vm-tools/disable-werror.patch21
-rw-r--r--user/open-vm-tools/dndcp-portability.patch22
-rw-r--r--user/open-vm-tools/hgfs-portability.patch34
-rw-r--r--user/open-vm-tools/loff_t.patch11
-rw-r--r--user/open-vm-tools/open-vm-tools.confd2
-rw-r--r--user/open-vm-tools/open-vm-tools.initd60
-rw-r--r--user/open-vm-tools/poll-header.patch125
-rw-r--r--user/open-vm-tools/preadv.patch11
-rw-r--r--user/open-vm-tools/resolver.patch40
-rw-r--r--user/open-vm-tools/strerror_r.patch25
-rw-r--r--user/open-vm-tools/vgauth-portability.patch49
-rw-r--r--user/open-vm-tools/vgauthd.initd6
-rw-r--r--user/open-vm-tools/vix.patch11
-rw-r--r--user/open-vm-tools/vmtoolsd.pamd6
15 files changed, 532 insertions, 0 deletions
diff --git a/user/open-vm-tools/APKBUILD b/user/open-vm-tools/APKBUILD
new file mode 100644
index 000000000..883b7d306
--- /dev/null
+++ b/user/open-vm-tools/APKBUILD
@@ -0,0 +1,109 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=open-vm-tools
+pkgver=12.4.0
+_buildver=23259341
+pkgrel=0
+pkgdesc="Guest additions for VMware hypervisors"
+url=" "
+arch="x86 pmmx i528 x86_64 aarch64"
+options="suid"
+license="GPL-2.0-only"
+depends=""
+makedepends="curl-dev fuse3-dev glib-dev gtk+3.0-dev gtkmm+3.0-dev icu-dev
+ libdrm-dev libice-dev libsigc++-dev libsm-dev libtirpc-dev
+ libxcomposite-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev
+ libxrandr-dev libxrender-dev libxtst-dev linux-pam-dev openssl-dev
+ rpcsvc-proto eudev-dev xmlsec-dev"
+subpackages="$pkgname-dev $pkgname-desktop $pkgname-openrc"
+source="https://github.com/vmware/open-vm-tools/releases/download/stable-$pkgver/open-vm-tools-$pkgver-$_buildver.tar.gz
+ disable-werror.patch
+ dndcp-portability.patch
+ hgfs-portability.patch
+ loff_t.patch
+ poll-header.patch
+ preadv.patch
+ resolver.patch
+ strerror_r.patch
+ vgauth-portability.patch
+ vix.patch
+ vmtoolsd.pamd
+
+ open-vm-tools.confd
+ open-vm-tools.initd
+ vgauthd.initd
+ "
+builddir="$srcdir/$pkgname-$pkgver-$_buildver"
+
+build() {
+ LDFLAGS="$LDFLAGS `icu-config --ldflags`" ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --disable-containerinfo \
+ --disable-deploypkg \
+ --disable-glibc-check \
+ --disable-static \
+ --disable-tests \
+ --enable-resolutionkms \
+ --with-gtk3 \
+ --with-gtkmm3 \
+ --with-icu \
+ --with-pam \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --with-x \
+ --without-kernel-modules
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ # Replace packaged PAM configuration with ours.
+ install -m 644 "$srcdir"/vmtoolsd.pamd "$pkgdir"/etc/pam.d/vmtoolsd
+ ln -s vmhgfs-fuse "$pkgdir"/usr/bin/mount.vmhgfs-fuse
+
+ install -D -m644 "$srcdir"/open-vm-tools.confd "$pkgdir"/etc/conf.d/open-vm-tools
+ install -D -m755 "$srcdir"/open-vm-tools.initd "$pkgdir"/etc/init.d/open-vm-tools
+ install -D -m755 "$srcdir"/vgauthd.initd "$pkgdir"/etc/init.d/vgauthd
+}
+
+desktop() {
+ pkgdesc="$pkgdesc (X11 desktop additions)"
+ mkdir -p "$subpkgdir"/etc
+ mv "$pkgdir"/etc/xdg "$subpkgdir"/etc/
+
+ mkdir -p "$subpkgdir"/usr/bin
+ for tool in vmware-user vmwgfxctrl vmware-user-suid-wrapper; do
+ mv "$pkgdir"/usr/bin/$tool "$subpkgdir"/usr/bin/$tool
+ done
+ chmod 4755 "$subpkgdir"/usr/bin/vmware-user-suid-wrapper
+
+ mkdir -p "$subpkgdir"/usr/lib/$pkgname/plugins/vmsvc
+ mv "$pkgdir"/usr/lib/$pkgname/plugins/vmusr \
+ "$subpkgdir"/usr/lib/$pkgname/plugins/
+ mv "$pkgdir"/usr/lib/$pkgname/plugins/vmsvc/libresolutionKMS.so \
+ "$subpkgdir"/usr/lib/$pkgname/plugins/vmsvc/
+}
+
+sha512sums="11ea43c64ec534922145f83e2b7ef9254437f80656ad03b596340a78c3698adcc7d84adade9c5d8e1c83b5ebc3bd086601b1d104e0f070274dc2b6bc1f64fb17 open-vm-tools-12.4.0-23259341.tar.gz
+1966f6f31ed531829a40cd3e5c8352ea25cac0535a24f62aecf37e2018adbeb33cd214a43d4acc57766c8795d1849e1241c8777bbf96ad447f0c7baa41a555ed disable-werror.patch
+987a65c77a462520430d157212fbd23381af301a0e5b02410750f4ac844bad903a92c62f743ea2880b9bca939696edd6c8f92b3f4fc01daafd46b5455f7b9666 dndcp-portability.patch
+656585c7b087dd1b7539bcd362bb80faa48b7354819636061c2c92569bcd537804daf15b76f6bad0b7229af9d24462de4e630256ac7059941bf8cd115ae9a39c hgfs-portability.patch
+6edb41bb9658271c6a214230c88526c4fccc4c6b3299bb67691f6f917e1e695a20dd09692c9a64d36d46a35cbecb975dcaf7062c0d7fccd2d9011cc17130072d loff_t.patch
+2b623a9901851ba9b1652c117ee2a2ebb8e4cea7a01e2ffe6553cf6d929a86921f4e206278fd19fbab4effc0cc9051848e5254ca35ecfb3a006783e915cd5c5e poll-header.patch
+52ab4bc5f73cde75b849a87dcc0981d95043a6b9bfdc1b18a10129998b4187ffd5098843f8593ed1a3569e91a2abeba0d5bdd1427727542a47dbbc8a84ab294f preadv.patch
+b1f059432d0c4a233356b082e975ea0bf68059231c40cf3e32aedcdc273df234d6cdef9ac1c52baf3c1ee05d9cd02f414f6ce3bf049bdcb0a1162f67f522f902 resolver.patch
+08abd276568d019c64e96ce49704980f214cab06eab563af3c7afb44b7e9893da3953cb34c963c82c6913092fcd766701a815db0b4c323aa1ba02ddb58768cd6 strerror_r.patch
+b87ebf98d97815d48d998cf84490ae74bfee3619894f12121c8cd5706934783bb29668e32f494f6527e06779016da6f9f3bd0be7d3c342fc43c49d3d6637fafd vgauth-portability.patch
+c37965bdbae1b1498d843cc752dc189832e79325eb7bd0dfd8acde81b1c2851c22d7717a3e65bce8209731c404a6e8eeff55a2e9a0f4d548e1f3ea7a7bfad27f vix.patch
+9974a6a2e382600f8019de8923268d82ae22ebad0c5280e38d529570e7bdfdcfad86be838fcfd449a457e2d6cbf1dd9091ffa1e4da3c0acd8c34e9690a338f23 vmtoolsd.pamd
+fca30a3be4dd3247e16115fe32b4d27ede8751f96b5a33b9f489b0ce57823c605b6249ff722d6f4ed82a98979f36d28821603b4a5a1d967d3048d23d983a19be open-vm-tools.confd
+90acbf03eac472e7d8929c9293bf6cc77ad8f3583d74a51679866d4483d35f8c2628d3d544fc608824db39ee018caf4a2d318f73c557c1fa2ca7683c44e5241e open-vm-tools.initd
+87ca487a2013b03c2d1b461621d98acd0a5f3eb3479ef7fa08f71ffcb7ab9947496ca08b7466bedc42c4d558ad31e7c81fcd40780a680161d8efc345fd857904 vgauthd.initd"
diff --git a/user/open-vm-tools/disable-werror.patch b/user/open-vm-tools/disable-werror.patch
new file mode 100644
index 000000000..544350a5e
--- /dev/null
+++ b/user/open-vm-tools/disable-werror.patch
@@ -0,0 +1,21 @@
+#--- open-vm-tools-12.4.0-23259341/configure.ac.old 2024-02-06 09:07:32.000000000 -0600
+#+++ open-vm-tools-12.4.0-23259341/configure.ac 2024-05-22 13:44:36.918508290 -0500
+#@@ -1388,7 +1388,6 @@
+#
+# ### General flags / actions
+# CFLAGS="$CFLAGS -Wall"
+#-CFLAGS="$CFLAGS -Werror"
+#
+# # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
+# # in Xlib.h on OpenSolaris.
+#
+--- open-vm-tools-12.4.0-23259341/configure.old 2024-02-06 09:11:26.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/configure 2024-05-22 13:44:44.128513544 -0500
+@@ -26481,7 +26481,6 @@
+
+ ### General flags / actions
+ CFLAGS="$CFLAGS -Wall"
+-CFLAGS="$CFLAGS -Werror"
+
+ # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
+ # in Xlib.h on OpenSolaris.
diff --git a/user/open-vm-tools/dndcp-portability.patch b/user/open-vm-tools/dndcp-portability.patch
new file mode 100644
index 000000000..b667cbbce
--- /dev/null
+++ b/user/open-vm-tools/dndcp-portability.patch
@@ -0,0 +1,22 @@
+--- open-vm-tools-12.4.0-23259341/services/plugins/dndcp/dnd/dndLinux.c.old 2024-02-06 09:08:40.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/services/plugins/dndcp/dnd/dndLinux.c 2024-05-22 14:45:57.307885844 -0500
+@@ -53,9 +53,6 @@
+
+ #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
+-#ifdef sun
+-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+-#endif
+ #ifdef __ANDROID__
+ /*
+ * Android doesn't support setmntent(), endmntent() or MOUNTED.
+@@ -64,6 +61,9 @@
+ #define NO_ENDMNTENT
+ #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
++#ifndef ACCESSPERMS
++#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
++#endif
+
+
+ /*
diff --git a/user/open-vm-tools/hgfs-portability.patch b/user/open-vm-tools/hgfs-portability.patch
new file mode 100644
index 000000000..dcd46b24f
--- /dev/null
+++ b/user/open-vm-tools/hgfs-portability.patch
@@ -0,0 +1,34 @@
+--- open-vm-tools-12.4.0-23259341/lib/include/hgfsUtil.h.old 2024-02-06 09:08:40.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/lib/include/hgfsUtil.h 2024-05-22 14:05:09.079168248 -0500
+@@ -53,17 +53,5 @@
+ # include <time.h>
+ # endif
+ # include "vm_basic_types.h"
+-# if !defined _STRUCT_TIMESPEC && \
+- !defined _TIMESPEC_DECLARED && \
+- !defined __timespec_defined && \
+- !defined sun && \
+- !defined __FreeBSD__ && \
+- !__APPLE__ && \
+- !defined _WIN32
+-struct timespec {
+- time_t tv_sec;
+- long tv_nsec;
+-};
+-# endif
+
+ # include "hgfs.h"
+--- open-vm-tools-12.4.0-23259341/lib/hgfsServer/hgfsServerLinux.c.old 2024-02-06 09:08:55.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/lib/hgfsServer/hgfsServerLinux.c 2024-05-22 14:04:34.789168929 -0500
+@@ -108,8 +108,10 @@
+ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
+ * Solaris version of <sys/stat.h>.
+ */
+-#ifdef sun
++#ifndef ACCESSPERMS
+ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++#ifndef ALLPERMS
+ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
+ #endif
+
diff --git a/user/open-vm-tools/loff_t.patch b/user/open-vm-tools/loff_t.patch
new file mode 100644
index 000000000..d9f24bd1b
--- /dev/null
+++ b/user/open-vm-tools/loff_t.patch
@@ -0,0 +1,11 @@
+--- open-vm-tools-12.4.0-23259341/vmhgfs-fuse/fsutil.h.old 2024-02-06 09:07:33.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/vmhgfs-fuse/fsutil.h 2024-05-22 14:49:32.547748097 -0500
+@@ -32,7 +32,7 @@
+ #include "hgfsProto.h"
+ #include <fuse.h>
+
+-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__) || defined(__linux__)
+ typedef long long loff_t;
+ #endif
+
diff --git a/user/open-vm-tools/open-vm-tools.confd b/user/open-vm-tools/open-vm-tools.confd
new file mode 100644
index 000000000..4414fabdb
--- /dev/null
+++ b/user/open-vm-tools/open-vm-tools.confd
@@ -0,0 +1,2 @@
+# Set this to no to disable drag and drop (and vmblock) loading.
+VM_DRAG_AND_DROP="yes"
diff --git a/user/open-vm-tools/open-vm-tools.initd b/user/open-vm-tools/open-vm-tools.initd
new file mode 100644
index 000000000..244a951e4
--- /dev/null
+++ b/user/open-vm-tools/open-vm-tools.initd
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/vmtoolsd.pid"
+command="/usr/bin/vmtoolsd"
+command_args="-b ${pidfile}"
+
+vmblockmntpt="/proc/fs/vmblock/mountPoint"
+vmblockfusemntpt="/run/vmblock-fuse"
+
+depend() {
+ before checkfs fsck net X
+ want vgauthd
+}
+
+start_vmblock() {
+ checkpath -d -m 1777 /tmp/VMwareDnD
+ if command -v vmware-vmblock-fuse > /dev/null; then
+ modprobe fuse > /dev/null 2>&1
+ checkpath -d "${vmblockfusemntpt}"
+ ebegin "Mounting vmblock-fuse"
+ vmware-vmblock-fuse \
+ -o subtype=vmware-vmblock,default_permissions,allow_other \
+ "${vmblockfusemntpt}"
+ eend $?
+ else
+ modprobe vmblock > /dev/null 2>&1
+ checkpath -d "${vmblockmntpt}"
+ ebegin "Mounting vmblock"
+ mount -t vmblock vmblock "${vmblockmntpt}"
+ eend $?
+ fi
+}
+
+stop_vmblock() {
+ if [ -d "${vmblockfusemntpt}" ]; then
+ ebegin "Unmounting vmblock-fuse"
+ umount "${vmblockfusemntpt}"
+ eend $?
+ else
+ ebegin "Unmounting vmblock"
+ umount "${vmblockmntpt}"
+ eend $?
+ fi
+}
+
+start_pre() {
+ if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then
+ start_vmblock
+ fi
+ return 0
+}
+
+stop_post() {
+ if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then
+ stop_vmblock
+ fi
+ return 0
+}
diff --git a/user/open-vm-tools/poll-header.patch b/user/open-vm-tools/poll-header.patch
new file mode 100644
index 000000000..1dcc5e3c2
--- /dev/null
+++ b/user/open-vm-tools/poll-header.patch
@@ -0,0 +1,125 @@
+From 821c7949d79ad8e06b20cb1238316fce56778607 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream-URL: https://github.com/vmware/open-vm-tools/pull/383
+Date: Thu, 31 Oct 2019 17:06:10 +0100
+Subject: [PATCH] Rename poll.h into vm_poll.h to fix build failure on musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+musl libc redirects include of sys/poll.h to poll.h. But since poll.h is
+also a local header file, the musl libc header is never included. This
+leads to the following build failure:
+
+In file included from asyncsocket.c:73:0:
+.../host/i586-buildroot-linux-musl/sysroot/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
+ #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+asyncsocket.c: In function ‘AsyncTCPSocketPollWork’:
+asyncsocket.c:2537:13: error: invalid use of undefined type ‘struct pollfd’
+ pfd[i].fd = asock[i]->fd;
+ ^
+asyncsocket.c:2537:13: error: dereferencing pointer to incomplete type ‘struct pollfd’
+asyncsocket.c:2538:13: error: invalid use of undefined type ‘struct pollfd’
+ pfd[i].events = read ? POLLIN : POLLOUT;
+ ^
+asyncsocket.c:2538:33: error: ‘POLLIN’ undeclared (first use in this function); did you mean ‘POLL_IN’?
+ pfd[i].events = read ? POLLIN : POLLOUT;
+
+So rename poll.h into vm_poll.h as suggested by srowe in
+https://github.com/vmware/open-vm-tools/issues/359#issuecomment-533529956
+
+Fixes:
+ - http://autobuild.buildroot.org/results/4f575ef42bbc4387a07e396205052b2da081c64d
+
+Fix #359
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ lib/asyncsocket/asyncsocket.c | 4 ++--
+ lib/hgfsServer/hgfsServer.c | 2 +-
+ lib/include/asyncsocket.h | 2 +-
+ lib/include/pollImpl.h | 2 +-
+ lib/include/{poll.h => vm_poll.h} | 0
+ lib/rpcIn/rpcin.c | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+ rename lib/include/{poll.h => vm_poll.h} (100%)
+
+diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
+index 102638cc9..01181a957 100644
+--- a/lib/asyncsocket/asyncsocket.c
++++ b/lib/asyncsocket/asyncsocket.c
+@@ -70,8 +70,8 @@
+ #else
+ #include <stddef.h>
+ #include <ctype.h>
++#include <poll.h>
+ #include <sys/types.h>
+-#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <netdb.h>
+@@ -87,7 +87,7 @@
+ #include "random.h"
+ #include "asyncsocket.h"
+ #include "asyncSocketBase.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "log.h"
+ #include "err.h"
+ #include "hostinfo.h"
+diff --git a/lib/hgfsServer/hgfsServer.c b/lib/hgfsServer/hgfsServer.c
+index 462245511..fc6912860 100644
+--- a/lib/hgfsServer/hgfsServer.c
++++ b/lib/hgfsServer/hgfsServer.c
+@@ -48,7 +48,7 @@
+ #include "hgfsServerOplock.h"
+ #include "hgfsDirNotify.h"
+ #include "userlock.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "mutexRankLib.h"
+ #include "vm_basic_asm.h"
+ #include "unicodeOperations.h"
+diff --git a/lib/include/asyncsocket.h b/lib/include/asyncsocket.h
+index 95a5e4643..a4b4e5aae 100644
+--- a/lib/include/asyncsocket.h
++++ b/lib/include/asyncsocket.h
+@@ -177,7 +177,7 @@ typedef struct AsyncSocket AsyncSocket;
+ * Or the client can specify its favorite poll class and locking behavior.
+ * Use of IVmdbPoll is only supported for regular sockets and for Attach.
+ */
+-#include "poll.h"
++#include "vm_poll.h"
+ struct IVmdbPoll;
+ typedef struct AsyncSocketPollParams {
+ int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */
+diff --git a/lib/include/pollImpl.h b/lib/include/pollImpl.h
+index 46442e556..8bc669970 100644
+--- a/lib/include/pollImpl.h
++++ b/lib/include/pollImpl.h
+@@ -44,7 +44,7 @@
+ #define INCLUDE_ALLOW_USERLEVEL
+ #include "includeCheck.h"
+
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "vm_basic_asm.h"
+
+ #if defined(__cplusplus)
+diff --git a/lib/include/poll.h b/lib/include/vm_poll.h
+similarity index 100%
+rename from lib/include/poll.h
+rename to lib/include/vm_poll.h
+diff --git a/lib/rpcIn/rpcin.c b/lib/rpcIn/rpcin.c
+index 47a3380e4..660382c62 100644
+--- a/lib/rpcIn/rpcin.c
++++ b/lib/rpcIn/rpcin.c
+@@ -57,7 +57,7 @@
+
+ #if defined(VMTOOLS_USE_VSOCKET)
+ # include <glib.h>
+-# include "poll.h"
++# include "vm_poll.h"
+ # include "asyncsocket.h"
+ # include "vmci_defs.h"
+ #include "dataMap.h"
diff --git a/user/open-vm-tools/preadv.patch b/user/open-vm-tools/preadv.patch
new file mode 100644
index 000000000..ee2aacc5a
--- /dev/null
+++ b/user/open-vm-tools/preadv.patch
@@ -0,0 +1,11 @@
+--- open-vm-tools-12.4.0-23259341/lib/file/fileIOPosix.c.old 2024-02-06 09:08:55.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/lib/file/fileIOPosix.c 2024-05-22 13:56:20.738840704 -0500
+@@ -203,7 +203,7 @@
+ * are not available in any header file.
+ */
+
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if defined(__linux__) && defined(__GLIBC__)
+ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+ /*
+ * We want preadv/pwritev. But due to FOB=64, the symbols are -64.
diff --git a/user/open-vm-tools/resolver.patch b/user/open-vm-tools/resolver.patch
new file mode 100644
index 000000000..7dd3e6fa9
--- /dev/null
+++ b/user/open-vm-tools/resolver.patch
@@ -0,0 +1,40 @@
+From: void-packages
+
+--- a/lib/nicInfo/nicInfoPosix.c
++++ b/lib/nicInfo/nicInfoPosix.c
+@@ -66,6 +66,35 @@
+ # include <net/if.h>
+ #endif
+
++
++#if !defined(__GLIBC__)
++/***************************************************************************
++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
++ * Note: res_init() is actually deprecated according to
++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
++ **************************************************************************/
++#include <string.h>
++
++static inline int res_ninit(res_state statp)
++{
++ int rc = res_init();
++ if (statp != &_res) {
++ memcpy(statp, &_res, sizeof(*statp));
++ }
++ return rc;
++}
++
++static inline int res_nclose(res_state statp)
++{
++ if (!statp)
++ return -1;
++ if (statp != &_res) {
++ memset(statp, 0, sizeof(*statp));
++ }
++ return 0;
++}
++#endif
++
+ /*
+ * resolver(3) and IPv6:
+ *
diff --git a/user/open-vm-tools/strerror_r.patch b/user/open-vm-tools/strerror_r.patch
new file mode 100644
index 000000000..05de85f7a
--- /dev/null
+++ b/user/open-vm-tools/strerror_r.patch
@@ -0,0 +1,25 @@
+--- open-vm-tools-12.4.0-23259341/lib/err/errPosix.c.old 2024-02-06 09:08:54.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/lib/err/errPosix.c 2024-05-22 13:58:47.578938258 -0500
+@@ -29,6 +29,7 @@
+ #endif
+
+ #include <errno.h>
++#include <stdio.h>
+ #include <string.h>
+ #include <locale.h>
+
+@@ -63,10 +64,12 @@
+ {
+ char *p;
+
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if defined(__linux__) && defined(__GLIBC__)
+ p = strerror_r(errorNumber, buf, bufSize);
+ #else
+- p = strerror(errorNumber);
++ if(strerror_r(errorNumber, buf, bufSize) != 0)
++ snprintf(buf, bufSize, "unknown error %i", errorNumber);
++ p = buf;
+ #endif
+ ASSERT(p != NULL);
+ return p;
diff --git a/user/open-vm-tools/vgauth-portability.patch b/user/open-vm-tools/vgauth-portability.patch
new file mode 100644
index 000000000..ad484a8fd
--- /dev/null
+++ b/user/open-vm-tools/vgauth-portability.patch
@@ -0,0 +1,49 @@
+--- open-vm-tools-12.4.0-23259341/vgauth/common/VGAuthLog.c.old 2024-02-06 09:07:33.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/vgauth/common/VGAuthLog.c 2024-05-22 14:27:07.008724455 -0500
+@@ -210,7 +210,7 @@
+ g_vsnprintf(buf, sizeof buf, fmt, args);
+ buf[sizeof buf - 1] = '\0';
+
+-#ifdef sun
++#ifndef __GLIBC__
+ strerror_r(code, errMsg, sizeof errMsg);
+ g_warning("[function %s, file %s, line %d], %s, [errno = %d], %s\n",
+ func, file, line, buf, code, errMsg);
+--- open-vm-tools-12.4.0-23259341/vgauth/lib/netPosix.c.old 2024-02-06 09:07:36.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/vgauth/lib/netPosix.c 2024-05-22 14:26:11.458768814 -0500
+@@ -27,7 +27,6 @@
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+-#include <sys/unistd.h>
+ #include <sys/un.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+--- open-vm-tools-12.4.0-23259341/vgauth/serviceImpl/netPosix.c.old 2024-02-06 09:07:35.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/vgauth/serviceImpl/netPosix.c 2024-05-22 14:28:53.728639235 -0500
+@@ -27,7 +27,6 @@
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+-#include <sys/unistd.h>
+ #include <sys/un.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+--- open-vm-tools-12.4.0-23259341/vgauth/common/vmxrpc.c.old 2024-02-06 09:07:36.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/vgauth/common/vmxrpc.c 2024-05-22 14:42:02.708035980 -0500
+@@ -76,13 +76,13 @@
+ typedef unsigned __int64 uint64;
+
+ #endif
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__)
+ typedef __uint32_t uint32;
+ typedef __uint64_t uint64;
+
+ #define SOCKET int
+ #endif
+-#ifdef sun
++#if (defined(__linux__) && !defined(__GLIBC__)) || defined(sun)
+ typedef uint32_t uint32;
+ typedef uint64_t uint64;
+
diff --git a/user/open-vm-tools/vgauthd.initd b/user/open-vm-tools/vgauthd.initd
new file mode 100644
index 000000000..8ab97f2c2
--- /dev/null
+++ b/user/open-vm-tools/vgauthd.initd
@@ -0,0 +1,6 @@
+#!/sbin/openrc-run
+
+pidfile="/run/vgauthd.pid"
+command="/usr/bin/VGAuthService"
+command_args="-s"
+command_background="true"
diff --git a/user/open-vm-tools/vix.patch b/user/open-vm-tools/vix.patch
new file mode 100644
index 000000000..9a12d0d76
--- /dev/null
+++ b/user/open-vm-tools/vix.patch
@@ -0,0 +1,11 @@
+--- open-vm-tools-12.4.0-23259341/services/plugins/vix/vixTools.c.old 2024-02-06 09:07:35.000000000 -0600
++++ open-vm-tools-12.4.0-23259341/services/plugins/vix/vixTools.c 2024-05-22 14:48:32.807786329 -0500
+@@ -66,7 +66,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__linux__)
+ #include <sys/stat.h>
+ #endif
+
diff --git a/user/open-vm-tools/vmtoolsd.pamd b/user/open-vm-tools/vmtoolsd.pamd
new file mode 100644
index 000000000..71fb8cc0d
--- /dev/null
+++ b/user/open-vm-tools/vmtoolsd.pamd
@@ -0,0 +1,6 @@
+# Welcome to Adélie Linux.
+
+# This file ensures VMware Tools uses the system-wide PAM configuration.
+
+auth include base-auth
+account include base-account