- Update vboxconfig.sh to fix problems noted in bsc#1042726
Disable pae build for 32-bit kernels. Added missing commands to keep mkinitrd from being called twice during installation of host kernel modules. bsc#105248. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=359
This commit is contained in:
parent
c3af46ed4d
commit
c6ad50c18b
@ -12,22 +12,30 @@ INCLUDE="/lib/modules/`uname -r`/build/include"
|
|||||||
# Test if vboxpci module loaded. If it is, skip everything else
|
# Test if vboxpci module loaded. If it is, skip everything else
|
||||||
loaded=$(lsmod | grep vboxpci)
|
loaded=$(lsmod | grep vboxpci)
|
||||||
if [ -n "$loaded" ] ; then
|
if [ -n "$loaded" ] ; then
|
||||||
echo "Kernel modules available - exiting..."
|
echo "Kernel modules are loaded, unload them via"
|
||||||
exit 0
|
echo "systemctl stop vboxdrv.service if you wish to rebuild them."
|
||||||
|
echo "Quitting .."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# Force installation of VB host sources. Zypper will install all the prerequisies
|
# Check if virtualbox-host-source is installed, quit if not
|
||||||
echo "Installing all required packages..."
|
if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
|
||||||
killproc PackageKit
|
echo "Sources for building host modules are not present,"
|
||||||
zypper install -y virtualbox-host-source > /dev/null 2>&1
|
echo "Use 'sudo zypper install virtualbox-host-source' to install them. Quitting .."
|
||||||
if [ "$?" -ne 0 ] ; then
|
exit 1
|
||||||
echo "Installation of required packages failed."
|
fi
|
||||||
echo "Use 'sudo zypper install virtualbox-host-source' to see the reason."
|
#
|
||||||
|
# Check if virtualbox-host-source version matches virtualbox version
|
||||||
|
if [ "$(rpm -q virtualbox virtualbox-host-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then
|
||||||
|
echo "virtualbox-host-source package version doesn't match"
|
||||||
|
echo "the version of virtualbox package."
|
||||||
|
echo "Reinstall virtualbox-host-source package. Quitting .."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Prerequisites are available, start build
|
# Prerequisites are available, start build
|
||||||
pushd $SOURCE > /dev/null 2>&1
|
pushd $SOURCE > /dev/null 2>&1
|
||||||
echo "Building kernel modules..."
|
echo "Building kernel modules..."
|
||||||
|
make clean &>/dev/null
|
||||||
make > $LOGFILE 2>&1
|
make > $LOGFILE 2>&1
|
||||||
if [ "$?" -ne 0 ] ; then
|
if [ "$?" -ne 0 ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 7 20:29:05 UTC 2017 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
- Update vboxconfig.sh to fix problems noted in bsc#1042726
|
||||||
|
Disable pae build for 32-bit kernels.
|
||||||
|
Added missing commands to keep mkinitrd from being called twice during installation of host kernel modules. bsc#105248.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 7 10:24:42 UTC 2017 - schwab@suse.de
|
Mon Aug 7 10:24:42 UTC 2017 - schwab@suse.de
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ websrv GUI part for %{name}.
|
|||||||
%package host-KMP
|
%package host-KMP
|
||||||
Summary: Host kernel module for VirtualBox
|
Summary: Host kernel module for VirtualBox
|
||||||
Group: System/Emulators/PC
|
Group: System/Emulators/PC
|
||||||
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen xenpae pv
|
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||||
|
|
||||||
%description host-KMP
|
%description host-KMP
|
||||||
This package contains the kernel-module for VirtualBox.
|
This package contains the kernel-module for VirtualBox.
|
||||||
@ -249,7 +249,7 @@ This package contains the kernel-module for VirtualBox.
|
|||||||
%package guest-KMP
|
%package guest-KMP
|
||||||
Summary: Guest kernel modules for VirtualBox
|
Summary: Guest kernel modules for VirtualBox
|
||||||
Group: System/Emulators/PC
|
Group: System/Emulators/PC
|
||||||
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen xenpae pv
|
%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen pae xenpae pv
|
||||||
|
|
||||||
%description guest-KMP
|
%description guest-KMP
|
||||||
This package contains the kernel-module for VirtualBox.
|
This package contains the kernel-module for VirtualBox.
|
||||||
@ -532,10 +532,13 @@ echo "entering virtualbox-kmp-guest and virtualbox-kmp-host install section"
|
|||||||
####################################################################################
|
####################################################################################
|
||||||
export INSTALL_MOD_PATH=%{buildroot}
|
export INSTALL_MOD_PATH=%{buildroot}
|
||||||
export INSTALL_MOD_DIR=misc
|
export INSTALL_MOD_DIR=misc
|
||||||
#to install modules we use here similar steps like in build phase, go trought the all modules :
|
#Keep the install process from calling mkinitrd. The VB kernel modules are not in initrd. bsc#1052428
|
||||||
|
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 :
|
||||||
for module_name in vbox{drv,netflt,pci,netadp,guest,sf,video}
|
for module_name in vbox{drv,netflt,pci,netadp,guest,sf,video}
|
||||||
do
|
do
|
||||||
#and trought the all flavors
|
#and through the all flavors
|
||||||
for flavor in %{flavors_to_build}; do
|
for flavor in %{flavors_to_build}; do
|
||||||
#to install modules use Makefile from %{_prefix}/src/linux-obj/%_target_cpu/$flavor and builds from $PWD/modules_build_dir/$flavor/$module_name
|
#to install modules use Makefile from %{_prefix}/src/linux-obj/%_target_cpu/$flavor and builds from $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
|
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||||
|
Loading…
Reference in New Issue
Block a user