forked from jengelh/virtualbox
Accepting request 719647 from home:lwfinger:branches:Virtualization
- Merge host kmp and guest kmp into a single kmp. The existence of two different kernel module packages is believed to be the reason that it is possible for a new kernel not to include the necessary kernel modules (boo#1142955). Files "virtualbox-host-kmp-files" and "virtualbox-guest-kmp-files" are deleted. File "virtualbox-kmp-files" is added. Files "virtualbox-host-preamble" and virtualbox-guest-preamble" are deleted. File "virtualbox-kmp-preamble" is added. File "fix_conflict_between_host_and_guest.patch" is added. - Script vboxdrv.sh, which is called from the systemd service file, incorrectly called a routine that does not exist when the kernel modules were not available. This call is changed to /sbin/vboxconfig that will build the modules if the requisite packages are available. If that is not true, the systemctl status vboxdrv will list the command needed to load the missing packages. This change address part of boo#1142995. OBS-URL: https://build.opensuse.org/request/show/719647 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=498
This commit is contained in:
committed by
Git OBS Bridge
parent
9c5c5083fa
commit
06c8f73ab1
@@ -62,10 +62,8 @@ Source0: VirtualBox-%{version}-patched.tar.bz2
|
||||
Source1: UserManual.pdf
|
||||
Source3: %{name}-60-vboxguest.rules
|
||||
Source4: %{name}-default.virtualbox
|
||||
Source5: %{name}-host-kmp-files
|
||||
Source6: %{name}-guest-kmp-files
|
||||
Source7: %{name}-host-preamble
|
||||
Source8: %{name}-guest-preamble
|
||||
Source5: %{name}-kmp-files
|
||||
Source7: %{name}-kmp-preamble
|
||||
Source9: %{name}-wrapper.sh
|
||||
Source10: %{name}-LocalConfig.kmk
|
||||
Source11: %{name}-60-vboxdrv.rules
|
||||
@@ -119,6 +117,8 @@ Patch108: virtualbox-snpritnf-buffer-overflow.patch
|
||||
Patch109: vbox-usb-warning.diff
|
||||
# Patch to ensure that VirtualBoxVM is SUID
|
||||
Patch110: vbox-suid-warning.diff
|
||||
# Fix symbol conflict between host and guest kmp
|
||||
Patch111: fix_conflict_between_host_and_guest.patch
|
||||
# Fix change in kernel API for ttm_bo_move_memcpy()
|
||||
Patch112: modify_for_4_8_bo_move.patch
|
||||
# Remove all mention of _smp_mflags
|
||||
@@ -218,7 +218,7 @@ BuildRequires: pkgconfig(xineramaproto)
|
||||
BuildRequires: pkgconfig(xmu)
|
||||
BuildRequires: pkgconfig(xproto)
|
||||
BuildRequires: pkgconfig(xrandr)
|
||||
Requires: %{name}-host-kmp = %{version}
|
||||
Requires: %{name}-kmp = %{version}
|
||||
Requires(post): sysvinit(syslog)
|
||||
Requires(pre): permissions
|
||||
%if ! 0%{?suse_version} > 1325
|
||||
@@ -283,30 +283,22 @@ Obsoletes: %{name}-vboxwebsrv
|
||||
The VirtualBox web server is used to control headless VMs using a browser.
|
||||
#########################################
|
||||
|
||||
%package host-KMP
|
||||
Summary: Host kernel module for VirtualBox
|
||||
%package kmp
|
||||
Summary: Kernel modules for VirtualBox
|
||||
Group: System/Emulators/PC
|
||||
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name} -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||
Requires: %{kernel_module_package_buildreqs}
|
||||
Obsoletes: %{name}-guest-kmp
|
||||
Obsoletes: %{name}-host-kmp
|
||||
|
||||
%description host-KMP
|
||||
This package contains the kernel-modules that VirtualBox uses to create virtual machines.
|
||||
##########################################
|
||||
|
||||
%package guest-KMP
|
||||
Summary: Guest kernel modules for VirtualBox
|
||||
Group: System/Emulators/PC
|
||||
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen pae xenpae pv
|
||||
Requires: %{kernel_module_package_buildreqs}
|
||||
|
||||
%description guest-KMP
|
||||
This package contains the VB kernel-modules for Linux guest virtual machines.
|
||||
%description kmp
|
||||
This package contains the kernel-modules that VirtualBox uses to create or run virtual machines.
|
||||
##########################################
|
||||
|
||||
%package guest-x11
|
||||
Summary: VirtualBox X11 drivers for mouse and video
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires: %{name}-guest-kmp = %{version}
|
||||
Requires: %{name}-kmp = %{version}
|
||||
Supplements: modalias(xorg-x11-server:pci:v000080EEd0000BEEFsv*sd*bc*sc*i*)
|
||||
#rename from xorg-x11-driver-virtualbox-ose:
|
||||
Provides: xorg-x11-driver-virtualbox-ose = %{version}
|
||||
@@ -319,7 +311,7 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers
|
||||
%package guest-tools
|
||||
Summary: VirtualBox guest tools
|
||||
Group: System/Emulators/PC
|
||||
Requires: %{name}-guest-kmp = %{version}
|
||||
Requires: %{name}-kmp = %{version}
|
||||
Supplements: modalias(pci:v000080EEd0000BEEFsv*sd*bc*sc*i*)
|
||||
#rename from "ose" version:
|
||||
Provides: %{name}-ose-guest-tools = %{version}
|
||||
@@ -390,7 +382,7 @@ BuildArch: noarch
|
||||
%description guest-source
|
||||
Source files for %{name} guest kernel modules
|
||||
These can be built for custom kernels using
|
||||
cd %{_prefix}/src/kernel-modules/virtualbox/guest ; make ; make install
|
||||
sudo /sbin/vboxguestconfig
|
||||
###########################################
|
||||
|
||||
%package guest-desktop-icons
|
||||
@@ -435,6 +427,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p1
|
||||
%patch115 -p1
|
||||
@@ -536,15 +529,15 @@ install -D -m 644 "COPYING" "%{buildroot}%{_datadir}/licenses/LICENSE.vnc"
|
||||
#
|
||||
# build kernel modules for guest and host (check novel-kmp package as example)
|
||||
# host modules : vboxdrv,vboxnetflt,vboxnetadp,vboxpci
|
||||
# guest modules : vboxguest,vboxsf vboxvideo (for Leap 15.1)
|
||||
# guest modules : vboxguest,vboxsf vboxvideo (for Leap 15.1 and older)
|
||||
echo "build kernel modules"
|
||||
%if 0%{?suse_version} >= 1500
|
||||
#%if 0%{?suse_version} < 1550
|
||||
for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp,pci} \
|
||||
out/linux.*/release/bin/additions/src/vbox{guest,sf,video}; do
|
||||
%else
|
||||
for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp,pci} \
|
||||
out/linux.*/release/bin/additions/src/vbox{guest,sf}; do
|
||||
%endif
|
||||
#%else
|
||||
#for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp,pci} \
|
||||
# out/linux.*/release/bin/additions/src/vbox{guest,sf}; do
|
||||
#%endif
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
|
||||
@@ -568,7 +561,7 @@ for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp,pci} \
|
||||
fi
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf and vboxvideo km's:
|
||||
if [ "$module_name" = "vboxsf" -o \
|
||||
"$module_name" = "vboxvideo" ] ; then
|
||||
"$module_name" = "vboxvideo" ] ; then
|
||||
cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
fi
|
||||
@@ -603,7 +596,7 @@ install -d -m 755 %{buildroot}%{_udevrulesdir}
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d
|
||||
|
||||
####################################################################################
|
||||
echo "entering virtualbox-kmp-guest and virtualbox-kmp-host install section"
|
||||
echo "entering virtualbox-kmp install section"
|
||||
####################################################################################
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=extra
|
||||
@@ -611,11 +604,11 @@ export INSTALL_MOD_DIR=extra
|
||||
export INITRD_IN_POSTTRANS=1
|
||||
export KMP_NEEDS_MKINITRD=0
|
||||
#to install modules we use here similar steps like in build phase, go through all the modules :
|
||||
%if 0%{?suse_version} >= 1500
|
||||
#%if 0%{?suse_version} < 1550
|
||||
for module_name in vbox{drv,netflt,pci,netadp,guest,sf,video}
|
||||
%else
|
||||
for module_name in vbox{drv,netflt,pci,netadp,guest,sf}
|
||||
%endif
|
||||
#%else
|
||||
#for module_name in vbox{drv,netflt,pci,netadp,guest,sf}
|
||||
#%endif
|
||||
do
|
||||
#and through the all flavors
|
||||
for flavor in %{flavors_to_build}; do
|
||||
@@ -816,7 +809,7 @@ getent group vboxusers >/dev/null || groupadd -r vboxusers
|
||||
# Add groups for seamless mode and shared folders:
|
||||
getent group vboxguest >/dev/null || groupadd -r vboxguest
|
||||
getent group vboxsf >/dev/null || groupadd -r vboxsf
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%if 0%{?suse_version} <= 1500
|
||||
getent group vboxvideo >/dev/null || groupadd -r vboxvideo
|
||||
%endif
|
||||
%service_add_pre vboxadd-service.service
|
||||
@@ -1031,8 +1024,6 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_bindir}/VBoxClient
|
||||
%{_libdir}/VBoxOGL*.so
|
||||
%{_libdir}/VBoxEGL*.so
|
||||
#%%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
#%%{_libdir}/dri/vboxvideo_dri.so
|
||||
%{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh
|
||||
|
||||
%files guest-tools
|
||||
|
Reference in New Issue
Block a user