[libvirt] [PATCH] Imprint all logs with version + package build information

Eric Blake eblake at redhat.com
Thu Jan 27 20:23:41 UTC 2011


[adding bug-gnulib]

On 01/27/2011 11:21 AM, Daniel P. Berrange wrote:
> The logging functions are enhanced so that immediately prior to
> the first log message being printed to any output channel, the
> libvirt package version will be printed.
> 
> eg
> 
>  $ LIBVIRT_DEBUG=1 virsh
>  18:13:28.013: 17536: info : libvirt version: 0.8.7
>  18:13:28.013: 17536: debug : virInitialize:361 : register drivers

I like it.

> 
> * src/util/logging.c: Output version data prior to first log message
> * libvirt.spec.in: Include RPM release, date, hostname & packager
> * configure.ac: Add --with-package-string arg

Let's have some cross-project compatibility (to avoid confusion or
subtle typos when using the same option already in use elsewhere).  Many
GNU projects already have the following configure options:

  --with-packager         String identifying the packager of this software
  --with-packager-version Packager-specific version information
  --with-packager-bug-reports
                          Packager info for bug reports (URL/e-mail/...)

and in fact, they get that straight out of gnulib, via the version-etc
module (unfortunately LGPLv3+ at the moment) - let me see if I can get
that improved, so we can reap the benefits of shared code, before I
review a slightly different implementation for libvirt.  But part of the
issue is that the current version-etc module, in addition to providing
the nice .m4 file for defining additional PACKAGER variables in the
source code, also provides the version_etc() function which is hardcoded
to output a GPLv3+ version string (oops - why is the module LGPLv3+ if
it outputs GPLv3+?).

Gnulib already has version-etc-fsf separate from version-etc for easy
exclusion of an FSF copyright holder, so what is still missing is an
easy way to override the default license output when using
version_etc().  Maybe by moving the default GPLv3+ out of version-etc.c
and into version-etc-fsf.c.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110127/80cfd788/attachment-0001.sig>


More information about the libvir-list mailing list