From e944f6171f9c17da3ecd35396c1658d66f8b89743e46e36655b9c10abbbff5ba Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 9 Dec 2017 01:13:47 +0000 Subject: [PATCH] - 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/package/show/Virtualization/virtualbox?expand=0&rev=389 --- vboxdrv.sh | 20 ++++++++++---------- virtualbox-guest-kmp-files | 8 ++++---- virtualbox-host-kmp-files | 10 +++++----- virtualbox.changes | 7 +++++++ virtualbox.spec | 2 +- 5 files changed, 27 insertions(+), 20 deletions(-) diff --git a/vboxdrv.sh b/vboxdrv.sh index e31929c..f73bfd5 100644 --- a/vboxdrv.sh +++ b/vboxdrv.sh @@ -234,7 +234,7 @@ start() if [ ! -z "$MAJOR" ]; then MINOR=0 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 MAJOR=10 fi @@ -349,16 +349,16 @@ cleanup() for i in /lib/modules/*; do # 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. - if test -e "${i}/misc/vboxdrv.ko" \ - || test -e "${i}/misc/vboxnetadp.ko" \ - || test -e "${i}/misc/vboxnetflt.ko" \ - || test -e "${i}/misc/vboxpci.ko"; then - rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \ - "${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko" + if test -e "${i}/extra/vboxdrv.ko" \ + || test -e "${i}/extra/vboxnetadp.ko" \ + || test -e "${i}/extra/vboxnetflt.ko" \ + || test -e "${i}/extra/vboxpci.ko"; then + rm -f "${i}/extra/vboxdrv.ko" "${i}/extra/vboxnetadp.ko" \ + "${i}/extra/vboxnetflt.ko" "${i}/extra/vboxpci.ko" # Remove the kernel version folder if it was empty except for us. - test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \ - = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." && - rmdir "${i}/misc" "${i}" # We used to leave empty folders. + test "`echo ${i}/extra/* ${i}/extra/.?* ${i}/* ${i}/.?*`" \ + = "${i}/extra/* ${i}/extra/.. ${i}/extra ${i}/.." && + rmdir "${i}/extra" "${i}" # We used to leave empty folders. version=`expr "${i}" : "/lib/modules/\(.*\)"` depmod -a "${version}" fi diff --git a/virtualbox-guest-kmp-files b/virtualbox-guest-kmp-files index ec5ab30..e277db8 100644 --- a/virtualbox-guest-kmp-files +++ b/virtualbox-guest-kmp-files @@ -1,6 +1,6 @@ %defattr (-,root,root) %dir /lib/modules/%2-%1/ -%dir /lib/modules/%2-%1/misc -/lib/modules/%2-%1/misc/vboxsf.ko -/lib/modules/%2-%1/misc/vboxvideo.ko -/lib/modules/%2-%1/misc/vboxguest.ko +%dir /lib/modules/%2-%1/extra +/lib/modules/%2-%1/extra/vboxsf.ko +/lib/modules/%2-%1/extra/vboxvideo.ko +/lib/modules/%2-%1/extra/vboxguest.ko diff --git a/virtualbox-host-kmp-files b/virtualbox-host-kmp-files index 6a68fab..21f6599 100644 --- a/virtualbox-host-kmp-files +++ b/virtualbox-host-kmp-files @@ -1,7 +1,7 @@ %defattr (-,root,root) %dir /lib/modules/%2-%1/ -%dir /lib/modules/%2-%1/misc -/lib/modules/%2-%1/misc/vboxdrv.ko -/lib/modules/%2-%1/misc/vboxnetadp.ko -/lib/modules/%2-%1/misc/vboxnetflt.ko -/lib/modules/%2-%1/misc/vboxpci.ko +%dir /lib/modules/%2-%1/extra +/lib/modules/%2-%1/extra/vboxdrv.ko +/lib/modules/%2-%1/extra/vboxnetadp.ko +/lib/modules/%2-%1/extra/vboxnetflt.ko +/lib/modules/%2-%1/extra/vboxpci.ko diff --git a/virtualbox.changes b/virtualbox.changes index ab56c16..f3331b1 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -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 diff --git a/virtualbox.spec b/virtualbox.spec index d03b7e0..65d8fe9 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -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" #################################################################################### 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 export INITRD_IN_POSTTRANS=1 export KMP_NEEDS_MKINITRD=0