svn commit: r435803 - in head/emulators: virtualbox-ose virtualbox-ose-additions virtualbox-ose/files
Jung-uk Kim
jkim at FreeBSD.org
Thu Mar 9 21:50:31 UTC 2017
Author: jkim
Date: Thu Mar 9 21:50:29 2017
New Revision: 435803
URL: https://svnweb.freebsd.org/changeset/ports/435803
Log:
Improve D-Bus support.
Added:
head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp (contents, props changed)
head/emulators/virtualbox-ose/files/patch-src_VBox_Main_Makefile.kmk (contents, props changed)
head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_HostPower.h (contents, props changed)
head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_HostImpl.cpp (contents, props changed)
Modified:
head/emulators/virtualbox-ose-additions/Makefile
head/emulators/virtualbox-ose/Makefile
Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile Thu Mar 9 21:28:11 2017 (r435802)
+++ head/emulators/virtualbox-ose-additions/Makefile Thu Mar 9 21:50:29 2017 (r435803)
@@ -3,6 +3,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 5.1.16
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${PORTVERSION}/
PKGNAMESUFFIX?= -additions
Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile Thu Mar 9 21:28:11 2017 (r435802)
+++ head/emulators/virtualbox-ose/Makefile Thu Mar 9 21:50:29 2017 (r435803)
@@ -3,6 +3,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 5.1.16
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${PORTVERSION}/
DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp Thu Mar 9 21:50:29 2017 (r435803)
@@ -0,0 +1,71 @@
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2017-03-08 17:15:20 UTC
++++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
+@@ -71,8 +71,8 @@
+ # include <net/if.h>
+ # include <pwd.h> /* getpwuid */
+ # include <unistd.h>
+-# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU)
+-# include <utmpx.h> /** @todo FreeBSD 9 should have this. */
++# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU)
++# include <utmpx.h>
+ # endif
+ # ifdef RT_OS_OS2
+ # include <net/if_dl.h>
+@@ -531,7 +531,7 @@ static void vgsvcVMInfoWriteFixedPropert
+ }
+
+
+-#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */
++#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */
+ /*
+ * Simple wrapper to work around compiler-specific va_list madness.
+ */
+@@ -562,12 +562,6 @@ static int vgsvcVMInfoWriteUsers(void)
+ rc = VERR_NOT_IMPLEMENTED;
+ # endif
+
+-#elif defined(RT_OS_FREEBSD)
+- /** @todo FreeBSD: Port logged on user info retrieval.
+- * However, FreeBSD 9 supports utmpx, so we could use the code
+- * block below (?). */
+- rc = VERR_NOT_IMPLEMENTED;
+-
+ #elif defined(RT_OS_HAIKU)
+ /** @todo Haiku: Port logged on user info retrieval. */
+ rc = VERR_NOT_IMPLEMENTED;
+@@ -593,7 +587,7 @@ static int vgsvcVMInfoWriteUsers(void)
+ while ( (ut_user = getutxent())
+ && RT_SUCCESS(rc))
+ {
+-# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */
++# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */
+ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid);
+ # else
+ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n",
+@@ -628,7 +622,7 @@ static int vgsvcVMInfoWriteUsers(void)
+ }
+
+ # ifdef VBOX_WITH_DBUS
+-# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */
++# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */
+ DBusError dbErr;
+ DBusConnection *pConnection = NULL;
+ int rc2 = RTDBusLoadLib();
+@@ -837,7 +831,7 @@ static int vgsvcVMInfoWriteUsers(void)
+ if ( fHaveLibDbus
+ && dbus_error_is_set(&dbErr))
+ dbus_error_free(&dbErr);
+-# endif /* RT_OS_LINUX */
++# endif /* RT_OS_LINUX || RT_OS_FREEBSD */
+ # endif /* VBOX_WITH_DBUS */
+
+ /** @todo Fedora/others: Handle systemd-loginctl. */
+@@ -874,7 +868,7 @@ static int vgsvcVMInfoWriteUsers(void)
+ RTMemFree(papszUsers);
+
+ endutxent(); /* Close utmpx file. */
+-#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */
++#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */
+
+ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+
Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Main_Makefile.kmk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Main_Makefile.kmk Thu Mar 9 21:50:29 2017 (r435803)
@@ -0,0 +1,10 @@
+--- src/VBox/Main/Makefile.kmk.orig 2017-03-08 17:20:11 UTC
++++ src/VBox/Main/Makefile.kmk
+@@ -445,6 +445,7 @@ VBoxSVC_SOURCES.os2 = \
+
+ VBoxSVC_SOURCES.freebsd = \
+ src-server/freebsd/HostHardwareFreeBSD.cpp \
++ $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \
+ src-server/HostDnsServiceResolvConf.cpp
+
+
Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_HostPower.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_HostPower.h Thu Mar 9 21:50:29 2017 (r435803)
@@ -0,0 +1,20 @@
+--- src/VBox/Main/include/HostPower.h.orig 2017-03-08 17:20:12 UTC
++++ src/VBox/Main/include/HostPower.h
+@@ -28,7 +28,7 @@
+
+ #include <vector>
+
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ # include <VBox/dbus.h>
+ #endif
+
+@@ -63,7 +63,7 @@ private:
+ HWND mHwnd;
+ RTTHREAD mThread;
+ };
+-#elif defined(RT_OS_LINUX)
++#elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ /**
+ * The Linux hosted Power Service.
+ */
Added: head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_HostImpl.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_HostImpl.cpp Thu Mar 9 21:50:29 2017 (r435803)
@@ -0,0 +1,11 @@
+--- src/VBox/Main/src-server/HostImpl.cpp.orig 2017-03-08 17:20:14 UTC
++++ src/VBox/Main/src-server/HostImpl.cpp
+@@ -293,7 +293,7 @@ HRESULT Host::init(VirtualBox *aParent)
+
+ #if defined(RT_OS_WINDOWS)
+ m->pHostPowerService = new HostPowerServiceWin(m->pParent);
+-#elif defined(RT_OS_LINUX) && defined(VBOX_WITH_DBUS)
++#elif (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) && defined(VBOX_WITH_DBUS)
+ m->pHostPowerService = new HostPowerServiceLinux(m->pParent);
+ #elif defined(RT_OS_DARWIN)
+ m->pHostPowerService = new HostPowerServiceDarwin(m->pParent);
More information about the svn-ports-head
mailing list