pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/57922 (qemu-ga should be shipped separately from emulators/qemu)



> Date: Tue,  9 Apr 2024 18:41:31 +0000 (UTC)
> From: bsiegert%NetBSD.org@localhost
> 
> Responsible-Changed-From-To: pkg-manager->bsiegert
> Responsible-Changed-By: bsiegert%NetBSD.org@localhost
> 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.)
From d0083cf86df8ee1ad32139a5c0da3e488479c3c7 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
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+=	py-watchdog
 SUBDIR+=	py-xattr
 SUBDIR+=	py27-dbus
 SUBDIR+=	qdirstat
+SUBDIR+=	qemu-guest-agent
 SUBDIR+=	qlogtools
 SUBDIR+=	qmail-dovecot-checkpassword
 SUBDIR+=	qmediamanager
diff --git a/sysutils/qemu-guest-agent/DESCR b/sysutils/qemu-guest-agent/DESCR
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=	qemu-8.2.0
+PKGNAME=	${DISTNAME:C/^qemu/&-guest-agent/}
+CATEGORIES=	sysutils
+MASTER_SITES=	https://download.qemu.org/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.qemu.org/
+COMMENT=	Guest daemon to coordinate with qemu host
+LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
+
+USE_TOOLS+=	pkg-config
+HAS_CONFIGURE=	yes
+
+TOOL_DEPENDS+=	meson-[0-9]*:../../devel/meson
+TOOL_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
+
+CONFIGURE_ARGS+=	--prefix=${PREFIX:Q}
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+=	--python=${TOOL_PYTHONBIN:Q}
+CONFIGURE_ARGS+=	--without-default-features
+CONFIGURE_ARGS+=	--enable-guest-agent
+CONFIGURE_ARGS+=	--target-list=	# no emulator targets
+CONFIGURE_ARGS+=	--disable-download
+CONFIGURE_ARGS+=	-Dinstall_blobs=false
+CONFIGURE_ARGS+=	-Dqom_cast_debug=false
+
+DISTINFO_FILE=	../../emulators/qemu/distinfo
+PATCHDIR=	../../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/PLIST
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@localhost>
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 $
 
-DISTNAME=	qemu-8.2.2
+.include "Makefile.common"
+
 CATEGORIES=	emulators
-MASTER_SITES=	https://download.qemu.org/
-EXTRACT_SUFX=	.tar.xz
 
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://www.qemu.org/
 COMMENT=	CPU emulator using dynamic translation
-LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
 
-TOOL_DEPENDS+=	meson-[0-9]*:../../devel/meson
-TOOL_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
 #TOOL_DEPENDS+=	${PYPKGPREFIX}-sphinx-[0-9]*:../../textproc/py-sphinx
 #TOOL_DEPENDS+=	${PYPKGPREFIX}-sphinx-rtd-theme>=1.2.0:../../textproc/py-sphinx-rtd-theme
 
 USE_CURSES=		resize_term wide
 USE_LANGUAGES+=		c c++
-USE_TOOLS+=		bison flex makeinfo perl:build pod2man pkg-config
+USE_TOOLS+=		bison flex makeinfo perl:build pod2man
 UNLIMIT_RESOURCES=	datasize
-HAS_CONFIGURE=		yes
-
-# https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d72ab
-GCC_REQD+=		7
 
 PYTHON_VERSIONS_INCOMPATIBLE=	27
 
@@ -40,15 +30,11 @@ DISTFILES=		${DEFAULT_DISTFILES}
 DISTFILES+=		${PALCODE_CLIPPER}
 SITES.${PALCODE_CLIPPER}= http://ftp.NetBSD.org/pub/NetBSD/arch/alpha/qemu/
 
-CONFIGURE_ARGS+=	--prefix=${PREFIX}
 CONFIGURE_ARGS+=	--interp-prefix=${PREFIX}/share/qemu
-CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=	--python=${PYTHONBIN}
 CONFIGURE_ARGS+=	--smbd=${PREFIX}/sbin/smbd
-CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
 CONFIGURE_ARGS+=	--enable-curses
 CONFIGURE_ARGS+=	--disable-docs
-CONFIGURE_ENV+=		mansuffix=/${PKGMANDIR}
+CONFIGURE_ARGS+=	--disable-guest-agent
 ALL_ENV+=		MESON_RSP_THRESHOLD=262144
 
 .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
 
-# 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=	qemu-8.2.1
+MASTER_SITES=	https://download.qemu.org/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.qemu.org/
+LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
+
+TOOL_DEPENDS+=	meson-[0-9]*:../../devel/meson
+TOOL_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
+
+USE_TOOLS+=	pkg-config
+HAS_CONFIGURE=	yes
+
+# https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d72ab
+GCC_REQD+=		7
+
+CONFIGURE_ARGS+=	--prefix=${PREFIX:Q}
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=	--python=${TOOL_PYTHONBIN:Q}
+CONFIGURE_ENV+=		mansuffix=/${PKGMANDIR}
+
+DISTINFO_FILE=	../../emulators/qemu/distinfo
+PATCHDIR=	../../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$
 
-DISTNAME=	qemu-8.2.0
+.include "../../emulators/qemu/Makefile.common"
+
 PKGNAME=	${DISTNAME:C/^qemu/&-guest-agent/}
 CATEGORIES=	sysutils
-MASTER_SITES=	https://download.qemu.org/
-EXTRACT_SUFX=	.tar.xz
 
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://www.qemu.org/
 COMMENT=	Guest daemon to coordinate with qemu host
-LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
-
-USE_TOOLS+=	pkg-config
-HAS_CONFIGURE=	yes
 
 TOOL_DEPENDS+=	meson-[0-9]*:../../devel/meson
 TOOL_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
 
-CONFIGURE_ARGS+=	--prefix=${PREFIX:Q}
-CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
-CONFIGURE_ARGS+=	--python=${TOOL_PYTHONBIN:Q}
 CONFIGURE_ARGS+=	--without-default-features
 CONFIGURE_ARGS+=	--enable-guest-agent
 CONFIGURE_ARGS+=	--target-list=	# no emulator targets
@@ -27,9 +17,6 @@ CONFIGURE_ARGS+=	--disable-download
 CONFIGURE_ARGS+=	-Dinstall_blobs=false
 CONFIGURE_ARGS+=	-Dqom_cast_debug=false
 
-DISTINFO_FILE=	../../emulators/qemu/distinfo
-PATCHDIR=	../../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
 
-# 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} && \


Home | Main Index | Thread Index | Old Index