summaryrefslogtreecommitdiff
path: root/app-emulation/spice-vdagent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emulation/spice-vdagent
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emulation/spice-vdagent')
-rw-r--r--app-emulation/spice-vdagent/Manifest9
-rw-r--r--app-emulation/spice-vdagent/files/spice-vdagent-0.17.0-add-missing-stub-function.patch18
-rw-r--r--app-emulation/spice-vdagent/files/spice-vdagent.confd-211
-rw-r--r--app-emulation/spice-vdagent/files/spice-vdagent.initd-260
-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.ebuild63
7 files changed, 236 insertions, 0 deletions
diff --git a/app-emulation/spice-vdagent/Manifest b/app-emulation/spice-vdagent/Manifest
new file mode 100644
index 000000000000..b4e3fca41fea
--- /dev/null
+++ b/app-emulation/spice-vdagent/Manifest
@@ -0,0 +1,9 @@
+AUX spice-vdagent-0.17.0-add-missing-stub-function.patch 418 SHA256 6e20aea4121370d809253bcc4d44bdbee0725d0f7d16ed9f47aa96a59cc096b7 SHA512 eaca4fe895bb749406f712fb4a04a2be82cbf199f064d11f915fe233cc7c52a381c217a78ac723d63c1625cffe40fc8b8d404cc414b2add3579d37eb70a7b8a8 WHIRLPOOL 9e5114e56a9cf94a956ec2072d11927326e7d51ccebc3d382bc3cceb69a9e61f7eacb2e582ebf1a7c18920b6443b7a0b0b2ef8429212381adfaa673038d60227
+AUX spice-vdagent.confd-2 314 SHA256 50dc90de28c68dc95000b88c9e00d01dc9d3fc338c93dc9540e0b01d40b90ae6 SHA512 ef3e02c65dd83ed0d4b1eaad9c6000a9d5d53fbbf2c19fe9604583f85478c92276b3b80554bd1573af6866e242c484f02da5c3500c0b4c430d3af0de755eed38 WHIRLPOOL f19f18e5f63471c3d34a79a66cef76405a5ee6ef66845e61367f31ba1399c71e620d071f98dd0b249572adf4caa9195303fca8ac8cd6450cf263fed203a817c8
+AUX spice-vdagent.initd-2 1483 SHA256 4d43a431bcdbadab7c920f59233105bfa8b0f0041617993a5f1241c2619fb49c SHA512 520b341b4b0a960d4577897d6a0875567375a92521e8f3ead44dd51eaf5df1238d316ed157e19fae3e28b34bcb98599deb7d13734e606dd2a5a9bfddb06e690a WHIRLPOOL 387c6eb5f748f5947239f0add3feeceeb43f6a5826b03d0adc3e24313dfbded909a1de130cc5441b7fcb1351640732cbc2d7c9a51c5b900b8f34979b40396741
+AUX spice-vdagent.initd-3 1475 SHA256 4773d918016d0ad862b2c2ed0a58b8d40b397988639bb6be168aa1316eb808d8 SHA512 11e61f5cd8081231318248e332f081e43a36fb2315c70d52e436e83a14f1fca5ee4ddd8016e8c9d639cdafe69c3e5f360fb66dc2405f0d45f817130221ece516 WHIRLPOOL f99f6690b28aebc986451dac86a7164dfdd4b626338f0812686f5edda64e0c4d2fd1bbdcf62f011e9cd4cc0e9e1b519d871fbdfb869d00ca75ca9565f7a85861
+DIST spice-vdagent-0.17.0.tar.bz2 130413 SHA256 f14a8bd8cdee10641aabd9ba32461a5844eab0fddb2a10c1d31386e7a9f7b33d SHA512 b26e44f6463ba70d5815956b301cc2351db22de41ed2ce8b2828d9bfa1cc581c86acd433f8f0d35d552d20f6ca140f88fa39b079ba26e9166dc07ad35bee502e WHIRLPOOL b83d034897c0a9ebc224072214081847ab0276edde82ad0d94d107421971fe64afc03ba3f7464735911fd57cf7a05b0cfcb0ecbb32eb4d55adc8abcf23fe8d09
+EBUILD spice-vdagent-0.17.0.ebuild 1529 SHA256 82608474e03c411dbe21e729f16f6915fdcb0b65459ee6d958873e2564c7083a SHA512 a9f36bec7245932f69e0c6c24055288667d0ceb8a6e99ad389ed913b746b19c12e288fdd7d5f9e07bab558b51c47c89b1a1b6e48d00019db23cf9b2bfce475a1 WHIRLPOOL 4574a54fcb2635b1427a8b562be55f1705c84b6adeeea96a0ccbc7b273c44811b3acbb8f9866cb3555e6378a799b9341a8c5c41f0ef8b51a8598ec745e4cbcd6
+MISC ChangeLog 4523 SHA256 c1861cf8df88cd525433f0b0c0f799e2aebebbdd9d30bf6b959115701741465b SHA512 b83ba7cffd1fce72caeda88c7fbb24b65151d81b42d31b57f1256644581d3320dc2da9a3ca06ac290b36739ab2424af5c522578a37f842f342f1c5694b7acce6 WHIRLPOOL d685b7311bf6990ab0653da48bd9336ae0eb1f79f1294d4310fdd0fcbdb56e94c1f4a0fc0567d2241f8b5a29475780ee19546b6de3d0f7202901cc6b6918b919
+MISC ChangeLog-2015 2822 SHA256 5e55c7a39724d6b9e54e76f7a47f811ac1fa4770771e00aa8777ea5687fae423 SHA512 cff2bed019c84260699f8365856391b26040f1d210512df974b6c9000966e4da3d32e814f2881d9fba72d6cf9128d9b528eb025d6838c730abcfe9a6f5e85c42 WHIRLPOOL 5ec239ba0f68740641e4bf1f17d4dd2ea29d21bda01aecea1bfac58171ff9d20fe3c7fcb8f110bb1f2cc66bdb20e0f46ca9efd12b2daf5004586a001f79947f5
+MISC metadata.xml 557 SHA256 4424218cc2011d8638e59ebf24632fd8ceae77b8e2a41f1fd93066fa35f61a04 SHA512 1f3892771740224f1275a9eb3507e1ac32be745340b50f983383e6b09e69de75d2e0562fd13465a588d08a4d049d0b33b233ada1a3a9883e1ee24c431fa7e236 WHIRLPOOL 9e7ecd059341ca072b105d6d25a592bdac27b71691d362a9178cc961defe00fd6a5e14668d79519cbe021f5f35c9935442c013dcd8a9ed0889ceafcd04ade71c
diff --git a/app-emulation/spice-vdagent/files/spice-vdagent-0.17.0-add-missing-stub-function.patch b/app-emulation/spice-vdagent/files/spice-vdagent-0.17.0-add-missing-stub-function.patch
new file mode 100644
index 000000000000..1d68ed53565f
--- /dev/null
+++ b/app-emulation/spice-vdagent/files/spice-vdagent-0.17.0-add-missing-stub-function.patch
@@ -0,0 +1,18 @@
+Add missing stub function to prevent underlinking error.
+Patch provided by Pat Erley
+See also: https://bugs.gentoo.org/show_bug.cgi?id=585994
+
+--- a/src/dummy-session-info.c
++++ b/src/dummy-session-info.c
+@@ -50,6 +50,11 @@
+ return FALSE;
+ }
+
++gboolean session_info_session_is_locked(struct session_info *ck)
++{
++ return FALSE;
++}
++
+ gboolean session_info_is_user(struct session_info *si)
+ {
+ return TRUE;
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-2 b/app-emulation/spice-vdagent/files/spice-vdagent.initd-2
new file mode 100644
index 000000000000..a3194d5c1852
--- /dev/null
+++ b/app-emulation/spice-vdagent/files/spice-vdagent.initd-2
@@ -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} && -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/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.ebuild b/app-emulation/spice-vdagent/spice-vdagent-0.17.0.ebuild
new file mode 100644
index 000000000000..92f797d2746a
--- /dev/null
+++ b/app-emulation/spice-vdagent/spice-vdagent-0.17.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit linux-info
+
+DESCRIPTION="SPICE VD Linux Guest Agent"
+HOMEPAGE="https://www.spice-space.org/"
+SRC_URI="https://www.spice-space.org/download/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+consolekit selinux systemd"
+
+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=( "${FILESDIR}"/${PN}-0.17.0-add-missing-stub-function.patch )
+
+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}"
+}