From 078a3145868546becb1f18ad4ff3f84b346ab7ae Mon Sep 17 00:00:00 2001 From: Beat Gaetzi Date: Wed, 13 Jan 2010 08:03:17 +0000 Subject: emulators/virtualbox: - Remove emulators/virtualbox port. Renamed to emulators/virtualbox-ose and seperate port for the kernel modules created: emulators/virtualbox-ose-kmod. emulators/virtualbox-ose: - Update to 3.1.2 - Update guest additions to 3.1.2 - Port has been renamed to virtualbox-ose to reflect that we are using the OSE version. [1] - Added proper PulseAudio support for FreeBSD [2] - procfs is not required anymore because vbox uses sysctl(3) now [3] - Update pkg-message to reflect recent changes - Add nox's FreeBSD host networking patches that are now also in the upstream vbox svn (modulo vbox variable naming style adjustments:) http://lists.freebsd.org/pipermail/freebsd-emulation/2010-January/007260.html http://www.virtualbox.org/changeset/25698 1. Allow direct tap networking again (for users that need the best network performance and/or need more complex network setups, like when they want to use routing instead of bridging to e.g. protect from guests messing with the lan's arp tables; a tap + routing + proxy arp example is in the above freebsd-emulation posting.) 2. Enable vbox' shared mac feature when using bridged mode on a wifi interface, together with the virtualbox-ose-kmod change this should fix bridged mode for wifi users. [4] emulators/virtualbox-ose-kmod: - Update to 3.1.2 - Add rc.d script to load kernel modules - Fix build with a non-standard location for the system source [5] - Merge aeichner's vboxnetflt fix committed to upstream vbox svn (thanks!) that makes the shared mac feature enabled above actually work on FreeBSD hosts. [6] Please see http://wiki.freebsd.org/VirtualBox for update instructions. Many thanks to the VirtualBox developers, all tester, patch submitter and the whole vbox@ team. PR: ports/141630 [2] Noticed by: mm@ [1] Submitted by: Noriyoshi Kawano [2], Baptiste Daroussin [3] and Bernhard Froehlich [3], nox@ [4], scf@ [5] Obtained from: http://www.virtualbox.org/changeset/25699 [6] On behalf of: vbox@ (decke, dhn, itetcu, miwi, nox) --- .../files/patch-src-VBox-Runtime-VBox-log-vbox.cpp | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-VBox-log-vbox.cpp (limited to 'emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-VBox-log-vbox.cpp') diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-VBox-log-vbox.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-VBox-log-vbox.cpp new file mode 100644 index 000000000000..005a25e4a79a --- /dev/null +++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-VBox-log-vbox.cpp @@ -0,0 +1,82 @@ +--- src/VBox/Runtime/VBox/log-vbox.cpp (revision 25471) ++++ src/VBox/Runtime/VBox/log-vbox.cpp (revision 25472) +@@ -135,6 +135,12 @@ + # include + # elif defined(RT_OS_LINUX) + # include ++# elif defined(RT_OS_FREEBSD) ++# include ++# include ++# include ++# include ++# include + # elif defined(RT_OS_SOLARIS) + # define _STRUCTURED_PROC 1 + # undef _FILE_OFFSET_BITS /* procfs doesn't like this */ +@@ -157,6 +163,7 @@ + # include + # include + # include ++# include + # include + #endif + +@@ -339,12 +346,8 @@ + fclose(pFile); + } + +-# elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) +-# ifdef RT_OS_LINUX ++# elif defined(RT_OS_LINUX) + FILE *pFile = fopen("/proc/self/cmdline", "r"); +-# else /* RT_OS_FREEBSD: */ +- FILE *pFile = fopen("/proc/curproc/cmdline", "r"); +-# endif + if (pFile) + { + /* braindead */ +@@ -370,7 +373,44 @@ + RTLogLoggerEx(pLogger, 0, ~0U, "\n"); + fclose(pFile); + } ++# elif defined(RT_OS_FREEBSD) ++ char *pszArgFileBuf = NULL; ++ int aiName[4]; ++ size_t cchArgs; + ++ aiName[0] = CTL_KERN; ++ aiName[1] = KERN_PROC; ++ aiName[2] = KERN_PROC_ARGS; ++ aiName[3] = -1; ++ ++ /* Retrieve the required length first */ ++ cchArgs = 0; ++ int rcBSD = sysctl(aiName, RT_ELEMENTS(aiName), NULL, &cchArgs, NULL, 0); ++ ++ if (cchArgs > 0) ++ { ++ pszArgFileBuf = (char *)RTMemAllocZ(cchArgs + 1 /* Safety */); ++ if (pszArgFileBuf) ++ { ++ /* Retrieve the argument list */ ++ rcBSD = sysctl(aiName, RT_ELEMENTS(aiName), pszArgFileBuf, &cchArgs, NULL, 0); ++ if (!rcBSD) ++ { ++ /* ++ * cmdline is a flattened argument list so we need ++ * to convert all \0 to blanks ++ */ ++ for(size_t i = 0; i < cchArgs - 1; i++) ++ { ++ if(pszArgFileBuf[i] == '\0') ++ pszArgFileBuf[i] = ' '; ++ } ++ ++ RTLogLoggerEx(pLogger, 0, ~0U, "Commandline: %s\n", pszArgFileBuf); ++ } ++ RTMemFree(pszArgFileBuf); ++ } ++ } + # elif defined(RT_OS_L4) || defined(RT_OS_OS2) || defined(RT_OS_DARWIN) + /* commandline? */ + # else -- cgit v1.2.3