[vbox-dev] Obtaining the source code for the VirtualBox rpms
Martin Simmons
martin at lispworks.com
Tue Jun 21 11:49:38 PDT 2011
>>>>> On Tue, 21 Jun 2011 15:12:36 +0200, Frank Mehnert said:
>
> If something is missing then this is a bug. Which VBox source tarball are
> you using?
Thanks for the reply. It was
http://download.virtualbox.org/virtualbox/4.0.8/VirtualBox-4.0.8.tar.bz2 from
the downloads page.
> The source for the RPM builds are in src/VBox/Installer/linux/rpm
> and an rpm packagecan be built like
>
> cd src/VBox/Installer/linux && rpm/rules binary
>
> There must be a file /etc/distname which contains something like fedora14
> to describe the Linux distribution were are building on. Have a look at
> src/VBox/Installer/linux/rpm/rules.
Yes, I found that. I'll list the problems here (I was running on Fedora 14
x86_64):
1.
The main problem is that I'm pretty sure the rpms are built without VBOX_OSE
defined. This can be seen by doing
strings /usr/lib/virtualbox/VBoxBalloonCtrl | grep 'Package type:'
which doesn't mention "(OSE)" with the Fedora 14 rpm at least. A VBOX_OSE
build would include "(OSE)" in the output according to the source code.
This contradicts the configure script, which always defines VBOX_OSE (it sets
OSE=1 and there is no configure option to prevent this).
I tried editing configure to say OSE=0, but that build fails because
src/VBox/Storage/VDFormats/Makefile.kmk is missing from the source but is
included by src/VBox/Storage/Makefile.kmk when VBOX_OSE is undefined.
2.
The second problem is that rpm/rules doesn't know how to build the
VBoxGuestAdditions tar file. This patch (based on debian/rules) fixes it:
--- src/VBox/Installer/linux/rpm/rules~ 2011-05-16 17:33:43.000000000 +0100
+++ src/VBox/Installer/linux/rpm/rules 2011-06-21 19:28:33.205003767 +0100
@@ -140,6 +140,10 @@
$(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
. rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) \
VBOX_NO_LINUX_RUN_INSTALLER=1 \
+ VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86-r$(svnrev).tar.bz2 \
+ VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64-r$(svnrev).tar.bz2 \
+ VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \
+ VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \
packing
touch rpm/build-stamp
3.
The third problem is that rpm/rules doesn't build VBoxBalloonCtrl and
vboxwebsrv, but they are needed to build the rpm. I think this might related
to VBOX_OSE.
4.
FWIW, running a non-rpm build with
kmk all; kmk -C src/VBox packing
also fails because it doesn't build VBoxBalloonCtrl.
5.
A minor problem is that rpm/rules never sets svn_revision, possibly because
the source tar file doesn't contain the SVN_REVISION file that rpm/rules tries
to include.
__Martin
More information about the vbox-dev
mailing list