NetBSD Problem Report #57922
From www@netbsd.org Sat Feb 10 20:45:21 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 613581A923C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 10 Feb 2024 20:45:21 +0000 (UTC)
Message-Id: <20240210204519.D00451A923D@mollari.NetBSD.org>
Date: Sat, 10 Feb 2024 20:45:19 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: qemu-ga should be shipped separately from emulators/qemu
X-Send-Pr-Version: www-1.0
>Number: 57922
>Category: pkg
>Synopsis: qemu-ga should be shipped separately from emulators/qemu
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bsiegert
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 10 20:50:00 +0000 2024
>Last-Modified: Wed Apr 10 18:55:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBSD Virtualization
>Environment:
>Description:
qemu-ga, the qemu guest agent daemon (https://www.qemu.org/docs/master/interop/qemu-ga.html), is a program that runs in the guest voluntarily let the host coordinate things with it like time changes.
The emulators/qemu package is mainly useful on the host, pulls in a large collection of dependencies like the graphics stack for drawing graphical output from the guest, and weighs over half a gigabyte.
What the guest needs is much more modest and shouldn't need to pull in any of these dependencies, so it should be available in a separate and much smaller package, say sysutils/qemu-guest-agent or sysutils/qemu-ga.
>How-To-Repeat:
try to use qemu-ga in a small VM
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Tue, 09 Apr 2024 18:41:31 +0000
Responsible-Changed-Why:
take (tentatively)
From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Cc:
Subject: Re: pkg/57922: qemu-ga should be shipped separately from
emulators/qemu
Date: Tue, 9 Apr 2024 22:15:34 +0200
Am 10.02.24 um 21:50 schrieb campbell+netbsd@mumble.net:
> qemu-ga, the qemu guest agent daemon (https://www.qemu.org/docs/master/interop/qemu-ga.html), is a program that runs in the guest voluntarily let the host coordinate things with it like time changes.
>
> The emulators/qemu package is mainly useful on the host, pulls in a large collection of dependencies like the graphics stack for drawing graphical output from the guest, and weighs over half a gigabyte.
>
> What the guest needs is much more modest and shouldn't need to pull in any of these dependencies, so it should be available in a separate and much smaller package, say sysutils/qemu-guest-agent or sysutils/qemu-ga.
I came up with wip/qemu-guest-agent. It needs a bit of cleanup and a
qemu/Makefile.common but seems OK otherwise. Feel free to give it a go!
--
Benny
From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: bsiegert@NetBSD.org, pkg-manager@NetBSD.org,
pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org,
bsiegert@NetBSD.org
Subject: Re: pkg/57922 (qemu-ga should be shipped separately from emulators/qemu)
Date: Wed, 10 Apr 2024 18:51:56 +0000
This is a multi-part message in MIME format.
--=_yEQegd6KE+J0RR5NTU8CY9iUdk+bjG6u
> Date: Tue, 9 Apr 2024 18:41:31 +0000 (UTC)
> From: bsiegert@NetBSD.org
>
> Responsible-Changed-From-To: pkg-manager->bsiegert
> Responsible-Changed-By: bsiegert@NetBSD.org
> Responsible-Changed-When: Tue, 09 Apr 2024 18:41:31 +0000
> Responsible-Changed-Why:
> take (tentatively)
Cool, thanks! FYI, attached is the draft I started working on a
couple months ago, in case it's helpful. (Halfway rebased onto the
update to qemu 8.2.1, shouldn't be hard to touch up, but also feel
free to discard this patch and start over if that's easier.)
--=_yEQegd6KE+J0RR5NTU8CY9iUdk+bjG6u
Content-Type: text/plain; charset="ISO-8859-1"; name="pr57922-qemu-ga"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="pr57922-qemu-ga.patch"
From d0083cf86df8ee1ad32139a5c0da3e488479c3c7 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh@NetBSD.org>
Date: Tue, 20 Feb 2024 02:26:14 +0000
Subject: [PATCH 1/2] WIP: sysutils/qemu-guest-agent: split out of
emulators/qemu
---
sysutils/Makefile | 1 +
sysutils/qemu-guest-agent/DESCR | 1 +
sysutils/qemu-guest-agent/Makefile | 65 ++++++++++++++++++++++++++++++
sysutils/qemu-guest-agent/PLIST | 2 +
4 files changed, 69 insertions(+)
create mode 100644 sysutils/qemu-guest-agent/DESCR
create mode 100644 sysutils/qemu-guest-agent/Makefile
create mode 100644 sysutils/qemu-guest-agent/PLIST
diff --git a/sysutils/Makefile b/sysutils/Makefile
index f26a222e9c4c..2a952feacc92 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -615,6 +615,7 @@ SUBDIR+=3D py-watchdog
SUBDIR+=3D py-xattr
SUBDIR+=3D py27-dbus
SUBDIR+=3D qdirstat
+SUBDIR+=3D qemu-guest-agent
SUBDIR+=3D qlogtools
SUBDIR+=3D qmail-dovecot-checkpassword
SUBDIR+=3D qmediamanager
diff --git a/sysutils/qemu-guest-agent/DESCR b/sysutils/qemu-guest-agent/DE=
SCR
new file mode 100644
index 000000000000..e78ef8847cde
--- /dev/null
+++ b/sysutils/qemu-guest-agent/DESCR
@@ -0,0 +1 @@
+Guest daemon to coordinate with qemu host
diff --git a/sysutils/qemu-guest-agent/Makefile b/sysutils/qemu-guest-agent=
/Makefile
new file mode 100644
index 000000000000..dab69a2bfd56
--- /dev/null
+++ b/sysutils/qemu-guest-agent/Makefile
@@ -0,0 +1,65 @@
+# $NetBSD$
+
+DISTNAME=3D qemu-8.2.0
+PKGNAME=3D ${DISTNAME:C/^qemu/&-guest-agent/}
+CATEGORIES=3D sysutils
+MASTER_SITES=3D https://download.qemu.org/
+EXTRACT_SUFX=3D .tar.xz
+
+MAINTAINER=3D pkgsrc-users@NetBSD.org
+HOMEPAGE=3D https://www.qemu.org/
+COMMENT=3D Guest daemon to coordinate with qemu host
+LICENSE=3D gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
+
+USE_TOOLS+=3D pkg-config
+HAS_CONFIGURE=3D yes
+
+TOOL_DEPENDS+=3D meson-[0-9]*:../../devel/meson
+TOOL_DEPENDS+=3D ninja-build-[0-9]*:../../devel/ninja-build
+
+CONFIGURE_ARGS+=3D --prefix=3D${PREFIX:Q}
+CONFIGURE_ARGS+=3D --sysconfdir=3D${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+=3D --python=3D${TOOL_PYTHONBIN:Q}
+CONFIGURE_ARGS+=3D --without-default-features
+CONFIGURE_ARGS+=3D --enable-guest-agent
+CONFIGURE_ARGS+=3D --target-list=3D # no emulator targets
+CONFIGURE_ARGS+=3D --disable-download
+CONFIGURE_ARGS+=3D -Dinstall_blobs=3Dfalse
+CONFIGURE_ARGS+=3D -Dqom_cast_debug=3Dfalse
+
+DISTINFO_FILE=3D ../../emulators/qemu/distinfo
+PATCHDIR=3D ../../emulators/qemu/patches
+
+# do-build:
+# ${RUN}${_ULIMIT_CMD} \
+# cd ${WRKSRC} && \
+# ${PKGSRC_SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${_MAKE_JOBS} \
+# ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} -f ${MAKE_FILE} \
+# -C build qemu-ga
+
+do-build:
+ ${RUN}${_ULIMIT_CMD} \
+ cd ${WRKSRC} && \
+ ${PKGSRC_SETENV} ${MAKE_ENV} \
+ ninja -j ${_MAKE_JOBS_N:U1} -C build
+
+# Some dependencies aren't correct and this tries to be re-made on install,
+# failing due to configure bugs.
+post-build:
+ ${TOUCH} ${WRKSRC}/config-host.mak
+
+do-install:
+ ${RUN}${_ULIMIT_CMD} \
+ cd ${WRKSRC} && \
+ ${PKGSRC_SETENV} ${MAKE_ENV} ${INSTALL_ENV} \
+ ninja -j ${_MAKE_JOBS_N:U1} -C build install
+
+# Not sure how to prevent this stuff from being installed, so let's
+# just delete it.
+post-install:
+ @${STEP_MSG} Deleting extraneous share directory
+ ${RUN}rm -rf ${DESTDIR:Q}${PREFIX:Q}/share
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/qemu-guest-agent/PLIST b/sysutils/qemu-guest-agent/PL=
IST
new file mode 100644
index 000000000000..86d52383d835
--- /dev/null
+++ b/sysutils/qemu-guest-agent/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/qemu-ga
From f035d74e7272d9b509c33732049f0a6bb21cfd09 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh@NetBSD.org>
Date: Tue, 20 Feb 2024 02:53:15 +0000
Subject: [PATCH 2/2] WIP: qemu Makefile.common
---
emulators/qemu/Makefile | 27 ++++-------------------
emulators/qemu/Makefile.common | 35 ++++++++++++++++++++++++++++++
sysutils/qemu-guest-agent/Makefile | 22 ++-----------------
3 files changed, 41 insertions(+), 43 deletions(-)
create mode 100644 emulators/qemu/Makefile.common
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 2ec8d79a3a56..b79f545b058b 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,28 +1,18 @@
# $NetBSD: Makefile,v 1.338 2024/03/04 18:46:38 adam Exp $
=20
-DISTNAME=3D qemu-8.2.2
+.include "Makefile.common"
+
CATEGORIES=3D emulators
-MASTER_SITES=3D https://download.qemu.org/
-EXTRACT_SUFX=3D .tar.xz
=20
-MAINTAINER=3D pkgsrc-users@NetBSD.org
-HOMEPAGE=3D https://www.qemu.org/
COMMENT=3D CPU emulator using dynamic translation
-LICENSE=3D gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
=20
-TOOL_DEPENDS+=3D meson-[0-9]*:../../devel/meson
-TOOL_DEPENDS+=3D ninja-build-[0-9]*:../../devel/ninja-build
#TOOL_DEPENDS+=3D ${PYPKGPREFIX}-sphinx-[0-9]*:../../textproc/py-sphinx
#TOOL_DEPENDS+=3D ${PYPKGPREFIX}-sphinx-rtd-theme>=3D1.2.0:../../textproc/=
py-sphinx-rtd-theme
=20
USE_CURSES=3D resize_term wide
USE_LANGUAGES+=3D c c++
-USE_TOOLS+=3D bison flex makeinfo perl:build pod2man pkg-config
+USE_TOOLS+=3D bison flex makeinfo perl:build pod2man
UNLIMIT_RESOURCES=3D datasize
-HAS_CONFIGURE=3D yes
-
-# https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d=
72ab
-GCC_REQD+=3D 7
=20
PYTHON_VERSIONS_INCOMPATIBLE=3D 27
=20
@@ -40,15 +30,11 @@ DISTFILES=3D ${DEFAULT_DISTFILES}
DISTFILES+=3D ${PALCODE_CLIPPER}
SITES.${PALCODE_CLIPPER}=3D http://ftp.NetBSD.org/pub/NetBSD/arch/alpha/qe=
mu/
=20
-CONFIGURE_ARGS+=3D --prefix=3D${PREFIX}
CONFIGURE_ARGS+=3D --interp-prefix=3D${PREFIX}/share/qemu
-CONFIGURE_ARGS+=3D --sysconfdir=3D${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=3D --python=3D${PYTHONBIN}
CONFIGURE_ARGS+=3D --smbd=3D${PREFIX}/sbin/smbd
-CONFIGURE_ARGS+=3D --mandir=3D${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+=3D --enable-curses
CONFIGURE_ARGS+=3D --disable-docs
-CONFIGURE_ENV+=3D mansuffix=3D/${PKGMANDIR}
+CONFIGURE_ARGS+=3D --disable-guest-agent
ALL_ENV+=3D MESON_RSP_THRESHOLD=3D262144
=20
.if defined(PKGSRC_USE_SSP)
@@ -184,11 +170,6 @@ do-install:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} \
ninja -j ${_MAKE_JOBS_N:U1} -C build install
=20
-# Some dependencies aren't correct and this tries to be re-made on install,
-# failing due to configure bugs.
-post-build:
- ${TOUCH} ${WRKSRC}/config-host.mak
-
post-install:
${INSTALL_DATA} ${FILESDIR}/Makefile.multinode-NetBSD \
${DESTDIR}${PREFIX}/share/doc/qemu/
diff --git a/emulators/qemu/Makefile.common b/emulators/qemu/Makefile.common
new file mode 100644
index 000000000000..3002f0788cdc
--- /dev/null
+++ b/emulators/qemu/Makefile.common
@@ -0,0 +1,35 @@
+# $NetBSD$
+
+# used by emulators/qemu/Makefile
+# used by sysutils/qemu-guest-agent/Makefile
+
+DISTNAME=3D qemu-8.2.1
+MASTER_SITES=3D https://download.qemu.org/
+EXTRACT_SUFX=3D .tar.xz
+
+MAINTAINER=3D pkgsrc-users@NetBSD.org
+HOMEPAGE=3D https://www.qemu.org/
+LICENSE=3D gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
+
+TOOL_DEPENDS+=3D meson-[0-9]*:../../devel/meson
+TOOL_DEPENDS+=3D ninja-build-[0-9]*:../../devel/ninja-build
+
+USE_TOOLS+=3D pkg-config
+HAS_CONFIGURE=3D yes
+
+# https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d=
72ab
+GCC_REQD+=3D 7
+
+CONFIGURE_ARGS+=3D --prefix=3D${PREFIX:Q}
+CONFIGURE_ARGS+=3D --sysconfdir=3D${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+=3D --mandir=3D${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=3D --python=3D${TOOL_PYTHONBIN:Q}
+CONFIGURE_ENV+=3D mansuffix=3D/${PKGMANDIR}
+
+DISTINFO_FILE=3D ../../emulators/qemu/distinfo
+PATCHDIR=3D ../../emulators/qemu/patches
+
+# Some dependencies aren't correct and this tries to be re-made on install,
+# failing due to configure bugs.
+post-build:
+ ${TOUCH} ${WRKSRC}/config-host.mak
diff --git a/sysutils/qemu-guest-agent/Makefile b/sysutils/qemu-guest-agent=
/Makefile
index dab69a2bfd56..c06646d66146 100644
--- a/sysutils/qemu-guest-agent/Makefile
+++ b/sysutils/qemu-guest-agent/Makefile
@@ -1,25 +1,15 @@
# $NetBSD$
=20
-DISTNAME=3D qemu-8.2.0
+.include "../../emulators/qemu/Makefile.common"
+
PKGNAME=3D ${DISTNAME:C/^qemu/&-guest-agent/}
CATEGORIES=3D sysutils
-MASTER_SITES=3D https://download.qemu.org/
-EXTRACT_SUFX=3D .tar.xz
=20
-MAINTAINER=3D pkgsrc-users@NetBSD.org
-HOMEPAGE=3D https://www.qemu.org/
COMMENT=3D Guest daemon to coordinate with qemu host
-LICENSE=3D gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
-
-USE_TOOLS+=3D pkg-config
-HAS_CONFIGURE=3D yes
=20
TOOL_DEPENDS+=3D meson-[0-9]*:../../devel/meson
TOOL_DEPENDS+=3D ninja-build-[0-9]*:../../devel/ninja-build
=20
-CONFIGURE_ARGS+=3D --prefix=3D${PREFIX:Q}
-CONFIGURE_ARGS+=3D --sysconfdir=3D${PKG_SYSCONFDIR:Q}
-CONFIGURE_ARGS+=3D --python=3D${TOOL_PYTHONBIN:Q}
CONFIGURE_ARGS+=3D --without-default-features
CONFIGURE_ARGS+=3D --enable-guest-agent
CONFIGURE_ARGS+=3D --target-list=3D # no emulator targets
@@ -27,9 +17,6 @@ CONFIGURE_ARGS+=3D --disable-download
CONFIGURE_ARGS+=3D -Dinstall_blobs=3Dfalse
CONFIGURE_ARGS+=3D -Dqom_cast_debug=3Dfalse
=20
-DISTINFO_FILE=3D ../../emulators/qemu/distinfo
-PATCHDIR=3D ../../emulators/qemu/patches
-
# do-build:
# ${RUN}${_ULIMIT_CMD} \
# cd ${WRKSRC} && \
@@ -43,11 +30,6 @@ do-build:
${PKGSRC_SETENV} ${MAKE_ENV} \
ninja -j ${_MAKE_JOBS_N:U1} -C build
=20
-# Some dependencies aren't correct and this tries to be re-made on install,
-# failing due to configure bugs.
-post-build:
- ${TOUCH} ${WRKSRC}/config-host.mak
-
do-install:
${RUN}${_ULIMIT_CMD} \
cd ${WRKSRC} && \
--=_yEQegd6KE+J0RR5NTU8CY9iUdk+bjG6u--
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.