Silence session agent error logging when not running in a vm (rhbz#999804)
- Release guest clipboard ownership on client disconnect (rhbz#1003977)
This commit is contained in:
parent
02033c19cd
commit
f5f826cac4
@ -0,0 +1,43 @@
|
|||||||
|
From 99a2628b0ff04e0aadd130e45aa2598c4df64690 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Walters <walters@verbum.org>
|
||||||
|
Date: Tue, 11 Jun 2013 15:21:13 -0400
|
||||||
|
Subject: [linux-vdagent PATCH 04/12] Not having the virtio channel is not an
|
||||||
|
error; instead silently do nothing
|
||||||
|
|
||||||
|
Fedora for example bundles the SPICE agent by default; however, we
|
||||||
|
don't want to spew an error when running non-virtualized, or with
|
||||||
|
plain VNC.
|
||||||
|
|
||||||
|
Let's just silently exit; while we could change LOG_ERR -> LOG_INFO
|
||||||
|
or something, that's still pointless noise in most people's syslog.
|
||||||
|
|
||||||
|
Someone who was debugging a misconfigured SPICE setup would pretty
|
||||||
|
quickly notice that they were missing the virtio port.
|
||||||
|
|
||||||
|
(This patch is part of a larger initiative to reduce error
|
||||||
|
spew on default startup in common deployment scenarios such as
|
||||||
|
KVM+VNC.)
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
src/vdagent.c | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/vdagent.c b/src/vdagent.c
|
||||||
|
index 9e238d3..10ebf6e 100644
|
||||||
|
--- a/src/vdagent.c
|
||||||
|
+++ b/src/vdagent.c
|
||||||
|
@@ -226,9 +226,7 @@ int main(int argc, char *argv[])
|
||||||
|
LOG_USER);
|
||||||
|
|
||||||
|
if (file_test(portdev) != 0) {
|
||||||
|
- syslog(LOG_ERR, "Missing virtio device '%s': %s",
|
||||||
|
- portdev, strerror(errno));
|
||||||
|
- return 1;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (do_daemonize)
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
From ad6ea7594a11d8a35be84a8ae2e8403ea3344a3b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Mon, 9 Sep 2013 15:50:39 +0200
|
||||||
|
Subject: [linux-vdagent PATCH 5/5] vdagent-x11: Release clipboard on client
|
||||||
|
disconnect if owned by client
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1003977
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
src/vdagent-x11.c | 10 ++++++++++
|
||||||
|
src/vdagent-x11.h | 2 ++
|
||||||
|
src/vdagent.c | 1 +
|
||||||
|
3 files changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/vdagent-x11.c b/src/vdagent-x11.c
|
||||||
|
index 4588b3d..5ce6000 100644
|
||||||
|
--- a/src/vdagent-x11.c
|
||||||
|
+++ b/src/vdagent-x11.c
|
||||||
|
@@ -1305,6 +1305,16 @@ void vdagent_x11_clipboard_release(struct vdagent_x11 *x11, uint8_t selection)
|
||||||
|
vdagent_x11_do_read(x11);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void vdagent_x11_client_disconnected(struct vdagent_x11 *x11)
|
||||||
|
+{
|
||||||
|
+ int sel;
|
||||||
|
+
|
||||||
|
+ for (sel = 0; sel < VD_AGENT_CLIPBOARD_SELECTION_SECONDARY; sel++) {
|
||||||
|
+ if (x11->clipboard_owner[sel] == owner_client)
|
||||||
|
+ vdagent_x11_clipboard_release(x11, sel);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Function used to determine the default location to save file-xfers,
|
||||||
|
xdg desktop dir or xdg download dir. We error on the save side and use a
|
||||||
|
whitelist approach, so any unknown desktops will end up with saving
|
||||||
|
diff --git a/src/vdagent-x11.h b/src/vdagent-x11.h
|
||||||
|
index a2a2485..d64a42a 100644
|
||||||
|
--- a/src/vdagent-x11.h
|
||||||
|
+++ b/src/vdagent-x11.h
|
||||||
|
@@ -46,6 +46,8 @@ void vdagent_x11_clipboard_data(struct vdagent_x11 *x11, uint8_t selection,
|
||||||
|
uint32_t type, uint8_t *data, uint32_t size);
|
||||||
|
void vdagent_x11_clipboard_release(struct vdagent_x11 *x11, uint8_t selection);
|
||||||
|
|
||||||
|
+void vdagent_x11_client_disconnected(struct vdagent_x11 *x11);
|
||||||
|
+
|
||||||
|
int vdagent_x11_has_icons_on_desktop(struct vdagent_x11 *x11);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
diff --git a/src/vdagent.c b/src/vdagent.c
|
||||||
|
index f270615..d7f7aba 100644
|
||||||
|
--- a/src/vdagent.c
|
||||||
|
+++ b/src/vdagent.c
|
||||||
|
@@ -104,6 +104,7 @@ void daemon_read_complete(struct udscs_connection **connp,
|
||||||
|
free(data);
|
||||||
|
break;
|
||||||
|
case VDAGENTD_CLIENT_DISCONNECTED:
|
||||||
|
+ vdagent_x11_client_disconnected(x11);
|
||||||
|
vdagent_file_xfers_destroy(vdagent_file_xfers);
|
||||||
|
vdagent_file_xfers = vdagent_file_xfers_create(client, fx_dir,
|
||||||
|
fx_open_dir, debug);
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: spice-vdagent
|
Name: spice-vdagent
|
||||||
Version: 0.14.0
|
Version: 0.14.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Agent for Spice guests
|
Summary: Agent for Spice guests
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -10,6 +10,8 @@ Source0: http://spice-space.org/download/releases/%{name}-%{version}.tar.
|
|||||||
Patch1: 0001-vdagent-d-Add-printing-of-version-to-h-output.patch
|
Patch1: 0001-vdagent-d-Add-printing-of-version-to-h-output.patch
|
||||||
Patch2: 0002-vdagentd-Advertise-VD_AGENT_CAP_GUEST_LINEEND_LF.patch
|
Patch2: 0002-vdagentd-Advertise-VD_AGENT_CAP_GUEST_LINEEND_LF.patch
|
||||||
Patch3: 0003-buildsys-Build-vdagentd-as-pie-relro-when-possible.patch
|
Patch3: 0003-buildsys-Build-vdagentd-as-pie-relro-when-possible.patch
|
||||||
|
Patch4: 0004-Not-having-the-virtio-channel-is-not-an-error-instea.patch
|
||||||
|
Patch5: 0005-vdagent-x11-Release-clipboard-on-client-disconnect-i.patch
|
||||||
BuildRequires: systemd-devel glib2-devel spice-protocol >= 0.12.6
|
BuildRequires: systemd-devel glib2-devel spice-protocol >= 0.12.6
|
||||||
BuildRequires: libpciaccess-devel libXrandr-devel libXinerama-devel
|
BuildRequires: libpciaccess-devel libXrandr-devel libXinerama-devel
|
||||||
BuildRequires: libXfixes-devel systemd-units desktop-file-utils libtool
|
BuildRequires: libXfixes-devel systemd-units desktop-file-utils libtool
|
||||||
@ -35,6 +37,8 @@ Features:
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
|
||||||
|
|
||||||
@ -77,6 +81,10 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/modules-load.d/spice-vdagentd.conf
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 10 2013 Hans de Goede <hdegoede@redhat.com> - 0.14.0-5
|
||||||
|
- Silence session agent error logging when not running in a vm (rhbz#999804)
|
||||||
|
- Release guest clipboard ownership on client disconnect (rhbz#1003977)
|
||||||
|
|
||||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-4
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user