diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2012-07-28 22:00:05 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2012-07-28 22:00:05 +0000 |
commit | 17c34fa315fb28bf5beede5b65f45f97302abc43 (patch) | |
tree | 63891d09f12e9343f2f645dfa93c6800d68c5743 /app-emulation/qemu-guest-agent | |
parent | Remove CONFIG_PREEMPT_VOLUNTARY restriction (diff) | |
download | historical-17c34fa315fb28bf5beede5b65f45f97302abc43.tar.gz historical-17c34fa315fb28bf5beede5b65f45f97302abc43.tar.bz2 historical-17c34fa315fb28bf5beede5b65f45f97302abc43.zip |
Add separate ebuild for the QEMU guest agent so it can be used when Gentoo is a guest instead of installing the all of QEMU for just the guest.
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/qemu-guest-agent')
9 files changed, 158 insertions, 0 deletions
diff --git a/app-emulation/qemu-guest-agent/ChangeLog b/app-emulation/qemu-guest-agent/ChangeLog new file mode 100644 index 000000000000..158b725e7b4f --- /dev/null +++ b/app-emulation/qemu-guest-agent/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for app-emulation/qemu-guest-agent +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-guest-agent/ChangeLog,v 1.1 2012/07/28 22:00:05 cardoe Exp $ + +*qemu-guest-agent-1.1.1 (28 Jul 2012) + + 28 Jul 2012; Doug Goldstein <cardoe@gentoo.org> + +qemu-guest-agent-1.1.1.ebuild, +files/qemu-ga.conf, +files/qemu-ga.init, + +files/qemu-ga.logrotate, +files/qemu-ga-systemd.service, + +files/qemu-ga-systemd.udev, +metadata.xml: + Add separate ebuild for the QEMU guest agent so it can be used when Gentoo is + a guest instead of installing the all of QEMU for just the guest. + diff --git a/app-emulation/qemu-guest-agent/Manifest b/app-emulation/qemu-guest-agent/Manifest new file mode 100644 index 000000000000..1055b473d158 --- /dev/null +++ b/app-emulation/qemu-guest-agent/Manifest @@ -0,0 +1,9 @@ +AUX qemu-ga-systemd.service 227 SHA256 0ceef6a004c0e3499124a09e497f8d2a3ce102301706319daa28e8e9aea617dd SHA512 73e3d531aa3de794bc851dcccc6c1f0495a7c94070bd3c1499abbc98dcd8a5017bc1a77f357ff7b81c2abfb8c0378d1b4da2f832a3e45725fab19bcd07216ad1 WHIRLPOOL 5abf158c1830123105e5e4449fe7e8bb63dc6851986451116b665227a73bdc7cc28dbeb3c3caf93210eda722c245b8dc734c43f22fb9d08b81e0e35ea742d9d6 +AUX qemu-ga-systemd.udev 129 SHA256 c57934919d7ea39c04604374d8256d4f434ecba65f8063c6fd1927ee6d709ed6 SHA512 14d47e55987d4e06712ccb7192cd03bdcdd887ce42473558fceff6eee7bafdadae953f08f8cf7facdfc4b340d4b47d75ebaae1ef5696de994cf0c224b8726edb WHIRLPOOL 84d3c1f6389b965cafc43e3c3fdfad59f9b2d68b65d7879b8659a3b0871684a8d35081c700193df2696bf5c3bddce00efa8da647a38c41c42f3182436db08536 +AUX qemu-ga.conf 311 SHA256 d84e53a94584f37f3bd1b21f44077b5de0d07094c6729f26ae20ab1f7b9cc298 SHA512 d90c034cae3f9097466854ed1a9f32ab4b02089fcdf7320e8f4da13b2b1ff65067233f48809911485e4431d7ec1a22448b934121bc9522a2dc489009e87e2b1f WHIRLPOOL 83c93123a4bd64b4ae41c30dcbece3d524bffd9eee7e26dd4045aa74a026713b10309019a7bc57237431870b9901a7cd5b24f3888718c3db74f655291eef896d +AUX qemu-ga.init 728 SHA256 0b7cca62d2adc56769e6872d27137dbbe465166d261e64b14744ab9f698bd4f5 SHA512 1d036c7a208e7b0c9740306bd09a05d3b71321251bc80026bbec71e4440434ec8f797e28200e36d5fc1b5673db6d1c63c13170b40f03dcc488caf84f91668500 WHIRLPOOL 71a94af28c123abc7ba6be36df29c229a4278c116682e87b07d6068cf1e2ed6eabf897f18d64dbc62a12e6768faab169e8e8681eef4aba40bdecb6dc1d1a1596 +AUX qemu-ga.logrotate 128 SHA256 9332aeb8f09814fbdbdff8bfb6e6784bf8031a17cba08e8490060fb87f8f024c SHA512 0fb39dd7ee528b36d8e837fbc53ba69476ba83947a4df10a9df03a02861a37d21f53865adbd3050c24aad72ec8a8bee1fb33f7382213d855884aff109f3c3789 WHIRLPOOL 6d715ed34541254a2d69943805d29e15f11a7c0ebaa30a47e090787f26640b3d64e2d48892e66c094593cc9f9d8ff37c788542c180d8bc5b9a2573b832b18cca +DIST qemu-kvm-1.1.1.tar.gz 6599376 SHA256 c6fab57ccadcad5deb34728623840a0141a0f3c8f29d0c253db577f059c796df SHA512 1106a35212cdac1fe5b043af6754595d03232f22bf74cdab86973759adb3cff2d3d7b42290883d2d99d97d163fe274de0108a05eed906ffdc3349c0631f52492 WHIRLPOOL 4d9b2b788a7f87104032635b3b6e2cd96275b92683e3003510b0951536ed6bcb959959bc7529e3f912a7a2055b5c1710b9310d591a8b443a17a231e5b86f6105 +EBUILD qemu-guest-agent-1.1.1.ebuild 1600 SHA256 6c0570cd555aaefdf986b1e59a9b4de0d2572cf2857711da16d7136da49c9bca SHA512 808e3ae2e9bbdeff83601ec2667dfab115aad6e1d587210dc8af86ef51b8e6780ec384cde4c0d7bff8b2989407635e74c99e6af63757962a76058899333e077e WHIRLPOOL 7689d7737fad893cf7e741f66fc46f734747abebaf7d2f2070962d182b031f566e6ba754f678a20dfe7c16a163aed6aa5ab366a7f6186cb99fe51948d7d5c00f +MISC ChangeLog 653 SHA256 9fd2b95dd026d8d1d3e0d3260711d38fd52a474f7770a9339d6bfdd65183a673 SHA512 781256a55b1e542a6bd2aa5c36f40812e0c98148a5a5402e677ce0cfb6e3b7f1a7f94825af3cc7a835afaffec174baf9ddcca6edced81ee0a4e47e108f25d0dc WHIRLPOOL 3fefeec87753fd67c294c0df0fc8662758da8ead8efce441d94c626255e6b438d7f3471b457fd405c5789f5c0976d60081f555cc62e1df93d2353448611375a6 +MISC metadata.xml 250 SHA256 10b9e945ef8bfa38f795b51e2914b0c4b2c8a6a315bd9cc00181714f48039ee6 SHA512 74fdba3406d2193fc37175e4e413b5debc01a68a5299b3023ec6151d3a03bc7794798a9e46b0f3bd7bc2687edf364a344bc60fdb8f20b6a46b9fe82c27975d0c WHIRLPOOL 37679ae4d3e6652a89c50e06fa70280793b555b131b28714e424354caecaec4bb6954f087b8207abd8ad318732ef55195734397b960e5342dea4ea5b4810b005 diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service b/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service new file mode 100644 index 000000000000..51cd7b37ff79 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service @@ -0,0 +1,11 @@ +[Unit] +Description=QEMU Guest Agent +BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device +After=dev-virtio\x2dports-org.qemu.guest_agent.0.device + +[Service] +ExecStart=-/usr/bin/qemu-ga +Restart=always +RestartSec=0 + +[Install] diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev b/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev new file mode 100644 index 000000000000..ce5819597877 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev @@ -0,0 +1,2 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ + TAG+"systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga.conf b/app-emulation/qemu-guest-agent/files/qemu-ga.conf new file mode 100644 index 000000000000..228c0325444d --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga.conf @@ -0,0 +1,7 @@ +# Specifies the transport method used to communicate to QEMU on the host side +# Default: virtio-serial +#GA_METHOD="virtio-serial" + +# Specifies the device path for the communications back to QEMU on the host +# Default: /dev/virtio-ports/org.qemu.guest_agent.0 +#GA_PATH="/dev/virtio-ports/org.qemu.guest_agent.0" diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga.init b/app-emulation/qemu-guest-agent/files/qemu-ga.init new file mode 100644 index 000000000000..599673574b65 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga.init @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-guest-agent/files/qemu-ga.init,v 1.1 2012/07/28 22:00:05 cardoe Exp $ + +depend() { + +} + +start() { + GA_METHOD=${GA_METHOD:-virtio-serial} + GA_PATH=${GA_PATH:-/dev/virtio-ports/org.qemu.guest_agent.0} + + ebegin "Starting QEMU Guest Agent" + + start-stop-daemon --start --pidfile /var/run/qemu-ga.pid \ + --exec /usr/bin/qemu-ga -- -m ${GA_METHOD} -p ${GA_PATH} \ + -l /var/log/qemu-ga.log -d + + eend $? +} + +stop() { + ebegin "Stopping QEMU Guest Agent" + + start-stop-daemon --stop --pidfile /var/run/qemu-ga.pid + + eend $? +} diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate b/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate new file mode 100644 index 000000000000..ffcc477d3358 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate @@ -0,0 +1,9 @@ +/var/log/qemu-ga.log { + weekly + missingok + rotate 4 + compress + delaycompress + copytruncate + minsize 100k +} diff --git a/app-emulation/qemu-guest-agent/metadata.xml b/app-emulation/qemu-guest-agent/metadata.xml new file mode 100644 index 000000000000..a33a278324be --- /dev/null +++ b/app-emulation/qemu-guest-agent/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>qemu</herd> + <use> + <flag name='systemd'>Install SystemD init script instead of OpenRC</flag> + </use> +</pkgmetadata> + diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-1.1.1.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-1.1.1.ebuild new file mode 100644 index 000000000000..31da731f9b1d --- /dev/null +++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-1.1.1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-guest-agent/qemu-guest-agent-1.1.1.ebuild,v 1.1 2012/07/28 22:00:05 cardoe Exp $ + +EAPI=4 + +inherit systemd + +MY_PN="qemu-kvm" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git" + inherit git-2 + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://sourceforge/kvm/${MY_PN}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" +fi + +DESCRIPTION="QEMU Guest Agent (qemu-ga) for use when running inside a VM" +HOMEPAGE="http://wiki.qemu.org/Features/QAPI/GuestAgent" + +LICENSE="GPL-2 BSD-2" +SLOT="0" +IUSE="systemd" + +DEPEND=">=dev-libs/glib-2.22" +RDEPEND="${DEPEND} + !app-emulation/qemu + !<app-emulation/qemu-kvm-1.1.1-r1" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + ./configure +} + +src_compile() { + emake qemu-ga +} + +src_install() { + dobin qemu-ga + + if ! use systemd; then + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf" qemu-guest-agent + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + else + # systemd stuff + insinto /lib/udev/rules.d/ + newins "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service + fi +} + +pkg_postinst() { + if ! use systemd; then + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" + fi +} |