forked from jengelh/virtualbox
Accepting request 819069 from home:lwfinger:branches:Virtualization
- Split virtualbox-kmp from virtualbox.spec (bsc#1114605) Adds files "virtualbox-kmp.spec" and "virtualbox-kmp.changes". - Remove extraneous lines from spec file. - Split virtualbox-kmp from virtualbox.spec (bsc#1114605) Adds files "virtualbox-kmp.spec" and "virtualbox-kmp.changes". OBS-URL: https://build.opensuse.org/request/show/819069 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=557
This commit is contained in:
committed by
Git OBS Bridge
parent
51e041e53e
commit
0995f0ac3e
@@ -65,8 +65,6 @@ Source2: VirtualBox.appdata.xml
|
||||
%endif
|
||||
Source3: %{name}-60-vboxguest.rules
|
||||
Source4: %{name}-default.virtualbox
|
||||
Source5: %{name}-kmp-files
|
||||
Source7: %{name}-kmp-preamble
|
||||
Source8: update-extpack.sh
|
||||
Source9: %{name}-wrapper.sh
|
||||
Source10: %{name}-LocalConfig.kmk
|
||||
@@ -243,7 +241,6 @@ Recommends: %{name}-gui = %{version}
|
||||
Provides: %{name}-ose = %{version}
|
||||
Obsoletes: %{name}-ose < %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%(sed -e '/^Provides: multiversion(kernel)/d' %{_libexecdir}/rpm/kernel-module-subpackage > %{_builddir}/virtualbox-kmp-template)
|
||||
ExclusiveArch: x86_64
|
||||
%ifarch amd64 x86_64 ia32e em64t
|
||||
BuildRequires: gcc-32bit
|
||||
@@ -295,18 +292,6 @@ Obsoletes: %{name}-vboxwebsrv
|
||||
The VirtualBox web server is used to control headless VMs using a browser.
|
||||
#########################################
|
||||
|
||||
%package kmp
|
||||
Summary: Kernel modules for VirtualBox
|
||||
Group: System/Emulators/PC
|
||||
%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 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
|
||||
@@ -543,51 +528,6 @@ install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensi
|
||||
popd
|
||||
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
|
||||
# guest modules : vboxguest,vboxsf vboxvideo (for Leap 15.1 and older)
|
||||
echo "build kernel modules"
|
||||
for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp} \
|
||||
out/linux.*/release/bin/additions/src/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
|
||||
# delete old build dir for sure
|
||||
rm -rf modules_build_dir/${module_name}_${flavor}
|
||||
|
||||
if [ "$module_name" = "vboxdrv" -o \
|
||||
"$module_name" = "vboxguest" ] ; then
|
||||
SYMBOLS=""
|
||||
fi
|
||||
# create build directory for specific flavor
|
||||
mkdir -p modules_build_dir/$flavor
|
||||
|
||||
# copy sources which will be used to build vbox module in last step
|
||||
cp -r $vbox_module/ modules_build_dir/$flavor/
|
||||
|
||||
# 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"
|
||||
fi
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf km:
|
||||
if [ "$module_name" = "vboxsf" -o \
|
||||
"$module_name" = "vboxvideo" ] ; then
|
||||
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"
|
||||
fi
|
||||
# build the module for the specific flavor
|
||||
make -j2 -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
|
||||
|
||||
%install
|
||||
#################################
|
||||
echo "create directory structure"
|
||||
@@ -612,23 +552,6 @@ install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
|
||||
install -d -m 755 %{buildroot}%{_udevrulesdir}
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d
|
||||
|
||||
####################################################################################
|
||||
echo "entering virtualbox-kmp install section"
|
||||
####################################################################################
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=extra
|
||||
#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,netadp,guest,sf,video}
|
||||
do
|
||||
#and through the 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
|
||||
done
|
||||
done
|
||||
|
||||
###########################################
|
||||
echo "entering guest-tools install section"
|
||||
###########################################
|
||||
|
Reference in New Issue
Block a user