Skip to content

Sink Or Swim: My Trouble With VirtualBox

 

I spent quite some time yesterday trying to build a package “just for fun” and realize that it is way over my n00b-packager head, but I do feel like I learned quite a bit in the process.  I feel like it has been a bit like jumping into the deep end of the pool and figuring it out as you go.  Granted I won’t die if I don’t figure it out, but you learn a lot very quickly when you’re in over your head.

What I was trying to do was build a .deb for VirtualBox 1.6 that was released just a few days ago.  I downloaded it to tinker with, assuming I would have to just compile the source, but I noticed it had a debian/ directory.  I figured it couldn’t hurt to give it a try, so I tried building it.  I wanted to outline what I tried to do (so all of the real packagers out there can correct me), but I will say that I am still stuck on getting it built in pbuilder.  I do have it built and running on my local machine, but when I build it in pbuilder something dies.

**What I tried (please comment with tips / corrections)

**

The first thing I did was download the VirtualBox 1.6 OSE from Sun (Yes, if you hadn’t heard, Innotek was recently bought by Sun).  From this I ended up with a VirtualBox-1.6.0-OSE.tar.bz2.

I unpacked this, which created a VirtualBox-1.6.0_OSE directory to work in.

Now, to try and appease the source-package-gods I re-packed that directory into a .orig.tar.gz and created a .orig/ directory as well.

QUESTION: Why does the source need to be in a .tar.gz format?

The .orig.tar.gz that I created used the naming convention virtualbox_ose_1.6.0.orig.tar.gz.

The .orig/ directory also had the naming convention virtualbox_ose_1.6.0.orig/.

QUESTION: I understand the naming convention should be -.  How is this handled when is two words?

I first tried to build the package with the default debian/ directory that came with the download.  I quickly found that this had some things wrong with it.

  1. The debian/changelog latest revision referred to 1.5.51~svn-1.
  2. There were missing Build-Depends on my machine (libxml2-dev, libxslt-dev, libpng-dev,…)

I then used dch -v 1.6 to create a new changelog version (This is 1.6 after all, not 1.5.51~svn), and added the details of my changes:

  • Corrected changelog version reference
  • Added required build-depends (libxml2-dev, libxslt-dev, libpng-dev,…)

QUESTION: Is this the proper way to document what I needed to change to build 1.6?

At this point the package did build using dpkg-buildpackage and it installed properly on my machine.  I did not yet run lintian, as I’m sure there are still plenty of things that are broken.

I tried to take this one step further and build it in pbuilder.  This is where things really got stuck.  I get into the build process and then it dies on finding Xlibs.  It is frustrating because it will build on my machine, but not in pbuilder, and I can’t figure out what package provides what it is looking for.

Here is a snippet of the build and the error.  I would appreciate any tips on how to figure out what package is needed to resolve this.

Checking for environment: Determined build machine: linux.x86, target machine: linux.x86, OK.

Checking for kBuild: found, OK.

Checking for gcc: found version 4.2.3, OK.

Checking for as86: found version 0.16.17, OK.

Checking for bcc: found version 0.16.17, OK.

Checking for iasl: found version 20061109, OK.

Checking for xslt: found, OK.

Checking for pthread: found, OK.

Checking for libxml2: found version 2.6.31, OK.

Checking for libxslt: found version 1.1.22, OK.

Checking for libIDL: found version 0.8.10, OK.

Checking for zlib: found version 1.2.3.3, OK.

Checking for libpng: found version 1.2.15beta5, OK.

Checking for SDL: found version 1.2.12, OK.

Checking for X libraries:

Xlibs not found at -L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11 -I/usr/local/include or Xlibs headers not found

I have tried a few X packages but they don’t seem to do the trick.  I even peeked into the PUEL pre-packaged version available for download and added any missing depends they had that I didn’t.  At this point I’m stuck wondering how to figure out the issue.  Any tips?