Bump
This commit is contained in:
147
app-emulation/virtualbox/files/050_virtualbox-5.2.8-nopie.patch
Normal file
147
app-emulation/virtualbox/files/050_virtualbox-5.2.8-nopie.patch
Normal file
@@ -0,0 +1,147 @@
|
||||
diff -Naur VirtualBox-5.1.24/Config.kmk VirtualBox-5.1.24/Config.kmk
|
||||
--- VirtualBox-5.1.24/Config.kmk 2017-07-26 13:55:27.803972185 -0400
|
||||
+++ VirtualBox-5.1.24/Config.kmk 2017-07-26 13:53:10.700974328 -0400
|
||||
@@ -2601,6 +2601,7 @@
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overlength-strings?= $(call VBOX_GCC_CHECK_CC,-Wno-overlength-strings,)'
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overloaded-virtual?= $(call VBOX_GCC_CHECK_CXX,-Wno-overloaded-virtual,)'
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
|
||||
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_nopie ?= $(call VBOX_GCC_CHECK_CC,-nopie,)'
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)'
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_m64 ?= $(call VBOX_GCC_CHECK_CC,-m64,)'
|
||||
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_no-pie ?= $(call VBOX_GCC_CHECK_CC,-no-pie,)'
|
||||
@@ -3843,8 +3844,8 @@
|
||||
|
||||
ifeq ($(VBOX_LDR_FMT32),elf)
|
||||
TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL)
|
||||
- TEMPLATE_VBoxRc_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
- TEMPLATE_VBoxRc_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
+ TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
+ TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
ifeq ($(KBUILD_TARGET),solaris)
|
||||
TEMPLATE_VBoxRc_LDFLAGS = -r
|
||||
else
|
||||
@@ -3864,8 +3865,8 @@
|
||||
ifeq ($(VBOX_LDR_FMT32),macho)
|
||||
TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC_TOOL)
|
||||
TEMPLATE_VBoxRc_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
||||
- TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
|
||||
- TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
||||
+ TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
|
||||
+ TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
|
||||
TEMPLATE_VBoxRc_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -m32 -nostdlib
|
||||
#TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ???
|
||||
endif
|
||||
@@ -3903,9 +3904,9 @@
|
||||
endif
|
||||
|
||||
ifeq ($(VBOX_LDR_FMT32),elf)
|
||||
- TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0
|
||||
- TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0
|
||||
- TEMPLATE_VBoxRcExe_LDFLAGS = -g
|
||||
+ TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0 $(VBOX_GCC_nopie)
|
||||
+ TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0 $(VBOX_GCC_nopie)
|
||||
+ TEMPLATE_VBoxRcExe_LDFLAGS = -g $(VBOX_GCC_nopie)
|
||||
TEMPLATE_VBoxRcExe_LDFLAGS.dbgopt = -g
|
||||
TEMPLATE_VBoxRcExe_LDFLAGS.strict = -g
|
||||
TEMPLATE_VBoxRcExe_LDFLAGS.release = -g
|
||||
@@ -3984,8 +3985,8 @@
|
||||
|
||||
ifeq ($(VBOX_LDR_FMT),elf)
|
||||
TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL)
|
||||
-TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
-TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
+TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
+TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
|
||||
TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
|
||||
TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
|
||||
ifeq ($(KBUILD_TARGET),solaris)
|
||||
@@ -4018,12 +4019,12 @@
|
||||
TEMPLATE_VBoxR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
|
||||
TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \
|
||||
-fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
|
||||
- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
||||
+ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
|
||||
TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
|
||||
TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32
|
||||
TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
|
||||
-fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
|
||||
- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
|
||||
+ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
|
||||
TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
|
||||
TEMPLATE_VBoxR0_CFLAGS.x86 = -m32
|
||||
TEMPLATE_VBoxR0_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
|
||||
@@ -4259,7 +4260,7 @@
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
|
||||
-Wimplicit-function-declaration -Werror-implicit-function-declaration \
|
||||
-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
||||
- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
-nostdinc -std=c99
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
|
||||
@@ -4268,7 +4269,7 @@
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
|
||||
$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
|
||||
-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
||||
- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
-nostdinc
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
|
||||
@@ -4341,7 +4342,7 @@
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
|
||||
-Wimplicit-function-declaration -Werror-implicit-function-declaration \
|
||||
-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
||||
- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
-nostdinc -std=c99 -msoft-float
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 \
|
||||
-mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \
|
||||
@@ -4353,7 +4354,7 @@
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
|
||||
$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
|
||||
-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
|
||||
- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
|
||||
-nostdinc -msoft-float
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
|
||||
TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
|
||||
@@ -4394,7 +4395,7 @@
|
||||
TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS = -fno-PIC \
|
||||
$(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \
|
||||
- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
|
||||
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
|
||||
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
|
||||
@@ -5210,8 +5211,8 @@
|
||||
TEMPLATE_VBoxNoCrtGccLib_TOOL = $(VBOX_GCC_TOOL)
|
||||
TEMPLATE_VBoxNoCrtGccLib_ASTOOL = $(VBOX_ASTOOL)
|
||||
TEMPLATE_VBoxNoCrtGccLib_ASFLAGS = $(VBOX_ASFLAGS)
|
||||
- TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector)
|
||||
- TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
|
||||
+ TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
|
||||
+ TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
|
||||
ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
||||
# in 64-bit mode we'll build a sys-module (VBoxREM2).
|
||||
if1of ($(KBUILD_TARGET), darwin solaris)
|
||||
diff -Naur VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk
|
||||
--- VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:55:27.746972186 -0400
|
||||
+++ VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:53:10.641974329 -0400
|
||||
@@ -132,6 +132,7 @@
|
||||
-W \
|
||||
-Wformat-nonliteral \
|
||||
$(VBOX_GCC_fno-stack-protector) \
|
||||
+ $(VBOX_GCC_nopie) \
|
||||
$(VBOX_GCC_fno-dwarf2-cfi-asm) \
|
||||
$(VBOX_GCC_Wno-address)
|
||||
TEMPLATE_iPxe_ASFLAGS = \
|
||||
@@ -155,6 +156,7 @@
|
||||
-W \
|
||||
-Wformat-nonliteral \
|
||||
$(VBOX_GCC_fno-stack-protector) \
|
||||
+ $(VBOX_GCC_nopie) \
|
||||
$(VBOX_GCC_fno-dwarf2-cfi-asm) \
|
||||
$(VBOX_GCC_Wno-address) \
|
||||
-DASSEMBLY
|
||||
7
app-emulation/virtualbox/files/10-virtualbox.rules
Normal file
7
app-emulation/virtualbox/files/10-virtualbox.rules
Normal file
@@ -0,0 +1,7 @@
|
||||
# create second tree of USB devices according to
|
||||
# http://www.virtualbox.org/ticket/7759#comment:5
|
||||
|
||||
SUBSYSTEM=="usb_device", ACTION!="remove", RUN="%UDEVDIR%/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
|
||||
SUBSYSTEM=="usb", ACTION!="remove", ENV{DEVTYPE}=="usb_device", RUN="%UDEVDIR%/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
|
||||
SUBSYSTEM=="usb_device", ACTION=="remove", RUN="%UDEVDIR%/VBoxCreateUSBNode.sh --remove $major $minor"
|
||||
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="%UDEVDIR%/VBoxCreateUSBNode.sh --remove $major $minor"
|
||||
19
app-emulation/virtualbox/files/vboxwebsrv-confd
Normal file
19
app-emulation/virtualbox/files/vboxwebsrv-confd
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# The host to bind to (defaults to "localhost").
|
||||
VBOXWEBSRV_HOST="localhost"
|
||||
|
||||
# Which port to on the host (defaults to 18083).
|
||||
VBOXWEBSRV_PORT="18083"
|
||||
|
||||
# Session timeout, in seconds. (defaults to 20).
|
||||
VBOXWEBSRV_TIMEOUT=20
|
||||
|
||||
# The interval in which the webservice checks for
|
||||
# timed-out clients, in seconds. Normally does not
|
||||
# need to be changed (defaults to 5).
|
||||
VBOXWEBSRV_INTERVAL=5
|
||||
|
||||
# User under which vboxwebsrv is running
|
||||
VBOXWEBSRV_USER="root"
|
||||
21
app-emulation/virtualbox/files/vboxwebsrv-initd
Normal file
21
app-emulation/virtualbox/files/vboxwebsrv-initd
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting VirtualBox WebService"
|
||||
start-stop-daemon --start --quiet --user ${VBOXWEBSRV_USER} --pidfile /var/run/vboxwebsrv.pid \
|
||||
--background --make-pidfile --exec /usr/bin/vboxwebsrv \
|
||||
-- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping VirtualBox WebService"
|
||||
start-stop-daemon --stop --user ${VBOXWEBSRV_USER} --quiet --pidfile /var/run/vboxwebsrv.pid
|
||||
eend $?
|
||||
}
|
||||
1
app-emulation/virtualbox/files/virtualbox-4-config
Normal file
1
app-emulation/virtualbox/files/virtualbox-4-config
Normal file
@@ -0,0 +1 @@
|
||||
INSTALL_DIR=/usr/MY_LIBDIR/virtualbox
|
||||
47
app-emulation/virtualbox/files/virtualbox-5-localconfig
Normal file
47
app-emulation/virtualbox/files/virtualbox-5-localconfig
Normal file
@@ -0,0 +1,47 @@
|
||||
# -*- Makefile -*-
|
||||
#
|
||||
# Overwrite some default kBuild settings
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
||||
#
|
||||
# This file is part of VirtualBox Open Source Edition (OSE), as
|
||||
# available from http://www.virtualbox.org. This file is free software;
|
||||
# you can redistribute it and/or modify it under the terms of the GNU
|
||||
# General Public License as published by the Free Software Foundation,
|
||||
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
||||
# distribution. VirtualBox OSE is distributed in the hope that it will
|
||||
# be useful, but WITHOUT ANY WARRANTY of any kind.
|
||||
#
|
||||
|
||||
# shut up wine complaining about unknown locale
|
||||
EXEC_X86_WIN32 := wine
|
||||
|
||||
# don't build testcases to save time, they are not needed for the package
|
||||
VBOX_WITH_TESTCASES :=
|
||||
VBOX_WITH_VALIDATIONKIT :=
|
||||
VBOX_DOCBOOK_WITH_LATEX := 1
|
||||
|
||||
KBUILD_MSG_STYLE := brief
|
||||
|
||||
## paths, origin, hardening
|
||||
VBOX_WITH_HARDENING := 1
|
||||
VBOX_WITH_ORIGIN :=
|
||||
VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox
|
||||
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
|
||||
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
|
||||
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
|
||||
VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS)
|
||||
|
||||
## don't build unwanted/splitted stuff
|
||||
VBOX_WITHOUT_ADDITIONS := 1
|
||||
VBOX_WITH_VBOXDRV :=
|
||||
VBOX_WITH_VBOXBFE :=
|
||||
VBOX_WITH_KCHMVIEWER :=
|
||||
|
||||
## don't build with -Werror
|
||||
VBOX_WITH_WARNINGS_AS_ERRORS :=
|
||||
|
||||
## fix compilation with USE="doc" (Gentoo bug #554932)
|
||||
VBOX_PATH_DOCBOOK_DTD := /usr/share/sgml/docbook/sgml-dtd-4.4
|
||||
@@ -0,0 +1,15 @@
|
||||
https://www.virtualbox.org/changeset/90377/vbox
|
||||
https://bugs.gentoo.org/805350
|
||||
https://bugs.gentoo.org/805365
|
||||
|
||||
--- VirtualBox-6.1.26/configure
|
||||
+++ VirtualBox-6.1.26/configure
|
||||
@@ -1624,6 +1624,8 @@ EOF
|
||||
else
|
||||
# Strip .../QtCore as we add components ourself:
|
||||
INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
|
||||
+ # Strip .../QtGui as we add components ourself:
|
||||
+ INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtGui|\1|g; s| $||g'`
|
||||
# store only the first path, remove all other paths
|
||||
# most likely pkg-config gave us -I/usr/include/qt5 -I/usr/include/qt5/QtCore
|
||||
INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/configure b/configure
|
||||
index fd2e296..695f6a7 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1987,6 +1987,9 @@ check_python()
|
||||
{
|
||||
test_header "Python support"
|
||||
|
||||
+ # We force the right implementation in the ebuild instead
|
||||
+ return
|
||||
+
|
||||
# On darwin this is a on/off decision only
|
||||
if [ "$OS" = "darwin" ]; then
|
||||
echo "enabled"
|
||||
@@ -0,0 +1,16 @@
|
||||
Bug https://bugs.gentoo.org/865361
|
||||
|
||||
gcc does not support -fcf-protection for i386 (needs i686+),
|
||||
so disable it when building iPxeBaseBin.
|
||||
|
||||
--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
|
||||
+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
|
||||
@@ -176,6 +177,8 @@
|
||||
|
||||
iPxeBaseBin_TEMPLATE = iPxe
|
||||
|
||||
+ iPxeBaseBin_CFLAGS = -fcf-protection=none
|
||||
+
|
||||
iPxeBaseBin_INCS = \
|
||||
src \
|
||||
src/include \
|
||||
@@ -0,0 +1,25 @@
|
||||
With dev-libs/libxml2-2.11, xi:include errors out if it can't find a file, so add an empty fallback.
|
||||
Used to work with dev-libs/libxml2-2.10.
|
||||
|
||||
See also: https://bugs.gentoo.org/906309
|
||||
|
||||
--- a/doc/manual/en_US/user_Frontends.xml
|
||||
+++ b/doc/manual/en_US/user_Frontends.xml
|
||||
@@ -1205,6 +1205,6 @@
|
||||
|
||||
</sect1>
|
||||
|
||||
- <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
+ <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include>
|
||||
|
||||
</chapter>
|
||||
--- b/doc/manual/en_US/user_VBoxManage.xml
|
||||
+++ a/doc/manual/en_US/user_VBoxManage.xml
|
||||
@@ -8975,6 +8975,6 @@
|
||||
<!-- TODO: Figure out how we can handle other manpages. The xml is bolted to
|
||||
sect1, so it's not possible to have them "in place" -->
|
||||
|
||||
- <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
+ <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include>
|
||||
|
||||
</chapter>
|
||||
@@ -0,0 +1,43 @@
|
||||
Bug: https://bugs.gentoo.org/922445
|
||||
|
||||
The change in libxml2 is not backwards compatibe.
|
||||
A patch like the one in arch does not work with 2.11, so just cast the argument to maintain compatibility with both.
|
||||
|
||||
The upstream change is in include/libxml/xmlerror.h:
|
||||
|
||||
typedef xmlError *xmlErrorPtr;
|
||||
|
||||
-typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
||||
+typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
|
||||
|
||||
See also: https://gitlab.archlinux.org/archlinux/packaging/packages/virtualbox/-/blob/main/019-libxml-2-12.patch?ref_type=heads
|
||||
|
||||
--- a/src/VBox/Runtime/r3/xml.cpp
|
||||
+++ b/src/VBox/Runtime/r3/xml.cpp
|
||||
@@ -1870,7 +1870,7 @@
|
||||
throw std::bad_alloc();
|
||||
/* per-thread so it must be here */
|
||||
xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
|
||||
- xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
|
||||
+ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc)xmlParserBaseStructuredError);
|
||||
}
|
||||
|
||||
XmlParserBase::~XmlParserBase()
|
||||
@@ -1931,7 +1931,7 @@
|
||||
pcszFilename,
|
||||
NULL, // encoding = auto
|
||||
options)))
|
||||
- throw XmlError(xmlCtxtGetLastError(m_ctxt));
|
||||
+ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
|
||||
|
||||
doc.refreshInternals();
|
||||
}
|
||||
@@ -2191,7 +2191,7 @@
|
||||
pcszFilename,
|
||||
NULL, // encoding = auto
|
||||
options)))
|
||||
- throw XmlError(xmlCtxtGetLastError(m_ctxt));
|
||||
+ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
|
||||
|
||||
doc.refreshInternals();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
When compiling with clang we get:
|
||||
|
||||
src/VBox/Devices/PC/ipxe/src/core/settings.c:310:8: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
|
||||
|
||||
Apply this patch conditionally to disable rebuilding iPxeBiosBin.rom when using clang.
|
||||
|
||||
--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
|
||||
+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
|
||||
@@ -45,7 +45,8 @@
|
||||
iPxeBiosBin_CLEAN = \
|
||||
$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \
|
||||
|
||||
-if1of ($(KBUILD_TARGET), darwin os2 solaris win)
|
||||
+# Disable building on Linux if using clang
|
||||
+if1of ($(KBUILD_TARGET), darwin os2 solaris win linux)
|
||||
$$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $(PATH_SUB_CURRENT)/iPxeBiosBin.rom $(VBOX_BIN2C) | $$(dir $$@)
|
||||
$(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@)
|
||||
$(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@
|
||||
119
app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
Normal file
119
app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
Normal file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
## @file
|
||||
# Oracle VM VirtualBox startup script, Linux hosts.
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2006-2017 Oracle Corporation
|
||||
#
|
||||
# This file is part of VirtualBox Open Source Edition (OSE), as
|
||||
# available from http://www.virtualbox.org. This file is free software;
|
||||
# you can redistribute it and/or modify it under the terms of the GNU
|
||||
# General Public License (GPL) as published by the Free Software
|
||||
# Foundation, in version 2 as it comes in the "COPYING" file of the
|
||||
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
||||
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
||||
#
|
||||
|
||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
CONFIG="/etc/vbox/vbox.cfg"
|
||||
|
||||
test -r "${CONFIG}" &&
|
||||
. "${CONFIG}"
|
||||
test -z "${INSTALL_DIR}" &&
|
||||
if test -f /usr/lib/virtualbox/VirtualBox &&
|
||||
test -x /usr/lib/virtualbox/VirtualBox; then
|
||||
INSTALL_DIR=/usr/lib/virtualbox
|
||||
else
|
||||
echo "Could not find VirtualBox installation. Please reinstall."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Note: This script must not fail if the module was not successfully installed
|
||||
# because the user might not want to run a VM but only change VM params!
|
||||
|
||||
if [ "$1" = "shutdown" ]; then
|
||||
SHUTDOWN="true"
|
||||
elif ! lsmod|grep -q vboxdrv; then
|
||||
cat << EOF
|
||||
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
|
||||
available for the current kernel (`uname -r`) or it failed to
|
||||
load. Please recompile the kernel module and install it by
|
||||
|
||||
for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
|
||||
|
||||
You will not be able to start VMs until this problem is fixed.
|
||||
EOF
|
||||
elif [ ! -c /dev/vboxdrv ]; then
|
||||
cat << EOF
|
||||
WARNING: The character device /dev/vboxdrv does not exist.
|
||||
Please try to reload all the needed kernel modules by:
|
||||
|
||||
for m in vbox{netflt,netadp,drv}; do rmmod \$m; done
|
||||
for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
|
||||
|
||||
and if that is not successful, try to re-install the package by:
|
||||
|
||||
emerge -1av app-emulation/virtualbox-modules
|
||||
|
||||
You will not be able to start VMs until this problem is fixed.
|
||||
EOF
|
||||
fi
|
||||
|
||||
SERVER_PID=$(ps -U ${LOGNAME:-$USER} | grep VBoxSVC | awk '{ print $1 }')
|
||||
if [ -z "$SERVER_PID" ]; then
|
||||
# Server not running yet/anymore, cleanup socket path.
|
||||
# See IPC_GetDefaultSocketPath()!
|
||||
if [ -n "$LOGNAME" ]; then
|
||||
rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1
|
||||
else
|
||||
rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SHUTDOWN" = "true" ]; then
|
||||
if [ -n "$SERVER_PID" ]; then
|
||||
kill -TERM $SERVER_PID
|
||||
sleep 2
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
APP=`basename $0`
|
||||
case "$APP" in
|
||||
VirtualBox|virtualbox)
|
||||
exec "$INSTALL_DIR/VirtualBox" "$@"
|
||||
;;
|
||||
VirtualBoxVM|virtualboxvm)
|
||||
exec "$INSTALL_DIR/VirtualBoxVM" "$@"
|
||||
;;
|
||||
VBoxManage|vboxmanage)
|
||||
exec "$INSTALL_DIR/VBoxManage" "$@"
|
||||
;;
|
||||
VBoxSDL|vboxsdl)
|
||||
exec "$INSTALL_DIR/VBoxSDL" "$@"
|
||||
;;
|
||||
VBoxVRDP|VBoxHeadless|vboxheadless)
|
||||
exec "$INSTALL_DIR/VBoxHeadless" "$@"
|
||||
;;
|
||||
VBoxAutostart|vboxautostart)
|
||||
exec "$INSTALL_DIR/VBoxAutostart" "$@"
|
||||
;;
|
||||
VBoxBalloonCtrl|vboxballoonctrl)
|
||||
exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
|
||||
;;
|
||||
VBoxBugReport|vboxbugreport)
|
||||
exec "$INSTALL_DIR/VBoxBugReport" "$@"
|
||||
;;
|
||||
VBoxDTrace|vboxdtrace)
|
||||
exec "$INSTALL_DIR/VBoxDTrace" "$@"
|
||||
;;
|
||||
vboxwebsrv)
|
||||
exec "$INSTALL_DIR/vboxwebsrv" "$@"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown application - $APP"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
@@ -0,0 +1 @@
|
||||
d /dev/vboxusb 0750 root vboxusers
|
||||
Reference in New Issue
Block a user