[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/1.0.0_rc2-1
Guido Günther
agx at sigxcpu.org
Mon Oct 29 10:23:24 UTC 2012
The following commit has been merged in the experimental branch:
commit e68850a607c3a0e08f0baabbf935ec777a14540b
Author: Guido Günther <agx at sigxcpu.org>
Date: Mon Oct 29 10:19:16 2012 +0100
Create temporary dir for socket
to avoid ENAMETOOLONG
diff --git a/debian/patches/Create-temporary-dir-for-socket.patch b/debian/patches/Create-temporary-dir-for-socket.patch
new file mode 100644
index 0000000..33b9532
--- /dev/null
+++ b/debian/patches/Create-temporary-dir-for-socket.patch
@@ -0,0 +1,57 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Mon, 29 Oct 2012 09:28:15 +0100
+Subject: Create temporary dir for socket
+
+to avoid ENAMETOOLONG:
+
+https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=amd64&ver=1.0.0~rc1-1&stamp=1351453521
+---
+ tests/qemumonitortestutils.c | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
+index 7133c99..4e5c879 100644
+--- a/tests/qemumonitortestutils.c
++++ b/tests/qemumonitortestutils.c
+@@ -424,9 +424,23 @@ static qemuMonitorCallbacks qemuCallbacks = {
+ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virCapsPtr caps)
+ {
+ qemuMonitorTestPtr test;
+- const char *path = abs_builddir "/qemumonitorjsontest.sock";
+ virDomainChrSourceDef src;
+
++ char *tmpdir = NULL, *path = NULL;
++ char template[] = "/tmp/libvirt_XXXXXX";
++
++ tmpdir = mkdtemp(template);
++ if (tmpdir == NULL) {
++ virReportSystemError(errno, "%s",
++ _("Failed to create temporary directory"));
++ goto error;
++ }
++
++ if (virAsprintf(&path, "%s/qemumonitorjsontest.sock", tmpdir) < 0) {
++ virReportOOMError();
++ goto error;
++ }
++
+ memset(&src, 0, sizeof(src));
+ src.type = VIR_DOMAIN_CHR_TYPE_UNIX;
+ src.data.nix.path = (char *)path;
+@@ -494,11 +508,15 @@ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virCapsPtr caps)
+ test->running = true;
+ virMutexUnlock(&test->lock);
+
++cleanup:
++ if (tmpdir)
++ rmdir(tmpdir);
++ VIR_FREE(path);
+ return test;
+
+ error:
+ qemuMonitorTestFree(test);
+- return NULL;
++ goto cleanup;
+ }
+
+ qemuMonitorPtr qemuMonitorTestGetMonitor(qemuMonitorTestPtr test)
diff --git a/debian/patches/series b/debian/patches/series
index 6148614..0181e03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ Don-t-fail-if-we-can-t-setup-avahi.patch
Reduce-udevadm-settle-timeout-to-10-seconds.patch
debian/Debianize-systemd-service-files.patch
Allow-xen-toolstack-to-find-it-s-binaries.patch
+Create-temporary-dir-for-socket.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list