From d368a28510eb7ee2e6c8d73fa19b031d03db1a2aa2e976d9ec459f5e6d8e7745 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Thu, 8 Feb 2018 17:43:16 +0000 Subject: [PATCH] Accepting request 574324 from home:jfehlig:branches:Virtualization - guest agent: change service file to a template so it can be used by Xen as well. Adjust udev rule accordingly. FATE#324963 - guest agent: change service file to a template so it can be used by Xen as well. Adjust udev rule accordingly. FATE#324963 OBS-URL: https://build.opensuse.org/request/show/574324 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=389 --- ...-string-input-visitor-Fix-uint64-par.patch | 4 ++-- ...-test-string-input-visitor-Add-int-t.patch | 20 +++++++++---------- 80-qemu-ga.rules | 2 +- qemu-ga.service => qemu-ga@.service | 6 +++--- qemu-testsuite.changes | 7 +++++++ qemu-testsuite.spec | 2 +- qemu.changes | 7 +++++++ qemu.spec | 2 +- qemu.spec.in | 2 +- 9 files changed, 33 insertions(+), 19 deletions(-) rename qemu-ga.service => qemu-ga@.service (50%) diff --git a/0027-string-input-visitor-Fix-uint64-par.patch b/0027-string-input-visitor-Fix-uint64-par.patch index f9f7f559..a5c1cefc 100644 --- a/0027-string-input-visitor-Fix-uint64-par.patch +++ b/0027-string-input-visitor-Fix-uint64-par.patch @@ -97,13 +97,13 @@ index b3fdd0827d..d64ad081b7 100644 + error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null", + "integer"); + return; -+ } + } + + parse_str(siv, name, true, errp); + + if (!siv->ranges) { + goto error; - } ++ } + + if (!siv->cur_range) { + Range *r; diff --git a/0028-test-string-input-visitor-Add-int-t.patch b/0028-test-string-input-visitor-Add-int-t.patch index 3e5466b5..2c5c2e2e 100644 --- a/0028-test-string-input-visitor-Add-int-t.patch +++ b/0028-test-string-input-visitor-Add-int-t.patch @@ -17,18 +17,18 @@ diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor index 4f9c36bef1..470f58e0ab 100644 --- a/tests/test-string-input-visitor.c +++ b/tests/test-string-input-visitor.c -@@ -55,6 +55,14 @@ static void test_visitor_in_int(TestInputVisitorData *data, - - v = visitor_input_test_init(data, "-42"); - -+ visit_type_int(v, NULL, &res, &err); -+ g_assert(!err); -+ g_assert_cmpint(res, ==, value); +@@ -58,6 +58,14 @@ static void test_visitor_in_int(TestInputVisitorData *data, + visit_type_int(v, NULL, &res, &err); + g_assert(!err); + g_assert_cmpint(res, ==, value); + visitor_input_teardown(data, unused); + + value = INT64_MAX; + v = visitor_input_test_init(data, g_strdup_printf("%" PRId64, value)); + - visit_type_int(v, NULL, &res, &err); - g_assert(!err); - g_assert_cmpint(res, ==, value); ++ visit_type_int(v, NULL, &res, &err); ++ g_assert(!err); ++ g_assert_cmpint(res, ==, value); + + v = visitor_input_test_init(data, "not an int"); + diff --git a/80-qemu-ga.rules b/80-qemu-ga.rules index 26defbfd..9d7733c7 100644 --- a/80-qemu-ga.rules +++ b/80-qemu-ga.rules @@ -1 +1 @@ -SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-ga.service" +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service" diff --git a/qemu-ga.service b/qemu-ga@.service similarity index 50% rename from qemu-ga.service rename to qemu-ga@.service index ee652d3b..63605e61 100644 --- a/qemu-ga.service +++ b/qemu-ga@.service @@ -1,11 +1,11 @@ [Unit] Description=QEMU Guest Agent Documentation=http://wiki.qemu.org/Features/GuestAgent -BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device -After=dev-virtio\x2dports-org.qemu.guest_agent.0.device +BindsTo=dev-%i.device +After=dev-%i.device [Service] Type=simple -ExecStart=-/usr/bin/qemu-ga +ExecStart=-/usr/bin/qemu-ga -p /dev/%I Restart=always RestartSec=0 diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 833ca87a..a21c493f 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 8 00:12:14 UTC 2018 - jfehlig@suse.com + +- guest agent: change service file to a template so it can be + used by Xen as well. Adjust udev rule accordingly. + FATE#324963 + ------------------------------------------------------------------- Mon Jan 29 21:51:17 UTC 2018 - brogers@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index 95d2201a..cf837417 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -119,7 +119,7 @@ Source3: kvm_stat Source4: kvm_stat.1.gz Source5: qemu-kvm.1.gz Source6: ksm.service -Source7: qemu-ga.service +Source7: qemu-ga@.service Source8: 80-qemu-ga.rules Source9: qemu-supportconfig Source10: kvm.conf diff --git a/qemu.changes b/qemu.changes index 833ca87a..a21c493f 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 8 00:12:14 UTC 2018 - jfehlig@suse.com + +- guest agent: change service file to a template so it can be + used by Xen as well. Adjust udev rule accordingly. + FATE#324963 + ------------------------------------------------------------------- Mon Jan 29 21:51:17 UTC 2018 - brogers@suse.com diff --git a/qemu.spec b/qemu.spec index 919619f1..5992dccf 100644 --- a/qemu.spec +++ b/qemu.spec @@ -119,7 +119,7 @@ Source3: kvm_stat Source4: kvm_stat.1.gz Source5: qemu-kvm.1.gz Source6: ksm.service -Source7: qemu-ga.service +Source7: qemu-ga@.service Source8: 80-qemu-ga.rules Source9: qemu-supportconfig Source10: kvm.conf diff --git a/qemu.spec.in b/qemu.spec.in index 93e00ef4..375f5b1f 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -119,7 +119,7 @@ Source3: kvm_stat Source4: kvm_stat.1.gz Source5: qemu-kvm.1.gz Source6: ksm.service -Source7: qemu-ga.service +Source7: qemu-ga@.service Source8: 80-qemu-ga.rules Source9: qemu-supportconfig Source10: kvm.conf