diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2024-12-12 17:46:02 +0100 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2024-12-12 18:18:23 +0100 |
commit | 77dbd57b8e9dad16375ba7a249b8046dd66d1c46 (patch) | |
tree | ec5ddb7ef8c8cfdd3307c26cd7352085b2d011fd /emulators/open-vm-tools | |
parent | science/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
Diffstat (limited to 'emulators/open-vm-tools')
-rw-r--r-- | emulators/open-vm-tools/Makefile | 16 | ||||
-rw-r--r-- | emulators/open-vm-tools/files/patch-modules_Makefile.am | 19 | ||||
-rw-r--r-- | emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c | 10 | ||||
-rw-r--r-- | emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c | 24 | ||||
-rw-r--r-- | emulators/open-vm-tools/files/vmware-kmod.in | 6 | ||||
-rw-r--r-- | emulators/open-vm-tools/pkg-plist | 3 |
6 files changed, 9 insertions, 69 deletions
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/patch-modules_freebsd_vmblock_vfsops.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c deleted file mode 100644 index 40b8facd5869..000000000000 --- a/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c +++ /dev/null @@ -1,10 +0,0 @@ ---- modules/freebsd/vmblock/vfsops.c.orig 2023-03-10 17:41:18 UTC -+++ modules/freebsd/vmblock/vfsops.c -@@ -173,7 +173,6 @@ VMBlockVFSMount(struct mount *mp) // IN: mount( - #endif - error = namei(ndp); - if (error) { -- NDFREE(ndp, 0); - uma_zfree(VMBlockPathnameZone, pathname); - return error; - } diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c deleted file mode 100644 index 0b6be303c9d6..000000000000 --- a/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c +++ /dev/null @@ -1,24 +0,0 @@ ---- modules/freebsd/vmmemctl/os.c.orig 2023-03-07 22:57:07 UTC -+++ modules/freebsd/vmmemctl/os.c -@@ -103,7 +103,11 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta - #define KVA_FREE(offset, size) kva_free(offset, size) - - #define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO) --#define KMEM_FREE(offset, size) kmem_free(offset, size) -+#if __FreeBSD_version < 1400070 -+ #define KMEM_FREE(offset, size) kmem_free((vm_offset_t)offset, size) -+#else -+ #define KMEM_FREE(offset, size) kmem_free(offset, size) -+#endif - - /* - * Globals -@@ -404,7 +408,7 @@ os_pmap_free(os_pmap *p) // IN - static void - os_pmap_free(os_pmap *p) // IN - { -- KMEM_FREE((vm_offset_t)p->bitmap, p->size); -+ KMEM_FREE(p->bitmap, p->size); - p->size = 0; - p->bitmap = NULL; - } 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 |