From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Yonggang Luo" <luoyonggang@gmail.com>,
qemu-devel@nongnu.org, "Cleber Rosa" <crosa@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"John Snow" <jsnow@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daude" <philmd@mailo.com>
Subject: Re: [PATCH] meson: generate qemu-version.h with a custom target
Date: Fri, 6 Nov 2026 08:19:42 +0000 [thread overview]
Message-ID: <au2NnibVpewh5VwD@redhat.com> (raw)
In-Reply-To: <CAFEAcA8ScuuOgjaYNpQOZS37yx=WBzZaKLcVGQs8Tj3JYB3jOw@mail.gmail.com>
On Thu, Nov 05, 2026 at 06:34:31PM +0000, Peter Maydell wrote:
> On Thu, 5 Nov 2026 at 18:15, Yonggang Luo <luoyonggang@gmail.com> wrote:
> >
> > configure_file() writes qemu-version.h at setup time. That result is
> > not a ninja edge, so a missing header is never rebuilt and compiles
> > that include it do not order on it. Generate the header with
> > custom_target and list it in genh. scripts/qemu-version.py reads
> > scripts/qemu-version.h.in and substitutes -version. An empty
> > pkgversion drops the QEMU_PKGVERSION line.
> >
> > Link: https://lore.kernel.org/qemu-devel/CAFEAcA8bGODxRfRzrimhGN1v2HtcWvApRsyucemZbMUUBVkYwA@mail.gmail.com/
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>
> If we're going back to having an external script, the other
> way to fix this would be to just revert ab78ac76f44a12 and
> maybe fc35f2438770, since their commit messages suggest the
> main aim was to not have an external script.
I'm not clear what problem there was with an external script that these
were solving ? These also seem to have appeared in a pull request
without any prior posting for review, which is rather shortcutting our
normal dev process.
Personally I'd suggest we revert and then simplify the version handling
in a different way:
* Remove the VERSION file and put the number in meson.build directly
* Emit QEMU_PKGVERSION into build/config-host.h
* Remove qemu/version.h and build/qemu-version.h
This avoids any need for rules to generate build/qemu-version.h
and config-host.h already has logic to regenerate itself when
meson.build changes.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-11-06 8:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 18:14 [PATCH] meson: generate qemu-version.h with a custom target Yonggang Luo
2026-11-05 18:34 ` Peter Maydell
2026-11-05 18:39 ` Yonggang Luo
2026-11-06 8:19 ` Daniel P. Berrangé [this message]
2026-11-06 8:42 ` Yonggang Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=au2NnibVpewh5VwD@redhat.com \
--to=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=luoyonggang@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@mailo.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.