Thursday, December 23, 2010

XBPS: VirtualBox 4.0.0 + DKMS

I've spent the past two days in packaging VirtualBox 4.0.0, that was released just yesterday. The problem is that VirtualBox uses some kernel modules for the hosts and guests and I didn't want really to create a package with the binary modules hardcoding a specific kernel package version.

What's the solution to this? DKMS. DKMS stands for Dynamic Kernel Modules Support, and is being used in Debian and RedHat derivatives. Why DKMS is useful? because it will rebuild/install some external kernel modules for all kernels available on the system or just a specific one. Let's show a real example:

My machine is currently running the Linux kernel 2.6.37-rc7, if DKMS is not used, I'd have to force the VirtualBox package that comes with the kernel modules to depend on a specific kernel version, the same that was used to build them. Actually the XBPS distribution uses the latest stable kernel, 2.6.36.2, so the XBPS package with the VirtualBox modules wouldn't work on my system. DKMS solves this by building/installing those external modules in the specific kernel version that you specify to it.

Hope you understood why DKMS is useful, and because those "foo-modules-version" packages in most distros are really not very useful, and becase there are tons of them.

VirtualBox 4.0.0 is really awesome, I'm impressed how fast it is compared to QEMU (without KVM). It's really working well on my XBPS x86_64 distro. You can find VirtualBox in the "xbps-templates" mercurial repository on the XBPS project site. Below are two screenshots of my system running VirtualBox.





DKMS: http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support
VirtualBox: http://www.virtualbox.org/

No comments: