]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Imprint all logs with version + package build information
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 27 Jan 2011 18:11:16 +0000 (18:11 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Feb 2011 14:13:08 +0000 (14:13 +0000)
commitcee61fc2987a00c4133f11055db942466b971c5b
treed4ae16eddb8f2c062681538d839c7c8924dd5d0a
parent6bf4788e86b408ba8f813e32dedd6b1956538df5
Imprint all logs with version + package build information

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
 ...

The 'configure' script gains two new arguments which can be
used as

   --with-packager="Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10"
   --with-packager-version="1.fc14"

to allow distros to append a custom string with package specific
data.

The RPM specfile is modified so that it appends the RPM version,
the build host, the build date and the packager name.

eg

 $ LIBVIRT_DEBUG=1 virsh
 18:14:52.086: 17551: info : libvirt version: 0.8.7, package: 1.fc13 (Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10)
 18:14:52.086: 17551: debug : virInitialize:361 : register drivers

Thus when distro packagers receive bug reports they can clearly
see what version was in use, even if the bug reporter mistakenly
or intentionally lies about version/builds

* 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-packager & --with-packager-version args
configure.ac
libvirt.spec.in
src/util/logging.c