From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7ib2-0001Ud-E9 for qemu-devel@nongnu.org; Tue, 31 May 2016 08:16:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7iaz-0000yf-21 for qemu-devel@nongnu.org; Tue, 31 May 2016 08:16:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7iay-0000yQ-Sq for qemu-devel@nongnu.org; Tue, 31 May 2016 08:16:28 -0400 References: <967bcc3b-e1d5-38db-eb7d-2d07e92c2e19@redhat.com> <20160531113248.GP21628@redhat.com> From: Laszlo Ersek Message-ID: Date: Tue, 31 May 2016 14:16:25 +0200 MIME-Version: 1.0 In-Reply-To: <20160531113248.GP21628@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] including the "git describe" output in the QEMU binaries? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Peter Maydell , Paolo Bonzini , qemu devel list On 05/31/16 13:32, Daniel P. Berrange wrote: > On Tue, May 31, 2016 at 01:16:14PM +0200, Laszlo Ersek wrote: >> Hi, >> >> has this been raised / considered before? To me at least it would be >> extremely useful if QEMU binaries built from a git working directory >> returned the output of "git describe" (+ possibly a hint about an >> unclean working directory), when invoked with "-version". >> >> Not volunteering for the implementation, and also not suggesting / >> requesting that others implement it (everyone is busy with real stuff, >> I'm sure); just asking if it's been considered. > > Currently configure supports a --pkgversion flag which is used by people > packaging QEMU in RPM/Debs to include their arbitrary custom version string. > This information is then reported by -version and the appropriate QMP > command. > > We could quite easily make configure default the pkgversion to the current > GIT hash if --pkgversion is not explicitly given. That sounds great, thanks! I'll try to post a patch. I'm thinking of git-describe, plus appending a plus sign (+), when there are uncommitted changes (for which I plan to look with ( ! git diff --quiet || ! git diff --staged --quiet )). Thanks! Laszlo