1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

emulators/virtualbox-ose: add option to build vboximg-mount

Introduce new port option VBOXIMG that enables building and installing
"vboximg-mount" utility. It is not enabled by default as it needs
fusesfs-libs as another dependency.

The utility gives access to insides of VM images like .vdi files etc.
Use "vboximg-mount -g" to get access to files on internal file systems
not supported by native FreeBSD mount command. Refer to utility's
internal online help for syntax details and to original documentation:

https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vboximg-mount.html

PR:		274817
Tested by:	vvd
Approved by:	vbox (maintainer timeout over 2 weeks)
This commit is contained in:
Eugene Grosbein 2023-11-16 18:05:14 +07:00
parent 84962599a8
commit 6c5da516ce
No known key found for this signature in database
GPG Key ID: C8960FF146564C9A
3 changed files with 29 additions and 2 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
PORTVERSION= 6.1.48
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/
DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
@ -58,7 +58,7 @@ VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \
SUB_FILES= pkg-message
OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OPUS PULSEAUDIO \
PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE VPX X11
PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11
OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11
# Since version 6.1.24 pulseaudio is broken at runtime, preventing
# virtual machines from starting if configured to use it.
@ -73,6 +73,7 @@ OPUS_DESC= Use libvpx for audio recording (requires VPX)
QT5_DESC= Build with QT5 frontend (requires X11)
R0LOGGING_DESC= Enable R0 logging (requires DEBUG)
UDPTUNNEL_DESC= Build with UDP tunnel support
VBOXIMG_DESC= Build vboximg-mount (requires fuse-libs)
VDE_DESC= Build with VDE support
VNC_DESC= Build with VNC support
VPX_DESC= Use libvpx for video recording
@ -108,6 +109,7 @@ QT5_CONFIGURE_OFF= --disable-qt
QT5_IMPLIES= X11
R0LOGGING_IMPLIES= DEBUG
UDPTUNNEL_CONFIGURE_OFF= --disable-udptunnel
VBOXIMG_LIB_DEPENDS= libfuse.so.2:sysutils/fusefs-libs
VDE_CONFIGURE_ON= --enable-vde
VDE_RUN_DEPENDS= vde_switch:net/vde2
VNC_CONFIGURE_ON= --enable-vnc
@ -183,6 +185,14 @@ PLIST_SUB+= SDK=""
PLIST_SUB+= SDK="@comment "
.endif
.if ${PORT_OPTIONS:MVBOXIMG}
EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-vboximg-Config.kmk
VBOX_UTILS+= vboximg-mount
PLIST_SUB+= VBOXIMG=""
.else
PLIST_SUB+= VBOXIMG="@comment "
.endif
KMK_ARCH= freebsd.${ARCH}
PLIST_SUB+= ARCH="${KMK_ARCH}"
@ -410,6 +420,10 @@ do-install:
${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH}/
.endif
.if ${PORT_OPTIONS:MVBOXIMG}
${LN} -fs ../${VBOX_DIR_REL}/vboximg-mount ${STAGEDIR}${PREFIX}/bin/
.endif
.if ${PORT_OPTIONS:MWEBSERVICE}
${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice
${INSTALL_DATA} ${KMK_BUILDDIR}/obj/webservice/vboxweb.wsdl \

View File

@ -0,0 +1,11 @@
--- Config.kmk.orig 2023-10-12 15:43:35.000000000 +0700
+++ Config.kmk 2023-10-30 22:11:09.119922000 +0700
@@ -869,7 +869,7 @@
# windows versions (only define when buildling win.x86).
#VBOX_WITH_MORE_NT4_COMPAT_BINARIES = 1
# Set this to enable building of the vboximg-mount FUSE mounting utility.
-if1of ($(KBUILD_TARGET), darwin linux)
+if1of ($(KBUILD_TARGET), darwin freebsd linux)
VBOX_WITH_VBOXIMGMOUNT = 1
endif
# Set this to enable packaging the fuse related bits into our installer.

View File

@ -11,6 +11,7 @@ bin/vboxautostart
bin/vboxballoonctrl
bin/vboxbugreport
bin/vboxheadless
%%VBOXIMG%%bin/vboximg-mount
bin/vboxmanage
%%X11%%bin/vboxsdl
%%WEBSERVICE%%bin/vboxwebsrv
@ -420,6 +421,7 @@ lib/virtualbox/VMMR0.r0
%%QT%%@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VirtualBoxVM
%%QT%%lib/virtualbox/VirtualBoxVM.so
%%SDK%%lib/virtualbox/sdk
%%VBOXIMG%%lib/virtualbox/vboximg-mount
%%WEBSERVICE%%lib/virtualbox/vboxwebsrv
%%WEBSERVICE%%lib/virtualbox/webtest
%%VNC%%lib/virtualbox/ExtensionPacks/VNC/ExtPack-license.html