Date: Tue, 4 Mar 2014 00:45:37 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r346981 - in head/emulators: virtualbox-ose virtualbox-ose-additions virtualbox-ose-additions/files virtualbox-ose-kmod virtualbox-ose-kmod/files virtualbox-ose/files Message-ID: <201403040045.s240jbv9010770@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Tue Mar 4 00:45:37 2014 New Revision: 346981 URL: http://svnweb.freebsd.org/changeset/ports/346981 QAT: https://qat.redports.org/buildarchive/r346981/ Log: Update to 4.3.8. Obtained from: svn.redports.org/virtualbox Added: head/emulators/virtualbox-ose/files/extrapatch-Config.kmk (contents, props changed) head/emulators/virtualbox-ose/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-freebsd-Makefile (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Network-slirp-resolv_conf_parser.c (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-VBoxNetAdp-Makefile.kmk (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-NetworkServices-NAT-VBoxNetLwipNAT.cpp (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h (contents, props changed) Deleted: head/emulators/virtualbox-ose-additions/files/patch-Config.kmk head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-Makefile.kmk head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c head/emulators/virtualbox-ose-kmod/files/extrapatch-Config.kmk head/emulators/virtualbox-ose-kmod/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile head/emulators/virtualbox-ose-kmod/files/patch-Config.kmk head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-Makefile.kmk head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h Modified: head/emulators/virtualbox-ose-additions/Makefile head/emulators/virtualbox-ose-additions/distinfo head/emulators/virtualbox-ose-additions/pkg-plist head/emulators/virtualbox-ose-kmod/Makefile head/emulators/virtualbox-ose-kmod/distinfo head/emulators/virtualbox-ose-kmod/pkg-plist head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/distinfo head/emulators/virtualbox-ose/pkg-plist Modified: head/emulators/virtualbox-ose-additions/Makefile ============================================================================== --- head/emulators/virtualbox-ose-additions/Makefile Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-additions/Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= virtualbox-ose -DISTVERSION= 4.3.6 +DISTVERSION= 4.3.8 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ @@ -21,6 +21,7 @@ BUILD_DEPENDS= yasm:${PORTSDIR}/devel/ya kmk:${PORTSDIR}/devel/kBuild UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX} +PATCHDIR= ${.CURDIR}/../${PORTNAME}/files WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} USE_RC_SUBR= vboxguest vboxservice USES= iconv kmod @@ -40,7 +41,7 @@ CONFLICTS_INSTALL= virtualbox-ose-additi OPTIONS_DEFINE= DEBUG X11 OPENGL OPTIONS_DEFAULT= X11 -OPTIONS_SUB= DEBUG X11 OPENGL +OPTIONS_SUB= yes .include <bsd.port.options.mk> @@ -48,17 +49,19 @@ VIDEODIR= ${PREFIX}/lib/xorg/modules/dri INPUTDIR= ${PREFIX}/lib/xorg/modules/input VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions +VBOX_SBINS= VBoxControl \ + VBoxService + +BUILD_WRKSRC= ${VBOX_BIN}/src KMK_BUILDTYPE= release KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} KMK_FLAGS= -MAKE_FLAGS= SYSDIR=${SRC_BASE}/sys - .if ${PORT_OPTIONS:MDEBUG} KMK_FLAGS+= BUILD_TYPE=debug KMK_BUILDTYPE= debug -MAKE_FLAGS+= DEBUG_FLAGS="-O1 -g" +MAKE_ARGS+= DEBUG_FLAGS="-O1 -g" .endif .if ${PORT_OPTIONS:MX11} @@ -71,6 +74,13 @@ VBOX_WITH_X11= .if ${PORT_OPTIONS:MOPENGL} USE_XORG+= xcomposite xdamage xext xfixes USE_GL= gl +VBOX_LIBS= VBoxOGL.so \ + VBoxOGLarrayspu.so \ + VBoxOGLcrutil.so \ + VBoxOGLerrorspu.so \ + VBoxOGLfeedbackspu.so \ + VBoxOGLpackspu.so \ + VBoxOGLpassthroughspu.so .else CONFIGURE_ARGS+=--disable-opengl .endif @@ -102,6 +112,7 @@ post-patch: ${WRKSRC}/configure \ ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ + ${WRKSRC}/src/VBox/Additions/common/crOpenGL/fakedri_drv.c \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop @${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure @@ -115,12 +126,11 @@ pre-build: @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \ ${WRKSRC}/env.sh \ ${WRKSRC}/src/VBox/Additions/freebsd/Installer/vboxguest.sh - -do-build: - cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} - cd ${VBOX_BIN}/src && make ${MAKE_FLAGS} + cd ${WRKSRC} && ${SH} env.sh && \ + ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} do-install: + ${MKDIR} ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko ${STAGEDIR}${KMODDIR} .if ${PORT_OPTIONS:MDEBUG} ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko.symbols ${STAGEDIR}${KMODDIR} @@ -129,48 +139,40 @@ do-install: ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko ${STAGEDIR}${KMODDIR} .endif - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d/ - - ${MKDIR} ${STAGEDIR}${PREFIX}/sbin - ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxControl ${STAGEDIR}${PREFIX}/sbin/ - ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxService ${STAGEDIR}${PREFIX}/sbin/ + ${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \ + ${STAGEDIR}${PREFIX}/sbin/ .if ${PORT_OPTIONS:MX11} ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${STAGEDIR}${PREFIX}/bin/ - - ${MKDIR} ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ - ${STAGEDIR}${PREFIX}/bin/VBoxClient-all + ${STAGEDIR}${PREFIX}/bin/VBoxClient-all # X11 autostart ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ ${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ - ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ + ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ # KDE autostart ${MKDIR} ${STAGEDIR}${PREFIX}/share/autostart/ ${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ - ${STAGEDIR}${PREFIX}/share/autostart/ + ${STAGEDIR}${PREFIX}/share/autostart/ ${MKDIR} ${STAGEDIR}${VIDEODIR} - ${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_${XSERVER_ABI}.so ${STAGEDIR}${VIDEODIR}/vboxvideo_drv.so + ${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_${XSERVER_ABI}.so \ + ${STAGEDIR}${VIDEODIR}/vboxvideo_drv.so ${MKDIR} ${STAGEDIR}${INPUTDIR} - ${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_${XSERVER_ABI}.so ${STAGEDIR}${INPUTDIR}/vboxmouse_drv.so + ${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_${XSERVER_ABI}.so \ + ${STAGEDIR}${INPUTDIR}/vboxmouse_drv.so .endif .if ${PORT_OPTIONS:MOPENGL} - ${MKDIR} ${STAGEDIR}${PREFIX}/lib - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGL.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLarrayspu.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLcrutil.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLerrorspu.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLfeedbackspu.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLpackspu.so ${STAGEDIR}${PREFIX}/lib/ - ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLpassthroughspu.so ${STAGEDIR}${PREFIX}/lib/ + ${INSTALL_DATA} ${VBOX_LIBS:S|^|${VBOX_BIN}/|} \ + ${STAGEDIR}${PREFIX}/lib/ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/dri - ${LN} -sf ${PREFIX}/lib/VBoxOGL.so ${STAGEDIR}${PREFIX}/lib/dri/vboxvideo_dri.so + ${LN} -sf ${PREFIX}/lib/VBoxOGL.so \ + ${STAGEDIR}${PREFIX}/lib/dri/vboxvideo_dri.so .endif .include <bsd.port.post.mk> Modified: head/emulators/virtualbox-ose-additions/distinfo ============================================================================== --- head/emulators/virtualbox-ose-additions/distinfo Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-additions/distinfo Tue Mar 4 00:45:37 2014 (r346981) @@ -1,2 +1,2 @@ -SHA256 (VirtualBox-4.3.6.tar.bz2) = c547e1e32e0b06fba9ee4ca7842f8ddee8e94c64aab17c2b0d0793f0caccbb27 -SIZE (VirtualBox-4.3.6.tar.bz2) = 89609199 +SHA256 (VirtualBox-4.3.8.tar.bz2) = ffabd8735bdc80753cec29d01b499769f41e083f37a3f58b3055f19d3b1b9641 +SIZE (VirtualBox-4.3.8.tar.bz2) = 90224116 Modified: head/emulators/virtualbox-ose-additions/pkg-plist ============================================================================== --- head/emulators/virtualbox-ose-additions/pkg-plist Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-additions/pkg-plist Tue Mar 4 00:45:37 2014 (r346981) @@ -1,8 +1,7 @@ -%%X11%%bin/VBoxClient-all +@comment $FreeBSD: ports/emulators/virtualbox-ose-additions/pkg-plist,v 1.6 2012/11/17 05:57:24 svnexp Exp $ %%X11%%bin/VBoxClient +%%X11%%bin/VBoxClient-all %%X11%%etc/xdg/autostart/vboxclient.desktop -sbin/VBoxControl -sbin/VBoxService %%OPENGL%%lib/VBoxOGL.so %%OPENGL%%lib/VBoxOGLarrayspu.so %%OPENGL%%lib/VBoxOGLcrutil.so @@ -11,20 +10,18 @@ sbin/VBoxService %%OPENGL%%lib/VBoxOGLpackspu.so %%OPENGL%%lib/VBoxOGLpassthroughspu.so %%OPENGL%%lib/dri/vboxvideo_dri.so -%%X11%%share/autostart/vboxclient.desktop %%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so %%X11%%lib/xorg/modules/input/vboxmouse_drv.so +sbin/VBoxControl +sbin/VBoxService +%%X11%%share/autostart/vboxclient.desktop %%X11%%@dirrmtry share/autostart %%X11%%@dirrmtry lib/xorg/modules/drivers %%X11%%@dirrmtry lib/xorg/modules/input %%X11%%@dirrmtry lib/xorg/modules %%X11%%@dirrmtry lib/xorg -%%X11%%@dirrmtry etc/xdg/autostart -%%X11%%@dirrmtry etc/xdg %%OPENGL%%@dirrmtry lib/dri -%%X11%%@dirrmtry lib @cwd / %%KMODDIR%%/vboxguest.ko %%DEBUG%%%%KMODDIR%%/vboxguest.ko.symbols %%X11%%%%KMODDIR%%/vboxvideo.ko -%%DEBUG%%%%X11%%%%KMODDIR%%/vboxvideo.ko Modified: head/emulators/virtualbox-ose-kmod/Makefile ============================================================================== --- head/emulators/virtualbox-ose-kmod/Makefile Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-kmod/Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= virtualbox-ose -DISTVERSION= 4.3.6 +DISTVERSION= 4.3.8 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ @@ -22,6 +22,7 @@ BUILD_DEPENDS= yasm:${PORTSDIR}/devel/ya USES= kmod UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX} +PATCHDIR= ${.CURDIR}/../${PORTNAME}/files WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} USE_RC_SUBR= vboxnet ONLY_FOR_ARCHS= i386 amd64 @@ -37,27 +38,29 @@ CONFLICTS= bcc-[0-9]* CONFLICTS_INSTALL= virtualbox-ose-kmod-devel-4* virtualbox-ose-kmod-legacy-4* OPTIONS_DEFINE= DEBUG VIMAGE +OPTIONS_SUB= yes DEBUG_DESC= Debug symbols, additional logs and assertions VIMAGE_DESC= VIMAGE virtual networking support .include <bsd.port.options.mk> VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/src +VBOX_KMODS= vboxdrv \ + vboxnetadp \ + vboxnetflt + +BUILD_WRKSRC= ${VBOX_BIN} KMK_BUILDTYPE= release KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys KMK_FLAGS= HostDrivers-scripts vboxdrv-mod VBoxNetFlt-src VBoxNetAdp-src -MAKE_FLAGS= SYSDIR=${SRC_BASE}/sys - .if ${PORT_OPTIONS:MDEBUG} KMK_FLAGS+= BUILD_TYPE=debug KMK_BUILDTYPE= debug -EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Config.kmk ${FILESDIR}/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile -MAKE_FLAGS+= DEBUG_FLAGS="-O1 -g" -PLIST_SUB+= WITH_DEBUG="" -.else -PLIST_SUB+= WITH_DEBUG="@comment " +EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Config.kmk \ + ${PATCHDIR}/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile +MAKE_ARGS+= DEBUG_FLAGS="-O1 -g" .endif .if ${ARCH} == i386 @@ -84,19 +87,16 @@ post-patch: pre-build: @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \ ${WRKSRC}/env.sh - -do-build: - cd ${WRKSRC} && ${SH} env.sh && cd ${WRKSRC}/src/VBox/HostDrivers && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} - cd ${VBOX_BIN} && make ${MAKE_FLAGS} + cd ${WRKSRC} && ${SH} env.sh && cd ${WRKSRC}/src/VBox/HostDrivers && \ + ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} do-install: - ${INSTALL_KLD} ${VBOX_BIN}/vboxdrv/vboxdrv.ko ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetadp/vboxnetadp.ko ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetflt/vboxnetflt.ko ${STAGEDIR}${KMODDIR} + ${MKDIR} ${STAGEDIR}${KMODDIR} +.for i in ${VBOX_KMODS} + ${INSTALL_KLD} ${VBOX_BIN}/${i}/${i}.ko ${STAGEDIR}${KMODDIR} .if ${PORT_OPTIONS:MDEBUG} - ${INSTALL_KLD} ${VBOX_BIN}/vboxdrv/vboxdrv.ko.symbols ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetadp/vboxnetadp.ko.symbols ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetflt/vboxnetflt.ko.symbols ${STAGEDIR}${KMODDIR} + ${INSTALL_KLD} ${VBOX_BIN}/${i}/${i}.ko.symbols ${STAGEDIR}${KMODDIR} .endif +.endfor .include <bsd.port.post.mk> Modified: head/emulators/virtualbox-ose-kmod/distinfo ============================================================================== --- head/emulators/virtualbox-ose-kmod/distinfo Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-kmod/distinfo Tue Mar 4 00:45:37 2014 (r346981) @@ -1,2 +1,2 @@ -SHA256 (VirtualBox-4.3.6.tar.bz2) = c547e1e32e0b06fba9ee4ca7842f8ddee8e94c64aab17c2b0d0793f0caccbb27 -SIZE (VirtualBox-4.3.6.tar.bz2) = 89609199 +SHA256 (VirtualBox-4.3.8.tar.bz2) = ffabd8735bdc80753cec29d01b499769f41e083f37a3f58b3055f19d3b1b9641 +SIZE (VirtualBox-4.3.8.tar.bz2) = 90224116 Modified: head/emulators/virtualbox-ose-kmod/pkg-plist ============================================================================== --- head/emulators/virtualbox-ose-kmod/pkg-plist Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose-kmod/pkg-plist Tue Mar 4 00:45:37 2014 (r346981) @@ -1,7 +1,8 @@ +@comment $FreeBSD$ @cwd / %%KMODDIR%%/vboxdrv.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxdrv.ko.symbols +%%DEBUG%%%%KMODDIR%%/vboxdrv.ko.symbols %%KMODDIR%%/vboxnetadp.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxnetadp.ko.symbols +%%DEBUG%%%%KMODDIR%%/vboxnetadp.ko.symbols %%KMODDIR%%/vboxnetflt.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxnetflt.ko.symbols +%%DEBUG%%%%KMODDIR%%/vboxnetflt.ko.symbols Modified: head/emulators/virtualbox-ose/Makefile ============================================================================== --- head/emulators/virtualbox-ose/Makefile Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose/Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= virtualbox-ose -DISTVERSION= 4.3.6 +DISTVERSION= 4.3.8 CATEGORIES= emulators MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ @@ -26,7 +26,7 @@ BUILD_DEPENDS= yasm:${PORTSDIR}/devel/ya LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \ libxslt.so:${PORTSDIR}/textproc/libxslt \ libcurl.so:${PORTSDIR}/ftp/curl -RUN_DEPENDS= ${KMODDIR}/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod \ +RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:${PORTSDIR}/emulators/virtualbox-ose-kmod \ cdrecord:${PORTSDIR}/sysutils/cdrtools WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} @@ -54,7 +54,7 @@ VBOX_GUEST_VER= ${PORTVERSION} OPTIONS_DEFINE= QT4 DEBUG GUESTADDITIONS DBUS PULSEAUDIO UDPTUNNEL VDE VNC WEBSERVICE NLS X11 VPX PYTHON OPTIONS_DEFAULT= QT4 DBUS X11 UDPTUNNEL VNC WEBSERVICE PYTHON -OPTIONS_SUB= X11 QT4 GUESTADDITIONS VNC NLS WEBSERVICE PYTHON +OPTIONS_SUB= yes DEBUG_DESC= Debug symbols, additional logs and assertions QT4_DESC= Build with QT4 Frontend GUESTADDITIONS_DESC= Build with Guest Additions @@ -87,14 +87,12 @@ ENV= .SHELL: path="/bin/sh" unsetenv=true .endif -NO_STAGE= yes .include <bsd.port.options.mk> -KMODDIR= /boot/modules - -PLIST_SUB+= PYTHON_VER=${PYTHON_VER} \ +PLIST_SUB+= GUEST_VER=${VBOX_GUEST_VER} \ + PYTHON_VER=${PYTHON_VER} \ PYTHON_VERU=${PYTHON_VER:S/./_/} \ - GUEST_VER=${VBOX_GUEST_VER} + VBOXGROUP=${VBOXGROUP} SUB_LIST+= VBOXUSER=${VBOXUSER} \ VBOXWSUSER=${VBOXWSUSER} @@ -102,7 +100,7 @@ USE_RC_SUBR+= vboxheadless vboxwatchdog KMK_BUILDTYPE= release KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys -KMK_FLAGS= -j 1 +KMK_FLAGS= -j${MAKE_JOBS_NUMBER} .if empty(PORT_OPTIONS:MQT4) && !empty(PORT_OPTIONS:MNLS) BROKEN= NLS support requires QT4 frontend. Run 'make config' again! @@ -170,8 +168,8 @@ PLIST_SUB+= ARCH="${KMK_ARCH}" .include <bsd.port.pre.mk> .if ${OSVERSION} < 900000 -EXTRA_PATCHES+= ${FILESDIR}/extrapatch-src-VBox-Main-src-server-generic-NetIf-generic.cpp \ - ${FILESDIR}/extrapatch-src-VBox-Devices-PC-vbox.dsl +EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src-VBox-Devices-PC-vbox.dsl \ + ${PATCHDIR}/extrapatch-src-VBox-Main-src-server-generic-NetIf-generic.cpp .endif pre-everything:: @@ -225,83 +223,63 @@ post-patch: .endif pre-build: - @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \ - ${WRKSRC}/env.sh + @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' ${WRKSRC}/env.sh do-build: - cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} + cd ${WRKSRC} && ${SH} env.sh && \ + ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} do-install: - ${MKDIR} ${DATADIR} - (cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom && ${COPYTREE_SHARE} "idl samples" ${DATADIR}) + ${MKDIR} ${STAGEDIR}${DATADIR} + cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom && ${COPYTREE_SHARE} "idl samples" ${STAGEDIR}${DATADIR} - ${MKDIR} ${PREFIX}/include/virtualbox - (cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom/include && ${COPYTREE_SHARE} "*" ${PREFIX}/include/virtualbox) + ${MKDIR} ${STAGEDIR}${PREFIX}/include/virtualbox + cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom/include && ${COPYTREE_SHARE} "*" ${STAGEDIR}${PREFIX}/include/virtualbox - ${MKDIR} ${PREFIX}/lib/virtualbox - (cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin && ${COPYTREE_SHARE} "*.so *.gc *.r0 *.fd components VBoxExtPackHelperApp" ${PREFIX}/lib/virtualbox) + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox + cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin && ${COPYTREE_SHARE} "*.so *.gc *.r0 *.fd components VBoxExtPackHelperApp" ${STAGEDIR}${PREFIX}/lib/virtualbox .if ${PORT_OPTIONS:MNLS} - ${MKDIR} ${DATADIR}/nls - (cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/obj/VirtualBox/qtnls && ${COPYTREE_SHARE} "*.qm" ${DATADIR}/nls) + cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/obj/VirtualBox/qtnls && ${COPYTREE_SHARE} "*.qm" ${STAGEDIR}${DATADIR}/nls .endif - ${MKDIR} ${PREFIX}/bin .for f in VBoxManage VBoxNetAdpCtl VBoxNetDHCP VBoxSVC VBoxXPCOMIPCD VBoxBalloonCtrl ${VBOX_FRONTENDS} ${VBOX_WEB} - ${INSTALL_PROGRAM} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/${f} ${PREFIX}/lib/virtualbox/ - ${LN} -sf ${PREFIX}/lib/virtualbox/${f} ${PREFIX}/bin/ -.endfor - -.for f in VBoxNetAdpCtl VBoxNetDHCP ${VBOX_FRONTENDS} - ${CHMOD} 4511 ${PREFIX}/lib/virtualbox/${f} -.endfor - -.for f in VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxExtPackHelperApp VBoxBalloonCtrl - ${CHMOD} 0711 ${PREFIX}/lib/virtualbox/${f} + ${INSTALL_PROGRAM} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/${f} ${STAGEDIR}${PREFIX}/lib/virtualbox/ + ${LN} -sf ${PREFIX}/lib/virtualbox/${f} ${STAGEDIR}${PREFIX}/bin/ .endfor .if ${PORT_OPTIONS:MVNC} - ${MKDIR} ${PREFIX}/lib/virtualbox/ExtensionPacks - ${CP} -a ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/ExtensionPacks/VNC ${PREFIX}/lib/virtualbox/ExtensionPacks + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/${KMK_ARCH} + ${INSTALL_DATA} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/ExtensionPacks/VNC/ExtPack* ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/ + ${INSTALL_LIB} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* ${STAGEDIR}${PREFIX}/lib/virtualbox/ExtensionPacks/VNC/${KMK_ARCH}/ .endif .if ${PORT_OPTIONS:MWEBSERVICE} - ${MKDIR} ${DATADIR}/sdk/bindings/webservice + ${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice .for f in vboxweb.wsdl - ${INSTALL_DATA} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/obj/webservice/${f} ${DATADIR}/sdk/bindings/webservice/ + ${INSTALL_DATA} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/obj/webservice/${f} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice/ .endfor .endif .if ${PORT_OPTIONS:MGUESTADDITIONS} - ${MKDIR} ${PREFIX}/lib/virtualbox/additions - ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} ${PREFIX}/lib/virtualbox/additions/ - ${LN} -sf ${PREFIX}/lib/virtualbox/additions/${GUESTADDITIONS} ${PREFIX}/lib/virtualbox/additions/VBoxGuestAdditions.iso + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions + ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions/ + ${LN} -sf ${PREFIX}/lib/virtualbox/additions/${GUESTADDITIONS} ${STAGEDIR}${PREFIX}/lib/virtualbox/additions/VBoxGuestAdditions.iso .endif .if ${PORT_OPTIONS:MPYTHON} cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/installer && \ - VBOX_INSTALL_PATH="${PREFIX}/lib/virtualbox" ${PYTHON_CMD} vboxapisetup.py install + ${SETENV} VBOX_INSTALL_PATH="${PREFIX}/lib/virtualbox" \ + ${PYTHON_CMD} vboxapisetup.py install --root=${STAGEDIR} - @${MKDIR} ${PYTHON_SITELIBDIR} - (cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom/python && ${COPYTREE_SHARE} "*" ${PYTHON_SITELIBDIR}) - ${PYTHON_CMD} -mcompileall ${PYTHON_SITELIBDIR}/xpcom/ + @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + cd ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/xpcom/python && ${COPYTREE_SHARE} "*" ${STAGEDIR}${PYTHON_SITELIBDIR} + ${PYTHON_CMD} -mcompileall ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom/ .endif -post-install: -.for f in VBoxManage VBoxNetDHCP VBoxSVC VBoxXPCOMIPCD VBoxExtPackHelperApp VBoxBalloonCtrl ${VBOX_FRONTENDS} - ${CHOWN} root:${VBOXGROUP} ${PREFIX}/lib/virtualbox/${f} -.endfor - - @${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755 - @${FIND} ${PREFIX}/include/virtualbox -type d -print0 | ${XARGS} -0 ${CHMOD} 755 - @${FIND} ${PREFIX}/lib/virtualbox -type d -print0 | ${XARGS} -0 ${CHMOD} 755 - .if ${PORT_OPTIONS:MQT4} - ${MKDIR} ${PREFIX}/share/pixmaps/ - ${INSTALL_DATA} ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png ${PREFIX}/share/pixmaps/VBox.png - ${MKDIR} ${PREFIX}/share/applications/ - ${INSTALL_DATA} ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop ${PREFIX}/share/applications/virtualbox.desktop + ${INSTALL_DATA} ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png ${STAGEDIR}${PREFIX}/share/pixmaps/VBox.png + ${INSTALL_DATA} ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop .endif - @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> Modified: head/emulators/virtualbox-ose/distinfo ============================================================================== --- head/emulators/virtualbox-ose/distinfo Tue Mar 4 00:43:46 2014 (r346980) +++ head/emulators/virtualbox-ose/distinfo Tue Mar 4 00:45:37 2014 (r346981) @@ -1,4 +1,4 @@ -SHA256 (VirtualBox-4.3.6.tar.bz2) = c547e1e32e0b06fba9ee4ca7842f8ddee8e94c64aab17c2b0d0793f0caccbb27 -SIZE (VirtualBox-4.3.6.tar.bz2) = 89609199 -SHA256 (VBoxGuestAdditions_4.3.6.iso) = 95648fcdb5d028e64145a2fe2f2f28c946d219da366389295a61fed296ca79f0 -SIZE (VBoxGuestAdditions_4.3.6.iso) = 64161792 +SHA256 (VirtualBox-4.3.8.tar.bz2) = ffabd8735bdc80753cec29d01b499769f41e083f37a3f58b3055f19d3b1b9641 +SIZE (VirtualBox-4.3.8.tar.bz2) = 90224116 +SHA256 (VBoxGuestAdditions_4.3.8.iso) = a1e58f3a15cab81b82424c6382a490bb02377d78d537a57538692fa83ce448c7 +SIZE (VBoxGuestAdditions_4.3.8.iso) = 64540672 Added: head/emulators/virtualbox-ose/files/extrapatch-Config.kmk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/extrapatch-Config.kmk Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,11 @@ +--- Config.kmk.orig 2012-05-24 01:15:53.393052000 +0200 ++++ Config.kmk 2012-05-24 01:16:15.883067161 +0200 +@@ -3188,7 +3188,7 @@ + | xargs -J% objcopy % $(out) + + ## Strip debug info (comment out if debugging or something). +- objcopy --strip-debug $(out) ++# objcopy --strip-debug $(out) + endef + else # x86 + TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld Added: head/emulators/virtualbox-ose/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,11 @@ +--- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2012-10-18 16:23:16.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/Makefile 2012-10-20 08:13:07.301179212 +0200 +@@ -27,7 +27,7 @@ + + KMOD = vboxdrv + +-CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS ++CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DDEBUG + + .if (${MACHINE_ARCH} == "i386") + CFLAGS += -DRT_ARCH_X86 Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,255 @@ +--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2014-02-25 12:00:25.000000000 -0500 ++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c 2014-03-01 03:23:16.000000000 -0500 +@@ -89,8 +89,7 @@ + /* + * Character device file handlers. + */ +-static d_fdopen_t VBoxGuestFreeBSDOpen; +-static d_close_t VBoxGuestFreeBSDClose; ++static d_open_t VBoxGuestFreeBSDOpen; + static d_ioctl_t VBoxGuestFreeBSDIOCtl; + static d_write_t VBoxGuestFreeBSDWrite; + static d_read_t VBoxGuestFreeBSDRead; +@@ -121,8 +120,7 @@ + { + .d_version = D_VERSION, + .d_flags = D_TRACKCLOSE | D_NEEDMINOR, +- .d_fdopen = VBoxGuestFreeBSDOpen, +- .d_close = VBoxGuestFreeBSDClose, ++ .d_open = VBoxGuestFreeBSDOpen, + .d_ioctl = VBoxGuestFreeBSDIOCtl, + .d_read = VBoxGuestFreeBSDRead, + .d_write = VBoxGuestFreeBSDWrite, +@@ -130,106 +128,45 @@ + .d_name = DEVICE_NAME + }; + ++/** Device structure. */ ++static struct cdev *g_pDev; + /** Device extention & session data association structure. */ + static VBOXGUESTDEVEXT g_DevExt; +-/** List of cloned device. Managed by the kernel. */ +-static struct clonedevs *g_pVBoxGuestFreeBSDClones; +-/** The dev_clone event handler tag. */ +-static eventhandler_tag g_VBoxGuestFreeBSDEHTag; + /** Reference counter */ + static volatile uint32_t cUsers; + /** selinfo structure used for polling. */ + static struct selinfo g_SelInfo; + +-/** +- * DEVFS event handler. +- */ +-static void VBoxGuestFreeBSDClone(void *pvArg, struct ucred *pCred, char *pszName, int cchName, struct cdev **ppDev) ++static void VBoxGuestFreeBSDDtr(void *pSession) + { +- int iUnit; +- int rc; +- +- Log(("VBoxGuestFreeBSDClone: pszName=%s ppDev=%p\n", pszName, ppDev)); +- +- /* +- * One device node per user, si_drv1 points to the session. +- * /dev/vboxguest<N> where N = {0...255}. +- */ +- if (!ppDev) +- return; +- if (strcmp(pszName, "vboxguest") == 0) +- iUnit = -1; +- else if (dev_stdclone(pszName, NULL, "vboxguest", &iUnit) != 1) +- return; +- if (iUnit >= 256) +- { +- Log(("VBoxGuestFreeBSDClone: iUnit=%d >= 256 - rejected\n", iUnit)); +- return; +- } +- +- Log(("VBoxGuestFreeBSDClone: pszName=%s iUnit=%d\n", pszName, iUnit)); +- +- rc = clone_create(&g_pVBoxGuestFreeBSDClones, &g_VBoxGuestFreeBSDChrDevSW, &iUnit, ppDev, 0); +- Log(("VBoxGuestFreeBSDClone: clone_create -> %d; iUnit=%d\n", rc, iUnit)); +- if (rc) +- { +- *ppDev = make_dev(&g_VBoxGuestFreeBSDChrDevSW, +- iUnit, +- UID_ROOT, +- GID_WHEEL, +- 0664, +- "vboxguest%d", iUnit); +- if (*ppDev) +- { +- dev_ref(*ppDev); +- (*ppDev)->si_flags |= SI_CHEAPCLONE; +- Log(("VBoxGuestFreeBSDClone: Created *ppDev=%p iUnit=%d si_drv1=%p si_drv2=%p\n", +- *ppDev, iUnit, (*ppDev)->si_drv1, (*ppDev)->si_drv2)); +- (*ppDev)->si_drv1 = (*ppDev)->si_drv2 = NULL; +- } +- else +- Log(("VBoxGuestFreeBSDClone: make_dev iUnit=%d failed\n", iUnit)); +- } +- else +- Log(("VBoxGuestFreeBSDClone: Existing *ppDev=%p iUnit=%d si_drv1=%p si_drv2=%p\n", +- *ppDev, iUnit, (*ppDev)->si_drv1, (*ppDev)->si_drv2)); ++ VBoxGuestCloseSession(&g_DevExt, pSession); ++ ASMAtomicDecU32(&cUsers); + } + + /** + * File open handler + * + */ +-#if __FreeBSD_version >= 700000 +-static int VBoxGuestFreeBSDOpen(struct cdev *pDev, int fOpen, struct thread *pTd, struct file *pFd) +-#else +-static int VBoxGuestFreeBSDOpen(struct cdev *pDev, int fOpen, struct thread *pTd) +-#endif ++static int VBoxGuestFreeBSDOpen(struct cdev *pDev, int fOpen, int DevType, struct thread *pTd) + { +- int rc; +- PVBOXGUESTSESSION pSession; ++ PVBOXGUESTSESSION pSession; ++ int rc; + + LogFlow((DEVICE_NAME ":VBoxGuestFreeBSDOpen\n")); + + /* +- * Try grab it (we don't grab the giant, remember). +- */ +- if (!ASMAtomicCmpXchgPtr(&pDev->si_drv1, (void *)0x42, NULL)) +- return EBUSY; +- +- /* + * Create a new session. + */ + rc = VBoxGuestCreateUserSession(&g_DevExt, &pSession); + if (RT_SUCCESS(rc)) + { +- if (ASMAtomicCmpXchgPtr(&pDev->si_drv1, pSession, (void *)0x42)) +- { +- Log((DEVICE_NAME ":VBoxGuestFreeBSDOpen success: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); ++ Log((DEVICE_NAME ":VBoxGuestFreeBSDOpen success: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); ++ rc = devfs_set_cdevpriv(pSession, VBoxGuestFreeBSDDtr); ++ if (rc) ++ VBoxGuestCloseSession(&g_DevExt, pSession); ++ else + ASMAtomicIncU32(&cUsers); +- return 0; +- } +- +- VBoxGuestCloseSession(&g_DevExt, pSession); ++ return rc; + } + + LogRel((DEVICE_NAME ":VBoxGuestFreeBSDOpen: failed. rc=%d\n", rc)); +@@ -237,47 +174,19 @@ + } + + /** +- * File close handler +- * +- */ +-static int VBoxGuestFreeBSDClose(struct cdev *pDev, int fFile, int DevType, struct thread *pTd) +-{ +- PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; +- Log(("VBoxGuestFreeBSDClose: fFile=%#x pSession=%p\n", fFile, pSession)); +- +- /* +- * Close the session if it's still hanging on to the device... +- */ +- if (VALID_PTR(pSession)) +- { +- VBoxGuestCloseSession(&g_DevExt, pSession); +- if (!ASMAtomicCmpXchgPtr(&pDev->si_drv1, NULL, pSession)) +- Log(("VBoxGuestFreeBSDClose: si_drv1=%p expected %p!\n", pDev->si_drv1, pSession)); +- ASMAtomicDecU32(&cUsers); +- /* Don't use destroy_dev here because it may sleep resulting in a hanging user process. */ +- destroy_dev_sched(pDev); +- } +- else +- Log(("VBoxGuestFreeBSDClose: si_drv1=%p!\n", pSession)); +- return 0; +-} +- +-/** + * IOCTL handler + * + */ + static int VBoxGuestFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd) + { +- LogFlow((DEVICE_NAME ":VBoxGuestFreeBSDIOCtl\n")); ++ PVBOXGUESTSESSION pSession; ++ int rc; + +- int rc = 0; ++ LogFlow((DEVICE_NAME ":VBoxGuestFreeBSDIOCtl\n")); + +- /* +- * Validate the input. +- */ +- PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; +- if (RT_UNLIKELY(!VALID_PTR(pSession))) +- return EINVAL; ++ rc = devfs_get_cdevpriv((void **)&pSession); ++ if (rc) ++ return rc; + + /* + * Validate the request wrapper. +@@ -361,12 +270,14 @@ + + static int VBoxGuestFreeBSDPoll (struct cdev *pDev, int fEvents, struct thread *td) + { +- int fEventsProcessed; ++ PVBOXGUESTSESSION pSession; ++ int fEventsProcessed, rc; + + LogFlow((DEVICE_NAME "::Poll: fEvents=%d\n", fEvents)); + +- PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; +- if (RT_UNLIKELY(!VALID_PTR(pSession))) { ++ rc = devfs_get_cdevpriv((void **)&pSession); ++ if (rc) ++ { + Log((DEVICE_NAME "::Poll: no state data for %s\n", devtoname(pDev))); + return (fEvents & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); + } +@@ -407,10 +318,7 @@ + /* + * Reverse what we did in VBoxGuestFreeBSDAttach. + */ +- if (g_VBoxGuestFreeBSDEHTag != NULL) +- EVENTHANDLER_DEREGISTER(dev_clone, g_VBoxGuestFreeBSDEHTag); +- +- clone_cleanup(&g_pVBoxGuestFreeBSDClones); ++ destroy_dev(g_pDev); + + VBoxGuestFreeBSDRemoveIRQ(pDevice, pState); + +@@ -562,18 +470,21 @@ + if (RT_SUCCESS(rc)) + { + /* +- * Configure device cloning. ++ * Configure device. + */ +- clone_setup(&g_pVBoxGuestFreeBSDClones); +- g_VBoxGuestFreeBSDEHTag = EVENTHANDLER_REGISTER(dev_clone, VBoxGuestFreeBSDClone, 0, 1000); +- if (g_VBoxGuestFreeBSDEHTag) ++ g_pDev = make_dev(&g_VBoxGuestFreeBSDChrDevSW, ++ 0, ++ UID_ROOT, ++ GID_WHEEL, ++ 0664, ++ "vboxguest"); ++ if (g_pDev) + { + printf(DEVICE_NAME ": loaded successfully\n"); + return 0; + } + +- printf(DEVICE_NAME ": EVENTHANDLER_REGISTER(dev_clone,,,) failed\n"); +- clone_cleanup(&g_pVBoxGuestFreeBSDClones); ++ printf(DEVICE_NAME ": make_dev failed\n"); + VBoxGuestFreeBSDRemoveIRQ(pDevice, pState); + } + else Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,10 @@ +--- src/VBox/Additions/common/VBoxGuest/freebsd/Makefile.orig 2013-11-29 14:20:37.000000000 -0500 ++++ src/VBox/Additions/common/VBoxGuest/freebsd/Makefile 2013-12-15 00:12:59.000000000 -0500 +@@ -155,6 +155,7 @@ + SRCS += \ + semspinmutex-r0drv-generic.c \ + mpnotification-r0drv-generic.c \ ++ threadctxhooks-r0drv-generic.c \ + RTMpIsCpuWorkPending-r0drv-generic.c + + .PATH: ${.CURDIR}/VBox Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,10 @@ +--- src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest.orig 2014-01-04 05:34:34.000000000 +0000 ++++ src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest 2014-01-04 05:34:41.000000000 +0000 +@@ -185,6 +185,7 @@ + ${PATH_ROOT}/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h=>r0drv/freebsd/sleepqueue-r0drv-freebsd.h \ + ${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c=>r0drv/generic/semspinmutex-r0drv-generic.c \ + ${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp=>r0drv/generic/mpnotification-r0drv-generic.c \ ++ ${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp=>r0drv/generic/threadctxhooks-r0drv-generic.c \ + ${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp=>r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.c \ + ${PATH_ROOT}/src/VBox/Runtime/r0drv/memobj-r0drv.cpp=>r0drv/memobj-r0drv.c \ + ${PATH_ROOT}/src/VBox/Runtime/VBox/log-vbox.cpp=>VBox/log-vbox.c \ Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,18 @@ +--- src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk.orig 2010-10-07 11:37:10.000000000 +0200 ++++ src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk 2010-10-07 11:36:16.000000000 +0200 +@@ -140,6 +140,7 @@ + # the X server runtime instead of IPRT, for use with old servers where the + # C library is not available. + # ++ifdef VBOX_WITH_X11_ADDITIONS + VBoxGuestR3LibXFree86_TEMPLATE = VBOXGUESTR3XF86LIB + VBoxGuestR3LibXFree86_DEFS = \ + VBOX_WITH_HGCM \ +@@ -163,6 +164,7 @@ + $(VBOX_PATH_X11_XFREE_4_3)/exports/include/X11 + + VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow ++endif + + include $(KBUILD_PATH)/subfooter.kmk + Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-freebsd-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-freebsd-Makefile Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,19 @@ +--- src/VBox/Additions/freebsd/Makefile.orig 2014-02-25 12:00:30.000000000 -0500 ++++ src/VBox/Additions/freebsd/Makefile 2014-03-03 15:27:32.000000000 -0500 +@@ -19,14 +19,14 @@ + + all: + @echo "*** Building 'vboxguest' module ***" +- @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest ++ @$(MAKE) CC=cc LDFLAGS= KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest + @if [ -f vboxguest/vboxguest.ko ]; then \ + cp vboxguest/vboxguest.ko .; \ + fi + @echo + @if [ -d vboxvfs ]; then \ + echo "*** Building 'vboxvfs' module ***"; \ +- $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \ ++ $(MAKE) CC=cc LDFLAGS= KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \ + if [ -f vboxvfs/vboxvfs.ko ]; then \ + cp vboxvfs/vboxvfs.ko .; \ + fi; \ Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,27 @@ +--- src/VBox/Additions/x11/Installer/98vboxadd-xclient.orig 2010-09-10 14:24:55.000000000 +0200 ++++ src/VBox/Additions/x11/Installer/98vboxadd-xclient 2010-12-29 20:42:00.000000000 +0100 +@@ -28,8 +28,8 @@ + xorgbin=Xorg + found=`which Xorg | grep "no Xorg"` + if test ! -z "$found"; then +- if test -f "/usr/X11/bin/Xorg"; then +- xorgbin=/usr/X11/bin/Xorg ++ if test -f "/usr/local/bin/Xorg"; then ++ xorgbin=/usr/local/bin/Xorg + else + exit 1 + fi +@@ -40,9 +40,9 @@ + no_display=1 + fi + +-/usr/bin/VBoxClient --clipboard +-/usr/bin/VBoxClient --checkhostversion ++/usr/local/bin/VBoxClient --clipboard ++/usr/local/bin/VBoxClient --checkhostversion + test -z "$no_display" && +- /usr/bin/VBoxClient --display ++ /usr/local/bin/VBoxClient --display + test -z "$no_display" && +- /usr/bin/VBoxClient --seamless ++ /usr/local/bin/VBoxClient --seamless Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,10 @@ +--- src/VBox/Additions/x11/Installer/vboxclient.desktop.orig 2009-06-12 12:34:57.000000000 +0000 ++++ src/VBox/Additions/x11/Installer/vboxclient.desktop 2011-01-13 22:07:37.000000000 +0000 +@@ -8,6 +8,6 @@ + Comment=VirtualBox User Session Services + Comment[it]=Servizi di sessione utente di VirtualBox + Comment[pl]=Usługi sesji użytkownika VirtualBox +-Exec=/usr/bin/VBoxClient-all ++Exec=/usr/local/bin/VBoxClient-all + X-GNOME-Autostart-enabled=true + X-KDE-autostart-after=panel Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk Tue Mar 4 00:45:37 2014 (r346981) @@ -0,0 +1,138 @@ +--- src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2014-02-25 12:00:33.000000000 -0500 ++++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2014-02-26 16:10:28.000000000 -0500 +@@ -33,7 +33,7 @@ + vboxvideo_13_DEFS := $(vboxvideo_70_DEFS) VBOXVIDEO_13 + vboxvideo_15_DEFS := \ + $(vboxvideo_13_DEFS) NO_ANSIC PCIACCESS XSERVER_LIBPCIACCESS +-if1of ($(KBUILD_TARGET), linux solaris) ++if1of ($(KBUILD_TARGET), freebsd linux solaris) + vboxvideo_15_DEFS += \ + VBOX_DRI + endif +@@ -198,7 +198,7 @@ + vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100503000 +-if1of ($(KBUILD_TARGET), linux solaris) ++if1of ($(KBUILD_TARGET), freebsd linux solaris) + vboxvideo_drv_15_DEFS += \ + VBOX_DRI_OLD + endif +@@ -207,7 +207,7 @@ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3 + vboxvideo_drv_15_INCS += $(PATH_ROOT)/src/VBox/Runtime/include + vboxvideo_drv_15_SOURCES = $(vboxvideo_drv_13_SOURCES) +-if1of ($(KBUILD_TARGET), linux solaris) ++if1of ($(KBUILD_TARGET), freebsd linux solaris) + vboxvideo_drv_15_SOURCES += \ + vboxvideo_dri.c + endif +@@ -220,7 +220,7 @@ + vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100600000 +-if1of ($(KBUILD_TARGET), linux solaris) ++if1of ($(KBUILD_TARGET), freebsd linux solaris) + vboxvideo_drv_16_DEFS += \ + VBOX_DRI_OLD + endif +@@ -238,11 +238,19 @@ + vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_17_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100699000 ++if1of ($(KBUILD_TARGET), freebsd) ++ vboxvideo_drv_17_DEFS += \ ++ VBOX_DRI_OLD ++endif + vboxvideo_drv_17_INCS = \ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.7.7 + vboxvideo_drv_17_INCS += $(PATH_ROOT)/src/VBox/Runtime/include + vboxvideo_drv_17_SOURCES := $(vboxvideo_drv_13_SOURCES) ++if1of ($(KBUILD_TARGET), freebsd) ++ vboxvideo_drv_17_SOURCES += \ ++ vboxvideo_dri.c ++endif + if1of ($(KBUILD_TARGET), linux solaris) + vboxvideo_drv_17_SOURCES += \ + vboxvideo_dri2.c +@@ -256,6 +264,10 @@ + vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_18_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100800000 ++if1of ($(KBUILD_TARGET), freebsd) ++ vboxvideo_drv_18_DEFS += \ ++ VBOX_DRI_OLD ++endif + vboxvideo_drv_18_INCS = \ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.8.0 +@@ -270,6 +282,10 @@ + vboxvideo_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_19_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_19_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100900000 ++if1of ($(KBUILD_TARGET), freebsd) ++ vboxvideo_drv_19_DEFS += \ ++ VBOX_DRI_OLD ++endif + vboxvideo_drv_19_INCS = \ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.9.0 +@@ -288,7 +304,11 @@ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.10.0 + vboxvideo_drv_110_INCS += $(PATH_ROOT)/src/VBox/Runtime/include +-vboxvideo_drv_110_SOURCES := $(vboxvideo_drv_17_SOURCES) ++vboxvideo_drv_110_SOURCES := $(vboxvideo_drv_13_SOURCES) ++if1of ($(KBUILD_TARGET), freebsd linux solaris) ++ vboxvideo_drv_110_SOURCES += \ ++ vboxvideo_dri2.c ++endif + + + # +@@ -302,7 +322,7 @@ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.11.0 + vboxvideo_drv_111_INCS += $(PATH_ROOT)/src/VBox/Runtime/include +-vboxvideo_drv_111_SOURCES := $(vboxvideo_drv_17_SOURCES) ++vboxvideo_drv_111_SOURCES := $(vboxvideo_drv_110_SOURCES) + + + # +@@ -316,7 +336,7 @@ + $(vboxvideo_xorg_INCS) \ + $(VBOX_PATH_X11_ROOT)/xorg-server-1.12.0 + vboxvideo_drv_112_INCS += $(PATH_ROOT)/src/VBox/Runtime/include +-vboxvideo_drv_112_SOURCES := $(vboxvideo_drv_17_SOURCES) ++vboxvideo_drv_112_SOURCES := $(vboxvideo_drv_110_SOURCES) + + + # *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403040045.s240jbv9010770>