vbox dkms fix - How to include fix for linux, but not linux-lts?
All, Doug, A header include is requires for 6.4.12, but not for LTS. How do I modify the PKGBUILD to apply the change only when building the module for linux and not linux-lts. I chose a simple sed -i to include the needed header: # fix 6.4.11 include requirement sed -i 's|#include <linux/inetdevice.h>|&\n#include <net/gso.h>|' "${_extractdir}/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c" The problem is that LTS doesn't like the additional include. I suspect it will take some makefile patch instead of a change of the source file so LTS can build without the new header. How best to do this? -- David C. Rankin, J.D.,P.E.
Hi, since "[2023-08-25T11:46:21+0200] [ALPM] upgraded linux" I didn't run virtualbox, but the modules were build. The 019-linux-6-4-10.patch [1] is from the Arch repos' virtualbox 7+ build, when virtualbox modules already failed to build with linux 6.4.10. It seemingly works for linux 6.4.12, too. I don't know if my PKGBUILD's "sed -i" fix is still required to build virtualbox 6.1.46. It's probably obsolet and was only required a while back. Note, in December Oracle discontinues Virtualbox 6+. I don't know what to do, to continue running a Windows 11 guest then. Some people are able to run a Windows 11 guest in Virtualbox 7+, but it still doesn't work with my 13th Gen Intel Core machine. I nearly forgot to mention, that I build Virtualbox in a clean chroot. Regards, Ralf [1] • rocketmouse@archlinux ~ $ pacman -Q virtualbox virtualbox 1:6.1.46-7010.2 • rocketmouse@archlinux ~ $ pacman -Qi virtualbox | grep Date Build Date : Wed 16 Aug 2023 12:37:57 CEST Install Date : Wed 16 Aug 2023 12:48:06 CEST • rocketmouse@archlinux ~ $ /bin/ls -l /lib/modules/6.4.12-arch1-1/updates/dkms/ total 396 -rw-r--r-- 1 root root 96343 Aug 25 11:46 r8125.ko.zst -rw-r--r-- 1 root root 227168 Aug 25 11:47 vboxdrv.ko.zst -rw-r--r-- 1 root root 26706 Aug 25 11:47 vboxnetadp.ko.zst -rw-r--r-- 1 root root 47040 Aug 25 11:47 vboxnetflt.ko.zst • rocketmouse@archlinux ~ $ cat /.tmp/virtualbox-epoch1-6.1/019-linux-6-4-10.patch diff -Nurp VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c VirtualBox-7.0.10-linux6410/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c --- VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2023-07-12 16:36:55.000000000 +0000 +++ VirtualBox-7.0.10-linux6410/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2023-08-11 12:18:01.841396649 +0000 @@ -47,7 +47,7 @@ #if RTLNX_VER_MIN(2,6,24) # include <linux/nsproxy.h> #endif -#if RTLNX_VER_MIN(6,5,0) +#if RTLNX_VER_MIN(6,4,10) # include <net/gso.h> #endif #include <linux/netdevice.h> • rocketmouse@archlinux ~ $ grep "build(" -A3 /.tmp/virtualbox-epoch1-6.1/PKGBUILD build() { cd "VirtualBox-$pkgver" sed -i 's/"python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m python3.10 python3.10m"/"python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m python3.10 python3.10m python3.11"/' configure
On Fri, 2023-08-25 at 22:50 -0500, David C. Rankin wrote:
The problem is that LTS doesn't like the additional include. I suspect it will take some makefile patch instead of a change of the source file so LTS can build without the new header.
How best to do this?
PS: Note, I only run linux (with ro threadirqs ibt=off). JIC I installed linux-lts, linux-rt, too. However, building the modules by using the 019-linux-6-4-10.patch obviously works for those kernels, too. • rocketmouse@archlinux ~ $ pacman -Q linux linux-lts linux-rt linux 6.4.12.arch1-1 linux-lts 6.1.47-1 linux-rt 6.3.3.15.realtime2-4 • rocketmouse@archlinux ~ $ /bin/ls -l /lib/modules/*/updates/dkms/ /lib/modules/6.1.47-1-lts/updates/dkms/: total 372 -rw-r--r-- 1 root root 86363 Aug 25 11:47 r8125.ko.zst -rw-r--r-- 1 root root 209587 Aug 25 11:47 vboxdrv.ko.zst -rw-r--r-- 1 root root 26374 Aug 25 11:47 vboxnetadp.ko.zst -rw-r--r-- 1 root root 45238 Aug 25 11:47 vboxnetflt.ko.zst /lib/modules/6.3.3.15.realtime2-4-rt/updates/dkms/: total 396 -rw-r--r-- 1 root root 96493 Aug 4 17:19 r8125.ko.zst -rw-r--r-- 1 root root 227986 Aug 16 12:48 vboxdrv.ko.zst -rw-r--r-- 1 root root 28496 Aug 16 12:48 vboxnetadp.ko.zst -rw-r--r-- 1 root root 49034 Aug 16 12:48 vboxnetflt.ko.zst /lib/modules/6.4.12-arch1-1/updates/dkms/: total 396 -rw-r--r-- 1 root root 96343 Aug 25 11:46 r8125.ko.zst -rw-r--r-- 1 root root 227168 Aug 25 11:47 vboxdrv.ko.zst -rw-r--r-- 1 root root 26706 Aug 25 11:47 vboxnetadp.ko.zst -rw-r--r-- 1 root root 47040 Aug 25 11:47 vboxnetflt.ko.zst
On 8/26/23 02:09, Ralf Mardorf wrote:
On Sat, 2023-08-26 at 09:01 +0200, Ralf Mardorf wrote:
On Fri, 2023-08-25 at 22:50 -0500, David C. Rankin wrote:
How best to do this?
Seemingly it's done by the "if", resp. "if not" ;).
"if RTLNX_VER_MIN(6,4,10)"
Brilliant! The 6.4.10 patch for Virtualbox 7.0.10 is what is needed for the 6.1.46 branch. Yep, including the preprocessor conditional will handle LTS and the current kernel (I should have snapped to that, but I didn't know RTLNX_VER_MIN() was the magic to use...) Thank you for pointing me in the right direction. Now I can fix the "Old" version with the same patch used by the "Current" version. -- David C. Rankin, J.D.,P.E.
On 8/26/23 02:01, Ralf Mardorf wrote:
Note, I only run linux (with ro threadirqs ibt=off). JIC I installed linux-lts, linux-rt, too. However, building the modules by using the 019-linux-6-4-10.patch obviously works for those kernels, too.
Thank you Ralf! Packages (2) virtualbox-bin-6.1.46-3 virtualbox-bin-guest-iso-6.1.46-3 Total Installed Size: 231.52 MiB Net Upgrade Size: 0.00 MiB <snip> (6/8) Install DKMS modules ==> dkms install --no-depmod vboxhost/6.1.46_non_OSE -k 6.1.47-1-lts ==> dkms install --no-depmod vboxhost/6.1.46_non_OSE -k 6.4.12-arch1-1 ==> depmod 6.4.12-arch1-1 ==> depmod 6.1.47-1-lts (7/8) Updating icon theme caches... (8/8) Updating the desktop file MIME type cache... Done! -- David C. Rankin, J.D.,P.E.
On Sat, 2023-08-26 at 19:31 -0500, David C. Rankin wrote:
Thank you Ralf!
David you are welcome! I always sweat blood each time something goes wrong with building the virtualbox 6+ packages or with dkms building the modules. However, it's always worth to take a look at the virtualbox 7+ changes from official Arch repositories, before considering other measures. I've also reinvented the not-perfectly-round wheel a few times, rather than adopting the round wheel that someone else invented before me. Welcome to the club! Regards, Ralf
On 8/27/23 03:26, Ralf Mardorf wrote:
However, it's always worth to take a look at the virtualbox 7+ changes from official Arch repositories, before considering other measures.
Yes, I'm about ready to make the jump. I wait because I have some unique uses of virtualbox. I've hosted a number of law offices over the years and many went away when XP was still a thing. Unfortunately, the accounting software used in the old offices will not run on newer windows and being proprietary, there is no other way to access that information should the need arise. (and it has a few times over the years) So until I see all bugs shaken out and a clear migration path, I stick with the old version.
I've also reinvented the not-perfectly-round wheel a few times, rather than adopting the round wheel that someone else invented before me.
Welcome to the club!
That seems to be my M.O. Something breaks, my first thought is to fix-it, rather than search to see of somebody else has already done it. Many rough-hewn wheels have been left along the way. -- David C. Rankin, J.D.,P.E.
participants (2)
-
David C. Rankin
-
Ralf Mardorf