[vbox-dev] packaging new kernel headers question

Frank Batschulat frank.batschulat at oracle.com
Tue Mar 31 12:58:33 UTC 2020

On Sun, 22 Mar 2020 19:21:20 +0100, Lonnie Cumberland <lonnie at outstep.com>  

> I have just setup the latest VirtualBox to work with a particular debian
> kernel by compiling the drivers with the needed
> linux-headers-$(uname -r)
> after installing gcc, make, and perl as well.
> I can now run virtualbox as anticipated on the development machine, but
> would now like to package the newly made drivers inside a debian DEB
> package.
> Can you please tell me what files that I can replace in the existing  
> Debian 9 DEB package that you might find on the Virtualbix website so  
> that this
> new DEB package will no need to compile drivers and I can just do a  
> simple package install?

Since you are building Virtualbox from the sources anyways, you can as  
well produce your own
debian packages for the host from this very same workspace.

Here are the steps to do this I hope work externally too:

$ cd trunk
$ tools/env.sh
$ mkdir prebuild
$ touch ./prebuild/UserManual.pdf
$ touch ./prebuild/VirtualBox.chm
$ export BUILD_TYPE=release ; export KBUILD_TYPE=release
$ cd src/VBox/Installer/linux/
$ fakeroot debian/rules binary NOWINE=1 NODOCS=1

The result of that should be 2 installable DEB packages:
dh_builddeb --destdir /home/ws/deb -- -Zxz
dpkg-deb: building package 'virtualbox-6.1' in  
dpkg-deb: building package 'virtualbox-6.1-dbg' in  
$ ls /home/ws/deb
trunk  virtualbox-6.1_6.1.3-135832~Ubuntu~eoan_amd64.deb   

To cleanup build remains:

$ cd src/VBox/Installer/linux/
$ fakeroot debian/rules clean

let me know whether or not that works for you.


Oracle Virtualbox Development

More information about the vbox-dev mailing list