summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2024-01-18 01:39:01 -0500
committerSam James <sam@gentoo.org>2024-02-02 03:54:45 +0000
commit99decf1e1533778a58f3c9bc7898c58526e7b780 (patch)
treee491130743736c82fef19414a0e6fb84c7835d5c /app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
parentapp-admin/sudo: drop 1.9.15_p2, 1.9.15_p4 (diff)
downloadgentoo-99decf1e1533778a58f3c9bc7898c58526e7b780.tar.gz
gentoo-99decf1e1533778a58f3c9bc7898c58526e7b780.tar.bz2
gentoo-99decf1e1533778a58f3c9bc7898c58526e7b780.zip
app-emulation/qemu-guest-agent: add 8.2.0, limit test suite
As noted, the only relevant test for the guest agent is test-qga, which is part of the qobject test suite, so limit to just this test suite. Bug: https://bugs.gentoo.org/917080 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/34876 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild')
-rw-r--r--app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild88
1 files changed, 88 insertions, 0 deletions
diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild b/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
new file mode 100644
index 000000000000..ab7a0c145b03
--- /dev/null
+++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit edo systemd toolchain-funcs python-any-r1 udev
+
+MY_PN="qemu"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="QEMU Guest Agent (qemu-ga) for use when running inside a VM"
+HOMEPAGE="https://wiki.qemu.org/Features/GuestAgent"
+SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.xz"
+
+LICENSE="GPL-2 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="dev-libs/glib"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}
+ dev-lang/perl
+ app-alternatives/ninja"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+)
+
+src_configure() {
+ tc-export AR LD OBJCOPY RANLIB
+
+ local myconf=(
+ --prefix=/usr
+ --sysconfdir=/etc
+ --libdir="/usr/$(get_libdir)"
+ --localstatedir=/
+ --disable-bsd-user
+ --disable-linux-user
+ --disable-system
+ --disable-strip
+ --enable-tools
+ --disable-werror
+ --without-default-features
+ --enable-guest-agent
+ --python="${PYTHON}"
+ --cc="$(tc-getCC)"
+ --cxx="$(tc-getCXX)"
+ --host-cc="$(tc-getBUILD_CC)"
+ )
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_test() {
+ # qga only uses generic code covered by qobject tests,
+ # the full test suite requires at least one softmmu binary
+ emake check-unit
+}
+
+src_install() {
+ dobin build/qga/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"
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}