diff options
author | 2011-01-27 18:11:16 +0000 | |
---|---|---|
committer | 2011-02-11 14:13:08 +0000 | |
commit | cee61fc2987a00c4133f11055db942466b971c5b (patch) | |
tree | d4ae16eddb8f2c062681538d839c7c8924dd5d0a /configure.ac | |
parent | qemu: fix attach-interface regression (diff) | |
download | libvirt-cee61fc2987a00c4133f11055db942466b971c5b.tar.gz libvirt-cee61fc2987a00c4133f11055db942466b971c5b.tar.bz2 libvirt-cee61fc2987a00c4133f11055db942466b971c5b.zip |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8a4083f93..3cd824afb 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,25 @@ AC_SUBST([LIBVIRT_VERSION]) AC_SUBST([LIBVIRT_VERSION_INFO]) AC_SUBST([LIBVIRT_VERSION_NUMBER]) +AC_ARG_WITH([packager], + [AS_HELP_STRING([--with-packager], + [Extra packager name])], + [],[]) +AC_ARG_WITH([packager-version], + [AS_HELP_STRING([--with-packager-version], + [Extra packager version])], + [],[]) +if test "x$with_packager" != "xno" +then + AC_DEFINE_UNQUOTED([PACKAGER], ["$with_packager"], + [Extra package name]) +fi +if test "x$with_packager_version" != "xno" +then + AC_DEFINE_UNQUOTED([PACKAGER_VERSION], ["$with_packager_version"], + [Extra package version]) +fi + dnl Required minimum versions of all libs we depend on LIBXML_REQUIRED="2.6.0" GNUTLS_REQUIRED="1.0.25" |