Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 443830 - app-emulation/virtualbox : Feature request to install `vditool` and `vbox-img`
Summary: app-emulation/virtualbox : Feature request to install `vditool` and `vbox-img`
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-18 19:49 UTC by Kent Fredric (IRC: kent\n)
Modified: 2018-09-29 20:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
virtualbox-4-enable-tools.diff (virtualbox-4-enable-tools.diff,1.75 KB, text/plain)
2012-11-18 19:49 UTC, Kent Fredric (IRC: kent\n)
Details
patch against virtualbox-4.2.18.ebuild for extra tools (vbox-ebuild-add-tools.patch,1.34 KB, patch)
2013-10-03 16:08 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2012-11-18 19:49:17 UTC
Created attachment 329880 [details]
virtualbox-4-enable-tools.diff

vditool and vbox-img are useful tools in the virtualbox source tree for advanced disk image manipulation. 

Upstream landed this patch https://www.virtualbox.org/changeset/43851/vbox

Which adds support for building vbox-img and vditool even if you're not doing the test suite, and it would be nice to be able to have these tools available. 

I managed to patch the respective files with a modified .ebuild and .diff

However, once I managed to do this I got a compile error compiling vbox-img that I don't know enough to debug

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lz
/var/tmp/portage/app-emulation/virtualbox-4.2.4-r2/work/VirtualBox-4.2.4/out/linux.amd64/release/lib/RuntimeR3.a(fs3-posix.o): In function `rtFsObjInfoAttrSetUnixGroup':
/var/tmp/portage/app-emulation/virtualbox-4.2.4-r2/work/VirtualBox-4.2.4/src/VBox/Runtime/r3/posix/fs3-posix.cpp:80: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/var/tmp/portage/app-emulation/virtualbox-4.2.4-r2/work/VirtualBox-4.2.4/out/linux.amd64/release/lib/RuntimeR3.a(fs3-posix.o): In function `rtFsObjInfoAttrSetUnixOwner':
/var/tmp/portage/app-emulation/virtualbox-4.2.4-r2/work/VirtualBox-4.2.4/src/VBox/Runtime/r3/posix/fs3-posix.cpp:58: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  INST    VBoxTunctl => {C}/out/linux.amd64/release/bin/VBoxTunctl
  LD      VBoxDDR0


--- /usr/portage/app-emulation/virtualbox/virtualbox-4.2.4-r1.ebuild	2012-11-13 07:19:52.000000000 +1300
+++ /usr/portage/app-emulation/virtualbox/virtualbox-4.2.4-r2.ebuild	2012-11-19 08:43:08.643967319 +1300
@@ -26,7 +26,7 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+additions alsa doc extensions headless java pam pulseaudio +opengl python +qt4 +sdk vboxwebsrv vnc"
+IUSE="+additions alsa doc extensions headless java pam pulseaudio +opengl python +qt4 +sdk vboxwebsrv vnc tools"
 
 RDEPEND="!app-emulation/virtualbox-bin
 	~app-emulation/virtualbox-modules-${PV}
@@ -172,6 +172,9 @@
 	EPATCH_SUFFIX="patch" \
 	EPATCH_FORCE="yes" \
 	epatch "${WORKDIR}/patches"
+	if use tools; then
+		epatch "${FILESDIR}"/${PN}-4-enable-tools.diff
+	fi
 }
 
 src_configure() {
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2012-12-21 18:04:05 UTC
I need some time to look into this more closely. I am definitely interested in this enhancement but I currently lack enough time to test this thoroughly for inclusion into the portage tree.
Comment 2 Ben Kohler gentoo-dev 2013-10-03 16:08:22 UTC
Created attachment 360074 [details, diff]
patch against virtualbox-4.2.18.ebuild for extra tools

Apparently these tools are being built as statically linked, so that's what your previous failure was about.  I've added the proper zlib[static-libs] dep and converted to inline sed instead of a separate patch, give this a try if you can.  The new tools seem to build/install/run fine here.
Comment 3 Kalin KOZHUHAROV 2015-11-12 06:10:47 UTC
Some updates from upstream:

vditool was removed upstream some 3 months ago.

https://www.virtualbox.org/log/vbox/trunk/src/VBox/Storage/testcase/vditool.cpp?rev=58658&mode=path_history

vbox-img is still persent

https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Storage/testcase/vbox-img.cpp