X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 85F39DCD328 for ; Mon, 20 Apr 2015 11:17:30 +0000 (UTC) Received: from apollo.thewebhostserver.com (apollomail.thewebhostserver.com [46.23.65.248]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 5133FDCD36C for ; Mon, 20 Apr 2015 11:17:25 +0000 (UTC) Received: from [81.4.121.188] (port=55514 helo=localhost.localdomain) by apollo.thewebhostserver.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.85) (envelope-from ) id 1Yk9ha-0043Og-AP; Mon, 20 Apr 2015 12:17:22 +0100 From: Stuart Cardall To: alpine-aports@lists.alpinelinux.org Cc: Stuart Cardall Subject: [alpine-aports] [PATCH 20/20] testing/spice-vdagent: fix copy / paste functionality Date: Mon, 20 Apr 2015 11:14:34 +0000 Message-Id: <1429528474-98979-4-git-send-email-developer@it-offshore.co.uk> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1429528474-98979-1-git-send-email-developer@it-offshore.co.uk> References: <1429528474-98979-1-git-send-email-developer@it-offshore.co.uk> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - apollo.thewebhostserver.com X-AntiAbuse: Original Domain - lists.alpinelinux.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - it-offshore.co.uk X-Get-Message-Sender-Via: apollo.thewebhostserver.com: authenticated_id: developer@it-offshore.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This patch adds an init script for copy & paste functionality between the guest & host. Run 'rc-service spice-vdagentd info' for details on the settings for libvirt. By default this runs with a single session possible. For multiple sessions remove '-X' to disable consolekit from the init script & install slim or lxdm. Tested on 32 & 64 bit KVM - but should also work on XEN / LXC run by libvirt. --- testing/spice-vdagent/APKBUILD | 23 +++-- .../fix-memcpy-memset-implicit-declaration.patch | 11 +++ testing/spice-vdagent/spice-vdagentd.initd | 97 ++++++++++++++++++++++ 3 files changed, 125 insertions(+), 6 deletions(-) create mode 100644 testing/spice-vdagent/fix-memcpy-memset-implicit-declaration.patch create mode 100644 testing/spice-vdagent/spice-vdagentd.initd diff --git a/testing/spice-vdagent/APKBUILD b/testing/spice-vdagent/APKBUILD index feb52cf..656e251 100644 --- a/testing/spice-vdagent/APKBUILD +++ b/testing/spice-vdagent/APKBUILD @@ -8,11 +8,14 @@ arch="all" license="GPLv3+" depends="" depends_dev="" -makedepends="$depends_dev glib-dev spice-protocol libpciaccess-dev - libxrandr-dev libxinerama-dev libxfixes-dev" +makedepends="$depends_dev glib-dev spice-protocol libpciaccess-dev dbus-dev + libxrandr-dev libxinerama-dev libxfixes-dev linux-headers" install="" subpackages="$pkgname-doc" -source="http://spice-space.org/download/releases/spice-vdagent-$pkgver.tar.bz2" +source="http://spice-space.org/download/releases/spice-vdagent-$pkgver.tar.bz2 + "$pkgname"d.initd + fix-memcpy-memset-implicit-declaration.patch + " _builddir="$srcdir"/spice-vdagent-$pkgver prepare() { @@ -43,8 +46,16 @@ package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la + install -m755 -D "$srcdir/$pkgname"d.initd \ + "$pkgdir"/etc/init.d/"$pkgname"d || return 1 } -md5sums="2919ac7a4195b0b4b2588fae90a9241c spice-vdagent-0.15.0.tar.bz2" -sha256sums="5bae1747307c2f4195f6de97639391be7c6be6c5673fdcc9febed6faca22bd34 spice-vdagent-0.15.0.tar.bz2" -sha512sums="7d3bdeca2a8a5a63f817c8b0c1c46508e3238e0d2f3a018e44ffa4c7a2b7d0e82b0a2c37a6f35c59fcb23d89de82312edb689dc1de6fdf659004e640b900f436 spice-vdagent-0.15.0.tar.bz2" +md5sums="2919ac7a4195b0b4b2588fae90a9241c spice-vdagent-0.15.0.tar.bz2 +c707c8127d647a9f5e2c99cd213dc0b3 spice-vdagentd.initd +083cdf808a24d1855d09a93a52dbeccd fix-memcpy-memset-implicit-declaration.patch" +sha256sums="5bae1747307c2f4195f6de97639391be7c6be6c5673fdcc9febed6faca22bd34 spice-vdagent-0.15.0.tar.bz2 +b61b09be015148dbaeb2047b1da9e96163920e34176cd6507d7d3cb9f872e083 spice-vdagentd.initd +69bbdffc46bd247f5fdee84e8a06d86b0a59e8dc53e9dc5eb0fd8055d87b9323 fix-memcpy-memset-implicit-declaration.patch" +sha512sums="7d3bdeca2a8a5a63f817c8b0c1c46508e3238e0d2f3a018e44ffa4c7a2b7d0e82b0a2c37a6f35c59fcb23d89de82312edb689dc1de6fdf659004e640b900f436 spice-vdagent-0.15.0.tar.bz2 +322a72ebfa978366e04b2aec49258fda2f2535fa21470a5c0a7e41a295b61dc57f657270836be99733e0111dc2b2da6c005d05f93dcf592bb280284b080b25c1 spice-vdagentd.initd +381f974580aa478a9c0a35d7e6cc5bee57903f47929dea143ee2ddda9952d4b3ed6180a2b2e90ef83b01425d46507ea18bba01c42d32739fd0cc85bcbac59537 fix-memcpy-memset-implicit-declaration.patch" diff --git a/testing/spice-vdagent/fix-memcpy-memset-implicit-declaration.patch b/testing/spice-vdagent/fix-memcpy-memset-implicit-declaration.patch new file mode 100644 index 0000000..ad0de92 --- /dev/null +++ b/testing/spice-vdagent/fix-memcpy-memset-implicit-declaration.patch @@ -0,0 +1,11 @@ +--- spice-vdagent-0.15.0/src/udscs.c ++++ spice-vdagent-0.15.0/src/udscs.c.new +@@ -26,6 +26,7 @@ + + #include + #include ++#include + #include + #include + #include + diff --git a/testing/spice-vdagent/spice-vdagentd.initd b/testing/spice-vdagent/spice-vdagentd.initd new file mode 100644 index 0000000..904908d --- /dev/null +++ b/testing/spice-vdagent/spice-vdagentd.initd @@ -0,0 +1,97 @@ +#!/sbin/runscript + +# This file is part of spice-vdagent +# by Stuart Cardall + +sockfile="/var/run/spice-vdagentd/spice-vdagent-sock" +pidfile="/var/run/spice-vdagentd/spice-vdagentd.pid" +command="/usr/sbin/spice-vdagentd" +command_args="-X" +msgfile=/tmp/spice-vdagent.msg +extra_commands="info" + +MODULES="uinput" + +depend() { + need net + need logger +} + +start_pre() { + # make sure dir for pidfile exists. /var/run is tmpfs... + checkpath --directory ${pidfile%/*} + # load userspace input driver for copy & paste support + ebegin "Loading uinput kernel module for ${SVCNAME}" + for mod in $MODULES; do + modprobe -q $mod + done + eend $? + rm -f $sockfile +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start $command --pidfile $pidfile -- $command_args + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile $pidfile + eend $? "Failed to stop ${SVCNAME}" + ebegin "Unloading uinput kernel module for ${SVCNAME}" + for mod in $MODULES; do + rmmod $mod + done + eend $? + rm -f $sockfile +} + +info() { + cat > $msgfile < + +
+ + + + + + + + + + + + + + + + + +