[libvirt] [PATCH] maint: use gnulib configmake rather than open-coding things

Daniel P. Berrange berrange at redhat.com
Wed Nov 17 14:32:04 UTC 2010


On Tue, Nov 16, 2010 at 10:53:03AM -0700, Eric Blake wrote:
> In some cases, we were just plain confusing (BINDIR expanded to
> $(libexecdir), GETTEXT_PACKAGE redefined PACKAGE for no apparant
> reason); in other cases, we might as well benefit from gnulib doing
> the work for us (PKGDATADIR), sometimes with different spellings
> (LOCAL_STATE_DIR vs. LOCALSTATEDIR).
> 
> * bootstrap.conf (gnulib_modules): Add configmake.
> * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by
> gnulib.
> * src/Makefile.am (INCLUDES): Likewise.
> * tests/Makefile.am (INCLUDES): Likewise.
> * tools/Makefile.am (virsh_CFLAGS): Likewise.
> * daemon/libvirtd.c (qemudInitPaths, usage, main): Update
> clients.
> * src/cpu/cpu_map.c (CPUMAPFILE): Likewise.
> * src/driver.c (DEFAULT_DRIVER_DIR): Likewise.
> * src/internal.h (_): Likewise.
> * src/libvirt.c (virInitialize): Likewise.
> * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR):
> Likewise.
> * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig):
> Likewise.
> * src/network/bridge_driver.c (NETWORK_PID_DIR)
> (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise.
> * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup):
> Likewise.
> * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise.
> * src/qemu/qemu_driver.c (qemudStartup): Likewise.
> * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET)
> (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE)
> (LIBVIRT_PKI_DIR): Likewise.
> * src/secret/secret_driver.c (secretDriverStartup): Likewise.
> * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise.
> * src/security/virt-aa-helper.c (main): Likewise.
> * src/storage/storage_backend_disk.c (PARTHELPER): Likewise.
> * src/storage/storage_driver.c (storageDriverStartup): Likewise.
> * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise.
> * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise.
> * tools/virsh.c (main): Likewise.
> * docs/hooks.html.in: Likewise.
> ---
>  bootstrap.conf                     |    1 +
>  daemon/Makefile.am                 |    6 ++----
>  daemon/libvirtd.c                  |   14 ++++++++------
>  docs/hooks.html.in                 |    2 +-
>  src/Makefile.am                    |    8 --------
>  src/cpu/cpu_map.c                  |    4 ++--
>  src/driver.c                       |    3 ++-
>  src/internal.h                     |    2 +-
>  src/libvirt.c                      |    3 ++-
>  src/lxc/lxc_conf.c                 |    7 ++++---
>  src/lxc/lxc_conf.h                 |    7 ++++---
>  src/network/bridge_driver.c        |   11 ++++++-----
>  src/nwfilter/nwfilter_driver.c     |    6 +++---
>  src/qemu/qemu_conf.c               |    6 ++++--
>  src/qemu/qemu_driver.c             |   16 ++++++++--------
>  src/remote/remote_driver.h         |   12 +++++++-----
>  src/secret/secret_driver.c         |    3 ++-
>  src/security/security_apparmor.c   |    5 +++--
>  src/security/virt-aa-helper.c      |    7 ++++---
>  src/storage/storage_backend_disk.c |    3 ++-
>  src/storage/storage_driver.c       |    5 +++--
>  src/uml/uml_driver.c               |    9 +++++----
>  src/util/hooks.c                   |    3 ++-
>  tests/Makefile.am                  |    1 -
>  tools/Makefile.am                  |    2 --
>  tools/virsh.c                      |    5 +++--
>  26 files changed, 79 insertions(+), 72 deletions(-)

ACK

> diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
> index 2b5a7c6..c5a876b 100644
> --- a/src/secret/secret_driver.c
> +++ b/src/secret/secret_driver.c
> @@ -42,6 +42,7 @@
>  #include "uuid.h"
>  #include "virterror_internal.h"
>  #include "files.h"
> +#include "configmake.h"

Should we just put that in 'internal.h' so all source files
(in src/ at least) get it ?  We'd still need it separately
in some places

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list