mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 08:26:57 +02:00
app-emulation/qemu-guest-agent: Sync with Gentoo
It's from Gentoo commit 03917118954701469ed427b29d6024bdbafd9571.
This commit is contained in:
parent
095fd36951
commit
ce60bb4326
@ -1 +1,2 @@
|
||||
DIST qemu-8.2.0.tar.xz 130008888 BLAKE2B a63667042e1e19c635568072d8dcc117320117e81e374a93cfb79e2363ebf505df3217fb098638e53c899eb6f83435221e8031f2aae003c27ec25af8654683b3 SHA512 92ec41196ff145cdbb98948f6b6e43214fa4b4419554a8a1927fb4527080c8212ccb703e184baf8ee0bdfa50ad7a84689e8f5a69eba1bd7bbbdfd69e3b91256c
|
||||
DIST qemu-9.2.0.tar.xz 135188800 BLAKE2B 5800556f356e4324124e250c02a07857eef3a6f22995a819fe972061fa750ebf7233da64ae4c0a3e775b1639c870be4b7312d86d9866fedf2bc99074aad0a10a SHA512 f92548623e4e31400c823a2d78417a8a4ecfccb07f3ee4883e2f2ad33054539d2a37d076dbc64df42c6c86c08fa7c2c975cd6e823aa14d5f20cef83348006813
|
||||
|
@ -4,6 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
||||
|
||||
inherit edo systemd toolchain-funcs python-any-r1 udev
|
||||
|
||||
|
@ -0,0 +1,94 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
PYTHON_REQ_USE="ensurepip(-),ncurses,readline"
|
||||
|
||||
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"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="GPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
|
||||
|
||||
RDEPEND="dev-libs/glib"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
dev-lang/perl
|
||||
app-alternatives/ninja
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/qemu-8.1.0-find-sphinx.patch
|
||||
)
|
||||
|
||||
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)"
|
||||
)
|
||||
|
||||
# Meson will not use a cross-file unless cross_prefix is set.
|
||||
tc-is-cross-compiler && myconf+=( --cross-prefix="${CHOST}-" )
|
||||
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user