<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch virt-hackery
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/580b98fce514996fbbc0049fd2c1e886871da5fb">https://github.com/macports/macports-ports/commit/580b98fce514996fbbc0049fd2c1e886871da5fb</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 580b98fce514996fbbc0049fd2c1e886871da5fb
</span>Author: Dan Villiom Podlaski Christiansen <danchr@macports.org>
AuthorDate: Sun Jun 21 16:22:49 2020 +0200

<span style='display:block; white-space:pre;color:#404040;'>    libvirt: fix remote socket name so that connection to linux boxes just works
</span>---
 sysutils/libvirt/Portfile                   | 12 ++++--------
 sysutils/libvirt/files/remote-sockname.diff | 12 ++++++++++++
 2 files changed, 16 insertions(+), 8 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/libvirt/Portfile b/sysutils/libvirt/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 38210206397..980bf28b1a6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/libvirt/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/libvirt/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -128,6 +128,10 @@ configure.args-append \
</span> # Upstream will not fix this; instead, they will switch to meson.
 configure.universal_args-delete --disable-dependency-tracking
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# adjust default remote socket path so that users to avoid something like
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# virsh -c qemu+ssh://user@host/system?socket=/var/run/libvirt/libvirt-sock
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append   remote-sockname.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # this patch is a rebase the hvf-domain branch from
 # https://github.com/roolebo/libvirt -- and it appears to work!
 patchfiles-append   hvf.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -147,14 +151,6 @@ variant sasl description {Use Cyrus SASL for authentication} {
</span>     configure.args-replace  --without-sasl --with-sasl
 }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-notes "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    The default socket path for the libvirt client is ${prefix}/var/run/libvirt/libvirt-sock,\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    which might cause problems when you want to attach to a remote libvirtd instance.\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    In this case, remember to also specify the socket path for the remote side, which is\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    usually /var/run/libvirt/libvirt-sock. For example to connect to a remote host with virsh:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-      $ virsh -c qemu+ssh://user@host/system?socket=/var/run/libvirt/libvirt-sock
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> livecheck.type      regex
 livecheck.url       [lindex ${master_sites} 0]
 livecheck.regex     ${name}-(\[0-9.\]+)\\.tar
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/libvirt/files/remote-sockname.diff b/sysutils/libvirt/files/remote-sockname.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..04a66a6a469
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/libvirt/files/remote-sockname.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/remote/remote_driver.c src/remote/remote_driver.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/remote/remote_driver.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/remote/remote_driver.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -788,7 +788,7 @@ remoteGetUNIXSocketHelper(remoteDriverTr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          * any machine with /run will have a /var/run symlink.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          * The portable option is to thus use $LOCALSTATEDIR/run
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        sockname = g_strdup_printf("%s/run/libvirt/%s-%s", LOCALSTATEDIR,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        sockname = g_strdup_printf("/var/run/libvirt/%s-%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                    sock_prefix,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                    flags & VIR_DRV_OPEN_REMOTE_RO ? "sock-ro" : "sock");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     }
</span></pre><pre style='margin:0'>

</pre>