mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 09:01:46 +00:00
-Update patch for 0.6.5
-Fix spec for 0.6.5
This commit is contained in:
parent
c996d198c3
commit
1aa800cfa6
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user