New upstream release 0.8.0

This commit is contained in:
Hans de Goede 2011-04-19 18:52:38 +02:00
parent ae22cef632
commit 0569e208c0
9 changed files with 10 additions and 260 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/spice-vdagent-0.6.3.tar.bz2
/spice-vdagent-0.8.0.tar.bz2

View File

@ -1,41 +0,0 @@
From 949a7110f5a389e7554b6d3b9bdfa262954b1669 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 1 Nov 2010 16:16:20 +0100
Subject: [PATCH 1/2] Install spice-vdagentd in /usr/sbin not /sbin
Now that it is no longer launched by a udev rule it does not need to be in
/sbin.
---
Makefile | 2 +-
spice-vdagentd.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5a67890..0f3586e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 0.6.3
DESTDIR ?=
-sbindir ?= /sbin
+sbindir ?= /usr/sbin
bindir ?= /usr/bin
initdir ?= /etc/rc.d/init.d
xdgautostartdir ?= /etc/xdg/autostart
diff --git a/spice-vdagentd.sh b/spice-vdagentd.sh
index 7037b42..0a62c2b 100644
--- a/spice-vdagentd.sh
+++ b/spice-vdagentd.sh
@@ -24,7 +24,7 @@
# Source function library.
. /etc/rc.d/init.d/functions
-exec="/sbin/spice-vdagentd"
+exec="/usr/sbin/spice-vdagentd"
prog="spice-vdagentd"
port="/dev/virtio-ports/com.redhat.spice.0"
--
1.7.3.1

View File

@ -1,28 +0,0 @@
From c337c0b89c23395679accd8e24dea703fc21aa66 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 1 Nov 2010 16:17:20 +0100
Subject: [PATCH 2/2] Only start spice-vdagentd in runlevel 5
Having it in runlevels without X is not useful
---
spice-vdagentd.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spice-vdagentd.sh b/spice-vdagentd.sh
index 0a62c2b..a74bb63 100644
--- a/spice-vdagentd.sh
+++ b/spice-vdagentd.sh
@@ -13,8 +13,8 @@
# Required-Stop: $local_fs messagebus
# Should-Start: $local_fs messagebus
# Should-Stop: $local_fs messagebus
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
+# Default-Start: 5
+# Default-Stop: 0 1 2 3 4 6
# Short-Description: Agent daemon for Spice guests
# Description: Together with a per X-session agent process the spice agent
# daemon enhances the spice guest user experience with client
--
1.7.3.1

View File

@ -1,27 +0,0 @@
From 1d9465f8822f3e241c8c22c862c873e37b49fb1b Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 8 Nov 2010 22:48:16 +0100
Subject: [PATCH] sysv initscript: fix lsb header multi line description
---
spice-vdagentd.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spice-vdagentd.sh b/spice-vdagentd.sh
index a74bb63..119a61a 100644
--- a/spice-vdagentd.sh
+++ b/spice-vdagentd.sh
@@ -17,8 +17,8 @@
# Default-Stop: 0 1 2 3 4 6
# Short-Description: Agent daemon for Spice guests
# Description: Together with a per X-session agent process the spice agent
-# daemon enhances the spice guest user experience with client
-# mouse mode, guest <-> client copy and paste support and more.
+# daemon enhances the spice guest user experience with client
+# mouse mode, guest <-> client copy and paste support and more.
### END INIT INFO
# Source function library.
--
1.7.3.2

View File

@ -1,91 +0,0 @@
From 1fe607610ae2f7477d22784c8bf28453df25efbc Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 19 Nov 2010 11:52:47 +0100
Subject: [PATCH] Put the pid and log files into their own subdir
This makes it easier to write an selinux policy for spice-vdagent and allows
for adding extra logfiles / sockets in the future without needing a policy
change.
---
Makefile | 2 ++
spice-vdagentd.sh | 7 ++++---
vdagentd.c | 4 ++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 0f3586e..3c5d8c9 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ initdir ?= /etc/rc.d/init.d
xdgautostartdir ?= /etc/xdg/autostart
gdmautostartdir ?= /usr/share/gdm/autostart/LoginWindow
socketdir ?= /var/run/spice-vdagentd
+logdir ?= /var/log/spice-vdagentd
CFLAGS ?= -O2 -g -Wall
CPPFLAGS = $(shell pkg-config --cflags spice-protocol)
@@ -21,6 +22,7 @@ install: build
install -d $(DESTDIR)$(bindir)
install -d $(DESTDIR)$(sbindir)
install -d $(DESTDIR)$(socketdir)
+ install -d $(DESTDIR)$(logdir)
install -p -m 755 spice-vdagent $(DESTDIR)$(bindir)
install -p -m 755 spice-vdagentd $(DESTDIR)$(sbindir)
install -d $(DESTDIR)$(initdir)
diff --git a/spice-vdagentd.sh b/spice-vdagentd.sh
index 119a61a..1ff2015 100644
--- a/spice-vdagentd.sh
+++ b/spice-vdagentd.sh
@@ -27,6 +27,7 @@
exec="/usr/sbin/spice-vdagentd"
prog="spice-vdagentd"
port="/dev/virtio-ports/com.redhat.spice.0"
+pid="/var/run/spice-vdagentd/spice-vdagentd.pid"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
@@ -38,7 +39,7 @@ start() {
# In case the previous running vdagentd crashed
rm -f /var/run/spice-vdagentd/spice-vdagent-sock
echo -n $"Starting $prog: "
- daemon $exec $SPICE_VDAGENTD_EXTRA_ARGS
+ daemon --pidfile $pid $exec $SPICE_VDAGENTD_EXTRA_ARGS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@@ -47,7 +48,7 @@ start() {
stop() {
echo -n $"Stopping $prog: "
- killproc $prog
+ killproc -p $pid $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
@@ -69,7 +70,7 @@ force_reload() {
rh_status() {
# run checks to determine if the service is running or use generic status
- status $prog
+ status -p $pid $prog
}
rh_status_q() {
diff --git a/vdagentd.c b/vdagentd.c
index 47ec963..0215c78 100644
--- a/vdagentd.c
+++ b/vdagentd.c
@@ -45,8 +45,8 @@ struct agent_data {
};
/* variables */
-static const char *logfilename = "/var/log/spice-vdagentd.log";
-static const char *pidfilename = "/var/run/spice-vdagentd.pid";
+static const char *logfilename = "/var/log/spice-vdagentd/spice-vdagentd.log";
+static const char *pidfilename = "/var/run/spice-vdagentd/spice-vdagentd.pid";
static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
static const char *uinput_device = "/dev/uinput";
static int debug = 0;
--
1.7.3.2

View File

@ -1,28 +0,0 @@
From a167b3f8945d07137c98d4ee6c2d512d5bc0cdbd Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 10 Jan 2011 19:31:35 +0100
Subject: [PATCH] sysv initscript: exit cleanly when not running under spice
Exit with an exit code of 0 (iow everything ok), rather then 6 (lsb:
program not configured) when started while not running under a spice
enabled vm.
---
spice-vdagentd.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/spice-vdagentd.sh b/spice-vdagentd.sh
index 1ff2015..f901398 100644
--- a/spice-vdagentd.sh
+++ b/spice-vdagentd.sh
@@ -35,7 +35,7 @@ lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
- [ -c $port ] || exit 6
+ [ -c $port ] || exit 0
# In case the previous running vdagentd crashed
rm -f /var/run/spice-vdagentd/spice-vdagent-sock
echo -n $"Starting $prog: "
--
1.7.3.2

View File

@ -1,28 +0,0 @@
From aca540ccae12fbc5194410accd71a5ab384473ce Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 7 Mar 2011 14:59:56 +0100
Subject: [PATCH] Allow changing the resolution through the agent on multi monitor setups
Rather then refusing to use the monitor config send by the client at
all for multi monitor clients, simply take the info from the first monitor.
---
vdagent-x11.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/vdagent-x11.c b/vdagent-x11.c
index 11e9c45..2bf5cd1 100644
--- a/vdagent-x11.c
+++ b/vdagent-x11.c
@@ -805,8 +805,7 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11,
if (mon_config->num_of_monitors != 1) {
fprintf(x11->errfile,
- "Only 1 monitor supported, ignoring monitor config\n");
- return;
+ "Only 1 monitor supported, ignoring additional monitors\n");
}
sizes = XRRSizes(x11->display, x11->screen, &num_sizes);
--
1.7.3.2

View File

@ -1 +1 @@
dca976a6a92744462e1aed101f4ea467 spice-vdagent-0.6.3.tar.bz2
0695e200494612a2da770e34297d86ee spice-vdagent-0.8.0.tar.bz2

View File

@ -1,18 +1,11 @@
Name: spice-vdagent
Version: 0.6.3
Release: 6%{?dist}
Version: 0.8.0
Release: 1%{?dist}
Summary: Agent for Spice guests
Group: Applications/System
License: GPLv3+
URL: http://spice-space.org/
Source0: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2
# Some small fixes from upstream git
Patch0: 0001-Install-spice-vdagentd-in-usr-sbin-not-sbin.patch
Patch1: 0002-Only-start-spice-vdagentd-in-runlevel-5.patch
Patch2: 0003-sysv-initscript-fix-lsb-header-multi-line-descriptio.patch
Patch3: 0004-Put-the-pid-and-log-files-into-their-own-subdir.patch
Patch4: 0005-sysv-initscript-exit-cleanly-when-not-running-under-.patch
Patch5: 0006-Allow-changing-the-resolution-through-the-agent-on-m.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: dbus-devel spice-protocol libXrandr-devel libXfixes-devel
BuildRequires: desktop-file-utils
@ -37,16 +30,11 @@ Features:
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
%configure
make %{?_smp_mflags}
%install
@ -76,6 +64,7 @@ fi
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README TODO
%{_sysconfdir}/tmpfiles.d/spice-vdagentd.conf
%{_initddir}/spice-vdagentd
%{_bindir}/spice-vdagent
%{_sbindir}/spice-vdagentd
@ -88,6 +77,9 @@ fi
%changelog
* Tue Apr 19 2011 Hans de Goede <hdegoede@redhat.com> 0.8.0-1
- New upstream release 0.8.0
* Mon Mar 07 2011 Hans de Goede <hdegoede@redhat.com> 0.6.3-6
- Fix setting of the guest resolution from a multi monitor client