Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280650 - app-emulation/libvirt pulls virt-manager- and virsh-incompatible version of netcat
Summary: app-emulation/libvirt pulls virt-manager- and virsh-incompatible version of n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Lance Albertson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 12:37 UTC by Johannes Truschnigg
Modified: 2009-09-11 23:43 UTC (History)
5 users (show)

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


Attachments
patch making libvirt ebuild depend on net-analyzer/netcat6 insetad of net-analyzer/netcat (libvirt-netcat6.ebuild.patch,140 bytes, patch)
2009-08-14 12:56 UTC, Johannes Truschnigg
Details | Diff
Patch for net-analyzer/netcat6 ebuild for compatibility with netcat and libvirt (netcat6-libvirt-compatibility.ebuild.patch,185 bytes, patch)
2009-08-14 13:01 UTC, Johannes Truschnigg
Details | Diff
patch making libvirt ebuild depend on net-analyzer/netcat6 insetad of net-analyzer/netcat (correct version) (libvirt-netcat6.ebuild.patch,140 bytes, patch)
2009-08-14 13:04 UTC, Johannes Truschnigg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Truschnigg 2009-08-07 12:37:26 UTC
app-emulation/libvirt depends on net-analyzer/netcat. The latter does not support the "-U" option for connecting to UNIX sockets on Gentoo, which remote virsh/libvirt-installations expect to be supported when connection over a SSH tunnel, thus failing with:

--- snip ---
user@some-host:~$ virsh -c "qemu+ssh://remoteuser@gentoo-libvirt-host/system" 
Connecting to uri: qemu+ssh://remoteuser@gentoo-libvirt-host/system 
nc: invalid option -- 'U' 
nc -h for help 
libvir: Remote error : socket closed unexpectedly 
error: failed to connect to the hypervisor
--- snip ---

Reproducible: Always

Steps to Reproduce:
1. Install libvirt (thereby pulling netcat) on Gentoo
2. connect to Gentoo libvirtd from another machine via virsh or virt-manager using SSH tunnelling
3. virsh or virt-manager cannot connect to Gentoo's libvirtd due to `nc` bailing on an unknown option on its command line

Actual Results:  
Remote management of virtual machines using libvirt on Gentoo hosts is impossible, as the connection to the libvirt daemon cannot be established.

Expected Results:  
virsh/virt-manager should be able to connect to libvirtd on Gentoo just fine.

It works fine with the net-analyzer/netcat6 program (after renaming/symlinking its binary from `nc6` to `nc`). This however conflicts with app-emulation/libvirt dependencies, as it pulls net-analyzer/netcat expliciitly. It may be wise to drop net-analyzer/netcat in favour of net-analyzer/netcat6, and have its ebuild automatically link /usr/bin/nc to /usr/bin/nc6.
Comment 1 Johannes Truschnigg 2009-08-14 12:56:24 UTC
Created attachment 201232 [details, diff]
patch making libvirt ebuild depend on net-analyzer/netcat6 insetad of net-analyzer/netcat

Note: this won't yield anything without an appropriately modified net-analyzer/netcat6 ebuild!
Comment 2 Johannes Truschnigg 2009-08-14 13:01:45 UTC
Created attachment 201234 [details, diff]
Patch for net-analyzer/netcat6 ebuild for compatibility with netcat and libvirt

This should probably also block on other installed versions of netcat. Maybe a virtual for netcat would be warranted?
Comment 3 Johannes Truschnigg 2009-08-14 13:04:31 UTC
Created attachment 201236 [details, diff]
patch making libvirt ebuild depend on net-analyzer/netcat6 insetad of net-analyzer/netcat (correct version)

This is what you get from having your shell expand wildcards... Patch should make sense now.
Comment 4 Patrick Lauer gentoo-dev 2009-09-08 21:24:54 UTC
+  08 Sep 2009; Patrick Lauer <patrick@gentoo.org> +libvirt-0.6.5-r1.ebuild:                                    
+  Fixing netcat dep #280650 #237277 #283884