pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
virtualbox: Fix more build issues on NetBSD
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat Jul 9 23:38:54 2016 +0200
Changeset: aa65ac855f441b23846c9b22df4c297e0373d402
Modified Files:
virtualbox/Makefile
virtualbox/distinfo
virtualbox/patches/patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp
virtualbox/patches/patch-src_VBox_Runtime_Makefile.kmk
Log Message:
virtualbox: Fix more build issues on NetBSD
1. Fix code mistakes with double else pre-processor switch
2. Pickup functional alternative to setresgid()/setresuid()
3. Disable for now building of Ring0 code-fragments (kernel code)
4. Disable FreeBSD specific headers generation on NetBSD from .m files
5. Add new required build-dependency: Perl
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=aa65ac855f441b23846c9b22df4c297e0373d402
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
virtualbox/Makefile | 2 +-
virtualbox/distinfo | 4 +--
..._VBox_HostDrivers_Support_SUPR3HardenedMain.cpp | 18 ++++++++++++++
.../patches/patch-src_VBox_Runtime_Makefile.kmk | 29 ++++++++++++++++++++--
4 files changed, 48 insertions(+), 5 deletions(-)
diffs:
diff --git a/virtualbox/Makefile b/virtualbox/Makefile
index 24dbb8a..e939974 100644
--- a/virtualbox/Makefile
+++ b/virtualbox/Makefile
@@ -23,7 +23,7 @@ BUILD_DEPENDS+= acpica-utils-[0-9]*:../../sysutils/acpica-utils
TOOL_DEPENDS+= libxml2-[0-9]*:../../textproc/libxml2 # for xmllint
-USE_TOOLS+= gtar pkg-config bison flex
+USE_TOOLS+= gtar pkg-config bison flex perl
WRKSRC= ${WRKDIR}/VirtualBox-${PKGVERSION_NOREV}
diff --git a/virtualbox/distinfo b/virtualbox/distinfo
index 2314d29..d005555 100644
--- a/virtualbox/distinfo
+++ b/virtualbox/distinfo
@@ -89,7 +89,7 @@ SHA1 (patch-src_VBox_HostDrivers_Support_SUPDrvGip.cpp) = af044f4f74cd4879b05538
SHA1 (patch-src_VBox_HostDrivers_Support_SUPDrvIDC.h) = 340f0b02bd21ba463578d1560a3e3f494a874890
SHA1 (patch-src_VBox_HostDrivers_Support_SUPDrvInternal.h) = e40bd87c79e140ef1d7a774679ff6cd22dc281b9
SHA1 (patch-src_VBox_HostDrivers_Support_SUPDrvTracer.cpp) = 754583a84916aca5a8c378658d7eab7356ad7d00
-SHA1 (patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp) = 688f9fab1f30330fa105f1a4913ffeb8776ba9e7
+SHA1 (patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp) = 7f7b43e3ff9869aebfb9097c027063a37d452171
SHA1 (patch-src_VBox_HostDrivers_Support_netbsd_Makefile) = 42a33228b7bded32fb9b543d1de0b9d2acb57f90
SHA1 (patch-src_VBox_HostDrivers_Support_netbsd_SUPDrv-netbsd.c) = fbc5fd6f45657e3323f731f09a1da298dd06db7c
SHA1 (patch-src_VBox_HostDrivers_Support_netbsd_SUPDrv-netbsd.def) = 85eb317c813e124b1b9556f9cdb5725ec6278f8f
@@ -160,7 +160,7 @@ SHA1 (patch-src_VBox_Makefile.kmk) = c6c010cc8fa19c6445d4d03b630a8741ccc3d364
SHA1 (patch-src_VBox_NetworkServices_NAT_Makefile.kmk) = cb489f3e32ea551faa59f1172500731ab2e74863
SHA1 (patch-src_VBox_NetworkServices_NAT_pxping.c) = 7e7f3fd26ae5f787e5cb9299d24eea9c4a53529a
SHA1 (patch-src_VBox_NetworkServices_NAT_pxudp.c) = 56dd97543fd9be4096d4b3aa1fd25075ec4ff7f3
-SHA1 (patch-src_VBox_Runtime_Makefile.kmk) = bb3ff65c3176782146c4a66f8723cdb529979c0a
+SHA1 (patch-src_VBox_Runtime_Makefile.kmk) = 2f47f4900aaf7c676c95793cfc60fd102be4415e
SHA1 (patch-src_VBox_Runtime_VBox_log-vbox.cpp) = b833b5e038652518f3c0ad74c699bc0ab57f56d5
SHA1 (patch-src_VBox_Runtime_r0drv_netbsd_alloc-r0drv-netbsd.c) = 8d39beeb6c649a68794b17e0cec27fc6acb68fed
SHA1 (patch-src_VBox_Runtime_r0drv_netbsd_assert-r0drv-netbsd.c) = a333976118abdc7f6c143c95f648ab9aa51c885e
diff --git a/virtualbox/patches/patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp b/virtualbox/patches/patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp
index 208c1c6..6b06af2 100644
--- a/virtualbox/patches/patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp
+++ b/virtualbox/patches/patch-src_VBox_HostDrivers_Support_SUPR3HardenedMain.cpp
@@ -20,6 +20,15 @@ $NetBSD$
# ifdef RT_OS_LINUX
int cchLink = readlink("/proc/self/exe", &g_szSupLibHardenedExePath[0], sizeof(g_szSupLibHardenedExePath) - 1);
+@@ -868,7 +868,7 @@ static void supR3HardenedGetFullExePath(
+ sprintf(szFileBuf, "/proc/%ld/path/a.out", (long)getpid());
+ int cchLink = readlink(szFileBuf, &g_szSupLibHardenedExePath[0], sizeof(g_szSupLibHardenedExePath) - 1);
+
+-# else /* RT_OS_FREEBSD */
++# elif defined(RT_OS_FREEBSD)
+ int aiName[4];
+ aiName[0] = CTL_KERN;
+ aiName[1] = KERN_PROC;
@@ -881,6 +881,19 @@ static void supR3HardenedGetFullExePath(
g_szSupLibHardenedExePath[sizeof(g_szSupLibHardenedExePath) - 1] = '\0';
int cchLink = suplibHardenedStrLen(g_szSupLibHardenedExePath); /* paranoid? can't we use cbPath? */
@@ -40,6 +49,15 @@ $NetBSD$
# endif
if (cchLink < 0 || cchLink == sizeof(g_szSupLibHardenedExePath) - 1)
supR3HardenedFatal("supR3HardenedExecDir: couldn't read \"%s\", errno=%d cchLink=%d\n",
+@@ -1558,7 +1571,7 @@ static void supR3HardenedMainDropPrivile
+ egid = getegid();
+ rgid = sgid = getgid();
+
+-# elif defined(RT_OS_SOLARIS)
++# elif defined(RT_OS_SOLARIS) || defined(RT_OS_NETBSD)
+ /* Solaris doesn't have setresuid, but the setreuid interface is BSD
+ compatible and will set the saved uid to euid when we pass it a ruid
+ that isn't -1 (which we do). */
@@ -2025,4 +2038,3 @@ DECLHIDDEN(int) SUPR3HardenedMain(const
g_enmSupR3HardenedMainState = SUPR3HARDENEDMAINSTATE_CALLED_TRUSTED_MAIN;
return pfnTrustedMain(argc, argv, envp);
diff --git a/virtualbox/patches/patch-src_VBox_Runtime_Makefile.kmk b/virtualbox/patches/patch-src_VBox_Runtime_Makefile.kmk
index a062a1e..e23a117 100644
--- a/virtualbox/patches/patch-src_VBox_Runtime_Makefile.kmk
+++ b/virtualbox/patches/patch-src_VBox_Runtime_Makefile.kmk
@@ -2,6 +2,31 @@ $NetBSD$
--- src/VBox/Runtime/Makefile.kmk.orig 2016-03-04 19:29:47.000000000 +0000
+++ src/VBox/Runtime/Makefile.kmk
+@@ -34,7 +34,7 @@ ifdef VBOX_ONLY_ADDITIONS
+ LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
+ LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
+ ifdef VBOX_WITH_ADDITION_DRIVERS
+- LIBRARIES += RuntimeGuestR0
++# LIBRARIES += RuntimeGuestR0
+ #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
+ LIBRARIES.win.x86 += RuntimeGuestR0NT4
+ endif
+@@ -84,13 +84,13 @@ else # !VBOX_ONLY_ADDITIONS && !VBOX_ONL
+ LIBRARIES.win += RuntimeRCStub
+ endif
+ ifdef VBOX_WITH_VBOXDRV
+- LIBRARIES += RuntimeR0Drv
++# LIBRARIES += RuntimeR0Drv
+ endif
+ ifdef VBOX_WITH_ADDITIONS
+ LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
+ LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
+ ifdef VBOX_WITH_ADDITION_DRIVERS
+- LIBRARIES += RuntimeGuestR0
++# LIBRARIES += RuntimeGuestR0
+ endif
+ #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
+ LIBRARIES.win.x86 += RuntimeGuestR0NT4
@@ -1094,6 +1094,81 @@ RuntimeR3_SOURCES.freebsd = \
RuntimeR3_SOURCES.freebsd.x86 += common/string/memrchr.asm
RuntimeR3_SOURCES.freebsd.amd64 += common/string/memrchr.asm
@@ -124,8 +149,8 @@ $NetBSD$
RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
RuntimeR0Drv_INCS.freebsd = \
$(PATH_STAGE)/gen-sys-hdrs
-+RuntimeR0Drv_INCS.netbsd = \
-+ $(PATH_STAGE)/gen-sys-hdrs
++#RuntimeR0Drv_INCS.netbsd = \
++# $(PATH_STAGE)/gen-sys-hdrs
RuntimeR0Drv_INCS.linux = \
r0drv/linux
RuntimeR0Drv_INCS.solaris = \
Home |
Main Index |
Thread Index |
Old Index