From b5b40f2eb604163e8354e2e8b92c57d847234694ddf1e746d86ce4108967d01a Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Fri, 25 Jun 2010 15:16:19 +0000 Subject: [PATCH] Use netcat-openbsd instead of socat OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=58 --- libvirt.changes | 7 +++++++ libvirt.spec | 6 ++---- socat.patch | 40 ---------------------------------------- 3 files changed, 9 insertions(+), 44 deletions(-) delete mode 100644 socat.patch diff --git a/libvirt.changes b/libvirt.changes index 6ed8fd5..195e9d8 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -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. diff --git a/libvirt.spec b/libvirt.spec index ebeb148..b5e0713 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -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 diff --git a/socat.patch b/socat.patch deleted file mode 100644 index 76b956f..0000000 --- a/socat.patch +++ /dev/null @@ -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++)