summaryrefslogtreecommitdiff
path: root/app-emulation/spice-vdagent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/spice-vdagent
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/spice-vdagent')
-rw-r--r--app-emulation/spice-vdagent/Manifest6
-rw-r--r--app-emulation/spice-vdagent/files/spice-vdagent.confd-211
-rw-r--r--app-emulation/spice-vdagent/files/spice-vdagent.initd-360
-rw-r--r--app-emulation/spice-vdagent/metadata.xml15
-rw-r--r--app-emulation/spice-vdagent/spice-vdagent-0.17.0_p20180319-r1.ebuild75
5 files changed, 167 insertions, 0 deletions
diff --git a/app-emulation/spice-vdagent/Manifest b/app-emulation/spice-vdagent/Manifest
new file mode 100644
index 000000000000..06d3e07d2d0b
--- /dev/null
+++ b/app-emulation/spice-vdagent/Manifest
@@ -0,0 +1,6 @@
+AUX spice-vdagent.confd-2 314 BLAKE2B 93d93f9e03e3aba9d889703ad24d08401222cf9d4b5fd0e72001bd0c0cf261d9f6879d1d0a89b51fc34dee2b15729425c694aca5522b1918f01edeea9b38b536 SHA512 ef3e02c65dd83ed0d4b1eaad9c6000a9d5d53fbbf2c19fe9604583f85478c92276b3b80554bd1573af6866e242c484f02da5c3500c0b4c430d3af0de755eed38
+AUX spice-vdagent.initd-3 1475 BLAKE2B 0d39828bd5be6271e0d3f1f7262751e1bee263bb52c0d409f5e85c51ac69b2ed1f6fa1b0ea377cae0e2879ed7d0ae39b93219fc961ed34c3d1d42b771a452932 SHA512 11e61f5cd8081231318248e332f081e43a36fb2315c70d52e436e83a14f1fca5ee4ddd8016e8c9d639cdafe69c3e5f360fb66dc2405f0d45f817130221ece516
+DIST spice-vdagent-0.17.0-patches-20180319.tar.xz 38924 BLAKE2B c7c7f851d307cd7dde620278c6ea240d71f8b1f25d6367f81213c7e902d2b2c15f72c71344f965743a45b5693832a2937041ca7b5511ce1db479dafe137bc7b1 SHA512 8ac627f56605151aebc100a6c6d61243776662150095c768196d750929971f98f4b6d1a831cfb547d29ae8a6734795c93e51a9c4f27dcf53bd66aca6df437c51
+DIST spice-vdagent-0.17.0.tar.bz2 130413 BLAKE2B b2fb522f491512d94ac15fa8d253e8e682210ad40657eb9e5e40489eaab18c9f1d5ef5f97075a4389501050a758e1f56d47132de6b1c74bb153fc6b5e87a698d SHA512 b26e44f6463ba70d5815956b301cc2351db22de41ed2ce8b2828d9bfa1cc581c86acd433f8f0d35d552d20f6ca140f88fa39b079ba26e9166dc07ad35bee502e
+EBUILD spice-vdagent-0.17.0_p20180319-r1.ebuild 1684 BLAKE2B 061a8c3d2423b3824f4d86501a8fe7767c8cd55cbb4aa304ef087a6fcbf713ddfaba610c4261bdf40d495a261eee2347f814c554c959faf66c6b331adefdca6e SHA512 427881f201729f926372826cab0cb0ee2595c6340f3aa49a54bdb4b9ad9d641e42b8baf49c211ccaae9a03fbde832e7107cfbd7a06a9e9ecaef616a58f63a78a
+MISC metadata.xml 557 BLAKE2B 03e0f3f159d333513fb7a575b46ad91167fc30e96b4e982cdb2bf545f19a53982e82698b03b02df0dc7dbfb90d9d05aa155c56aa1dc2cf6a13153145fd4231b3 SHA512 1f3892771740224f1275a9eb3507e1ac32be745340b50f983383e6b09e69de75d2e0562fd13465a588d08a4d049d0b33b233ada1a3a9883e1ee24c431fa7e236
diff --git a/app-emulation/spice-vdagent/files/spice-vdagent.confd-2 b/app-emulation/spice-vdagent/files/spice-vdagent.confd-2
new file mode 100644
index 000000000000..763fdaf886d0
--- /dev/null
+++ b/app-emulation/spice-vdagent/files/spice-vdagent.confd-2
@@ -0,0 +1,11 @@
+# The virtual communication port provided by the hypervisor/vm
+# Default: /dev/virtio-ports/com.redhat.spice.0
+#PORT="/dev/virtio-ports/com.redhat.spice.0"
+
+# Userspace Input Device
+# Default: /dev/uinput or /dev/input/uinput
+#DEVICE=""
+
+# Extra arguments for spice-vdagentd
+# Default: none
+#SPICE_VDAGENT_ARGS=""
diff --git a/app-emulation/spice-vdagent/files/spice-vdagent.initd-3 b/app-emulation/spice-vdagent/files/spice-vdagent.initd-3
new file mode 100644
index 000000000000..255051192b15
--- /dev/null
+++ b/app-emulation/spice-vdagent/files/spice-vdagent.initd-3
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after dbus
+}
+
+PIDFILE="/var/run/spice-vdagentd/spice-vdagentd.pid"
+
+start() {
+ PORT="${PORT:-/dev/virtio-ports/com.redhat.spice.0}"
+ DEVICE="${DEVICE:-/dev/uinput}"
+
+ ebegin "Checking for required modules and devices"
+
+ if [ ! -d /sys/module/uinput ]; then
+ modprobe -q uinput
+ fi
+
+ if [ ! -d /sys/module/uinput ]; then
+ eerror "Module 'uinput' not loaded or not enabled in the kernel"
+ eend 1
+ return 1
+ fi
+
+ if [ ! -c "${PORT}" ] ; then
+ eerror "Required virtio port does not exist. Make sure you"
+ eerror "started the virtual machine with appropriate parameters."
+ eend 1
+ return 1
+ fi
+ eend 0
+
+ if [ ! -c ${DEVICE} -a -c /dev/input/uinput ]; then
+ DEVICE=/dev/input/uinput
+ fi
+
+ # recreate the directory since /var/run may reside on a ramdisk
+ mkdir -p /var/run/spice-vdagentd
+
+ # cleanup stalled socket
+ rm -f /var/run/spice-vdagentd/spice-vdagent-sock
+
+ ebegin "Starting spice VD agent daemon"
+ start-stop-daemon \
+ --start \
+ --pidfile "${PIDFILE}" \
+ --exec /usr/sbin/spice-vdagentd \
+ -- -u "${DEVICE}" ${SPICE_VDAGENT_ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping spice VD agent daemon"
+ start-stop-daemon \
+ --stop \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/app-emulation/spice-vdagent/metadata.xml b/app-emulation/spice-vdagent/metadata.xml
new file mode 100644
index 000000000000..50477de61e16
--- /dev/null
+++ b/app-emulation/spice-vdagent/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>virtualization@gentoo.org</email>
+ <name>Gentoo Virtualization Project</name>
+ </maintainer>
+ <use>
+ <flag name="consolekit">Use <pkg>sys-auth/consolekit</pkg> to determine the master vdagentd in case of multiple running vdagentds (highly recommended)</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-emulation/spice-vdagent/spice-vdagent-0.17.0_p20180319-r1.ebuild b/app-emulation/spice-vdagent/spice-vdagent-0.17.0_p20180319-r1.ebuild
new file mode 100644
index 000000000000..1b644dbfda11
--- /dev/null
+++ b/app-emulation/spice-vdagent/spice-vdagent-0.17.0_p20180319-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info
+
+MY_P="${P/_*/}"
+PATCHSET="${P/*_p/}"
+
+DESCRIPTION="SPICE VD Linux Guest Agent"
+HOMEPAGE="https://www.spice-space.org/"
+SRC_URI="https://www.spice-space.org/download/releases/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~tamiko/distfiles/${MY_P}-patches-${PATCHSET}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+consolekit selinux systemd"
+S="${WORKDIR}/${MY_P}"
+
+CDEPEND="
+ >=app-emulation/spice-protocol-0.12.8
+ media-libs/alsa-lib
+ >=x11-libs/libpciaccess-0.10
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libX11
+ x11-libs/libXinerama
+ consolekit? ( sys-auth/consolekit sys-apps/dbus )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-vdagent )"
+
+CONFIG_CHECK="~INPUT_UINPUT ~VIRTIO_CONSOLE"
+ERROR_INPUT_UINPUT="User level input support (INPUT_UINPUT) is required"
+ERROR_VIRTIO_CONSOLE="VirtIO console/serial device support (VIRTIO_CONSOLE) is required"
+
+PATCHES=(
+ "${WORKDIR}"/patches
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local opt=()
+ if use consolekit; then
+ opt+=( --with-session-info=console-kit )
+ elif use systemd; then
+ opt+=( --with-session-info=systemd )
+ else
+ opt+=( --with-session-info=none )
+ fi
+
+ econf \
+ --with-init-script=systemd \
+ --localstatedir="${EPREFIX}"/var \
+ "${opt[@]}"
+}
+
+src_install() {
+ default
+
+ cd "${ED}" && rmdir -p var/run/spice-vdagentd || die
+
+ keepdir /var/log/spice-vdagentd
+
+ newinitd "${FILESDIR}/${PN}.initd-3" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd-2" "${PN}"
+}