qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] configure: save git working tree information in


From: Kashyap Chamarthy
Subject: Re: [Qemu-devel] [PATCH] configure: save git working tree information in "pkgversion"
Date: Wed, 1 Jun 2016 11:36:37 +0200
User-agent: Mutt/1.6.0.1 (2016-04-01)

On Tue, May 31, 2016 at 05:04:04PM +0200, Laszlo Ersek wrote:
> When building QEMU from a git working tree (either in-tree or
> out-of-tree), it is useful to capture the working tree status in the QEMU
> binary, for the "-version" option to report.
> 
> Daniel suggested using the "pkgversion" variable (tied to the
> "--with-pkgversion" option) of the configure script for this. Downstream
> packagers of QEMU already use this option for customizing their builds,
> plus libvirtd captures "pkgversion" (with the "-version" option) in
> "/var/log/libvirt/qemu/$GUEST.log", whenever a guest is started.
> 
> The information we include in "pkgversion" is the output of git-describe,
> with a plus sign (+) appended if there are staged or unstaged changes to
> tracked files, at the time of "configure" being executed.
> 
> The content of "pkgversion" is not changed when "--with-pkgversion" is
> used on the command line.
> 
> Cc: "Daniel P. Berrange" <address@hidden>
> Cc: Kashyap Chamarthy <address@hidden>
> Signed-off-by: Laszlo Ersek <address@hidden>
> ---
>  configure | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)

[...]

Thanks, this is quite handy as I often have multiple QEMU binaries, and
it'd be useful to associate the binary with a Git tree.

Just tested on a clean tree.

Before:

    $ ./x86_64-softmmu/qemu-system-x86_64 -version
    QEMU emulator version 2.5.50, Copyright (c) 2003-2008 Fabrice Bellard

After applying the patch:

    $ ./x86_64-softmmu/qemu-system-x86_64 -version
    QEMU emulator version 2.6.50 (v2.6.0-602-g0132639), Copyright (c) 2003-2008 
Fabrice Bellard

- - -

I see there's an in-progress discussion of "git describe --dirty" vs. the
plus-sign fallback.  For the current version:

Tested-by: Kashyap Chamarthy <address@hidden>

-- 
/kashyap



reply via email to

[Prev in Thread] Current Thread [Next in Thread]