1
0
forked from pool/virtualbox

Accepting request 555558 from Virtualization

- Move location of kernel modules from /lib/modules/$(uname -r)/misc to
  /lib/modules/$(uname -r)/extra. This change is supposed to force rebuild
  of the modules when the kernel is updated.

OBS-URL: https://build.opensuse.org/request/show/555558
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=150
This commit is contained in:
Dominique Leuenberger 2017-12-11 17:55:26 +00:00 committed by Git OBS Bridge
commit d71ad83387
5 changed files with 27 additions and 20 deletions

View File

@ -234,7 +234,7 @@ start()
if [ ! -z "$MAJOR" ]; then if [ ! -z "$MAJOR" ]; then
MINOR=0 MINOR=0
else else
MINOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/misc` MINOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/extra`
if [ ! -z "$MINOR" ]; then if [ ! -z "$MINOR" ]; then
MAJOR=10 MAJOR=10
fi fi
@ -349,16 +349,16 @@ cleanup()
for i in /lib/modules/*; do for i in /lib/modules/*; do
# We could just do "rm -f", but we only want to try deleting folders if # We could just do "rm -f", but we only want to try deleting folders if
# we are sure they were ours, i.e. they had our modules in beforehand. # we are sure they were ours, i.e. they had our modules in beforehand.
if test -e "${i}/misc/vboxdrv.ko" \ if test -e "${i}/extra/vboxdrv.ko" \
|| test -e "${i}/misc/vboxnetadp.ko" \ || test -e "${i}/extra/vboxnetadp.ko" \
|| test -e "${i}/misc/vboxnetflt.ko" \ || test -e "${i}/extra/vboxnetflt.ko" \
|| test -e "${i}/misc/vboxpci.ko"; then || test -e "${i}/extra/vboxpci.ko"; then
rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \ rm -f "${i}/extra/vboxdrv.ko" "${i}/extra/vboxnetadp.ko" \
"${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko" "${i}/extra/vboxnetflt.ko" "${i}/extra/vboxpci.ko"
# Remove the kernel version folder if it was empty except for us. # Remove the kernel version folder if it was empty except for us.
test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \ test "`echo ${i}/extra/* ${i}/extra/.?* ${i}/* ${i}/.?*`" \
= "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." && = "${i}/extra/* ${i}/extra/.. ${i}/extra ${i}/.." &&
rmdir "${i}/misc" "${i}" # We used to leave empty folders. rmdir "${i}/extra" "${i}" # We used to leave empty folders.
version=`expr "${i}" : "/lib/modules/\(.*\)"` version=`expr "${i}" : "/lib/modules/\(.*\)"`
depmod -a "${version}" depmod -a "${version}"
fi fi

View File

@ -1,6 +1,6 @@
%defattr (-,root,root) %defattr (-,root,root)
%dir /lib/modules/%2-%1/ %dir /lib/modules/%2-%1/
%dir /lib/modules/%2-%1/misc %dir /lib/modules/%2-%1/extra
/lib/modules/%2-%1/misc/vboxsf.ko /lib/modules/%2-%1/extra/vboxsf.ko
/lib/modules/%2-%1/misc/vboxvideo.ko /lib/modules/%2-%1/extra/vboxvideo.ko
/lib/modules/%2-%1/misc/vboxguest.ko /lib/modules/%2-%1/extra/vboxguest.ko

View File

@ -1,7 +1,7 @@
%defattr (-,root,root) %defattr (-,root,root)
%dir /lib/modules/%2-%1/ %dir /lib/modules/%2-%1/
%dir /lib/modules/%2-%1/misc %dir /lib/modules/%2-%1/extra
/lib/modules/%2-%1/misc/vboxdrv.ko /lib/modules/%2-%1/extra/vboxdrv.ko
/lib/modules/%2-%1/misc/vboxnetadp.ko /lib/modules/%2-%1/extra/vboxnetadp.ko
/lib/modules/%2-%1/misc/vboxnetflt.ko /lib/modules/%2-%1/extra/vboxnetflt.ko
/lib/modules/%2-%1/misc/vboxpci.ko /lib/modules/%2-%1/extra/vboxpci.ko

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Dec 9 01:11:34 UTC 2017 - Larry.Finger@lwfinger.net
- Move location of kernel modules from /lib/modules/$(uname -r)/misc to
/lib/modules/$(uname -r)/extra. This change is supposed to force rebuild
of the modules when the kernel is updated.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Dec 2 03:57:55 UTC 2017 - Larry.Finger@lwfinger.net Sat Dec 2 03:57:55 UTC 2017 - Larry.Finger@lwfinger.net

View File

@ -550,7 +550,7 @@ 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-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=extra
#Keep the install process from calling mkinitrd. The VB kernel modules are not in initrd. bsc#1052428 #Keep the install process from calling mkinitrd. The VB kernel modules are not in initrd. bsc#1052428
export INITRD_IN_POSTTRANS=1 export INITRD_IN_POSTTRANS=1
export KMP_NEEDS_MKINITRD=0 export KMP_NEEDS_MKINITRD=0