forked from pool/virtualbox
Compare commits
2 Commits
master
...
python313-
| Author | SHA256 | Date | |
|---|---|---|---|
| 57db7db36d | |||
| 2d6eb3f435 |
BIN
VirtualBox-7.2.0-patched.tpxz
LFS
Normal file
BIN
VirtualBox-7.2.0-patched.tpxz
LFS
Normal file
Binary file not shown.
BIN
VirtualBox-7.2.6-patched.tpxz
LFS
BIN
VirtualBox-7.2.6-patched.tpxz
LFS
Binary file not shown.
@@ -1,225 +0,0 @@
|
||||
From: Sérgio Basto
|
||||
References: bsc#1258115
|
||||
|
||||
Support building against kernel 6.19 -- cr4_update_irqsoff and
|
||||
cr4_read_shadow were unexported in 6276c67.
|
||||
|
||||
This contains https://github.com/VirtualBox/virtualbox/compare/d52f0680a4e4...33992f0e56b8
|
||||
|
||||
Backport from:
|
||||
https://github.com/rpmfusion/VirtualBox-kmod/commit/ec4795b37621
|
||||
|
||||
Adapted to these sources by Jiri Slaby.
|
||||
|
||||
---
|
||||
src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c | 79 ++++++++++++++++++--
|
||||
src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c | 16 ++++
|
||||
src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c | 15 +++
|
||||
src/VBox/Runtime/r0drv/linux/the-linux-kernel.h | 3
|
||||
4 files changed, 107 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||
+++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||
@@ -190,6 +190,12 @@ static bool g_fEnabledHw
|
||||
static int (*g_pfnKvmEnableVirtualization)(void);
|
||||
/** Function pointer to kvm_disable_virtualization(). */
|
||||
static void (*g_pfnKvmDisableVirtualization)(void);
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+/** Function pointer to cr4_update_irqsoff(). */
|
||||
+static void (*g_pfnCr4UpdateIrqsoff)(unsigned long set, unsigned long clear);
|
||||
+/** Function pointer to cr4_read_shadow(). */
|
||||
+static unsigned long (*g_pfnCr4ReadShadow)(void);
|
||||
+# endif
|
||||
/** Pointer to the KVM hardware specific module. */
|
||||
struct module *g_pKvmHwvirtModule;
|
||||
#endif
|
||||
@@ -395,6 +401,28 @@ static int supdrvLinuxInitKvmSymbols(voi
|
||||
void *pfnDisable = __symbol_get("kvm_disable_virtualization");
|
||||
if (pfnDisable)
|
||||
{
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+ void *pfnCr4UpdateIrqsoff = __symbol_get("cr4_update_irqsoff");
|
||||
+ void *pfnRr4ReadShadow = __symbol_get("cr4_read_shadow");
|
||||
+
|
||||
+ if ( pfnCr4UpdateIrqsoff
|
||||
+ && pfnRr4ReadShadow)
|
||||
+ {
|
||||
+ g_pfnCr4UpdateIrqsoff = pfnCr4UpdateIrqsoff;
|
||||
+ g_pfnCr4ReadShadow = pfnRr4ReadShadow;
|
||||
+
|
||||
+ printk(KERN_INFO "vboxdrv: Found extra KVM hardware-virtualization symbols\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printk(KERN_WARNING "vboxdrv: Failed to find extra KVM hardware-virtualization symbols\n");
|
||||
+
|
||||
+ if (pfnCr4UpdateIrqsoff)
|
||||
+ symbol_put_addr(pfnCr4UpdateIrqsoff);
|
||||
+ if (pfnRr4ReadShadow)
|
||||
+ symbol_put_addr(pfnRr4ReadShadow);
|
||||
+ }
|
||||
+#endif
|
||||
/*
|
||||
* Try to obtain a reference to kvm_intel/kvm_amd module in addition to the
|
||||
* reference to the kvm module. If we fail, we will not try to use KVM for
|
||||
@@ -466,6 +494,18 @@ static void supdrvLinuxTermKvmSymbols(vo
|
||||
symbol_put_addr(g_pfnKvmDisableVirtualization);
|
||||
g_pfnKvmDisableVirtualization = NULL;
|
||||
}
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+ if (g_pfnCr4UpdateIrqsoff)
|
||||
+ {
|
||||
+ symbol_put_addr(g_pfnCr4UpdateIrqsoff);
|
||||
+ g_pfnCr4UpdateIrqsoff = NULL;
|
||||
+ }
|
||||
+ if (g_pfnCr4ReadShadow)
|
||||
+ {
|
||||
+ symbol_put_addr(g_pfnCr4ReadShadow);
|
||||
+ g_pfnCr4ReadShadow = NULL;
|
||||
+ }
|
||||
+#endif
|
||||
if (g_pKvmHwvirtModule)
|
||||
{
|
||||
module_put(g_pKvmHwvirtModule);
|
||||
@@ -1146,6 +1186,37 @@ SUPR0DECL(int) SUPDrvLinuxLdrDeregisterW
|
||||
}
|
||||
EXPORT_SYMBOL(SUPDrvLinuxLdrDeregisterWrappedModule);
|
||||
|
||||
+#if RTLNX_VER_MIN(5,8,0)
|
||||
+/**
|
||||
+ * Wrapper function for cr4_update_irqsoff() which was
|
||||
+ * exported only for KVM starting from kernel 6.19.
|
||||
+ */
|
||||
+static void supdrvLinux_cr4_update_irqsoff(unsigned long set, unsigned long clear)
|
||||
+{
|
||||
+# if RTLNX_VER_MIN(6,19,0) && defined(SUPDRV_LINUX_HAS_KVM_HWVIRT_API)
|
||||
+ if (g_pfnCr4UpdateIrqsoff)
|
||||
+ g_pfnCr4UpdateIrqsoff(set, clear);
|
||||
+# else
|
||||
+ cr4_update_irqsoff(set, clear);
|
||||
+# endif
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Wrapper function for supdrvLinux_cr4_read_shadow() which was
|
||||
+ * exported only for KVM starting from kernel 6.19.
|
||||
+ */
|
||||
+static unsigned long supdrvLinux_cr4_read_shadow(void)
|
||||
+{
|
||||
+ unsigned long cr4 = 0;
|
||||
+# if RTLNX_VER_MIN(6,19,0) && defined(SUPDRV_LINUX_HAS_KVM_HWVIRT_API)
|
||||
+ if (g_pfnCr4ReadShadow)
|
||||
+ cr4 = g_pfnCr4ReadShadow();
|
||||
+# else
|
||||
+ cr4 = cr4_read_shadow();
|
||||
+# endif
|
||||
+ return cr4;
|
||||
+}
|
||||
+#endif /* 5.8.0 */
|
||||
|
||||
#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
|
||||
RTCCUINTREG VBOXCALL supdrvOSChangeCR4(RTCCUINTREG fOrMask, RTCCUINTREG fAndMask)
|
||||
@@ -1153,10 +1224,10 @@ RTCCUINTREG VBOXCALL supdrvOSChangeCR4(R
|
||||
# if RTLNX_VER_MIN(5,8,0)
|
||||
unsigned long fSavedFlags;
|
||||
local_irq_save(fSavedFlags);
|
||||
- RTCCUINTREG const uOld = cr4_read_shadow();
|
||||
- cr4_update_irqsoff(fOrMask, ~fAndMask); /* Same as this function, only it is not returning the old value. */
|
||||
- AssertMsg(cr4_read_shadow() == ((uOld & fAndMask) | fOrMask),
|
||||
- ("fOrMask=%#RTreg fAndMask=%#RTreg uOld=%#RTreg; new cr4=%#llx\n", fOrMask, fAndMask, uOld, cr4_read_shadow()));
|
||||
+ RTCCUINTREG const uOld = supdrvLinux_cr4_read_shadow();
|
||||
+ supdrvLinux_cr4_update_irqsoff(fOrMask, ~fAndMask); /* Same as this function, only it is not returning the old value. */
|
||||
+ AssertMsg(supdrvLinux_cr4_read_shadow() == ((uOld & fAndMask) | fOrMask),
|
||||
+ ("fOrMask=%#RTreg fAndMask=%#RTreg uOld=%#RTreg; new cr4=%#llx\n", fOrMask, fAndMask, uOld, supdrvLinux_cr4_read_shadow()));
|
||||
local_irq_restore(fSavedFlags);
|
||||
# else
|
||||
# if RTLNX_VER_MIN(3,20,0)
|
||||
--- a/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c
|
||||
@@ -60,6 +60,11 @@ static DECLARE_TASK_QUEUE(g_rtR0LnxWorkQ
|
||||
* This is a special mm structure used to manage the kernel address space. */
|
||||
struct mm_struct *g_pLnxInitMm = NULL;
|
||||
|
||||
+#if RTLNX_VER_MIN(6,19,0)
|
||||
+/** Pointer to __flush_tlb_all kernel symbol. */
|
||||
+void (*g_pfnLinuxFlushTlbAll)(void);
|
||||
+#endif
|
||||
+
|
||||
|
||||
/**
|
||||
* Pushes an item onto the IPRT work queue.
|
||||
@@ -136,6 +141,11 @@ DECLHIDDEN(int) rtR0InitNative(void)
|
||||
printk("rtR0InitNative: g_pLnxInitMm=%p\n", g_pLnxInitMm);
|
||||
|
||||
RTR0DbgKrnlInfoRelease(hKrnlInfo);
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+ g_pfnLinuxFlushTlbAll = __symbol_get("__flush_tlb_all");
|
||||
+ if (!RT_VALID_PTR(g_pfnLinuxFlushTlbAll))
|
||||
+ printk("rtR0InitNative: can't load __flush_tlb_all\n");
|
||||
+# endif
|
||||
}
|
||||
else
|
||||
printk("rtR0InitNative: RTR0DbgKrnlInfoOpen failed: %d\n", rc);
|
||||
@@ -151,6 +161,12 @@ DECLHIDDEN(void) rtR0TermNative(void)
|
||||
{
|
||||
IPRT_LINUX_SAVE_EFL_AC();
|
||||
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+ if (RT_VALID_PTR(g_pfnLinuxFlushTlbAll))
|
||||
+ symbol_put_addr(g_pfnLinuxFlushTlbAll);
|
||||
+ g_pfnLinuxFlushTlbAll = NULL;
|
||||
+#endif
|
||||
+
|
||||
rtR0LnxWorkqueueFlush();
|
||||
#if RTLNX_VER_MIN(2,5,41)
|
||||
destroy_workqueue(g_prtR0LnxWorkQueue);
|
||||
--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
||||
@@ -2108,6 +2108,17 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if defined(IPRT_USE_ALLOC_VM_AREA_FOR_EXEC) || defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC)
|
||||
+static void rtR0MemObjLinuxFlushTlbAll(void)
|
||||
+{
|
||||
+# if RTLNX_VER_MIN(6,19,0)
|
||||
+ if (RT_LIKELY(RT_VALID_PTR(g_pfnLinuxFlushTlbAll)))
|
||||
+ g_pfnLinuxFlushTlbAll();
|
||||
+# else
|
||||
+ __flush_tlb_all();
|
||||
+# endif
|
||||
+}
|
||||
+#endif
|
||||
|
||||
DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
|
||||
{
|
||||
@@ -2128,7 +2139,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(
|
||||
set_pte(papPtes[i], mk_pte(pMemLnx->apPages[i], fPg));
|
||||
}
|
||||
preempt_disable();
|
||||
- __flush_tlb_all();
|
||||
+ rtR0MemObjLinuxFlushTlbAll();
|
||||
preempt_enable();
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
@@ -2174,7 +2185,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(
|
||||
flush_icache_range((uintptr_t)pMemLnx->Core.pv + offSub, cbSub);
|
||||
# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) /* flush_tlb_kernel_range is not exported, but __flush_tlb_all is. */
|
||||
preempt_disable();
|
||||
- __flush_tlb_all();
|
||||
+ rtR0MemObjLinuxFlushTlbAll();
|
||||
preempt_enable();
|
||||
# else
|
||||
flush_tlb_kernel_range((uintptr_t)pMemLnx->Core.pv + offSub, cbSub);
|
||||
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||
@@ -512,6 +512,9 @@ RTDECL(struct page *) rtR0MemObjLinuxVir
|
||||
|
||||
|
||||
extern struct mm_struct *g_pLnxInitMm;
|
||||
+#if RTLNX_VER_MIN(6,19,0)
|
||||
+extern void (*g_pfnLinuxFlushTlbAll)(void);
|
||||
+#endif
|
||||
|
||||
|
||||
#endif /* !IPRT_INCLUDED_SRC_r0drv_linux_the_linux_kernel_h */
|
||||
79
python313.patch
Normal file
79
python313.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
Index: VirtualBox-7.2.0/configure
|
||||
===================================================================
|
||||
--- VirtualBox-7.2.0.orig/configure
|
||||
+++ VirtualBox-7.2.0/configure
|
||||
@@ -2116,7 +2116,7 @@ extern "C" int main(void)
|
||||
}
|
||||
EOF
|
||||
found=
|
||||
- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12"
|
||||
+ SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12 python3.13"
|
||||
for p in $PYTHONDIR; do
|
||||
for d in $SUPPYTHONLIBS; do
|
||||
for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
|
||||
Index: VirtualBox-7.2.0/src/VBox/Installer/linux/routines.sh
|
||||
===================================================================
|
||||
--- VirtualBox-7.2.0.orig/src/VBox/Installer/linux/routines.sh
|
||||
+++ VirtualBox-7.2.0/src/VBox/Installer/linux/routines.sh
|
||||
@@ -483,6 +483,7 @@ maybe_run_python_bindings_installer() {
|
||||
python3.10 \
|
||||
python3.11 \
|
||||
python3.12 \
|
||||
+ python3.13 \
|
||||
python3 \
|
||||
python"
|
||||
|
||||
Index: VirtualBox-7.2.0/src/libs/xpcom18a4/python/Makefile.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.2.0.orig/src/libs/xpcom18a4/python/Makefile.kmk
|
||||
+++ VirtualBox-7.2.0/src/libs/xpcom18a4/python/Makefile.kmk
|
||||
@@ -658,6 +658,27 @@ ifndef VBOX_ONLY_SDK
|
||||
endif
|
||||
endif
|
||||
|
||||
+ ifdef VBOX_PYTHON313_INC
|
||||
+ #
|
||||
+ # Python 3.13 version (implicitly with pymalloc)
|
||||
+ #
|
||||
+ DLLS += VBoxPython3_13
|
||||
+ VBoxPython3_13_EXTENDS = VBoxPythonBase
|
||||
+ VBoxPython3_13_EXTENDS_BY = appending
|
||||
+ VBoxPython3_13_INCS = $(VBOX_PYTHON313_INC)
|
||||
+ VBoxPython3_13_LIBS = $(VBOX_PYTHON313_LIB)
|
||||
+
|
||||
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
|
||||
+ ifdef VBOX_PYTHON313_LIB_X86
|
||||
+ DLLS += VBoxPython3_13_x86
|
||||
+ VBoxPython3_13_x86_EXTENDS = VBoxPythonBase_x86
|
||||
+ VBoxPython3_13_x86_EXTENDS_BY = appending
|
||||
+ VBoxPython3_13_x86_INCS = $(VBOX_PYTHON313_INC)
|
||||
+ VBoxPython3_13_x86_LIBS = $(VBOX_PYTHON313_LIB_X86)
|
||||
+ endif
|
||||
+ endif
|
||||
+ endif
|
||||
+
|
||||
ifdef VBOX_PYTHONDEF_INC
|
||||
#
|
||||
# Python without versioning
|
||||
@@ -700,7 +721,7 @@ ifndef VBOX_ONLY_SDK
|
||||
# TODO: ASSUMING that we don't need a different headers for pymalloc
|
||||
# ('m' builds < 3.8) and CRT malloc.
|
||||
#
|
||||
- VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 37 38 39 310 311 312 34 33 \
|
||||
+ VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 37 38 39 310 311 312 313 34 33 \
|
||||
,$(if-expr defined(VBOX_PYTHON$(ver)_INC),$(ver),)$(if-expr defined(VBOX_PYTHON$(ver)M_INC),$(ver)M,)))
|
||||
ifneq ($(VBOX_PYTHON_LIMITED_API_VER),)
|
||||
DLLS += VBoxPython3
|
||||
Index: VirtualBox-7.2.0/src/libs/xpcom18a4/python/gen_python_deps.py
|
||||
===================================================================
|
||||
--- VirtualBox-7.2.0.orig/src/libs/xpcom18a4/python/gen_python_deps.py
|
||||
+++ VirtualBox-7.2.0/src/libs/xpcom18a4/python/gen_python_deps.py
|
||||
@@ -29,7 +29,7 @@ if sys.version_info >= (3, 10):
|
||||
else:
|
||||
from distutils.version import StrictVersion as Version
|
||||
|
||||
-versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.9", "3.10", "3.11", "3.12" ]
|
||||
+versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
|
||||
prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
|
||||
known = {}
|
||||
|
||||
@@ -6,6 +6,7 @@ if [ -z "$1" ]; then
|
||||
fi
|
||||
|
||||
REMOVE_DIRS=(
|
||||
src/VBox/Additions/WINNT
|
||||
src/VBox/Additions/os2
|
||||
src/VBox/Runtime/r3/darwin
|
||||
src/VBox/Runtime/r0drv/darwin
|
||||
|
||||
@@ -1,68 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 23 10:46:41 UTC 2026 - Jan Engelhardt <jengelh@inai.de>
|
||||
Mon Aug 25 11:50:21 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Set build parameter VBOX_WITHOUT_SPLIT_SOAPC=1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 20 05:23:41 UTC 2026 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- add kernel-6.19.patch (bsc#1258115)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 10 23:13:26 UTC 2026 - Lubos Kocman <lubos.kocman@suse.com>
|
||||
|
||||
- Update license tag to GPL-3.0-only
|
||||
* Requested by SUSE legal via legaldb
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 2 09:59:43 UTC 2026 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.2.6
|
||||
* VMM: Fixed issue when VM process was crashing during RHEL5
|
||||
guest boot
|
||||
* VMM: Fixed issue when VMX nested-guest VM-entry was checking
|
||||
the wrong VM-execution control bit in the virtual VMCS
|
||||
* VMM: Fixed issue when guest process was crashing inside Windows
|
||||
guest on AMD system
|
||||
* The VRDP server, the USB smartcard emulation, the disk/VM
|
||||
encryption features are now in the open source base package
|
||||
- Drop curl-8.16.patch (merged)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 22 10:52:35 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.2.4
|
||||
* GUI: Fixed VBox Manager crash when some VM has a lot of
|
||||
snapshots.
|
||||
* GUI: Fixed VBox Manager crash while attempting to show error
|
||||
notifications too early.
|
||||
* GUI: Fixed VBox Manager freeze on Linux hosts at startup or
|
||||
while attempting to add a VM.
|
||||
* Network: Added a new experimental type of e1000 adapter.
|
||||
(82583V). It requires the ICH9 chipset, since MSIs are not
|
||||
supported by PIIX3.
|
||||
* USB Webcam: The virtual USB webcam is now part of the open
|
||||
source base package.
|
||||
* GUI: Fixed VirtualBox VM Manager crash when host was resuming
|
||||
from sleep.
|
||||
* Support for Linux 6.18
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 30 09:31:18 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Drop logic for building and installing on pre-Leap 15.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 11 15:03:37 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add curl-8.16.patch [boo#1249448]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 26 10:21:54 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Disable python bindings for Leap 16.0 (bsc#1248418)
|
||||
python3.13 is not supported by the current virtualbox version so
|
||||
we can't build the bindings.
|
||||
- Build python bindings for python313
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 15 14:46:51 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
196
virtualbox.spec
196
virtualbox.spec
@@ -15,6 +15,7 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if "@BUILD_FLAVOR@" == "kmp"
|
||||
# macros for virtualbox-kmp
|
||||
%define main_package 0
|
||||
@@ -54,25 +55,18 @@
|
||||
%endif
|
||||
|
||||
# If you want to disable building Python parts, just set this to %%nil
|
||||
%if 0%{?suse_version} == 1600
|
||||
# Leap 16.0 has python3.13, currently not supported
|
||||
%global mypython %nil
|
||||
%else
|
||||
# Using python3.11 for Factory, current version doesn't support python3.13
|
||||
%global mypython python311
|
||||
%endif
|
||||
|
||||
%global mypython python313
|
||||
%if "%mypython" != ""
|
||||
%global __mypython %{expand:%%__%{mypython}}
|
||||
%global mypython_sitelib %{expand:%%%{mypython}_sitelib}
|
||||
%global __mypython %{expand:%%__%{mypython}}
|
||||
%global mypython_sitelib %{expand:%%%{mypython}_sitelib}
|
||||
%endif
|
||||
|
||||
Name: virtualbox%{?dash}%{?name_suffix}
|
||||
Version: 7.2.6
|
||||
%define rversion 7.2.6
|
||||
Version: 7.2.0
|
||||
%define rversion 7.2.0
|
||||
Release: 0
|
||||
Summary: %{package_summary}
|
||||
License: GPL-3.0-only
|
||||
License: GPL-3.0-or-later
|
||||
%if %{kmp_package}
|
||||
Group: System/Kernel
|
||||
%else
|
||||
@@ -133,7 +127,8 @@ Patch10: fix_for_leap15.5.patch
|
||||
Patch11: cxx17.patch
|
||||
Patch12: host-source.patch
|
||||
Patch20: gentoo-C23.patch
|
||||
Patch21: kernel-6.19.patch
|
||||
# Build python bindings for python 3.13
|
||||
Patch21: python313.patch
|
||||
#
|
||||
# Common BuildRequires for both virtualbox and virtualbox-kmp
|
||||
BuildRequires: %{kernel_module_package_buildreqs}
|
||||
@@ -164,7 +159,7 @@ ExclusiveArch: x86_64
|
||||
%if 0%{?sle_version} != 120300
|
||||
Source2: VirtualBox.appdata.xml
|
||||
%endif
|
||||
|
||||
### Requirements for virtualbox main package ###
|
||||
%if %{main_package}
|
||||
BuildRequires: dmidecode
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@@ -189,7 +184,7 @@ BuildRequires: sysuser-tools
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: which
|
||||
BuildRequires: xorg-x11-server
|
||||
BuildRequires: pkgconfig(Qt6Core) >= 6.8
|
||||
BuildRequires: pkgconfig(Qt6Core)
|
||||
BuildRequires: pkgconfig(Qt6DBus)
|
||||
BuildRequires: pkgconfig(Qt6Gui)
|
||||
BuildRequires: pkgconfig(Qt6Help)
|
||||
@@ -244,12 +239,19 @@ Conflicts: %{name}-qt > %{version}
|
||||
Conflicts: %{name}-websrv < %{version}
|
||||
Conflicts: %{name}-websrv > %{version}
|
||||
Recommends: %{name}-gui = %{version}
|
||||
# package i4l-vbox from source package i4l-base shares the directory /etc/vbox
|
||||
# with us, but with different owner.
|
||||
Conflicts: i4l-vbox
|
||||
#rename from ose version:
|
||||
Provides: %{name}-ose = %{version}
|
||||
Obsoletes: %{name}-ose < %{version}
|
||||
%{?systemd_ordering}
|
||||
%{?sysusers_requires}
|
||||
%if 0%{?suse_version} > 1325
|
||||
BuildRequires: libboost_headers-devel
|
||||
%else
|
||||
BuildRequires: boost-devel
|
||||
%endif
|
||||
%ifarch amd64 x86_64 ia32e em64t
|
||||
%if 0%{?suse_version} && 0%{?suse_version} >= 1600
|
||||
BuildRequires: gcc-32bit
|
||||
@@ -263,8 +265,12 @@ BuildRequires: xorg-x11-libXext-devel-32bit
|
||||
BuildRequires: xorg-x11-libXmu-devel-32bit
|
||||
BuildRequires: xorg-x11-libXt-devel-32bit
|
||||
%endif
|
||||
%if ! 0%{?suse_version} > 1325
|
||||
Requires(pre): net-tools-deprecated
|
||||
%endif
|
||||
|
||||
# end of main_package
|
||||
%endif
|
||||
### Requirements for virtualbox-kmp ###
|
||||
%if %{kmp_package}
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: libiptc-devel
|
||||
@@ -273,8 +279,9 @@ BuildRequires: libxml2-devel
|
||||
Requires: ca-certificates
|
||||
Requires: openSUSE-signkey-cert
|
||||
%kernel_module_package -p %{SOURCE7} -n virtualbox -x kdump um xen pae xenpae pv
|
||||
# end of kmp_package
|
||||
%endif
|
||||
|
||||
### Description and subpackages of virtualbox main package ###
|
||||
%if %{main_package}
|
||||
%description
|
||||
VirtualBox is a hosted hypervisor for x86 computers. It supports the
|
||||
@@ -325,6 +332,9 @@ Provides: %{name}-ose-guest-tools = %{version}
|
||||
Obsoletes: %{name}-ose-guest-tools < %{version}
|
||||
Obsoletes: virtualbox-guest-x11 < %{version}
|
||||
Obsoletes: xorg-x11-driver-virtualbox-ose < %{version}
|
||||
%if ! 0%{?suse_version} > 1325
|
||||
Requires(pre): net-tools-deprecated
|
||||
%endif
|
||||
%{?sysusers_requires}
|
||||
|
||||
%description guest-tools
|
||||
@@ -457,17 +467,17 @@ rm -rf src/libs/{libpng-*,libxml2-*,libxslt-*,zlib-*,boost-*}
|
||||
# --disable-kmods don't build Linux kernel modules - but use SUSE specific way see few lines under
|
||||
# NOT an autoconf configure script
|
||||
./configure \
|
||||
--enable-vnc \
|
||||
--enable-vde \
|
||||
--disable-kmods \
|
||||
--with-linux="%{_prefix}" \
|
||||
--disable-java \
|
||||
--disable-docs \
|
||||
--enable-webservice \
|
||||
--enable-vnc \
|
||||
--enable-vde \
|
||||
--disable-kmods \
|
||||
--with-linux="%{_prefix}" \
|
||||
--disable-java \
|
||||
--disable-docs \
|
||||
--enable-webservice \
|
||||
%if "%mypython" == ""
|
||||
--disable-python \
|
||||
--disable-python \
|
||||
%endif
|
||||
--with-makeself=%{_bindir}/true
|
||||
--with-makeself=%{_bindir}/true
|
||||
|
||||
# configure actually warns we should source env.sh (which seems like it could influence the build...)
|
||||
source ./env.sh
|
||||
@@ -475,20 +485,15 @@ source ./env.sh
|
||||
#
|
||||
# VBOX_PATH_PACKAGE_DOCS set propper path for link to pdf in .desktop file
|
||||
# VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= just disable some functionality in gui
|
||||
#
|
||||
# split-soapC (a virtualbox program) splits the gsoap-generated file at
|
||||
# silly boundaries, producing something unbuildable.
|
||||
#
|
||||
echo "build basic parts"
|
||||
%{_bindir}/kmk %{?_smp_mflags} \
|
||||
VBOX_GCC_WERR= \
|
||||
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
|
||||
VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \
|
||||
TOOL_YASM_AS=yasm \
|
||||
VBOX_BUILD_PUBLISHER=_SUSE \
|
||||
TOOL_GCC3_CFLAGS="%{optflags}" TOOL_GCC3_CXXFLAGS="%{optflags}" \
|
||||
VBOX_GCC_OPT="%{optflags}" \
|
||||
VBOX_WITHOUT_SPLIT_SOAPC=1
|
||||
%{_bindir}/kmk %{?_smp_mflags} \
|
||||
VBOX_GCC_WERR= \
|
||||
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
|
||||
VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \
|
||||
TOOL_YASM_AS=yasm \
|
||||
VBOX_BUILD_PUBLISHER=_SUSE \
|
||||
TOOL_GCC3_CFLAGS="%{optflags}" TOOL_GCC3_CXXFLAGS="%{optflags}" \
|
||||
VBOX_GCC_OPT="%{optflags}"
|
||||
|
||||
echo "build VNC extension pack"
|
||||
# tar must use GNU, not POSIX, format here
|
||||
@@ -556,17 +561,19 @@ install -m 755 out/linux.*/release/bin/additions/VBoxDRMClient %{buildroot}%{_bi
|
||||
install -m 755 src/VBox/Additions/x11/Installer/98vboxadd-xclient %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/
|
||||
install -d %{buildroot}%{_sysconfdir}/xdg/autostart/
|
||||
install -m 644 %{SOURCE25} %{buildroot}%{_sysconfdir}/xdg/autostart/vboxclient.desktop
|
||||
%if 0%{?suse_version} > 1320 || 0%{?sle_version} == 120300
|
||||
install -d -m 755 %{buildroot}/media
|
||||
%endif
|
||||
|
||||
echo "entering VNC extension install section"
|
||||
cd out/linux.*/release/packages/
|
||||
pushd out/linux.*/release/packages/
|
||||
mkdir -p "%{buildroot}%{_datadir}/virtualbox/extensions/"
|
||||
install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensions/VNC-%{rversion}.vbox-extpack"
|
||||
cd -
|
||||
popd
|
||||
|
||||
echo "entering virtualbox(-qt) install section"
|
||||
# copy the main files to %%{_vbox_instdir}
|
||||
cd out/linux.*/release/bin
|
||||
pushd out/linux.*/release/bin
|
||||
cp -a VBoxManage VBoxHeadless VBoxSDL VBoxNetNAT VBoxAutostart VBoxVolInfo \
|
||||
VBoxBalloonCtrl webtest VBoxDTrace VBoxDbg.so \
|
||||
VBoxDxVk.so UICommon.so vboximg-mount %{buildroot}%{_vbox_instdir}
|
||||
@@ -606,42 +613,42 @@ mkdir -p %{buildroot}%{_usrsrc}/kernel-modules/additions
|
||||
tar -jcf %{buildroot}%{_usrsrc}/kernel-modules/additions/guest_src.tar.bz2 additions/src
|
||||
cp -a src %{buildroot}%{_usrsrc}/kernel-modules/virtualbox
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_udevrulesdir}/60-vboxdrv.rules
|
||||
cd -
|
||||
popd
|
||||
|
||||
# install desktop file
|
||||
install -m 644 out/linux.*/release/bin/virtualbox.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop 'System Emulator'
|
||||
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop 'System Emulator'
|
||||
|
||||
%if 0%{?sle_version} != 120300
|
||||
# install appstream file
|
||||
mkdir -p %{buildroot}%{_datadir}/metainfo
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%endif
|
||||
|
||||
# create a menu entry
|
||||
install -m 644 out/linux.*/release/bin/VBox.png %{buildroot}%{_datadir}/pixmaps/virtualbox.png
|
||||
# install config with session shutdown defs
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox
|
||||
#install wrapper script
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_bindir}/VirtualBox
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_bindir}/update-extpack.sh
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_bindir}/VirtualBox
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_bindir}/update-extpack.sh
|
||||
# Service files to load kernel modules on boot
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxdrv
|
||||
install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service
|
||||
install -m 0755 %{SOURCE16} %{buildroot}%{_sbindir}/vboxconfig
|
||||
install -m 0755 %{SOURCE17} %{buildroot}%{_sbindir}/vboxguestconfig
|
||||
install -m 0755 %{SOURCE18} %{buildroot}%{_sbindir}/vbox-fix-usb-rules.sh
|
||||
install -m 0755 %{SOURCE19} %{buildroot}%{_vbox_instdir}/vboxdrv.sh
|
||||
install -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/vboxweb-service.service
|
||||
install -m 0755 %{SOURCE22} %{buildroot}%{_vbox_instdir}/vboxweb-service.sh
|
||||
install -m 0644 %{SOURCE23} %{buildroot}%{_unitdir}/vboxautostart-service.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxautostart
|
||||
install -m 0755 %{SOURCE24} %{buildroot}%{_vbox_instdir}/vboxautostart-service.sh
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxdrv
|
||||
install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service
|
||||
install -m 0755 %{SOURCE16} %{buildroot}%{_sbindir}/vboxconfig
|
||||
install -m 0755 %{SOURCE17} %{buildroot}%{_sbindir}/vboxguestconfig
|
||||
install -m 0755 %{SOURCE18} %{buildroot}%{_sbindir}/vbox-fix-usb-rules.sh
|
||||
install -m 0755 %{SOURCE19} %{buildroot}%{_vbox_instdir}/vboxdrv.sh
|
||||
install -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/vboxweb-service.service
|
||||
install -m 0755 %{SOURCE22} %{buildroot}%{_vbox_instdir}/vboxweb-service.sh
|
||||
install -m 0644 %{SOURCE23} %{buildroot}%{_unitdir}/vboxautostart-service.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxautostart
|
||||
install -m 0755 %{SOURCE24} %{buildroot}%{_vbox_instdir}/vboxautostart-service.sh
|
||||
# Init scripts to start virtualbox during boot
|
||||
ln -sf %{_unitdir}/vboxdrv.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
|
||||
ln -sf %{_unitdir}/vboxadd-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
|
||||
ln -sf %{_unitdir}/vboxautostart-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
|
||||
ln -sf %{_unitdir}/vboxdrv.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
|
||||
ln -sf %{_unitdir}/vboxadd-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
|
||||
ln -sf %{_unitdir}/vboxautostart-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
|
||||
|
||||
# config file for vboxdrv and vboxweb
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
|
||||
@@ -661,9 +668,9 @@ install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_
|
||||
|
||||
%if "%mypython" != ""
|
||||
echo "entering python-virtualbox install section"
|
||||
cd out/linux.*/release/bin/sdk/installer/python
|
||||
pushd out/linux.*/release/bin/sdk/installer/python
|
||||
VBOX_INSTALL_PATH=%{_vbox_instdir} %{__mypython} vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
cd -
|
||||
popd
|
||||
install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
%py3_compile %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom/python
|
||||
@@ -672,29 +679,29 @@ cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_inst
|
||||
echo "entering virtualbox-devel install section"
|
||||
cp -r out/linux.*/release/bin/sdk/bindings/auth %{buildroot}%{_vbox_instdir}/sdk/bindings
|
||||
|
||||
cd out/linux.*/release/bin/sdk/bindings/xpcom
|
||||
pushd out/linux.*/release/bin/sdk/bindings/xpcom
|
||||
cp -r include %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r idl %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r samples %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cd -
|
||||
popd
|
||||
|
||||
cp out/linux.*/release/bin/sdk/bindings/VirtualBox.xidl %{buildroot}%{_vbox_instdir}/sdk/bindings
|
||||
|
||||
echo "entering virtualbox-websrv install section"
|
||||
cd out/linux.*/release/bin
|
||||
pushd out/linux.*/release/bin
|
||||
install -m 755 vboxwebsrv %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 webtest %{buildroot}%{_vbox_instdir}
|
||||
cd -
|
||||
popd
|
||||
ln -sf %{_unitdir}/vboxweb-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxweb-service.service
|
||||
|
||||
echo "entering virtualbox-guest-desktop-icons install section"
|
||||
install -d -m 755 %{buildroot}%{_datadir}/pixmaps/virtualbox
|
||||
install -d -m 755 %{buildroot}%{_datadir}/pixmaps/virtualbox
|
||||
|
||||
cd src/VBox/Frontends/VirtualBox/images
|
||||
pushd src/VBox/Frontends/VirtualBox/images
|
||||
for icon in os_*.png; do
|
||||
install -m 644 "$icon" %{buildroot}%{_datadir}/pixmaps/virtualbox/"$icon";
|
||||
install -m 644 "$icon" %{buildroot}%{_datadir}/pixmaps/virtualbox/"$icon";
|
||||
done
|
||||
cd -
|
||||
popd
|
||||
|
||||
install -Dm0644 vbox.conf %{buildroot}%{_sysusersdir}/vbox.conf
|
||||
install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-tools.conf
|
||||
@@ -712,6 +719,7 @@ install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-too
|
||||
%service_add_pre vboxweb-service.service
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
#setup our sysconfig file /etc/sysconfig/vbox
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetNAT
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetDHCP
|
||||
@@ -720,7 +728,7 @@ install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-too
|
||||
%service_add_post vboxdrv.service vboxautostart-service.service
|
||||
# add new autostart stuff to the existing default config, if missing
|
||||
grep -q VBOXAUTOSTART %{_sysconfdir}/default/virtualbox || {
|
||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||
#
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Autostart
|
||||
@@ -732,8 +740,8 @@ EOF
|
||||
}
|
||||
for entry in %{_sysconfdir}/vbox/*.start
|
||||
do
|
||||
user=$(basename "$entry" .start)
|
||||
[ "$user" = "*" ] && break
|
||||
user=$(basename "$entry" .start)
|
||||
[ "$user" = "*" ] && break
|
||||
mv %{_sysconfdir}/vbox/user.start %{_sysconfdir}/vbox/autostart.d/.
|
||||
done
|
||||
|
||||
@@ -775,6 +783,7 @@ VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" >
|
||||
%service_del_preun vboxweb-service.service
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
# immediately restarting virtualbox may not work. As such wait for the next reboot to restart
|
||||
%if ! %{defined service_del_postun_without_restart}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
@@ -817,9 +826,8 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_vbox_instdir}/VBoxSharedFolders.so
|
||||
%{_vbox_instdir}/VBoxVMM.so
|
||||
%{_vbox_instdir}/VBoxVMMArm.so
|
||||
%{_vbox_instdir}/VBoxVRDP.so
|
||||
%{_vbox_instdir}/VBoxXPCOM.so
|
||||
%{_vbox_instdir}/VBoxXPCOMC.so
|
||||
%{_vbox_instdir}/VBoxXPCOM.so
|
||||
%{_vbox_instdir}/VBox*.r0
|
||||
%{_vbox_instdir}/VMMR0.r0
|
||||
%{_vbox_instdir}/VBoxEFI*.fd
|
||||
@@ -924,7 +932,9 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%dir %{_sysconfdir}/xdg
|
||||
%dir %{_sysconfdir}/xdg/autostart
|
||||
%{_sysconfdir}/xdg/autostart/vboxclient.desktop
|
||||
%if 0%{?suse_version} > 1320 || 0%{?sle_version} == 120300
|
||||
%dir /media
|
||||
%endif
|
||||
|
||||
%if "%mypython" != ""
|
||||
%files -n %{mypython}-%{name}
|
||||
@@ -990,18 +1000,18 @@ rm -rf src/libs/{libpng-*,libxml2-*,libxslt-*,zlib-*,boost-*}
|
||||
# guest modules : vboxguest,vboxsf,vboxvideo
|
||||
echo "build kernel modules"
|
||||
for vbox_module in kmp_host/vbox{drv,netflt,netadp} \
|
||||
kmp_additions/vbox{guest,sf,video}; do
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
kmp_additions/vbox{guest,sf,video}; do
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
|
||||
# go through the all flavors (desktop,default ...)
|
||||
for flavor in %{flavors_to_build}; do
|
||||
# go through the all flavors (desktop,default ...)
|
||||
for flavor in %{flavors_to_build}; do
|
||||
# delete old build dir for sure
|
||||
rm -rf modules_build_dir/${module_name}_${flavor}
|
||||
|
||||
if [ "$module_name" = "vboxdrv" -o \
|
||||
"$module_name" = "vboxguest" ] ; then
|
||||
SYMBOLS=""
|
||||
SYMBOLS=""
|
||||
fi
|
||||
# create build directory for specific flavor
|
||||
mkdir -p modules_build_dir/$flavor
|
||||
@@ -1012,21 +1022,21 @@ for vbox_module in kmp_host/vbox{drv,netflt,netadp} \
|
||||
# copy vboxdrv (for host) module symbols which are used by vboxnetflt and vboxnetadp km's:
|
||||
if [ "$module_name" = "vboxnetflt" -o \
|
||||
"$module_name" = "vboxnetadp" ] ; then
|
||||
cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers"
|
||||
cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers"
|
||||
fi
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf and vboxvideo km's:
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf and vboxvideo km's:
|
||||
if [ "$module_name" = "vboxsf" -o \
|
||||
"$module_name" = "vboxvideo" ] ; then
|
||||
cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxguest/Module.symvers"
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxguest/Module.symvers"
|
||||
fi
|
||||
# build the module for the specific flavor
|
||||
%make_build -j4 -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?linux_make_arch} modules \
|
||||
M=$PWD/modules_build_dir/$flavor/$module_name KBUILD_EXTRA_SYMBOLS="$SYMBOLS" V=1
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
%install
|
||||
@@ -1036,7 +1046,7 @@ for module_name in vbox{drv,netflt,netadp,guest,sf,video}
|
||||
do
|
||||
#and through all flavors
|
||||
for flavor in %{flavors_to_build}; do
|
||||
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
done
|
||||
done
|
||||
# kmp_package
|
||||
|
||||
Reference in New Issue
Block a user