SHA256
1
0
forked from pool/libvirt

Use netcat-openbsd instead of socat

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=58
This commit is contained in:
James Fehlig 2010-06-25 15:16:19 +00:00 committed by Git OBS Bridge
parent 78c7fb52cc
commit b5b40f2eb6
3 changed files with 9 additions and 44 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jun 25 09:02:38 MDT 2010 - jfehlig@novell.com
- Use netcat-openbsd, which contains a proper 'nc' program
supporting the '-U' option. Drop socat.patch.
bnc#611023
-------------------------------------------------------------------
Mon Jun 21 10:00:13 MDT 2010 - jfehlig@novell.com
- Re-enable numa support now that bnc#598488 is resolved.

View File

@ -148,7 +148,6 @@ Patch6: xend-content-buf.patch
Patch7: xend-content-buf-fix.patch
# Need to go upstream
Patch100: xen-name-for-devid.patch
Patch101: socat.patch
Patch102: clone.patch
Patch103: xen-pv-cdrom.patch
Patch104: xen-domctl-ver7.patch
@ -180,8 +179,8 @@ Group: Development/Libraries/C and C++
Requires: readline
Requires: ncurses
# So remote clients can access libvirt over SSH tunnel
# (client invokes 'socat' against the UNIX socket on the server)
Requires: socat
# (client invokes 'nc' against the UNIX socket on the server)
Requires: netcat-openbsd
Requires: cyrus-sasl
Recommends: cyrus-sasl-digestmd5
@ -268,7 +267,6 @@ Authors:
%patch6 -p1
%patch7 -p1
%patch100 -p1
%patch101 -p1
%patch102
%patch103 -p1
%patch104 -p1

View File

@ -1,40 +0,0 @@
Index: libvirt-0.8.1/src/remote/remote_driver.c
===================================================================
--- libvirt-0.8.1.orig/src/remote/remote_driver.c
+++ libvirt-0.8.1/src/remote/remote_driver.c
@@ -769,12 +769,29 @@ doRemoteOpen (virConnectPtr conn,
cmd_argv[j++] = strdup ("none");
}
cmd_argv[j++] = strdup (priv->hostname);
- cmd_argv[j++] = strdup (netcat ? netcat : "nc");
- cmd_argv[j++] = strdup ("-U");
- cmd_argv[j++] = strdup (sockname ? sockname :
- (flags & VIR_CONNECT_RO
- ? LIBVIRTD_PRIV_UNIX_SOCKET_RO
- : LIBVIRTD_PRIV_UNIX_SOCKET));
+ if (netcat) {
+ cmd_argv[j++] = strdup (netcat);
+ cmd_argv[j++] = strdup ("-U");
+ cmd_argv[j++] = strdup (sockname ? sockname :
+ (flags & VIR_CONNECT_RO
+ ? LIBVIRTD_PRIV_UNIX_SOCKET_RO
+ : LIBVIRTD_PRIV_UNIX_SOCKET));
+ } else {
+ cmd_argv[j++] = strdup ("socat");
+ cmd_argv[j++] = strdup ("-");
+
+ char *socat_addr = NULL;
+ if ((asprintf (&socat_addr, "GOPEN:%s",
+ sockname ? sockname :
+ (flags & VIR_CONNECT_RO
+ ? LIBVIRTD_PRIV_UNIX_SOCKET_RO
+ : LIBVIRTD_PRIV_UNIX_SOCKET))) < 0) {
+ error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
+ goto failed;
+ }
+ cmd_argv[j++] = strdup (socat_addr);
+ VIR_FREE(socat_addr);
+ }
cmd_argv[j++] = 0;
assert (j == nr_args);
for (j = 0; j < (nr_args-1); j++)