Browse Source

New upstream version 1.2.1~rc1

tags/upstream/1.2.1_rc1^0
Guido Günther 7 years ago
parent
commit
0d0590ed1a
100 changed files with 6868 additions and 2077 deletions
  1. +7
    -0
      AUTHORS
  2. +3035
    -0
      ChangeLog
  3. +1
    -1
      GNUmakefile
  4. +2
    -2
      INSTALL
  5. +1
    -1
      Makefile.am
  6. +8
    -4
      Makefile.in
  7. +2
    -0
      aclocal.m4
  8. +22
    -12
      build-aux/config.guess
  9. +81
    -57
      build-aux/config.rpath
  10. +14
    -9
      build-aux/config.sub
  11. +0
    -35
      build-aux/depcomp
  12. +1
    -1
      build-aux/gitlog-to-changelog
  13. +145
    -192
      build-aux/install-sh
  14. +1
    -1
      build-aux/mktempd
  15. +1
    -1
      build-aux/snippet/arg-nonnull.h
  16. +1
    -1
      build-aux/snippet/c++defs.h
  17. +1
    -1
      build-aux/snippet/unused-parameter.h
  18. +1
    -1
      build-aux/snippet/warn-on-use.h
  19. +1
    -1
      build-aux/useless-if-before-free
  20. +1
    -1
      build-aux/vc-list-files
  21. +10
    -6
      cfg.mk
  22. +9
    -6
      config.h.in
  23. +1594
    -1167
      configure
  24. +23
    -13
      configure.ac
  25. +7
    -3
      daemon/Makefile.in
  26. +1
    -1
      daemon/libvirtd.8.in
  27. +6
    -1
      daemon/libvirtd.c
  28. +1
    -0
      daemon/libvirtd.h
  29. +2
    -0
      daemon/libvirtd.init.in
  30. +158
    -18
      daemon/remote.c
  31. +71
    -0
      daemon/remote_dispatch.h
  32. +7
    -3
      docs/Makefile.in
  33. +4
    -3
      docs/api_extension.html
  34. +4
    -3
      docs/api_extension.html.in
  35. +2
    -2
      docs/auditlog.html
  36. +2
    -2
      docs/auditlog.html.in
  37. +228
    -82
      docs/devhelp/libvirt-libvirt.html
  38. +15
    -0
      docs/devhelp/libvirt.devhelp
  39. +36
    -2
      docs/formatdomain.html
  40. +38
    -2
      docs/formatdomain.html.in
  41. +1
    -1
      docs/html/libvirt-libvirt.html
  42. +2
    -2
      docs/hvsupport.html
  43. +52
    -32
      docs/hvsupport.html.in
  44. +264
    -101
      docs/libvirt-api.xml
  45. +353
    -89
      docs/libvirt-refs.xml
  46. +7
    -3
      docs/schemas/Makefile.in
  47. +17
    -0
      docs/schemas/basictypes.rng
  48. +41
    -0
      docs/schemas/domaincommon.rng
  49. +14
    -10
      docs/schemas/domainsnapshot.rng
  50. +18
    -0
      examples/apparmor/Makefile.am
  51. +133
    -11
      examples/apparmor/Makefile.in
  52. +7
    -3
      examples/dominfo/Makefile.in
  53. +3
    -1
      examples/domsuspend/Makefile.am
  54. +7
    -3
      examples/domsuspend/Makefile.in
  55. +249
    -109
      examples/domsuspend/suspend.c
  56. +7
    -3
      examples/hellolibvirt/Makefile.in
  57. +0
    -0
      examples/object-events/Makefile.am
  58. +10
    -6
      examples/object-events/Makefile.in
  59. +45
    -2
      examples/object-events/event-test.c
  60. +7
    -3
      examples/openauth/Makefile.in
  61. +7
    -3
      examples/systemtap/Makefile.in
  62. +7
    -3
      examples/xml/nwfilter/Makefile.in
  63. +32
    -19
      gnulib/lib/Makefile.in
  64. +1
    -1
      gnulib/lib/accept.c
  65. +1
    -1
      gnulib/lib/alloca.in.h
  66. +1
    -1
      gnulib/lib/allocator.h
  67. +1
    -1
      gnulib/lib/areadlink.c
  68. +1
    -1
      gnulib/lib/areadlink.h
  69. +1
    -1
      gnulib/lib/arpa_inet.in.h
  70. +1
    -1
      gnulib/lib/asnprintf.c
  71. +1
    -1
      gnulib/lib/asprintf.c
  72. +5
    -2
      gnulib/lib/base64.c
  73. +1
    -1
      gnulib/lib/base64.h
  74. +1
    -1
      gnulib/lib/basename-lgpl.c
  75. +1
    -1
      gnulib/lib/binary-io.h
  76. +1
    -1
      gnulib/lib/bind.c
  77. +1
    -1
      gnulib/lib/bitrotate.h
  78. +1
    -1
      gnulib/lib/btowc.c
  79. +1
    -1
      gnulib/lib/byteswap.in.h
  80. +1
    -1
      gnulib/lib/c-ctype.c
  81. +1
    -1
      gnulib/lib/c-ctype.h
  82. +1
    -1
      gnulib/lib/c-strcase.h
  83. +1
    -1
      gnulib/lib/c-strcasecmp.c
  84. +1
    -1
      gnulib/lib/c-strcasestr.c
  85. +1
    -1
      gnulib/lib/c-strcasestr.h
  86. +1
    -1
      gnulib/lib/c-strncasecmp.c
  87. +1
    -1
      gnulib/lib/calloc.c
  88. +1
    -1
      gnulib/lib/canonicalize-lgpl.c
  89. +1
    -1
      gnulib/lib/careadlinkat.c
  90. +1
    -1
      gnulib/lib/careadlinkat.h
  91. +1
    -1
      gnulib/lib/chown.c
  92. +1
    -1
      gnulib/lib/cloexec.c
  93. +1
    -1
      gnulib/lib/cloexec.h
  94. +1
    -1
      gnulib/lib/close.c
  95. +1
    -1
      gnulib/lib/config.charset
  96. +1
    -1
      gnulib/lib/connect.c
  97. +1
    -1
      gnulib/lib/count-one-bits.h
  98. +1
    -1
      gnulib/lib/dirname-lgpl.c
  99. +1
    -1
      gnulib/lib/dirname.h
  100. +1
    -1
      gnulib/lib/dosname.h

+ 7
- 0
AUTHORS View File

@@ -82,6 +82,7 @@ Takahashi Tomohiro <takatom@jp.fujitsu.com>
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>

Adam Litke <agl@us.ibm.com>
Adam Walters <adam@pandorasboxen.com>
Alan Pevec <apevec@redhat.com>
Alex Jia <ajia@redhat.com>
Alex Williamson <alex.williamson@redhat.com>
@@ -148,6 +149,7 @@ David S. Wang <dwang2@cisco.com>
David Weber <wb@munzinger.de>
Davidlohr Bueso <dave@gnu.org>
Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
Denis Kondratenko <denis.kondratenko@gmail.com>
Dennis Chen <xschen@tnsoft.com.cn>
Diego Elio Pettenò <flameeyes@gmail.com>
Diego Woitasen <diego.woitasen@vhgroup.net>
@@ -244,6 +246,7 @@ Lincoln Myers <lincoln_myers@yahoo.com>
Liuji (Jeremy) <jeremy.liu@huawei.com>
Lorin Hochstein <lorin@isi.edu>
Luiz Capitulino <lcapitulino@redhat.com>
Lénaïc Huard <lenaic@lhuard.fr.eu.org>
MATSUDA Daiki <matsudadik@intellilink.co.jp>
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Marc-André Lureau <marcandre.lureau@redhat.com>
@@ -357,6 +360,7 @@ Taizo ITO <taizo.ito@hde.co.jp>
Taku Izumi <izumi.taku@jp.fujitsu.com>
Tal Kain <tal.kain@ravellosystems.com>
Tang Chen <tangchen@cn.fujitsu.com>
Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Thang Pham <thang.pham@us.ibm.com>
Thibault VINCENT <thibault.vincent@smartjog.com>
Thomas Treutner <thomas@scripty.at>
@@ -371,15 +375,18 @@ Vladislav Bogdanov <bubble@hoster-ok.com>
Václav Pavlín <vpavlin@redhat.com>
Wang Yufei <james.wangyufei@huawei.com>
Wangyufei (A) <james.wangyufei@huawei.com>
Wangyufei (James) <james.wangyufei@huawei.com>
Wen Congyang <wency@cn.fujitsu.com>
Wido den Hollander <wido@widodh.nl>
Wieland Hoffmann <themineo@googlemail.com>
William Jon McCann <william.jon.mccann@gmail.com>
Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Wout Mertens <Wout.Mertens@gmail.com>
Xu He Jie <xuhj@linux.vnet.ibm.com>
Xuesong Zhang <xuzhang@redhat.com>
Yanbing Du <ydu@redhat.com>
Yogesh Tillu <tillu.yogesh@gmail.com>
Yudai Yamagish <yummy@sfc.wide.ad.jp>
Yufang Zhang <yufang521247@gmail.com>
Yufang Zhang <yuzhang@redhat.com>
Yuji NISHIDA <nishidy@nict.go.jp>


+ 3035
- 0
ChangeLog
File diff suppressed because it is too large
View File


+ 1
- 1
GNUmakefile View File

@@ -5,7 +5,7 @@
# It is necessary if you want to build targets usually of interest
# only to the maintainer.

# Copyright (C) 2001, 2003, 2006-2013 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2006-2014 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by


+ 2
- 2
INSTALL View File

@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================

Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented


+ 1
- 1
Makefile.am View File

@@ -20,7 +20,7 @@ LCOV = lcov
GENHTML = genhtml

SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
tests po examples/domain-events/events-c examples/hellolibvirt \
tests po examples/object-events examples/hellolibvirt \
examples/dominfo examples/domsuspend examples/apparmor \
examples/xml/nwfilter examples/openauth examples/systemtap



+ 8
- 4
Makefile.in View File

@@ -97,7 +97,8 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(top_srcdir)/build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/arpa_inet_h.m4 \
$(top_srcdir)/m4/asm-underscore.m4 \
$(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/base64.m4 \
$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/byteswap.m4 \
@@ -131,8 +132,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getpagesize.m4 \
$(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/getugroups.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/getugroups.m4 $(top_srcdir)/m4/gl-openssl.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/grantpt.m4 \
$(top_srcdir)/m4/hostent.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \
@@ -1292,6 +1293,7 @@ LIBXL_LIBS = @LIBXL_LIBS@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_LIBS = @LIBXML_LIBS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPTO = @LIB_CRYPTO@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
@@ -1526,6 +1528,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
@@ -1547,6 +1550,7 @@ REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
@@ -1810,7 +1814,7 @@ top_srcdir = @top_srcdir@
LCOV = lcov
GENHTML = genhtml
SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
tests po examples/domain-events/events-c examples/hellolibvirt \
tests po examples/object-events examples/hellolibvirt \
examples/dominfo examples/domsuspend examples/apparmor \
examples/xml/nwfilter examples/openauth examples/systemtap



+ 2
- 0
aclocal.m4 View File

@@ -1319,6 +1319,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR

m4_include([m4/00gnulib.m4])
m4_include([m4/absolute-header.m4])
m4_include([m4/alloca.m4])
m4_include([m4/arpa_inet_h.m4])
m4_include([m4/asm-underscore.m4])
@@ -1383,6 +1384,7 @@ m4_include([m4/getpass.m4])
m4_include([m4/gettext.m4])
m4_include([m4/gettimeofday.m4])
m4_include([m4/getugroups.m4])
m4_include([m4/gl-openssl.m4])
m4_include([m4/glibc21.m4])
m4_include([m4/gnulib-common.m4])
m4_include([m4/gnulib-comp.m4])


+ 22
- 12
build-aux/config.guess View File

@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
# Copyright 1992-2014 Free Software Foundation, Inc.

timestamp='2013-06-10'
timestamp='2014-01-01'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright 1992-2013 Free Software Foundation, Inc.
Copyright 1992-2014 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -1260,16 +1260,26 @@ EOF
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;


+ 81
- 57
build-aux/config.rpath View File

@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2007 Free Software Foundation, Inc.
# Copyright 1996-2014 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -25,7 +25,7 @@
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.

# All known linkers require a `.a' archive for static linking (except MSVC,
# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
@@ -47,7 +47,7 @@ for cc_temp in $CC""; do
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`

# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
# Code taken from libtool.m4's _LT_COMPILER_PIC.

wl=
if test "$GCC" = yes; then
@@ -57,14 +57,7 @@ else
aix*)
wl='-Wl,'
;;
darwin*)
case $cc_basename in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | cygwin* | pw32* | os2*)
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@@ -72,24 +65,37 @@ else
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux* | k*bsd*-gnu)
linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
icc* | ecc*)
ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
nagfor*)
wl='-Wl,-Wl,,'
;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
xl* | bgxl* | bgf* | mpixl*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ F* | *Sun*Fortran*)
wl=
;;
*Sun\ C*)
wl='-Wl,'
;;
@@ -97,13 +103,24 @@ else
;;
esac
;;
newsos6)
;;
*nto* | *qnx*)
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
wl='-Wl,'
case $cc_basename in
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
wl='-Qoption ld '
;;
*)
wl='-Wl,'
;;
esac
;;
sunos4*)
wl='-Qoption ld '
@@ -124,7 +141,7 @@ else
esac
fi

# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.

hardcode_libdir_flag_spec=
hardcode_libdir_separator=
@@ -132,7 +149,7 @@ hardcode_direct=no
hardcode_minus_L=no

case "$host_os" in
cygwin* | mingw* | pw32*)
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -158,22 +175,21 @@ if test "$with_gnu_ld" = yes; then
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix3* | aix4* | aix5*)
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
@@ -182,7 +198,7 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -192,11 +208,13 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
haiku*)
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | k*bsd*-gnu)
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
@@ -254,7 +272,7 @@ else
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -264,7 +282,7 @@ else
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -319,14 +337,18 @@ else
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -336,24 +358,15 @@ else
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
:
else
case $cc_basename in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
ld_shlibs=no
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -414,6 +427,8 @@ else
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
*nto* | *qnx*)
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
@@ -494,7 +509,7 @@ else
fi

# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
@@ -505,11 +520,16 @@ case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix4* | aix5*)
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
library_names_spec='$libname.a'
case "$host_cpu" in
powerpc*)
library_names_spec='$libname$shrext' ;;
m68k)
library_names_spec='$libname.a' ;;
esac
;;
beos*)
library_names_spec='$libname$shrext'
@@ -517,7 +537,7 @@ case "$host_os" in
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32*)
cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
@@ -528,8 +548,6 @@ case "$host_os" in
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd1*)
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
@@ -541,6 +559,9 @@ case "$host_os" in
gnu*)
library_names_spec='$libname$shrext'
;;
haiku*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
@@ -576,7 +597,7 @@ case "$host_os" in
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu)
linux* | k*bsd*-gnu | kopensolaris*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
@@ -588,7 +609,7 @@ case "$host_os" in
newsos6)
library_names_spec='$libname$shrext'
;;
nto-qnx*)
*nto* | *qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
@@ -619,6 +640,9 @@ case "$host_os" in
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
tpf*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;


+ 14
- 9
build-aux/config.sub View File

@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
# Copyright 1992-2014 Free Software Foundation, Inc.

timestamp='2013-04-24'
timestamp='2014-01-01'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)

Copyright 1992-2013 Free Software Foundation, Inc.
Copyright 1992-2014 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -257,7 +257,7 @@ case $basic_machine in
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -265,6 +265,7 @@ case $basic_machine in
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -324,7 +325,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -372,7 +373,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -381,6 +382,7 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -794,7 +796,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
basic_machine=i386-pc
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -830,7 +832,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1006,7 +1008,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
@@ -1546,6 +1548,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;


+ 0
- 35
build-aux/depcomp View File

@@ -251,41 +251,6 @@ hp)
exit 1
;;

sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"

if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;

xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,


+ 1
- 1
build-aux/gitlog-to-changelog View File

@@ -9,7 +9,7 @@ my $VERSION = '2012-07-29 06:11'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.

# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# Copyright (C) 2008-2014 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by


+ 145
- 192
build-aux/install-sh View File

@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile

scriptversion=2011-11-20.07; # UTC
scriptversion=2013-10-30.23; # UTC

# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.

tab=' '
nl='
'
IFS=" "" $nl"
IFS=" $tab$nl"

# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
doit_exec=${doit:-exec}

# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}

posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'

posix_mkdir=

# Desired mode of installed file.
@@ -137,40 +122,39 @@ while test $# -ne 0; do
-d) dir_arg=true;;

-g) chgrpcmd="$chgrpprog $2"
shift;;
shift;;

--help) echo "$usage"; exit $?;;

-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;

-o) chowncmd="$chownprog $2"
shift;;
shift;;

-s) stripcmd=$stripprog;;

-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;

-T) no_target_directory=true;;

--version) echo "$0 $scriptversion"; exit $?;;

--) shift
break;;
--) shift
break;;

-*) echo "$0: invalid option: $1" >&2
exit 1;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;

*) break;;
esac
@@ -223,16 +207,16 @@ if test -z "$dir_arg"; then

*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw='% 200'
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw=,u+rw
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -270,40 +254,14 @@ do
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`

dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@@ -314,74 +272,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac

if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -391,53 +349,51 @@ do
# directory the slow way, step by step, checking for races as we go.

case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac

eval "$initialize_posix_glob"

oIFS=$IFS
IFS=/
$posix_glob set -f
set -f
set fnord $dstdir
shift
$posix_glob set +f
set +f
IFS=$oIFS

prefixes=

for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done

if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
@@ -472,15 +428,12 @@ do

# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&

eval "$initialize_posix_glob" &&
$posix_glob set -f &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&

set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -493,24 +446,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1



+ 1
- 1
build-aux/mktempd View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Create a temporary directory, much like mktemp -d does.

# Copyright (C) 2007-2013 Free Software Foundation, Inc.
# Copyright (C) 2007-2014 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by


+ 1
- 1
build-aux/snippet/arg-nonnull.h View File

@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
Copyright (C) 2009-2014 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published


+ 1
- 1
build-aux/snippet/c++defs.h View File

@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2013 Free Software Foundation, Inc.
Copyright (C) 2010-2014 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published


+ 1
- 1
build-aux/snippet/unused-parameter.h View File

@@ -1,5 +1,5 @@
/* A C macro for declaring that specific function parameters are not used.
Copyright (C) 2008-2013 Free Software Foundation, Inc.
Copyright (C) 2008-2014 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published


+ 1
- 1
build-aux/snippet/warn-on-use.h View File

@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
Copyright (C) 2010-2013 Free Software Foundation, Inc.
Copyright (C) 2010-2014 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published


+ 1
- 1
build-aux/useless-if-before-free View File

@@ -10,7 +10,7 @@ my $VERSION = '2012-01-06 07:23'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.

# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# Copyright (C) 2008-2014 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by


+ 1
- 1
build-aux/vc-list-files View File

@@ -4,7 +4,7 @@
# Print a version string.
scriptversion=2011-05-16.22; # UTC

# Copyright (C) 2006-2013 Free Software Foundation, Inc.
# Copyright (C) 2006-2014 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by


+ 10
- 6
cfg.mk View File

@@ -125,9 +125,8 @@ useless_free_options = \
--name=virDomainDeviceDefFree \
--name=virDomainDiskDefFree \
--name=virDomainEventCallbackListFree \
--name=virDomainEventFree \
--name=virDomainEventQueueFree \
--name=virDomainEventStateFree \
--name=virObjectEventQueueFree \
--name=virObjectEventStateFree \
--name=virDomainFSDefFree \
--name=virDomainGraphicsDefFree \
--name=virDomainHostdevDefFree \
@@ -205,7 +204,6 @@ useless_free_options = \
# y virDomainDeviceDefFree
# y virDomainDiskDefFree
# y virDomainEventCallbackListFree
# y virDomainEventFree
# y virDomainEventQueueFree
# y virDomainFSDefFree
# n virDomainFree
@@ -869,6 +867,12 @@ sc_prohibit_getenv:
halt='Use virGetEnv{Allow,Block}SUID instead of getenv' \
$(_sc_search_regexp)

sc_prohibit_atoi:
@prohibit='\bato(i|f|l|ll|q) *\(' \
halt='Use virStrToLong* instead of atoi, atol, atof, atoq, atoll' \
$(_sc_search_regexp)


# We don't use this feature of maint.mk.
prev_version_file = /dev/null

@@ -959,7 +963,7 @@ exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/virutil\.c$$

exclude_file_name_regexp--sc_prohibit_asprintf = \
^(bootstrap.conf$$|src/util/virstring\.[ch]$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
^(bootstrap.conf$$|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)

exclude_file_name_regexp--sc_prohibit_strdup = \
^(docs/|examples/|src/util/virstring\.c|tests/virnetserverclientmock.c$$)
@@ -999,7 +1003,7 @@ exclude_file_name_regexp--sc_prohibit_sprintf = \
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$

exclude_file_name_regexp--sc_prohibit_strtol = \
^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$
^(src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c)|(examples/domsuspend/suspend.c)$$

exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$



+ 9
- 6
config.h.in View File

@@ -1186,6 +1186,9 @@
to 0 otherwise. */
#undef HAVE_MALLOC_GNU

/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H

/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX

@@ -1266,6 +1269,12 @@
/* Define to 1 if the system has the 'openpty' function. */
#undef HAVE_OPENPTY

/* Define to 1 if libcrypto is used for MD5. */
#undef HAVE_OPENSSL_MD5

/* Define to 1 if libcrypto is used for SHA256. */
#undef HAVE_OPENSSL_SHA256

/* Define to 1 if you have the <OS.h> header file. */
#undef HAVE_OS_H

@@ -2648,9 +2657,6 @@
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))

/* Define to rpl_gmtime if the replacement function should be used. */
#undef gmtime

/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
@@ -2676,9 +2682,6 @@
/* Define to 1 if the compiler is checking for lint. */
#undef lint

/* Define to rpl_localtime if the replacement function should be used. */
#undef localtime

/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t



+ 1594
- 1167
configure
File diff suppressed because it is too large
View File


+ 23
- 13
configure.ac View File

@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.

AC_INIT([libvirt], [1.2.0], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_INIT([libvirt], [1.2.1], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
@@ -1418,6 +1418,16 @@ elif test "with_secdriver_apparmor" != "no" ; then
fi
AM_CONDITIONAL([WITH_SECDRIVER_APPARMOR], [test "$with_secdriver_apparmor" != "no"])

if test "$with_apparmor" != "no"; then
AC_ARG_WITH([apparmor-profiles],
[AS_HELP_STRING([--with-apparmor-profiles],
[install apparmor profiles @<:@default=no@:>@])],
[with_apparmor_profiles=yes],
[with_apparmor_profiles=no])
else
with_apparmor_profiles="no"
fi
AM_CONDITIONAL([WITH_APPARMOR_PROFILES], [test "$with_apparmor_profiles" != "no"])

dnl DTrace static probes
AC_ARG_WITH([dtrace],
@@ -2032,17 +2042,17 @@ AM_CONDITIONAL([WITH_HYPERV], [test "$with_hyperv" = "yes"])


dnl Allow perl/python overrides
AC_PATH_PROG([PYTHON], [python])
AC_PATH_PROGS([PYTHON], [python2 python])
AC_PATH_PROG([PERL], [perl])

AC_ARG_ENABLE([with-test-suite],
[AS_HELP_STRING([--with-test-suite],
[build test suite by default @<:@default=check@:>@])],
[case "${withval}" in
yes|no|check) ;;
*) AC_MSG_ERROR([bad value ${withval} for tests option]) ;;
esac],
[withval=check])
AC_ARG_WITH([test-suite],
[AS_HELP_STRING([--with-test-suite],
[build test suite by default @<:@default=check@:>@])],
[case "${withval}" in
yes|no|check) ;;
*) AC_MSG_ERROR([bad value ${withval} for tests option]) ;;
esac],
[withval=check])

AC_MSG_CHECKING([Whether to build test suite by default])
if test "$withval" = "check" ; then
@@ -2129,7 +2139,7 @@ AC_ARG_ENABLE([test-locking],
enable_locking=$enableval

if test "$enable_locking" = "yes"; then
LOCK_CHECKING_CFLAGS="-Dbool=char -D_Bool=char -save-temps"
LOCK_CHECKING_CFLAGS="-save-temps"
AC_SUBST([LOCK_CHECKING_CFLAGS])
fi
AM_CONDITIONAL([WITH_CIL],[test "$enable_locking" = "yes"])
@@ -2554,7 +2564,7 @@ AC_CONFIG_FILES([\
tools/Makefile \
tests/Makefile \
examples/apparmor/Makefile \
examples/domain-events/events-c/Makefile \
examples/object-events/Makefile \
examples/domsuspend/Makefile \
examples/dominfo/Makefile \
examples/openauth/Makefile \
@@ -2607,7 +2617,7 @@ AC_MSG_NOTICE([])
AC_MSG_NOTICE([Security Drivers])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux ($SELINUX_MOUNT)])
AC_MSG_NOTICE([AppArmor: $with_secdriver_apparmor])
AC_MSG_NOTICE([AppArmor: $with_secdriver_apparmor (install profiles: $with_apparmor_profiles)])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Driver Loadable Modules])
AC_MSG_NOTICE([])


+ 7
- 3
daemon/Makefile.in View File

@@ -104,7 +104,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/build-aux/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/arpa_inet_h.m4 \
$(top_srcdir)/m4/asm-underscore.m4 \
$(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/base64.m4 \
$(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/byteswap.m4 \
@@ -138,8 +139,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getpagesize.m4 \
$(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/getugroups.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/getugroups.m4 $(top_srcdir)/m4/gl-openssl.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/grantpt.m4 \
$(top_srcdir)/m4/hostent.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \
@@ -1313,6 +1314,7 @@ LIBXL_LIBS = @LIBXL_LIBS@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_LIBS = @LIBXML_LIBS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPTO = @LIB_CRYPTO@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
@@ -1547,6 +1549,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
@@ -1568,6 +1571,7 @@ REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@


+ 1
- 1
daemon/libvirtd.8.in View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "LIBVIRTD 8"
.TH LIBVIRTD 8 "2013-08-28" "libvirt-1.2.0" "Virtualization Support"
.TH LIBVIRTD 8 "2013-08-28" "libvirt-1.2.1" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l


+ 6
- 1
daemon/libvirtd.c View File

@@ -108,6 +108,8 @@ virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;

volatile bool driversInitialized = false;

enum {
VIR_DAEMON_ERR_NONE = 0,
VIR_DAEMON_ERR_PIDFILE,
@@ -912,6 +914,8 @@ static void daemonRunStateInit(void *opaque)
goto cleanup;
}

driversInitialized = true;

#ifdef HAVE_DBUS
/* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */
if (!virNetServerIsPrivileged(srv)) {
@@ -1546,7 +1550,8 @@ cleanup:

daemonConfigFree(config);

virStateCleanup();
if (driversInitialized)
virStateCleanup();

return ret;
}

+ 1
- 0
daemon/libvirtd.h View File

@@ -50,6 +50,7 @@ struct daemonClientPrivate {
virMutex lock;

int domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LAST];
int networkEventCallbackID[VIR_NETWORK_EVENT_ID_LAST];

# if WITH_SASL
virNetSASLSessionPtr sasl;


+ 2
- 0
daemon/libvirtd.init.in View File

@@ -9,9 +9,11 @@
# Should-Start: $named
# Should-Start: xend
# Should-Start: avahi-daemon
# Should-Start: virtlockd
# Required-Stop: $network messagebus
# Should-Stop: $named
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon for managing guest instances
# and libvirt virtual networks


+ 158
- 18
daemon/remote.c View File

@@ -49,6 +49,7 @@
#include "qemu_protocol.h"
#include "lxc_protocol.h"
#include "virstring.h"
#include "object_event.h"

#define VIR_FROM_THIS VIR_FROM_RPC

@@ -108,7 +109,7 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,

/* Prototypes */
static void
remoteDispatchDomainEventSend(virNetServerClientPtr client,
remoteDispatchObjectEventSend(virNetServerClientPtr client,
virNetServerProgramPtr program,
int procnr,
xdrproc_t proc,
@@ -134,7 +135,7 @@ static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
data.event = event;
data.detail = detail;

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE,
(xdrproc_t)xdr_remote_domain_event_lifecycle_msg, &data);

@@ -157,7 +158,7 @@ static int remoteRelayDomainEventReboot(virConnectPtr conn ATTRIBUTE_UNUSED,
memset(&data, 0, sizeof(data));
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_REBOOT,
(xdrproc_t)xdr_remote_domain_event_reboot_msg, &data);

@@ -183,7 +184,7 @@ static int remoteRelayDomainEventRTCChange(virConnectPtr conn ATTRIBUTE_UNUSED,
make_nonnull_domain(&data.dom, dom);
data.offset = offset;

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE,
(xdrproc_t)xdr_remote_domain_event_rtc_change_msg, &data);

@@ -209,7 +210,7 @@ static int remoteRelayDomainEventWatchdog(virConnectPtr conn ATTRIBUTE_UNUSED,
make_nonnull_domain(&data.dom, dom);
data.action = action;

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_WATCHDOG,
(xdrproc_t)xdr_remote_domain_event_watchdog_msg, &data);

@@ -240,7 +241,7 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
make_nonnull_domain(&data.dom, dom);
data.action = action;

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR,
(xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);

@@ -279,7 +280,7 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS

make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON,
(xdrproc_t)xdr_remote_domain_event_io_error_reason_msg, &data);

@@ -342,7 +343,7 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
}
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_GRAPHICS,
(xdrproc_t)xdr_remote_domain_event_graphics_msg, &data);

@@ -388,7 +389,7 @@ static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
data.status = status;
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB,
(xdrproc_t)xdr_remote_domain_event_block_job_msg, &data);

@@ -415,7 +416,7 @@ static int remoteRelayDomainEventControlError(virConnectPtr conn ATTRIBUTE_UNUSE
memset(&data, 0, sizeof(data));
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR,
(xdrproc_t)xdr_remote_domain_event_control_error_msg, &data);

@@ -461,7 +462,7 @@ static int remoteRelayDomainEventDiskChange(virConnectPtr conn ATTRIBUTE_UNUSED,

make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE,
(xdrproc_t)xdr_remote_domain_event_disk_change_msg, &data);

@@ -497,7 +498,7 @@ static int remoteRelayDomainEventTrayChange(virConnectPtr conn ATTRIBUTE_UNUSED,

make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE,
(xdrproc_t)xdr_remote_domain_event_tray_change_msg, &data);

@@ -520,7 +521,7 @@ static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
memset(&data, 0, sizeof(data));
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP,
(xdrproc_t)xdr_remote_domain_event_pmwakeup_msg, &data);

@@ -543,7 +544,7 @@ static int remoteRelayDomainEventPMSuspend(virConnectPtr conn ATTRIBUTE_UNUSED,
memset(&data, 0, sizeof(data));
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND,
(xdrproc_t)xdr_remote_domain_event_pmsuspend_msg, &data);

@@ -569,7 +570,7 @@ remoteRelayDomainEventBalloonChange(virConnectPtr conn ATTRIBUTE_UNUSED,
make_nonnull_domain(&data.dom, dom);
data.actual = actual;

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE,
(xdrproc_t)xdr_remote_domain_event_balloon_change_msg, &data);

@@ -593,7 +594,7 @@ static int remoteRelayDomainEventPMSuspendDisk(virConnectPtr conn ATTRIBUTE_UNUS
memset(&data, 0, sizeof(data));
make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK,
(xdrproc_t)xdr_remote_domain_event_pmsuspend_disk_msg, &data);

@@ -623,7 +624,7 @@ remoteRelayDomainEventDeviceRemoved(virConnectPtr conn ATTRIBUTE_UNUSED,

make_nonnull_domain(&data.dom, dom);

remoteDispatchDomainEventSend(client, remoteProgram,
remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED,
(xdrproc_t)xdr_remote_domain_event_device_removed_msg,
&data);
@@ -653,6 +654,39 @@ static virConnectDomainEventGenericCallback domainEventCallbacks[] = {

verify(ARRAY_CARDINALITY(domainEventCallbacks) == VIR_DOMAIN_EVENT_ID_LAST);

static int remoteRelayNetworkEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
virNetworkPtr net,
int event,
int detail,
void *opaque)
{
virNetServerClientPtr client = opaque;
remote_network_event_lifecycle_msg data;

if (!client)
return -1;

VIR_DEBUG("Relaying network lifecycle event %d, detail %d", event, detail);

/* build return data */
memset(&data, 0, sizeof(data));
make_nonnull_network(&data.net, net);
data.event = event;
data.detail = detail;

remoteDispatchObjectEventSend(client, remoteProgram,
REMOTE_PROC_NETWORK_EVENT_LIFECYCLE,
(xdrproc_t)xdr_remote_network_event_lifecycle_msg, &data);

return 0;
}

static virConnectNetworkEventGenericCallback networkEventCallbacks[] = {
VIR_NETWORK_EVENT_CALLBACK(remoteRelayNetworkEventLifecycle),
};

verify(ARRAY_CARDINALITY(networkEventCallbacks) == VIR_NETWORK_EVENT_ID_LAST);

/*
* You must hold lock for at least the client
* We don't free stuff here, merely disconnect the client's
@@ -680,6 +714,15 @@ void remoteClientFreeFunc(void *data)
priv->domainEventCallbackID[i] = -1;
}

for (i = 0; i < VIR_NETWORK_EVENT_ID_LAST; i++) {
if (priv->networkEventCallbackID[i] != -1) {
VIR_DEBUG("Deregistering to relay remote events %zu", i);
virConnectNetworkEventDeregisterAny(priv->conn,
priv->networkEventCallbackID[i]);
}
priv->networkEventCallbackID[i] = -1;
}

virConnectClose(priv->conn);

virIdentitySetCurrent(NULL);
@@ -716,6 +759,9 @@ void *remoteClientInitHook(virNetServerClientPtr client,
for (i = 0; i < VIR_DOMAIN_EVENT_ID_LAST; i++)
priv->domainEventCallbackID[i] = -1;

for (i = 0; i < VIR_NETWORK_EVENT_ID_LAST; i++)
priv->networkEventCallbackID[i] = -1;

virNetServerClientSetCloseHook(client, remoteClientCloseFunc);
return priv;
}
@@ -3158,7 +3204,7 @@ cleanup:
}

static void
remoteDispatchDomainEventSend(virNetServerClientPtr client,
remoteDispatchObjectEventSend(virNetServerClientPtr client,
virNetServerProgramPtr program,
int procnr,
xdrproc_t proc,
@@ -5216,6 +5262,100 @@ cleanup:
}


static int
remoteDispatchConnectNetworkEventRegisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client ATTRIBUTE_UNUSED,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED,
remote_connect_network_event_register_any_args *args,
remote_connect_network_event_register_any_ret *ret ATTRIBUTE_UNUSED)
{