tech-pkg archive

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

Re: qemu-ga



> Date: Fri, 16 Feb 2024 14:51:37 +0100
> From: is%netbsd.org@localhost
> 
> I noticed that the qemu package comes nowadays with the compiled version of
> qemu-ga.

Side note: We should really split qemu-ga out of qemu, because the two
packages serve two different purposes that are almost guaranteed not
to intersect -- qemu runs on a VM host; qemu-ga runs on a VM guest.

Filed a PR for this: <https://gnats.NetBSD.org/57922>.  Started
drafting work to make a separate sysutils/qemu-ga package -- which can
be built without all the gigantic graphical dependencies that
emulators/qemu drags in -- but haven't finished.

> I investigated with "strings" and "grep /etc" and found that 
> the binaries all (not only qemu-ga) reference 
> 
> /usr/pkg/etc/qemu/qemu/qemu.conf
> /usr/pkg/etc/qemu/qemu/qemu-ga.conf
> 
> but
> 
> /usr/pkg/etc/qemu/qemu-ifup
> /usr/pkg/etc/qemu/qemu-ifdown

Yes, this seems wrong and not very helpful.

> I note that the pkgsrc Makefile has
> 
> CONFIGURE_ARGS+=        --sysconfdir=${PKG_SYSCONFDIR}
> 
> PKG_SYSCONFSUBDIR=      qemu

This was done back in 2010, in a change that also patched away the
`/qemu' suffix that qemu was adding for _some_ files but not others:

https://mail-index.NetBSD.org/pkgsrc-changes/2010/11/09/msg048563.html

+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
+
+CONF_FILES=            ${EGDIR}/target-x86_64.conf \
+                       ${PKG_SYSCONFDIR}/target-x86_64.conf
+EGDIR=                 ${PREFIX}/share/examples/qemu
+INSTALL_MAKE_FLAGS=    egdir=${EGDIR}
+PKG_SYSCONFSUBDIR=     qemu
...
-$NetBSD: patch-dd,v 1.4 2010/10/27 13:24:09 tsutsui Exp $
+$NetBSD: patch-dd,v 1.5 2010/11/09 10:37:12 jmmv Exp $
+
+Remove confsuffix from sysconfdir so that our PKG_SYSCONFSUBDIR setting
+works.
...
+ sysconfdir="\${prefix}/etc"
+-confsuffix="/qemu"
++confsuffix=""

At the time, there were other files like target-x86_64.conf with no
`qemu' in the name so it would be reasonable pkgsrc policy to push
them into a subdirectory.

Unfortunately, in the update to 1.1.0 in 2012, that patch was
discarded.  So we ended up with /qemu/qemu in some files, and /qemu in
others, as you see now:

https://mail-index.NetBSD.org/pkgsrc-changes/2012/06/07/msg074027.html

I think the current state of affairs is a bug and we should either:

(a) just not add our own /qemu component -- I skimmed the qemu source
and I don't see any cases outside /qemu other than qemu-ifup and
qemu-ifdown any more, which are named qemuishly anyway so it's not a
big deal;

or

(b) restore the patch to qemu so that it puts everything under the
same directory, not something under /qemu and some things not under
/qemu, like we had 2010-2012.


Home | Main Index | Thread Index | Old Index