diff --git a/libvirt/libvirt-socat.patch b/libvirt/libvirt-socat.patch index 8b72730..ce6c278 100644 --- a/libvirt/libvirt-socat.patch +++ b/libvirt/libvirt-socat.patch @@ -1,30 +1,34 @@ -Index: libvirt-0.4.5/src/remote_internal.c -=================================================================== ---- libvirt-0.4.5.orig/src/remote_internal.c -+++ libvirt-0.4.5/src/remote_internal.c -@@ -623,9 +623,22 @@ doRemoteOpen (virConnectPtr conn, +diff -urN libvirt-0.6.5/src/remote_internal.c libvirt-0.6.5-socat/src/remote_internal.c +--- libvirt-0.6.5/src/remote_internal.c 2009-07-01 04:22:39.000000000 -0400 ++++ libvirt-0.6.5-socat/src/remote_internal.c 2009-07-08 14:48:23.000000000 -0400 +@@ -721,12 +721,26 @@ 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 : LIBVIRTD_PRIV_UNIX_SOCKET); +- cmd_argv[j++] = strdup (sockname ? sockname : + if (netcat) { -+ cmd_argv[j++] = strdup (netcat); -+ cmd_argv[j++] = strdup ("-U"); -+ cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); -+ } else { -+ cmd_argv[j++] = strdup ("socat"); -+ cmd_argv[j++] = strdup ("-"); -+ -+ char *socat_addr = 0; -+ if ((asprintf (&socat_addr, "GOPEN:%s", -+ sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET)) < 0) { -+ error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM)); -+ goto failed; -+ } -+ cmd_argv[j++] = socat_addr; ++ 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 { //Use socat, since some distros hate nc ++ char *socat_addr = 0; ++ cmd_argv[j++] = strdup ("socat"); ++ cmd_argv[j++] = strdup ("-"); ++ 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++] = socat_addr; + } cmd_argv[j++] = 0; assert (j == nr_args); for (j = 0; j < (nr_args-1); j++) +Binary files libvirt-0.6.5/src/.remote_internal.c.swp and libvirt-0.6.5-socat/src/.remote_internal.c.swp differ diff --git a/libvirt/libvirt.spec b/libvirt/libvirt.spec index a452ce9..b482345 100644 --- a/libvirt/libvirt.spec +++ b/libvirt/libvirt.spec @@ -327,6 +327,7 @@ fi %doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO %doc %{_mandir}/man1/virsh.1* /usr/bin/virt-xml-validate +/usr/libexec/libvirt_parthelper /usr/share/man/man1/virt-xml-validate.1.gz %{_bindir}/virsh