From 61cf3e765e13c6ebab06376dc0eea44da3aefba4 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 1 Sep 2025 07:06:43 +0000 Subject: [PATCH] app-emulation/qemu-guest-agent: Sync with Gentoo It's from Gentoo commit 89291a1c3c00481aebdefcb84eb4c26761a7caf5. Signed-off-by: Flatcar Buildbot --- .../qemu-guest-agent/files/qemu-ga.init-r1 | 24 ------------------- .../qemu-guest-agent/files/qemu-ga.init-r2 | 11 +++++++++ .../qemu-guest-agent-8.2.0.ebuild | 23 ++++++++++++++---- .../qemu-guest-agent-9.2.0.ebuild | 21 +++++++++++++--- 4 files changed, 48 insertions(+), 31 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 create mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r2 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 deleted file mode 100644 index f08c082709..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 +++ /dev/null @@ -1,24 +0,0 @@ -#!/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/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r2 b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r2 new file mode 100644 index 0000000000..29cf985908 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r2 @@ -0,0 +1,11 @@ +#!/sbin/openrc-run +# Copyright 1999-2024 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +GA_METHOD=${GA_METHOD:-virtio-serial} +GA_PATH=${GA_PATH:-/dev/virtio-ports/org.qemu.guest_agent.0} + +description="QEMU Guest Agent (qemu-ga) for use when running inside a VM" +command="/usr/bin/qemu-ga" +pidfile="/run/qemu-ga.pid" +command_args="-m ${GA_METHOD} -p ${GA_PATH} -l /var/log/qemu-ga.log -d -f ${pidfile} -t /run ${GA_OPTIONS}" diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild index d9988b5cbf..5e8b6e54b6 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,14 +6,14 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} ) PYTHON_REQ_USE="ensurepip(-),ncurses,readline" -inherit edo systemd toolchain-funcs python-any-r1 udev +inherit edo linux-info python-any-r1 systemd toolchain-funcs 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" +SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" S="${WORKDIR}/${MY_P}" LICENSE="GPL-2 BSD-2" @@ -24,6 +24,9 @@ RDEPEND="dev-libs/glib" DEPEND="${RDEPEND}" BDEPEND=" ${PYTHON_DEPS} + $(python_gen_any_dep ' + dev-python/distlib[${PYTHON_USEDEP}] + ') dev-lang/perl app-alternatives/ninja " @@ -32,6 +35,18 @@ PATCHES=( "${FILESDIR}"/qemu-8.1.0-find-sphinx.patch ) +python_check_deps() { + python_has_version "dev-python/distlib[${PYTHON_USEDEP}]" +} + +pkg_setup() { + # While qemu-ga supports multiple modes, virtio-serial is the + # default. Make sure it's enabled in kernel. + CONFIG_CHECK="~VIRTIO_CONSOLE" + linux-info_pkg_setup + python-any-r1_pkg_setup +} + src_configure() { tc-export AR LD OBJCOPY RANLIB @@ -70,7 +85,7 @@ src_install() { dobin build/qga/qemu-ga # Normal init stuff - newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newinitd "${FILESDIR}/qemu-ga.init-r2" qemu-guest-agent newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent insinto /etc/logrotate.d diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-9.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-9.2.0.ebuild index 75d0e3f000..5e8b6e54b6 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-9.2.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-9.2.0.ebuild @@ -6,14 +6,14 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} ) PYTHON_REQ_USE="ensurepip(-),ncurses,readline" -inherit edo systemd toolchain-funcs python-any-r1 udev +inherit edo linux-info python-any-r1 systemd toolchain-funcs 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" +SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" S="${WORKDIR}/${MY_P}" LICENSE="GPL-2 BSD-2" @@ -24,6 +24,9 @@ RDEPEND="dev-libs/glib" DEPEND="${RDEPEND}" BDEPEND=" ${PYTHON_DEPS} + $(python_gen_any_dep ' + dev-python/distlib[${PYTHON_USEDEP}] + ') dev-lang/perl app-alternatives/ninja " @@ -32,6 +35,18 @@ PATCHES=( "${FILESDIR}"/qemu-8.1.0-find-sphinx.patch ) +python_check_deps() { + python_has_version "dev-python/distlib[${PYTHON_USEDEP}]" +} + +pkg_setup() { + # While qemu-ga supports multiple modes, virtio-serial is the + # default. Make sure it's enabled in kernel. + CONFIG_CHECK="~VIRTIO_CONSOLE" + linux-info_pkg_setup + python-any-r1_pkg_setup +} + src_configure() { tc-export AR LD OBJCOPY RANLIB @@ -70,7 +85,7 @@ src_install() { dobin build/qga/qemu-ga # Normal init stuff - newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newinitd "${FILESDIR}/qemu-ga.init-r2" qemu-guest-agent newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent insinto /etc/logrotate.d