dpkg-buildpackage and --disable-python result in error

Discussions related to using the OSE version of VirtualBox.

dpkg-buildpackage and --disable-python result in error

Postby Mini » 14. Dec 2014, 20:44

Building a .deb with "--disable-python" config option fails for me.
Before running the build, I modified the debian/rules file as follows:
Code: Select all   Expand viewCollapse view
uncommented OSE=1
uncommented STAGEDISO=prebuild (added the needed stuff to this folder)
uncommented NODOCS=1
added to the cfg_flags section the following options: --enable-hardening --disable-java --disable-alsa --disable-python --disable-dbus --disable-sdl-ttf --disable-opengl --disable-docs --disable-libvpx --disable-udptunnel


Then I run "dpkg-buildpackage -d -b -uc -us -nc". I can see that the compilation phase succeeds, but the installation phase fails:
Code: Select all   Expand viewCollapse view
Packing {C}/out/debian/builddir/bin/VirtualBox.tar.bz2
touch debian/build-stamp
 fakeroot debian/rules binary
dh_testdir
dh_testroot
dh_clean -k
dh_clean: dh_clean -k is deprecated; use dh_prep instead
dh_clean: Compatibility levels before 5 are deprecated (level 4 in use)
dh_installdirs
dh_installdirs: Compatibility levels before 5 are deprecated (level 4 in use)
tar -xjC /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt -f /home/me/Downloads/VirtualBox-4.3.20/out/debian/builddir/bin/VirtualBox.tar.bz2
mv /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE/virtualbox.xml debian/virtualbox-ose.sharedmimeinfo
/home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE/scripts/install.sh --package virtualbox --root /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose \
       --prefix /usr  --ose \
        --no-web-service \
       --install-folder /lib/virtualbox --no-helpers
/home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE/scripts/install.sh: 211: cd: can't cd to /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE/scripts/../sdk/installer
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2


I tried to make a quick and dirty fix by commenting the code in src/VBox/Installer/linux/scripts/install.sh which couses this error (this code has something to do with the setup of python api to VirtualBox, which IMHO should not be executed when I use "--disable-python"):
Code: Select all   Expand viewCollapse view
#(
#    cd "${INSTALL_SOURCE}/sdk/installer"
#    export VBOX_INSTALL_PATH="${RELATIVE_PREFIX}${INSTALL_FOLDER}"
#    "${PYTHON_COMMAND}" "vboxapisetup.py" install --root "${ROOT}" --prefix "${RELATIVE_PREFIX}"
#)
#rm -rf ${INSTALL_SOURCE}/sdk/installer


but got a new error:
Code: Select all   Expand viewCollapse view
/home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE/scripts/install.sh --package virtualbox --root /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose \
       --prefix /usr  --ose \
        --no-web-service \
       --install-folder /lib/virtualbox --no-helpers
install -d -g 0 -o 0 /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/usr/share/doc/virtualbox-ose
install -d -g 0 -o 0 /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/usr/share/lintian/overrides
sed \
       -e 's|%VERPKG%|virtualbox-ose|g' \
       debian/lintian-override.in > \
      /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/usr/share/lintian/overrides/virtualbox-ose
mv /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE /home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/usr/lib/virtualbox
mv: cannot move ‘/home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/opt/VirtualBox-4.3.20_OSE’ to ‘/home/me/Downloads/VirtualBox-4.3.20/debian/virtualbox-ose/usr/lib/virtualbox’: No such file or directory


So, this dirty fix did not work.

NOTE 1: If I remove the "--disable-python" option in debian/rules, then the creation of .deb succeeds, so the problem is definitely in "--disable-python".
NOTE 2: If I use "kmk; kmk packing" instead of dpkg-buildpackage and add the "--disable-python" option to "./configure", then the build also succeeds and I get the .run installation file.
NOTE 3: All of the above is true for building sources both from VirtualBox-4.3.20.tar.bz2 and from the latest SVN repo.

Is this a bug? Should I create a bug report for it?
Thanks for your help in advance.
Mini
 
Posts: 1
Joined: 14. Dec 2014, 19:59

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 2 guests