summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2024-12-12 17:46:02 +0100
committerBaptiste Daroussin <bapt@FreeBSD.org>2024-12-12 18:18:23 +0100
commit77dbd57b8e9dad16375ba7a249b8046dd66d1c46 (patch)
treeec5ddb7ef8c8cfdd3307c26cd7352085b2d011fd
parentscience/PETSc: Correction (diff)
emulators/open-vm-{tools,kmod}: split the package
Split the package to build the kmods separatly! Building separately has multiple benefits: 1. it allows user to rebuild when they upgrade their kernel without rebuilding all of the tools which can take a long time. 2. it allows us to provide the modules in the new kmods package repository 3. it installs the kmods the in the same place as the regular kmods: /boot/modules It means we can probably get rid of the rc script in favor if letting users use kld_list mecanism but I will let this decision to the maintainer based on what it probably best for users. Approved by: garga (maintainer) Reviewed by: garga (maintainer) Differential Revision: https://reviews.freebsd.org/D48059
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/open-vm-kmod/Makefile30
-rw-r--r--emulators/open-vm-kmod/distinfo3
-rw-r--r--emulators/open-vm-kmod/files/patch-Makefile7
-rw-r--r--emulators/open-vm-kmod/files/patch-vmblock_vfsops.c (renamed from emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c)4
-rw-r--r--emulators/open-vm-kmod/files/patch-vmmemctl_os.c (renamed from emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c)4
-rw-r--r--emulators/open-vm-kmod/pkg-descr6
-rw-r--r--emulators/open-vm-tools/Makefile16
-rw-r--r--emulators/open-vm-tools/files/patch-modules_Makefile.am19
-rw-r--r--emulators/open-vm-tools/files/vmware-kmod.in6
-rw-r--r--emulators/open-vm-tools/pkg-plist3
11 files changed, 60 insertions, 39 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 473fd6fa5292..1c1f9d5b485b 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -101,6 +101,7 @@
SUBDIR += ods2reader
SUBDIR += open-simh
SUBDIR += open-vm-tools
+ SUBDIR += open-vm-kmod
SUBDIR += openmsx
SUBDIR += p5-Acme-6502
SUBDIR += parallels-tools
diff --git a/emulators/open-vm-kmod/Makefile b/emulators/open-vm-kmod/Makefile
new file mode 100644
index 000000000000..64a367bd1c98
--- /dev/null
+++ b/emulators/open-vm-kmod/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= open-vm-kmod
+PORTVERSION= 12.5.0
+DISTVERSIONPREFIX= stable-
+PORTEPOCH= 2
+CATEGORIES= emulators
+
+MAINTAINER= garga@FreeBSD.org
+COMMENT= Open VMware tools for FreeBSD VMware guests ${${FLAVOR}_COMMENT}
+WWW= https://github.com/vmware/open-vm-tools
+
+LICENSE= BSD2CLAUSE GPLv2
+LICENSE_COMB= multi
+LICENSE_FILE_GPLv2= ${WRKSRC}/vmmemctl/COPYING
+LICENSE_FILE_BSD2CLAUSE= ${WRKSRC}/vmblock/COPYING
+
+ONLY_FOR_ARCHS= aarch64 amd64 i386
+
+USES= kmod uidfix
+
+USE_GITHUB= yes
+GH_ACCOUNT= vmware
+GH_PROJECT= open-vm-tools
+
+WRKSRC_SUBDIR= open-vm-tools/modules/freebsd/
+MAKE_ARGS= OVT_SOURCE_DIR=${WRKSRC:H:H:H}
+
+PLIST_FILES= ${KMODDIR}/vmblock.ko \
+ ${KMODDIR}/vmmemctl.ko
+
+.include <bsd.port.mk>
diff --git a/emulators/open-vm-kmod/distinfo b/emulators/open-vm-kmod/distinfo
new file mode 100644
index 000000000000..2f34cde2a8c0
--- /dev/null
+++ b/emulators/open-vm-kmod/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1733928741
+SHA256 (vmware-open-vm-tools-stable-12.5.0_GH0.tar.gz) = a52182c7e6b5df41bb317625e9d8592ecdb9db814d1c2c9b7cdb91a77f8c0640
+SIZE (vmware-open-vm-tools-stable-12.5.0_GH0.tar.gz) = 3001944
diff --git a/emulators/open-vm-kmod/files/patch-Makefile b/emulators/open-vm-kmod/files/patch-Makefile
new file mode 100644
index 000000000000..a1ac4b5af968
--- /dev/null
+++ b/emulators/open-vm-kmod/files/patch-Makefile
@@ -0,0 +1,7 @@
+--- Makefile.orig 2024-12-12 16:16:21 UTC
++++ Makefile
+@@ -0,0 +1,4 @@
++SUBDIR+= vmblock
++SUBDIR+= vmmemctl
++
++.include <bsd.subdir.mk>
diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c b/emulators/open-vm-kmod/files/patch-vmblock_vfsops.c
index 40b8facd5869..97840675e338 100644
--- a/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c
+++ b/emulators/open-vm-kmod/files/patch-vmblock_vfsops.c
@@ -1,5 +1,5 @@
---- modules/freebsd/vmblock/vfsops.c.orig 2023-03-10 17:41:18 UTC
-+++ modules/freebsd/vmblock/vfsops.c
+--- vmblock/vfsops.c.orig 2024-10-10 15:05:07 UTC
++++ vmblock/vfsops.c
@@ -173,7 +173,6 @@ VMBlockVFSMount(struct mount *mp) // IN: mount(
#endif
error = namei(ndp);
diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
index 0b6be303c9d6..d096f92236c3 100644
--- a/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c
+++ b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
@@ -1,5 +1,5 @@
---- modules/freebsd/vmmemctl/os.c.orig 2023-03-07 22:57:07 UTC
-+++ modules/freebsd/vmmemctl/os.c
+--- vmmemctl/os.c.orig 2024-10-10 15:05:07 UTC
++++ vmmemctl/os.c
@@ -103,7 +103,11 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta
#define KVA_FREE(offset, size) kva_free(offset, size)
diff --git a/emulators/open-vm-kmod/pkg-descr b/emulators/open-vm-kmod/pkg-descr
new file mode 100644
index 000000000000..de6677a26c1c
--- /dev/null
+++ b/emulators/open-vm-kmod/pkg-descr
@@ -0,0 +1,6 @@
+open-vm-kmod is a set of modules that enable several features in
+VMware products for better management of, and seamless user
+interactions with, guests.
+
+It includes kernel modules for enhancing the performance of virtual
+machines running FreeBSD.
diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile
index 202faed130a9..18c7cf396891 100644
--- a/emulators/open-vm-tools/Makefile
+++ b/emulators/open-vm-tools/Makefile
@@ -1,5 +1,6 @@
PORTNAME= open-vm-tools
PORTVERSION= 12.5.0
+PORTREVISION= 1
DISTVERSIONPREFIX= stable-
PORTEPOCH= 2
CATEGORIES= emulators
@@ -14,6 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
ONLY_FOR_ARCHS= aarch64 amd64 i386
LIB_DEPENDS= libdnet.so:net/libdnet
+RUN_DEPENDS= open-vm-kmod>0:emulators/open-vm-kmod
FLAVORS= default nox11
default_CONFLICTS_INSTALL= open-vm-tools-nox11
@@ -21,7 +23,7 @@ nox11_PKGNAMESUFFIX= -nox11
nox11_CONFLICTS_INSTALL= open-vm-tools
nox11_COMMENT= (without X11)
-USES= autoreconf gettext-runtime gnome kmod libtool localbase \
+USES= autoreconf gettext-runtime gnome libtool localbase \
pathfix pkgconfig
USE_GITHUB= yes
@@ -34,13 +36,12 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--disable-vgauth \
--enable-containerinfo=no \
--sysconfdir=${PREFIX}/etc \
- --without-icu
-CONFIGURE_ENV+= SYSDIR=${SRC_BASE}/sys
+ --without-icu \
+ --without-kernel-modules
INSTALL_TARGET= install-strip
CPPFLAGS+= -Wno-deprecated-declarations
-SSP_UNSAFE= kernel module does not support ssp
WRKSRC_SUBDIR= open-vm-tools
@@ -75,16 +76,9 @@ post-patch:
@${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@"\
${WRKSRC}/lib/guestApp/guestApp.c
-post-build:
- cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
-
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers
${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input
- ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko \
- ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko
- ${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko \
- ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/tools.conf \
${STAGEDIR}${DATADIR}/tools.conf.sample
diff --git a/emulators/open-vm-tools/files/patch-modules_Makefile.am b/emulators/open-vm-tools/files/patch-modules_Makefile.am
deleted file mode 100644
index b53fda2dc938..000000000000
--- a/emulators/open-vm-tools/files/patch-modules_Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
---- modules/Makefile.am.orig 2018-09-29 03:57:04 UTC
-+++ modules/Makefile.am
-@@ -65,11 +65,11 @@ if SOLARIS
- done
- endif
- if FREEBSD
-- for MOD in $(MODULES); do \
-- $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \
-- $(INSTALL) -m 644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \
-- $(DESTDIR)$(MODULES_DIR); \
-- done
-+# for MOD in $(MODULES); do \
-+# $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \
-+# $(INSTALL) -m 644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \
-+# $(DESTDIR)$(MODULES_DIR); \
-+# done
- endif
-
- uninstall-hook:
diff --git a/emulators/open-vm-tools/files/vmware-kmod.in b/emulators/open-vm-tools/files/vmware-kmod.in
index a62f03b465e8..9c6863af4387 100644
--- a/emulators/open-vm-tools/files/vmware-kmod.in
+++ b/emulators/open-vm-tools/files/vmware-kmod.in
@@ -13,9 +13,9 @@ checkvm_cmd="%%PREFIX%%/bin/vmware-checkvm > /dev/null"
vmware_mod_load()
{
echo -n "Loading $1 kernel module: "
- if kldstat -qn %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko; then
+ if kldstat -qn $1.ko; then
echo "already loaded."
- elif kldload -q %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko; then
+ elif kldload -q $1.ko; then
echo "done."
else
echo "failed."
@@ -25,7 +25,7 @@ vmware_mod_load()
vmware_mod_status()
{
echo -n "Checking $1 kernel module: "
- if kldstat -qn %%PREFIX%%/lib/vmware-tools/modules/drivers/$1.ko; then
+ if kldstat -qn $1.ko; then
echo "loaded."
else
echo "not loaded"
diff --git a/emulators/open-vm-tools/pkg-plist b/emulators/open-vm-tools/pkg-plist
index 7ae249592b27..92ebcad1749b 100644
--- a/emulators/open-vm-tools/pkg-plist
+++ b/emulators/open-vm-tools/pkg-plist
@@ -53,8 +53,6 @@ lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libdesktopEvents.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libdndcp.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libresolutionSet.so
-lib/vmware-tools/modules/drivers/vmblock.ko
-lib/vmware-tools/modules/drivers/vmmemctl.ko
%%DEPLOYPKG%%libdata/pkgconfig/libDeployPkg.pc
libdata/pkgconfig/vmguestlib.pc
sbin/mount_vmblock
@@ -83,6 +81,7 @@ share/vmware-tools/resume-vm-default
share/vmware-tools/scripts/vmware/network
share/vmware-tools/statechange.subr
share/vmware-tools/suspend-vm-default
+@dir lib/vmware-tools/modules/drivers
@dir lib/vmware-tools/modules/input
@dir %%DATADIR%%/scripts/vmware
@dir %%DATADIR%%/tests