From 91ef7e8b5c6a3f6d8888ccd538d02653894779937d20eab8108d8d0ac6c9929f Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 25 Apr 2012 14:31:24 +0000 Subject: [PATCH 1/2] - yajl is availabile in all supported SUSE products, so always use it when building libvirtd OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=206 --- libvirt.changes | 6 ++++++ libvirt.spec | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index 6269369..5a49529 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 25 08:27:04 MDT 2012 - jfehlig@suse.com + +- yajl is availabile in all supported SUSE products, so always + use it when building libvirtd + ------------------------------------------------------------------- Thu Apr 12 11:19:38 MDT 2012 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 65bac04..62f1b5b 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -144,10 +144,8 @@ %define with_capng 0%{!?_without_capng:1} %endif -# Enable yajl library for JSON mode with QEMU in 11.4 or newer -%if 0%{?suse_version} >= 1140 +# Enable yajl library for JSON mode with QEMU %define with_yajl 0%{!?_without_yajl:%{server_drivers}} -%endif # All supported version of openSUSE/SLE contain audit %define with_audit 0%{!?_without_audit:1} From 67b62a5e60d07e1e0c3970905a8bf32de7803ceb3cc28b4f065c7fb665c6fe39 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 25 Apr 2012 18:28:21 +0000 Subject: [PATCH 2/2] - Copy user in virURIParse 4eb1c256-viruri-user.patch bnc#757766 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=207 --- 4eb1c256-viruri-user.patch | 92 ++++++++++++++++++++++++++++++++++++++ libvirt.changes | 7 +++ libvirt.spec | 2 + 3 files changed, 101 insertions(+) create mode 100644 4eb1c256-viruri-user.patch diff --git a/4eb1c256-viruri-user.patch b/4eb1c256-viruri-user.patch new file mode 100644 index 0000000..c35c634 --- /dev/null +++ b/4eb1c256-viruri-user.patch @@ -0,0 +1,92 @@ +commit 4eb1c2560d1ab8bae620788d343e9e7b32ddc066 +Author: Guido Günther +Date: Thu Apr 5 17:52:42 2012 +0200 + + virURIParse: don't forget to copy the user part + + This got dropped with 300e60e15b22387dda41ed5985a9ebadfd86dd25 + + Cheers, + -- Guido + +diff --git a/src/util/viruri.c b/src/util/viruri.c +index 2c6de51..a41f345 100644 +--- a/src/util/viruri.c ++++ b/src/util/viruri.c +@@ -185,7 +185,9 @@ virURIParse(const char *uri) + if (xmluri->fragment && + !(ret->fragment = strdup(xmluri->fragment))) + goto no_memory; +- ++ if (xmluri->user && ++ !(ret->user = strdup(xmluri->user))) ++ goto no_memory; + + /* First check: does it even make sense to jump inside */ + if (ret->server != NULL && +@@ -249,6 +251,7 @@ virURIFormat(virURIPtr uri) + xmluri.query = uri->query; + #endif + xmluri.fragment = uri->fragment; ++ xmluri.user = uri->user; + + /* First check: does it make sense to do anything */ + if (xmluri.server != NULL && +diff --git a/tests/viruritest.c b/tests/viruritest.c +index 3570217..4bb6a03 100644 +--- a/tests/viruritest.c ++++ b/tests/viruritest.c +@@ -42,6 +42,7 @@ struct URIParseData { + const char *path; + const char *query; + const char *fragment; ++ const char *user; + virURIParamPtr params; + }; + +@@ -143,33 +144,34 @@ mymain(void) + signal(SIGPIPE, SIG_IGN); + + #define TEST_FULL(uri, uri_out, scheme, server, port, path, query, \ +- fragment, params) \ ++ fragment, user, params) \ + do { \ + const struct URIParseData data = { \ + uri, (uri_out) ? (uri_out) : (uri), scheme, server, port, \ +- path, query, fragment, params \ ++ path, query, fragment, user, params \ + }; \ + if (virtTestRun("Test URI " # uri, 1, testURIParse, &data) < 0) \ + ret = -1; \ + } while (0) +-#define TEST_PARSE(uri, scheme, server, port, path, query, fragment, params) \ +- TEST_FULL(uri, NULL, scheme, server, port, path, query, fragment, params) ++#define TEST_PARSE(uri, scheme, server, port, path, query, fragment, user, params) \ ++ TEST_FULL(uri, NULL, scheme, server, port, path, query, fragment, user, params) + #define TEST_PARAMS(query_in, query_out, params) \ + TEST_FULL("test://example.com/?" query_in, \ + *query_out ? "test://example.com/?" query_out : NULL, \ +- "test", "example.com", 0, "/", query_in, NULL, params) ++ "test", "example.com", 0, "/", query_in, NULL, NULL, params) + + virURIParam params[] = { + { (char*)"name", (char*)"value" }, + { NULL, NULL }, + }; + +- TEST_PARSE("test://example.com", "test", "example.com", 0, NULL, NULL, NULL, NULL); +- TEST_PARSE("test://example.com:123", "test", "example.com", 123, NULL, NULL, NULL, NULL); +- TEST_PARSE("test://example.com:123/system?name=value#foo", "test", "example.com", 123, "/system", "name=value", "foo", params); +- TEST_PARSE("test://127.0.0.1:123/system", "test", "127.0.0.1", 123, "/system", NULL, NULL, NULL); +- TEST_PARSE("test://[::1]:123/system", "test", "::1", 123, "/system", NULL, NULL, NULL); +- TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL); ++ TEST_PARSE("test://example.com", "test", "example.com", 0, NULL, NULL, NULL, NULL, NULL); ++ TEST_PARSE("test://foo@example.com", "test", "example.com", 0, NULL, NULL, NULL, "foo", NULL); ++ TEST_PARSE("test://example.com:123", "test", "example.com", 123, NULL, NULL, NULL, NULL, NULL); ++ TEST_PARSE("test://example.com:123/system?name=value#foo", "test", "example.com", 123, "/system", "name=value", "foo", NULL, params); ++ TEST_PARSE("test://127.0.0.1:123/system", "test", "127.0.0.1", 123, "/system", NULL, NULL, NULL, NULL); ++ TEST_PARSE("test://[::1]:123/system", "test", "::1", 123, "/system", NULL, NULL, NULL, NULL); ++ TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL, NULL); + + virURIParam params1[] = { + { (char*)"foo", (char*)"one" }, diff --git a/libvirt.changes b/libvirt.changes index 5a49529..a8d30fb 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 25 12:26:25 MDT 2012 - jfehlig@suse.com + +- Copy user in virURIParse + 4eb1c256-viruri-user.patch + bnc#757766 + ------------------------------------------------------------------- Wed Apr 25 08:27:04 MDT 2012 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 62f1b5b..b68d918 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -410,6 +410,7 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches +Patch0: 4eb1c256-viruri-user.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch @@ -545,6 +546,7 @@ Authors: %prep %setup -q +%patch0 -p1 %patch100 -p1 %patch101 %patch102 -p1