[PATCH 0/2] meson: Revert recent changes to qemu version header handling

Peter Maydell posted 2 patches 2 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261106155858.3779237-1-peter.maydell@linaro.org
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Laurent Vivier <laurent@vivier.eu>, Helge Deller <deller@gmx.de>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Markus Armbruster <armbru@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Michael Roth <michael.roth@amd.com>, Kostiantyn Kostiuk <kkostiuk@redhat.com>, Fam Zheng <fam@euphon.net>, Zhao Liu <zhao1.liu@intel.com>, Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
meson.build                          | 29 +++++++++-------------------
include/qemu/version.h               | 20 -------------------
bsd-user/main.c                      |  2 +-
linux-user/main.c                    |  2 +-
monitor/qmp-cmds-control.c           |  2 +-
qemu-img.c                           |  2 +-
qemu-io.c                            |  2 +-
qemu-nbd.c                           |  2 +-
qga/main.c                           |  2 +-
scsi/qemu-pr-helper.c                |  2 +-
storage-daemon/qemu-storage-daemon.c |  2 +-
system/vl.c                          |  2 +-
tools/i386/qemu-vmsr-helper.c        |  3 ++-
tools/qemu-vnc/qemu-vnc.c            |  2 +-
util/module.c                        |  2 +-
scripts/qemu-version.h.in            |  1 -
scripts/qemu-version.sh              | 25 ++++++++++++++++++++++++
ui/cocoa.m                           |  2 +-
18 files changed, 49 insertions(+), 55 deletions(-)
delete mode 100644 include/qemu/version.h
delete mode 100644 scripts/qemu-version.h.in
create mode 100755 scripts/qemu-version.sh
[PATCH 0/2] meson: Revert recent changes to qemu version header handling
Posted by Peter Maydell 2 weeks, 2 days ago
This patchset is two git reverts, to revert ab78ac76f44a124 and
fc35f24387703da. Those commits try to move the handling of version.h
to entirely within the meson file with no external script, but
unfortunately if you do that then there is no dependency information
about it passed to ninja, so the file isn't recreated if it's
missing. In particular this breaks incremental builds from a build
tree that pre-dates those two commits.

There's been some on-list discussion:
https://lore.kernel.org/qemu-devel/20261105181449.1691-1-luoyonggang@gmail.com/
Since it's not clear how we want to proceed, I'm posting this as
the "revert to the situation we had before", so we can discuss
what we want to do with a bit more leisure.

thanks
-- PMM

Peter Maydell (2):
  Revert "meson: rewrite scripts/qemu-version.sh directly in
    meson.build"
  Revert "include: introduce qemu/version.h"

 meson.build                          | 29 +++++++++-------------------
 include/qemu/version.h               | 20 -------------------
 bsd-user/main.c                      |  2 +-
 linux-user/main.c                    |  2 +-
 monitor/qmp-cmds-control.c           |  2 +-
 qemu-img.c                           |  2 +-
 qemu-io.c                            |  2 +-
 qemu-nbd.c                           |  2 +-
 qga/main.c                           |  2 +-
 scsi/qemu-pr-helper.c                |  2 +-
 storage-daemon/qemu-storage-daemon.c |  2 +-
 system/vl.c                          |  2 +-
 tools/i386/qemu-vmsr-helper.c        |  3 ++-
 tools/qemu-vnc/qemu-vnc.c            |  2 +-
 util/module.c                        |  2 +-
 scripts/qemu-version.h.in            |  1 -
 scripts/qemu-version.sh              | 25 ++++++++++++++++++++++++
 ui/cocoa.m                           |  2 +-
 18 files changed, 49 insertions(+), 55 deletions(-)
 delete mode 100644 include/qemu/version.h
 delete mode 100644 scripts/qemu-version.h.in
 create mode 100755 scripts/qemu-version.sh

-- 
2.43.0
Re: [PATCH 0/2] meson: Revert recent changes to qemu version header handling
Posted by Peter Maydell 1 week, 2 days ago
I have been running into this all week, and not only with build
trees that were last built on some commit that preceded the
introduction of the relevant commits. RTH has reviewed this,
so I'm going to put these reverts into target-arm.next for a
pullreq to go out by Monday. We can figure out what our preferred
way of handling the version header is once we've fixed the breakage.

thanks
-- PMM

On Fri, 6 Nov 2026 at 15:59, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset is two git reverts, to revert ab78ac76f44a124 and
> fc35f24387703da. Those commits try to move the handling of version.h
> to entirely within the meson file with no external script, but
> unfortunately if you do that then there is no dependency information
> about it passed to ninja, so the file isn't recreated if it's
> missing. In particular this breaks incremental builds from a build
> tree that pre-dates those two commits.
>
> There's been some on-list discussion:
> https://lore.kernel.org/qemu-devel/20261105181449.1691-1-luoyonggang@gmail.com/
> Since it's not clear how we want to proceed, I'm posting this as
> the "revert to the situation we had before", so we can discuss
> what we want to do with a bit more leisure.
>
> thanks
> -- PMM
>
> Peter Maydell (2):
>   Revert "meson: rewrite scripts/qemu-version.sh directly in
>     meson.build"
>   Revert "include: introduce qemu/version.h"
>
>  meson.build                          | 29 +++++++++-------------------
>  include/qemu/version.h               | 20 -------------------
>  bsd-user/main.c                      |  2 +-
>  linux-user/main.c                    |  2 +-
>  monitor/qmp-cmds-control.c           |  2 +-
>  qemu-img.c                           |  2 +-
>  qemu-io.c                            |  2 +-
>  qemu-nbd.c                           |  2 +-
>  qga/main.c                           |  2 +-
>  scsi/qemu-pr-helper.c                |  2 +-
>  storage-daemon/qemu-storage-daemon.c |  2 +-
>  system/vl.c                          |  2 +-
>  tools/i386/qemu-vmsr-helper.c        |  3 ++-
>  tools/qemu-vnc/qemu-vnc.c            |  2 +-
>  util/module.c                        |  2 +-
>  scripts/qemu-version.h.in            |  1 -
>  scripts/qemu-version.sh              | 25 ++++++++++++++++++++++++
>  ui/cocoa.m                           |  2 +-
>  18 files changed, 49 insertions(+), 55 deletions(-)
>  delete mode 100644 include/qemu/version.h
>  delete mode 100644 scripts/qemu-version.h.in
>  create mode 100755 scripts/qemu-version.sh
Re: [PATCH 0/2] meson: Revert recent changes to qemu version header handling
Posted by Richard Henderson 1 week, 5 days ago
On 11/6/26 07:58, Peter Maydell wrote:
> This patchset is two git reverts, to revert ab78ac76f44a124 and
> fc35f24387703da. Those commits try to move the handling of version.h
> to entirely within the meson file with no external script, but
> unfortunately if you do that then there is no dependency information
> about it passed to ninja, so the file isn't recreated if it's
> missing. In particular this breaks incremental builds from a build
> tree that pre-dates those two commits.
> 
> There's been some on-list discussion:
> https://lore.kernel.org/qemu-devel/20261105181449.1691-1-luoyonggang@gmail.com/
> Since it's not clear how we want to proceed, I'm posting this as
> the "revert to the situation we had before", so we can discuss
> what we want to do with a bit more leisure.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~