1
0
forked from pool/virtualbox

Add host-source.patch [boo#1231346]

This commit is contained in:
Jan Engelhardt 2024-11-14 17:04:32 +01:00
parent b439cb0a11
commit 4c36cc83be
3 changed files with 59 additions and 9 deletions

48
host-source.patch Normal file
View File

@ -0,0 +1,48 @@
From: Jan Engelhardt <ej@inai.de>
Date: 2024-11-14 15:11:28.216506193 +0100
References: https://bugzilla.suse.com/1231346
Stop overriding INSTALL_MOD_DIR, stop using a non-standard path.
[MODULE_DIR is a 2.4ism and irrelevant here;
but INSTALL_MOD_DIR affects the 2.6+ install alike.]
---
src/VBox/Installer/linux/Makefile-footer.gmk | 2 +-
src/VBox/Installer/linux/Makefile-header.gmk | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
Index: VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-footer.gmk
===================================================================
--- VirtualBox-7.1.4.orig/src/VBox/Installer/linux/Makefile-footer.gmk
+++ VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-footer.gmk
@@ -145,7 +145,7 @@ $(VBOXMOD_0_TARGET):
$(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) $(if $(JOBS),-j$(JOBS),) modules
install: $(VBOXMOD_0_TARGET)
- $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
+ $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install
modules_install: install
Index: VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-header.gmk
===================================================================
--- VirtualBox-7.1.4.orig/src/VBox/Installer/linux/Makefile-header.gmk
+++ VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-header.gmk
@@ -261,8 +261,7 @@ endif
# Kernel include folder
KERN_INCL := $(KERN_DIR)/include
# module install folder
-INSTALL_MOD_DIR ?= misc
-MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/$(INSTALL_MOD_DIR)
+MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/updates
# For VBOX_GCC_CHECK_CC
VBOX_CLOSEPAR := )
@@ -298,7 +297,6 @@ endif
ifdef DEBUG
ifndef VBOX_KERN_QUIET
$(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH))
-$(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR))
$(warning dbg: KERN_DIR = $(KERN_DIR))
$(warning dbg: KERN_INCL = $(KERN_INCL))
$(warning dbg: KERN_VERSION = $(KERN_VERSION))

View File

@ -1,7 +1,8 @@
-------------------------------------------------------------------
Thu Nov 14 00:33:23 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
Thu Nov 14 16:03:49 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Use distro-default INSTALL_MOD_DIR.
- Use distro-default INSTALL_MOD_DIR for both kmp
and for local-built files. Add host-source.patch [boo#1231346].
-------------------------------------------------------------------
Wed Oct 16 23:37:43 UTC 2024 - Jan Engelhardt <jengelh@inai.de>

View File

@ -113,6 +113,7 @@ Patch9: vbox-usb-warning.diff
# Patch for 15.5
Patch10: fix_for_leap15.5.patch
Patch11: cxx17.patch
Patch12: host-source.patch
#
# Common BuildRequires for both virtualbox and virtualbox-kmp
BuildRequires: %{kernel_module_package_buildreqs}
@ -126,8 +127,8 @@ BuildRequires: dwarves
BuildRequires: gcc
BuildRequires: gcc-c++
%else
BuildRequires: gcc11
BuildRequires: gcc11-c++
BuildRequires: gcc12
BuildRequires: gcc12-c++
%endif
BuildRequires: kbuild >= 0.1.9998+svn3613
BuildRequires: libcap-devel
@ -239,8 +240,8 @@ BuildRequires: boost-devel
BuildRequires: gcc-32bit
BuildRequires: gcc-c++-32bit
%else
BuildRequires: gcc11-32bit
BuildRequires: gcc11-c++-32bit
BuildRequires: gcc12-32bit
BuildRequires: gcc12-c++-32bit
%endif
BuildRequires: xorg-x11-libX11-devel-32bit
BuildRequires: xorg-x11-libXext-devel-32bit
@ -433,11 +434,11 @@ sed -i 's:include/drm:%{_prefix}/src/linux/include/drm:' src/VBox/Additions/linu
%if %{main_package}
%build
%if 0%{?suse_version} && 0%{?suse_version} < 1600
# kmk is annoying, does not respond to CXX=g++-11 ...
# kmk is annoying, does not respond to CXX=g++-12 ...
mkdir tc
export PATH="$PWD/tc:$PATH"
ln -s /usr/bin/gcc-11 tc/gcc
ln -s /usr/bin/g++-11 tc/g++
ln -s /usr/bin/gcc-12 tc/gcc
ln -s /usr/bin/g++-12 tc/g++
%endif
# Disable LTO - Link Time Optimization
%define _lto_cflags %{nil}