diff options
Diffstat (limited to 'app-emulation/qemu-guest-agent')
12 files changed, 449 insertions, 0 deletions
diff --git a/app-emulation/qemu-guest-agent/Manifest b/app-emulation/qemu-guest-agent/Manifest new file mode 100644 index 000000000000..0ba73d9f0463 --- /dev/null +++ b/app-emulation/qemu-guest-agent/Manifest @@ -0,0 +1,17 @@ +AUX qemu-ga-systemd.service 227 SHA256 0ceef6a004c0e3499124a09e497f8d2a3ce102301706319daa28e8e9aea617dd SHA512 73e3d531aa3de794bc851dcccc6c1f0495a7c94070bd3c1499abbc98dcd8a5017bc1a77f357ff7b81c2abfb8c0378d1b4da2f832a3e45725fab19bcd07216ad1 WHIRLPOOL 5abf158c1830123105e5e4449fe7e8bb63dc6851986451116b665227a73bdc7cc28dbeb3c3caf93210eda722c245b8dc734c43f22fb9d08b81e0e35ea742d9d6 +AUX qemu-ga-systemd.udev 130 SHA256 ab34240fa8f3e8ce37ced642493184a610e187b2d9e5e15f1132975b9f076c43 SHA512 1035035a98790eead4ead347026baaf33b15eff37155210c6755ca9fa490f5dd276c4769f6d5626d6e42e99cbb3a5e2c13d8417a726830234327e83b0449667a WHIRLPOOL c0a2d18150ee771cd54e2dfd06bd597c2cfab786829f0b779044f954e6757d4febeb7f2c919c50e4ee06ab2fa8ddc105092f461a7c9e40a581f87a0ae67a7faf +AUX qemu-ga.conf-r1 452 SHA256 0b613b13273154847f4c93c4fc714021533bff68638730d809537f02385baf27 SHA512 c339ddad3e94e1cd009d9f6819b7fbaddda0c8d5ad7736704cdf8efd0f802df9b905c3529ecd2a1e5831bc8e9e6e7be94ac816097f97c92deb6a3816328dba39 WHIRLPOOL e8624a469e6ab581f63c7e3c46ec9477006750504331fb53fb449c4de63cc6f060ba2f3456ebd3364dbdacf071e51ded9e4ecad9135dbe614c5154f626a6b9bc +AUX qemu-ga.init-r1 624 SHA256 b05642aa865171b06bf9ac8ba5992e06d55648ceccb50ec21e1357248740f7f5 SHA512 820ae4b04b9eeb2c8ac6128544f764af67b4462cc98377ceb37708130a5cae118bd3ed892a945fb25234a8d73fb98e60dbf5da3a44861fc56f97b66a3f12532e WHIRLPOOL 3467924c4f2d6fdf9ad20c3e4470cebd865e9d7946039dc0742829dce0afe3ccc3af92d880f37f61979526cfa3daad14f6e2e91dc36da883226bf1872e36aa7b +AUX qemu-ga.logrotate 128 SHA256 9332aeb8f09814fbdbdff8bfb6e6784bf8031a17cba08e8490060fb87f8f024c SHA512 0fb39dd7ee528b36d8e837fbc53ba69476ba83947a4df10a9df03a02861a37d21f53865adbd3050c24aad72ec8a8bee1fb33f7382213d855884aff109f3c3789 WHIRLPOOL 6d715ed34541254a2d69943805d29e15f11a7c0ebaa30a47e090787f26640b3d64e2d48892e66c094593cc9f9d8ff37c788542c180d8bc5b9a2573b832b18cca +AUX qemu-guest-agent-2.5.0-sysmacros.patch 365 SHA256 c5b5905032b2384cf5a68ddb0c19d229f5a303d3278d4ac4ad386cf95b7d77c5 SHA512 a608a3d96f03c54fcccb7bcb354f0deec4bcb570f03b8ac9044ca5c6ee7a6252ae7cac05fb142d7c95feecfbb17e0499bbc1d6935c3e3e9ea7db319c4c11f6ad WHIRLPOOL 110821f136ae81b522947a7ed5fe59def066ccfef877f5e652fb869cc9235248ee820e35aae1d8375e17182ec3c908917d23472c420e8cb9704d8cc78955f99d +DIST qemu-2.5.0.tar.bz2 25464996 SHA256 3443887401619fe33bfa5d900a4f2d6a79425ae2b7e43d5b8c36eb7a683772d4 SHA512 12153f94cc7f834fd6a85f25690c36f2331d88d414426fb8b9ac20a34e6f9222b1eda30b727674af583580fae90dfd6d0614a905dce1567d94cd049d426b9dd3 WHIRLPOOL 8f5717989d8d234ecf1763ee386b2e1f20c3b17918de130c6dae255e4523a230b2b01a759eba25e4b9f604c680d9b868c56f58bd71b7c6c2c22a2e46804435ef +DIST qemu-2.6.0.tar.bz2 25755267 SHA256 c9ac4a651b273233d21b8bec32e30507cb9cce7900841febc330956a1a8434ec SHA512 0d17075e52f7688cc05776ad7a76509d1f22ae8eda896fddb06c1fd6dea6da485422c8efb3ba118b054d9a413b7b02baba656a9131658dabdb71def50c92b215 WHIRLPOOL f9373bf66f67301787e7510ac161b0072ba7c7bc067e10215fb97a52524adaba0fcbc79a4c0cefac9c6e2b4e07380eb9d10f65ed6ce6867e43843043684231ed +DIST qemu-2.8.1.tar.bz2 28366270 SHA256 018e4c7ed22c220395cf41f835d01505e49d0e579a548bd3d72b03809442bbcd SHA512 0397b4029cdcb77ed053c44b3579a3f34894038e6fc6b4aa88de14515f5a78bf2f41c5e865f37111529f567c85d2f1c4deefae47dde54f76eac79410e5b2bdda WHIRLPOOL c41f53f18fac44efd1c81ba9d95204d23e9a70dc9c21624177be2fe92a327428fd5704b25bc334229fa36ae395fb4c82ba3955db39719c4458343978a4d3141a +DIST qemu-2.9.0.tar.bz2 28720490 SHA256 00bfb217b1bb03c7a6c3261b819cfccbfb5a58e3e2ceff546327d271773c6c14 SHA512 4b28966eec0ca44681e35fcfb64a4eaef7c280b8d65c91d03f2efa37f76278fd8c1680e5798c7a30dbfcc8f3c05f4a803f48b8a2dfec3a4181bac079b2a5e422 WHIRLPOOL d79fe89eb271a56aee0cbd328e5f96999176b711afb5683d164b7b99d91e6dd2bfaf6e2ff4cd820a941c94f28116765cb07ffd5809d75c2f9654a67d56bfc0c1 +EBUILD qemu-guest-agent-2.5.0.ebuild 1892 SHA256 dff4cfded6e5b9e4c7175a363cb75fbb92699d18b38cd44dfd007e2775bd167b SHA512 22cadd91d2f585908581285c484b48c9b794169b63fb57fb353a5e7d35bde5ea3decae2cbce302d168b30932c1d75f7a24e77d95a220b12c871f18469d280b95 WHIRLPOOL 5dc39c494703b4d521e17410dbbb9622900a6f7f2257b899aa0de71336db5560f61117049fc21b0695cbccb11dbe150d52ac9ce0b04124bbaec3797745ea17f0 +EBUILD qemu-guest-agent-2.6.0.ebuild 1896 SHA256 392882e333f2bd4ee95dc873c5942a749c82217b9a405106af01d36553a96f84 SHA512 c8e7b73d7b54b845f3bc65362ab7f9f144b245fb6d2a74ca5a85d7c0ba89daf1e8538e200b4461272f59bdfc664cc9afc0c85d3ddc10144e3bdd867dc9391932 WHIRLPOOL f6fb91c1fde69cf1ce686d7f1d5a4cee7f21ad4366f311046cb23621c3e29d3e3e42dea313136b154a0d33b92301eb8febf14f4ad37746f9d21f3f6451706fb3 +EBUILD qemu-guest-agent-2.8.1.ebuild 1870 SHA256 ad33b66657f2afeb429517d9d59d32638f07be63fe2f6a174870be43ac1e14f7 SHA512 e254689f9926f81f323eeda81d162fcea9b22a7338a291036491c6a0261cb2e56d4b5284ce06d92b8d7ece770a0912b8ed582dc94648c330f1235556bb124a70 WHIRLPOOL c4ba6224f0f23f01600dbc55586b594fff9753d2915dd99e91280a428fa27d2de5eddd22f886d3a4e473e353f4b5c1a0a0733a39917f076c6b57157d5787dc36 +EBUILD qemu-guest-agent-2.9.0.ebuild 1870 SHA256 ad33b66657f2afeb429517d9d59d32638f07be63fe2f6a174870be43ac1e14f7 SHA512 e254689f9926f81f323eeda81d162fcea9b22a7338a291036491c6a0261cb2e56d4b5284ce06d92b8d7ece770a0912b8ed582dc94648c330f1235556bb124a70 WHIRLPOOL c4ba6224f0f23f01600dbc55586b594fff9753d2915dd99e91280a428fa27d2de5eddd22f886d3a4e473e353f4b5c1a0a0733a39917f076c6b57157d5787dc36 +MISC ChangeLog 5204 SHA256 f13cae569746e19a3c7cfac563e06462aacf6d670a2ee1a0bc22b1b0834d209e SHA512 36f55c7386c67367cb2d5ac7f5088e1ca8d994f5c885c7b197836c710713f9d4e6ed1f6982a2deb01009c04b181f087717b0b40db41c4e3bf0b7fa2d56fdc3ee WHIRLPOOL 73efb8a1d6ffb44f1e717599921b6824cdc856d3f810d07c515a6eaa08e4eda0a3589614f24c381cf3b249e4dc259ed38e7b7a4cb95c6347ffc4111c9d634b0b +MISC ChangeLog-2015 4832 SHA256 1fad5a1063bec302bc0ab1018fde27bc9c008f2b951e0f34f2a6f82f876fb5bb SHA512 3dba906cae2e94ba6ff9270cd998f2baf35f57adea449d71dba01b893d258ca0e75e34fcf6082d80e1d5ae51ebb17def65093b3207406f202a19a7165d1b8a4f WHIRLPOOL 35d0901089a82d90c8fcc05ec741b4b81a8684a21a39be564a07c9a72eff626871e72b7de3408254f6a030fa2c559395a3d3e33439bd21fe9dd164f49f98fe12 +MISC metadata.xml 251 SHA256 e1a6e78de44cc67cab2037d0450e2f22376c057e2a1f05fa095c45c40ba767c2 SHA512 7a5f4f7e0f89c87ab04103d4688e87d1560d63b3565dde0b6089f272ccf6c235e0d2ad31383a5171d425776c4a98b999eb5de420e42d1af8b80e76256b2c9297 WHIRLPOOL 6f27653731c8c73ddaf17f8d7cf53abdbf38c1d35e7458e8affe55ebcfbd87b310c61e6d116919018bfcc969ead44b8775571f509f774a8e05829523ecf645c9 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..8a290abbd3e3 --- /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-r1 b/app-emulation/qemu-guest-agent/files/qemu-ga.conf-r1 new file mode 100644 index 000000000000..a1a78df3dea0 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga.conf-r1 @@ -0,0 +1,11 @@ +# 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" + +# Additional options to qemu-guest-agent such as --fsfreeze-hook +# See qemu-ga --help for more info +#GA_OPTIONS="-F/etc/qemu/fsfreeze-hook" diff --git a/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 b/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 new file mode 100644 index 000000000000..f08c082709b3 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 /run/qemu-ga.pid \ + --exec /usr/bin/qemu-ga -- -m ${GA_METHOD} -p ${GA_PATH} \ + -l /var/log/qemu-ga.log -d -f /run/qemu-ga.pid -t /run ${GA_OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping QEMU Guest Agent" + + start-stop-daemon --stop --pidfile /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/files/qemu-guest-agent-2.5.0-sysmacros.patch b/app-emulation/qemu-guest-agent/files/qemu-guest-agent-2.5.0-sysmacros.patch new file mode 100644 index 000000000000..4d5690c59ae4 --- /dev/null +++ b/app-emulation/qemu-guest-agent/files/qemu-guest-agent-2.5.0-sysmacros.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/580924 + +Linux C libs are moving away from implicit header pollution with sys/types.h + +--- a/include/qemu/osdep.h ++++ b/include/qemu/osdep.h +@@ -78,6 +78,10 @@ extern int daemon(int, int); + #include <assert.h> + #include <signal.h> + ++#ifdef __linux__ ++#include <sys/sysmacros.h> ++#endif ++ + #ifdef __OpenBSD__ + #include <sys/signal.h> + #endif diff --git a/app-emulation/qemu-guest-agent/metadata.xml b/app-emulation/qemu-guest-agent/metadata.xml new file mode 100644 index 000000000000..c7b88a32f7d0 --- /dev/null +++ b/app-emulation/qemu-guest-agent/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>qemu@gentoo.org</email> + <name>Gentoo QEMU Project</name> + </maintainer> +</pkgmetadata> diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-2.5.0.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.5.0.ebuild new file mode 100644 index 000000000000..bf8f034c84c1 --- /dev/null +++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.5.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd udev python-any-r1 + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-2 +else + SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.bz2" + 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="" + +RDEPEND=">=dev-libs/glib-2.22 + !<app-emulation/qemu-1.1.1-r1 + !<sys-apps/sysvinit-2.88-r5" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch #580924 + epatch_user +} + +src_configure() { + tc-export AR LD OBJCOPY + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + echo "./configure ${myconf[*]}" + ./configure "${myconf[@]}" || die +} + +src_compile() { + emake V=1 qemu-ga +} + +src_install() { + dobin qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" +} diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-2.6.0.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.6.0.ebuild new file mode 100644 index 000000000000..50e0e2f2ebdb --- /dev/null +++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.6.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd udev python-any-r1 + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-2 +else + SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.bz2" + 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="" + +RDEPEND=">=dev-libs/glib-2.22 + !<app-emulation/qemu-1.1.1-r1 + !<sys-apps/sysvinit-2.88-r5" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch #580924 + epatch_user +} + +src_configure() { + tc-export AR LD OBJCOPY + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + echo "./configure ${myconf[*]}" + ./configure "${myconf[@]}" || die +} + +src_compile() { + emake V=1 qemu-ga +} + +src_install() { + dobin qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" +} diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-2.8.1.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.8.1.ebuild new file mode 100644 index 000000000000..959db3ef084d --- /dev/null +++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.8.1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd udev python-any-r1 + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-2 +else + SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.bz2" + 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="" + +RDEPEND=">=dev-libs/glib-2.22 + !<app-emulation/qemu-1.1.1-r1 + !<sys-apps/sysvinit-2.88-r5" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch #580924 +) + +src_configure() { + tc-export AR LD OBJCOPY + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + echo "./configure ${myconf[*]}" + ./configure "${myconf[@]}" || die +} + +src_compile() { + emake V=1 qemu-ga +} + +src_install() { + dobin qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" +} diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-2.9.0.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.9.0.ebuild new file mode 100644 index 000000000000..959db3ef084d --- /dev/null +++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-2.9.0.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd udev python-any-r1 + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-2 +else + SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.bz2" + 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="" + +RDEPEND=">=dev-libs/glib-2.22 + !<app-emulation/qemu-1.1.1-r1 + !<sys-apps/sysvinit-2.88-r5" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch #580924 +) + +src_configure() { + tc-export AR LD OBJCOPY + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + echo "./configure ${myconf[*]}" + ./configure "${myconf[@]}" || die +} + +src_compile() { + emake V=1 qemu-ga +} + +src_install() { + dobin qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" +} |