2005-11-02 12:50:21 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
## Copyright (C) 2005-2018 Red Hat, Inc.
|
2013-05-14 23:42:12 +00:00
|
|
|
##
|
|
|
|
## This library is free software; you can redistribute it and/or
|
|
|
|
## modify it under the terms of the GNU Lesser General Public
|
|
|
|
## License as published by the Free Software Foundation; either
|
|
|
|
## version 2.1 of the License, or (at your option) any later version.
|
|
|
|
##
|
|
|
|
## This library is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
## Lesser General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU Lesser General Public
|
|
|
|
## License along with this library. If not, see
|
|
|
|
## <http://www.gnu.org/licenses/>.
|
2011-07-28 18:56:24 +00:00
|
|
|
|
2014-03-14 10:35:46 +00:00
|
|
|
# old automake does not provide abs_{src,build}dir variables
|
|
|
|
abs_builddir = $(shell pwd)
|
2014-04-24 14:05:42 +00:00
|
|
|
abs_topbuilddir = $(shell cd .. && pwd)
|
2014-03-14 10:35:46 +00:00
|
|
|
abs_srcdir = $(shell cd $(srcdir) && pwd)
|
2015-04-27 09:08:59 +00:00
|
|
|
abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
|
2014-03-14 10:35:46 +00:00
|
|
|
|
Move all XML configuration handling to src/conf/
* src/capabilities.c, src/capabilities.h, src/domain_conf.c,
src/domain_conf.h, src/domain_event.c, src/domain_event.h,
src/interface_conf.c, src/interface_conf.h,
src/network_conf.c, src/network_conf.h, src/node_device_conf.c,
src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h,
src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c,
src/storage_encryption_conf.h: Move to src/conf/
* src/Makefile.am: Add -Isrc/conf to the individual build targets
which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
and SELINUX_CFLAGS from global INCLUDES and only have them in build
targets which actually need them. Create a libvirt_conf.la
convenience library for all config parsers
* src/hostusb.h: Remove bogus include of domain_conf.h
* tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src
since it never has any generated header files
* daemon/Makefile.am: Add -Isrc/conf
* proxy/Makefile.am: Add -Isrc/conf and cope with renamed files
* src/hash.c: Remove bogus include of libxml/threads.h
2009-09-16 14:39:12 +00:00
|
|
|
# No libraries with the exception of LIBXML should be listed
|
|
|
|
# here. List them against the individual XXX_la_CFLAGS targets
|
2011-07-28 12:55:21 +00:00
|
|
|
# that actually use them. Also keep GETTEXT_CPPFLAGS at the end.
|
2017-11-03 12:09:47 +00:00
|
|
|
INCLUDES = -I../gnulib/lib \
|
|
|
|
-I$(top_srcdir)/gnulib/lib \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-I../include \
|
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(srcdir)/util \
|
|
|
|
-I./util \
|
|
|
|
-DIN_LIBVIRT \
|
|
|
|
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
|
|
|
|
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
|
2011-07-28 12:55:21 +00:00
|
|
|
$(GETTEXT_CPPFLAGS)
|
build: consistently use CFLAGS
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
in automake 1.9.6) should only include -I, -D, and -U directives; more
generic directives like -Wall belong in CFLAGS since they affect more
phases of the build process. Therefore, we should be sticking CFLAGS
additions into a CFLAGS container, not a CPPFLAGS container.
* src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
(INCLUDES): Move CFLAGS items...
(AM_CFLAGS): ...to their proper location.
* python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
* tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
(commandtest_CFLAGS, commandhelper_CFLAGS)
(virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
2011-05-31 22:15:28 +00:00
|
|
|
|
2016-06-29 13:19:18 +00:00
|
|
|
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
AM_CFLAGS = $(LIBXML_CFLAGS) \
|
|
|
|
$(WARN_CFLAGS) \
|
|
|
|
$(LOCK_CHECKING_CFLAGS) \
|
|
|
|
$(WIN32_EXTRA_CFLAGS) \
|
build: consistently use CFLAGS
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
in automake 1.9.6) should only include -I, -D, and -U directives; more
generic directives like -Wall belong in CFLAGS since they affect more
phases of the build process. Therefore, we should be sticking CFLAGS
additions into a CFLAGS container, not a CPPFLAGS container.
* src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
(INCLUDES): Move CFLAGS items...
(AM_CFLAGS): ...to their proper location.
* python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
* tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
(commandtest_CFLAGS, commandhelper_CFLAGS)
(virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
2011-05-31 22:15:28 +00:00
|
|
|
$(COVERAGE_CFLAGS)
|
2017-11-03 12:09:47 +00:00
|
|
|
AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
|
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
$(RELRO_LDFLAGS) \
|
|
|
|
$(NO_INDIRECT_LDFLAGS) \
|
|
|
|
$(CYGWIN_EXTRA_LDFLAGS) \
|
|
|
|
$(MINGW_EXTRA_LDFLAGS) \
|
2013-08-20 09:20:46 +00:00
|
|
|
$(NULL)
|
2018-01-25 09:35:57 +00:00
|
|
|
AM_LDFLAGS_MOD = -module -avoid-version $(AM_LDFLAGS)
|
2018-01-25 09:35:58 +00:00
|
|
|
AM_LDFLAGS_MOD_NOUNDEF = $(AM_LDFLAGS_MOD) $(NO_UNDEFINED_LDFLAGS)
|
2010-06-09 18:35:49 +00:00
|
|
|
|
2017-03-03 12:43:51 +00:00
|
|
|
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
|
|
|
|
|
2017-03-02 10:46:53 +00:00
|
|
|
EXTRA_DIST = $(conf_DATA)
|
2007-10-12 19:54:15 +00:00
|
|
|
|
2010-03-06 16:56:28 +00:00
|
|
|
BUILT_SOURCES =
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
CLEANFILES =
|
|
|
|
DISTCLEANFILES =
|
|
|
|
MAINTAINERCLEANFILES =
|
2012-12-14 10:54:16 +00:00
|
|
|
nodist_conf_DATA =
|
2018-02-21 18:05:56 +00:00
|
|
|
DRIVER_SOURCE_FILES =
|
|
|
|
STATEFUL_DRIVER_SOURCE_FILES =
|
|
|
|
noinst_LTLIBRARIES =
|
|
|
|
mod_LTLIBRARIES =
|
|
|
|
INSTALL_DATA_DIRS =
|
2018-02-21 18:05:56 +00:00
|
|
|
libvirt_la_BUILT_LIBADD =
|
2018-02-21 18:05:56 +00:00
|
|
|
SYM_FILES =
|
|
|
|
USED_SYM_FILES =
|
|
|
|
GENERATED_SYM_FILES =
|
2018-02-21 18:05:56 +00:00
|
|
|
augeas_DATA =
|
|
|
|
augeastest_DATA =
|
|
|
|
conf_DATA =
|
|
|
|
AUGEAS_DIRS =
|
|
|
|
if WITH_DTRACE_PROBES
|
|
|
|
tapset_DATA =
|
|
|
|
endif WITH_DTRACE_PROBES
|
2018-02-21 18:05:56 +00:00
|
|
|
libexec_PROGRAMS =
|
|
|
|
RPC_PROBE_FILES =
|
2018-02-21 18:05:56 +00:00
|
|
|
LOGROTATE_FILES_IN =
|
|
|
|
PODFILES =
|
|
|
|
MANINFILES =
|
|
|
|
SYSTEMD_UNIT_FILES_IN =
|
|
|
|
SYSVINIT_FILES_IN =
|
|
|
|
UPSTART_FILES =
|
|
|
|
SYSCONF_FILES =
|
|
|
|
sbin_PROGRAMS =
|
|
|
|
man8_MANS =
|
2018-02-21 18:05:56 +00:00
|
|
|
DRIVER_SOURCES =
|
2018-02-21 18:05:56 +00:00
|
|
|
|
2018-02-23 16:33:19 +00:00
|
|
|
include conf/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include cpu/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include security/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include access/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include logging/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include uml/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include phyp/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include test/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include esx/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include hyperv/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include vmware/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include vbox/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include openvz/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include qemu/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include bhyve/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include xenconfig/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include libxl/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include xen/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include xenapi/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include vz/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include lxc/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include interface/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include network/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include nwfilter/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include node_device/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include secret/Makefile.inc.am
|
2018-02-27 11:30:54 +00:00
|
|
|
include storage/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
include remote/Makefile.inc.am
|
2018-02-21 18:05:56 +00:00
|
|
|
|
2010-03-06 16:56:28 +00:00
|
|
|
|
2011-11-04 20:53:15 +00:00
|
|
|
THREAD_LIBS = $(LIB_PTHREAD) $(LTLIBMULTITHREAD)
|
|
|
|
|
2013-10-21 21:36:11 +00:00
|
|
|
SECDRIVER_CFLAGS =
|
2013-02-01 19:22:26 +00:00
|
|
|
SECDRIVER_LIBS =
|
|
|
|
if WITH_SECDRIVER_SELINUX
|
2013-10-21 21:36:11 +00:00
|
|
|
SECDRIVER_CFLAGS += $(SELINUX_CFLAGS)
|
2013-02-01 19:22:26 +00:00
|
|
|
SECDRIVER_LIBS += $(SELINUX_LIBS)
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SECDRIVER_SELINUX
|
2013-02-01 19:22:26 +00:00
|
|
|
if WITH_SECDRIVER_APPARMOR
|
2013-10-21 21:36:11 +00:00
|
|
|
SECDRIVER_CFLAGS += $(APPARMOR_CFLAGS)
|
2013-02-01 19:22:26 +00:00
|
|
|
SECDRIVER_LIBS += $(APPARMOR_LIBS)
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SECDRIVER_APPARMOR
|
2013-02-01 19:22:26 +00:00
|
|
|
|
2005-11-02 15:37:34 +00:00
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
lib_LTLIBRARIES = libvirt.la libvirt-qemu.la libvirt-lxc.la
|
2007-06-15 01:21:18 +00:00
|
|
|
|
2011-01-21 17:42:07 +00:00
|
|
|
moddir = $(libdir)/libvirt/connection-driver
|
2008-11-21 12:16:08 +00:00
|
|
|
|
2009-10-08 15:40:14 +00:00
|
|
|
confdir = $(sysconfdir)/libvirt
|
2018-02-21 18:05:56 +00:00
|
|
|
conf_DATA += libvirt.conf libvirt-admin.conf
|
2008-11-21 12:16:08 +00:00
|
|
|
|
2009-10-08 16:06:40 +00:00
|
|
|
augeasdir = $(datadir)/augeas/lenses
|
|
|
|
|
|
|
|
augeastestdir = $(datadir)/augeas/lenses/tests
|
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
# These files are not related to driver APIs. Simply generic
|
|
|
|
# helper APIs for various purposes
|
2017-11-03 12:09:47 +00:00
|
|
|
UTIL_SOURCES = \
|
|
|
|
util/viralloc.c util/viralloc.h \
|
|
|
|
util/virarch.h util/virarch.c \
|
|
|
|
util/viratomic.h util/viratomic.c \
|
|
|
|
util/viraudit.c util/viraudit.h \
|
|
|
|
util/virauth.c util/virauth.h \
|
|
|
|
util/virauthconfig.c util/virauthconfig.h \
|
|
|
|
util/virbitmap.c util/virbitmap.h \
|
|
|
|
util/virbuffer.c util/virbuffer.h \
|
|
|
|
util/virperf.c util/virperf.h \
|
|
|
|
util/vircgroup.c util/vircgroup.h util/vircgrouppriv.h \
|
|
|
|
util/virclosecallbacks.c util/virclosecallbacks.h \
|
2014-03-11 10:59:58 +00:00
|
|
|
util/vircommand.c util/vircommand.h util/vircommandpriv.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virconf.c util/virconf.h \
|
|
|
|
util/vircrypto.c util/vircrypto.h \
|
|
|
|
util/virdbus.c util/virdbus.h util/virdbuspriv.h \
|
|
|
|
util/virdnsmasq.c util/virdnsmasq.h \
|
|
|
|
util/virebtables.c util/virebtables.h \
|
|
|
|
util/virendian.h \
|
|
|
|
util/virerror.c util/virerror.h \
|
|
|
|
util/virevent.c util/virevent.h \
|
|
|
|
util/vireventpoll.c util/vireventpoll.h \
|
|
|
|
util/virfcp.c util/virfcp.h \
|
|
|
|
util/virfdstream.c util/virfdstream.h \
|
|
|
|
util/virfile.c util/virfile.h \
|
|
|
|
util/virfirewall.c util/virfirewall.h \
|
|
|
|
util/virfirewallpriv.h \
|
|
|
|
util/virfirmware.c util/virfirmware.h \
|
|
|
|
util/virgettext.c util/virgettext.h \
|
|
|
|
util/virgic.c util/virgic.h \
|
|
|
|
util/virhash.c util/virhash.h \
|
|
|
|
util/virhashcode.c util/virhashcode.h \
|
|
|
|
util/virhook.c util/virhook.h \
|
2016-04-13 17:53:02 +00:00
|
|
|
util/virhostcpu.c util/virhostcpu.h util/virhostcpupriv.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virhostdev.c util/virhostdev.h \
|
|
|
|
util/virhostmem.c util/virhostmem.h \
|
|
|
|
util/viridentity.c util/viridentity.h \
|
|
|
|
util/virinitctl.c util/virinitctl.h \
|
|
|
|
util/viriptables.c util/viriptables.h \
|
|
|
|
util/viriscsi.c util/viriscsi.h \
|
|
|
|
util/virjson.c util/virjson.h \
|
|
|
|
util/virkeycode.c util/virkeycode.h \
|
|
|
|
util/virkeyfile.c util/virkeyfile.h \
|
|
|
|
util/virlease.c util/virlease.h \
|
|
|
|
util/virlockspace.c util/virlockspace.h \
|
|
|
|
util/virlog.c util/virlog.h \
|
|
|
|
util/virmacaddr.h util/virmacaddr.c \
|
|
|
|
util/virmacmap.h util/virmacmap.c \
|
|
|
|
util/virnetdev.h util/virnetdev.c \
|
Split src/util/network.{c,h} into 5 pieces
The src/util/network.c file is a dumping ground for many different
APIs. Split it up into 5 pieces, along functional lines
- src/util/virnetdevbandwidth.c: virNetDevBandwidth type & helper APIs
- src/util/virnetdevvportprofile.c: virNetDevVPortProfile type & helper APIs
- src/util/virsocketaddr.c: virSocketAddr and APIs
- src/conf/netdev_bandwidth_conf.c: XML parsing / formatting
for virNetDevBandwidth
- src/conf/netdev_vport_profile_conf.c: XML parsing / formatting
for virNetDevVPortProfile
* src/util/network.c, src/util/network.h: Split into 5 pieces
* src/conf/netdev_bandwidth_conf.c, src/conf/netdev_bandwidth_conf.h,
src/conf/netdev_vport_profile_conf.c, src/conf/netdev_vport_profile_conf.h,
src/util/virnetdevbandwidth.c, src/util/virnetdevbandwidth.h,
src/util/virnetdevvportprofile.c, src/util/virnetdevvportprofile.h,
src/util/virsocketaddr.c, src/util/virsocketaddr.h: New pieces
* daemon/libvirtd.h, daemon/remote.c, src/conf/domain_conf.c,
src/conf/domain_conf.h, src/conf/network_conf.c,
src/conf/network_conf.h, src/conf/nwfilter_conf.h,
src/esx/esx_util.h, src/network/bridge_driver.c,
src/qemu/qemu_conf.c, src/rpc/virnetsocket.c,
src/rpc/virnetsocket.h, src/util/dnsmasq.h, src/util/interface.h,
src/util/iptables.h, src/util/macvtap.c, src/util/macvtap.h,
src/util/virnetdev.h, src/util/virnetdevtap.c,
tools/virsh.c: Update include files
2011-11-02 15:40:08 +00:00
|
|
|
util/virnetdevbandwidth.h util/virnetdevbandwidth.c \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virnetdevbridge.h util/virnetdevbridge.c \
|
|
|
|
util/virnetdevip.h util/virnetdevip.c \
|
|
|
|
util/virnetdevmacvlan.c util/virnetdevmacvlan.h \
|
2015-02-23 20:54:54 +00:00
|
|
|
util/virnetdevmidonet.h util/virnetdevmidonet.c \
|
2012-02-10 21:09:00 +00:00
|
|
|
util/virnetdevopenvswitch.h util/virnetdevopenvswitch.c \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virnetdevtap.h util/virnetdevtap.c \
|
|
|
|
util/virnetdevveth.h util/virnetdevveth.c \
|
|
|
|
util/virnetdevvlan.h util/virnetdevvlan.c \
|
Split src/util/network.{c,h} into 5 pieces
The src/util/network.c file is a dumping ground for many different
APIs. Split it up into 5 pieces, along functional lines
- src/util/virnetdevbandwidth.c: virNetDevBandwidth type & helper APIs
- src/util/virnetdevvportprofile.c: virNetDevVPortProfile type & helper APIs
- src/util/virsocketaddr.c: virSocketAddr and APIs
- src/conf/netdev_bandwidth_conf.c: XML parsing / formatting
for virNetDevBandwidth
- src/conf/netdev_vport_profile_conf.c: XML parsing / formatting
for virNetDevVPortProfile
* src/util/network.c, src/util/network.h: Split into 5 pieces
* src/conf/netdev_bandwidth_conf.c, src/conf/netdev_bandwidth_conf.h,
src/conf/netdev_vport_profile_conf.c, src/conf/netdev_vport_profile_conf.h,
src/util/virnetdevbandwidth.c, src/util/virnetdevbandwidth.h,
src/util/virnetdevvportprofile.c, src/util/virnetdevvportprofile.h,
src/util/virsocketaddr.c, src/util/virsocketaddr.h: New pieces
* daemon/libvirtd.h, daemon/remote.c, src/conf/domain_conf.c,
src/conf/domain_conf.h, src/conf/network_conf.c,
src/conf/network_conf.h, src/conf/nwfilter_conf.h,
src/esx/esx_util.h, src/network/bridge_driver.c,
src/qemu/qemu_conf.c, src/rpc/virnetsocket.c,
src/rpc/virnetsocket.h, src/util/dnsmasq.h, src/util/interface.h,
src/util/iptables.h, src/util/macvtap.c, src/util/macvtap.h,
src/util/virnetdev.h, src/util/virnetdevtap.c,
tools/virsh.c: Update include files
2011-11-02 15:40:08 +00:00
|
|
|
util/virnetdevvportprofile.h util/virnetdevvportprofile.c \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virnetlink.c util/virnetlink.h \
|
|
|
|
util/virnodesuspend.c util/virnodesuspend.h \
|
|
|
|
util/virkmod.c util/virkmod.h \
|
|
|
|
util/virnuma.c util/virnuma.h \
|
|
|
|
util/virobject.c util/virobject.h \
|
|
|
|
util/virpci.c util/virpci.h \
|
|
|
|
util/virpidfile.c util/virpidfile.h \
|
|
|
|
util/virpolkit.c util/virpolkit.h \
|
2013-01-09 15:11:50 +00:00
|
|
|
util/virportallocator.c util/virportallocator.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virprobe.h \
|
|
|
|
util/virprocess.c util/virprocess.h \
|
|
|
|
util/virqemu.c util/virqemu.h \
|
|
|
|
util/virrandom.h util/virrandom.c \
|
2017-10-16 15:17:32 +00:00
|
|
|
util/virresctrl.h util/virresctrl.c util/virresctrlpriv.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virrotatingfile.h util/virrotatingfile.c \
|
|
|
|
util/virscsi.c util/virscsi.h \
|
|
|
|
util/virscsihost.c util/virscsihost.h \
|
|
|
|
util/virscsivhost.c util/virscsivhost.h \
|
|
|
|
util/virseclabel.c util/virseclabel.h \
|
|
|
|
util/virsecret.c util/virsecret.h \
|
|
|
|
util/virsexpr.c util/virsexpr.h \
|
|
|
|
util/virsocketaddr.h util/virsocketaddr.c \
|
2014-03-28 03:26:44 +00:00
|
|
|
util/virstorageencryption.c util/virstorageencryption.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virstoragefile.c util/virstoragefile.h \
|
2018-01-25 09:35:46 +00:00
|
|
|
util/virstoragefilebackend.c util/virstoragefilebackend.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virstring.h util/virstring.c \
|
|
|
|
util/virsysinfo.c util/virsysinfo.h util/virsysinfopriv.h \
|
2017-03-06 17:30:37 +00:00
|
|
|
util/virsystemd.c util/virsystemd.h util/virsystemdpriv.h \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/virthread.c util/virthread.h \
|
|
|
|
util/virthreadjob.c util/virthreadjob.h \
|
|
|
|
util/virthreadpool.c util/virthreadpool.h \
|
|
|
|
util/virtime.h util/virtime.c \
|
|
|
|
util/virtpm.h util/virtpm.c \
|
|
|
|
util/virtypedparam.c util/virtypedparam.h \
|
|
|
|
util/virusb.c util/virusb.h \
|
|
|
|
util/viruri.h util/viruri.c \
|
|
|
|
util/virutil.c util/virutil.h \
|
|
|
|
util/viruuid.c util/viruuid.h \
|
|
|
|
util/virvhba.c util/virvhba.h \
|
|
|
|
util/virxdrdefs.h \
|
|
|
|
util/virxml.c util/virxml.h \
|
|
|
|
util/virmdev.c util/virmdev.h \
|
|
|
|
util/virfilecache.c util/virfilecache.h \
|
2012-12-13 17:44:57 +00:00
|
|
|
$(NULL)
|
2011-07-21 07:32:34 +00:00
|
|
|
|
2017-03-02 10:46:53 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
$(srcdir)/keycodemapdb/data/keymaps.csv \
|
|
|
|
$(srcdir)/keycodemapdb/tools/keymap-gen \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
util/virkeycodetable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
|
|
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
|
|
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycodetable_,,' \
|
|
|
|
-e 's,\.h,,'` && \
|
|
|
|
$(MKDIR_P) util/ && \
|
|
|
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
|
|
|
--lang stdc --varname virKeyCodeTable_$$NAME code-table \
|
|
|
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
|
|
|
|
mv $@-tmp $@ || rm -f $@-tmp
|
|
|
|
|
|
|
|
util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
|
|
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
|
|
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeynametable_,,' \
|
|
|
|
-e 's,\.h,,'` && \
|
|
|
|
$(MKDIR_P) util/ && \
|
|
|
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
|
|
|
--lang stdc --varname virKeyNameTable_$$NAME name-table \
|
|
|
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
|
|
|
|
mv $@-tmp $@ || rm -f $@-tmp
|
|
|
|
|
2017-03-03 12:43:51 +00:00
|
|
|
util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
|
|
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
|
|
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycode-,,' \
|
|
|
|
-e 's,\.pod,,'` && \
|
|
|
|
$(MKDIR_P) util/ && \
|
|
|
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
|
|
|
--lang pod --varname "Key code values for $$NAME" code-docs \
|
|
|
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
|
|
|
|
$@-tmp && mv $@-tmp $@ || rm $@-tmp
|
|
|
|
|
|
|
|
util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
|
|
|
|
$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
|
|
|
|
$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeyname-,,' \
|
|
|
|
-e 's,\.pod,,'` && \
|
|
|
|
$(MKDIR_P) util/ && \
|
|
|
|
$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
|
|
|
|
--lang pod --varname "Key name values for $$NAME" name-docs \
|
|
|
|
$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
|
|
|
|
$@-tmp && mv $@-tmp $@ || rm $@-tmp
|
|
|
|
|
|
|
|
util/virkey%.7: util/virkey%.pod
|
|
|
|
$(AM_V_GEN)$(POD2MAN) --section=7 $< $@-t1 && \
|
|
|
|
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
|
|
|
|
sed \
|
|
|
|
-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
|
|
|
|
-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
|
|
|
|
< $@-t1 > $@-t2 && \
|
|
|
|
rm -f $@-t1 && \
|
|
|
|
mv $@-t2 $@
|
|
|
|
|
2017-08-07 13:38:28 +00:00
|
|
|
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 rfb
|
2017-03-02 10:46:53 +00:00
|
|
|
KEYNAMES = linux osx win32
|
|
|
|
|
|
|
|
KEYTABLES = \
|
|
|
|
$(KEYCODES:%=util/virkeycodetable_%.h) \
|
|
|
|
$(KEYNAMES:%=util/virkeynametable_%.h) \
|
|
|
|
$(NULL)
|
|
|
|
|
2017-03-03 12:43:51 +00:00
|
|
|
KEYPODS = $(KEYCODES:%=util/virkeycode-%.pod) \
|
|
|
|
$(KEYNAMES:%=util/virkeyname-%.pod)
|
|
|
|
KEYMANS = $(KEYPODS:%.pod=%.7)
|
|
|
|
|
|
|
|
man7_MANS = $(KEYMANS)
|
|
|
|
|
2017-03-02 10:46:53 +00:00
|
|
|
UTIL_SOURCES += $(KEYTABLES)
|
|
|
|
BUILT_SOURCES += $(KEYTABLES)
|
|
|
|
MAINTAINERCLEANFILES += $(KEYTABLES)
|
2017-03-03 12:43:51 +00:00
|
|
|
CLEANFILES += $(KEYMANS) $(KEYPODS)
|
2011-07-21 07:32:34 +00:00
|
|
|
|
2008-11-17 10:43:30 +00:00
|
|
|
# Internal generic driver infrastructure
|
2012-08-03 15:48:05 +00:00
|
|
|
DATATYPES_SOURCES = datatypes.h datatypes.c
|
2018-02-21 18:05:56 +00:00
|
|
|
DRIVER_SOURCES += \
|
2017-11-03 12:09:47 +00:00
|
|
|
driver.c driver.h \
|
|
|
|
driver-hypervisor.h \
|
|
|
|
driver-interface.h \
|
|
|
|
driver-network.h \
|
|
|
|
driver-nodedev.h \
|
|
|
|
driver-nwfilter.h \
|
|
|
|
driver-secret.h \
|
|
|
|
driver-state.h \
|
|
|
|
driver-storage.h \
|
|
|
|
driver-stream.h \
|
|
|
|
internal.h \
|
|
|
|
$(DATATYPES_SOURCES) \
|
|
|
|
libvirt.c libvirt_internal.h \
|
|
|
|
libvirt-domain.c \
|
|
|
|
libvirt-domain-snapshot.c \
|
|
|
|
libvirt-host.c \
|
|
|
|
libvirt-interface.c \
|
|
|
|
libvirt-network.c \
|
|
|
|
libvirt-nodedev.c \
|
|
|
|
libvirt-nwfilter.c \
|
|
|
|
libvirt-secret.c \
|
|
|
|
libvirt-storage.c \
|
|
|
|
libvirt-stream.c \
|
|
|
|
locking/lock_manager.c locking/lock_manager.h \
|
|
|
|
locking/lock_driver.h \
|
|
|
|
locking/lock_driver_nop.h locking/lock_driver_nop.c \
|
|
|
|
locking/domain_lock.h locking/domain_lock.c \
|
2015-11-03 11:09:25 +00:00
|
|
|
$(NULL)
|
2008-11-17 10:43:30 +00:00
|
|
|
|
2011-01-18 18:37:45 +00:00
|
|
|
LOCK_DRIVER_SANLOCK_SOURCES = \
|
|
|
|
locking/lock_driver_sanlock.c
|
|
|
|
|
2012-09-18 11:41:26 +00:00
|
|
|
LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
|
|
|
|
locking/sanlock_helper.c
|
2008-11-17 10:43:30 +00:00
|
|
|
|
2011-07-06 16:20:04 +00:00
|
|
|
LOCK_PROTOCOL_GENERATED = \
|
build: avoid $(srcdir) in *_SOURCES
Trying to enable automake's subdir-objects option resulted in
the creation of literal directories such as src/$(srcdir)/remote/.
I traced this to the fact that we had used a literal $(srcdir)
in a location that later fed an automake *_SOURCES variable.
This has also been reported as an automake bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
but it's better to fix our code than to wait for an automake fix.
Some things to remember that affect VPATH builds, and where an
in-tree build is blissfully unaware of the issues: if a VPATH
build fails to find a file that was used as a prereq of any
other target, then the rule for that file will expand $@ to
prefer the current build dir (bad because a VPATH build on a
fresh checkout will then stick $@ in the current directory
instead of the desired srcdir); conversely, if a VPATH build
finds the file in srcdir but decides it needs to be rebuilt,
then the rule for that file will expand $@ to include the
directory where it was found out-of-date (bad for an explicit
listing of $(srcdir)/$@ because an incremental VPATH build will
then expand srcdir twice). As we want these files to go into
srcdir unconditionally, we have to massage or avoid $@ for any
recipe that involves one of these files.
Therefore, this patch removes all uses of $(srcdir) from any
generated file name that later feeds a *_SOURCES variable, and
then rewrites all the recipes to generate those files to
hard-code their creation into srcdir without the use of $@.
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Drop $(srcdir); VPATH
builds know how to find the files, and automake subdir-objects
fails with it in place.
(LXC_MONITOR_PROTOCOL_GENERATED, (LXC_MONITOR_GENERATED)
(ACCESS_DRIVER_GENERATED, LOCK_PROTOCOL_GENERATED): Likewise.
(*_client_bodies.h): Hard-code rules to write into srcdir, as
VPATH tries to build $@ locally if missing.
(util/virkeymaps.h): Likewise.
(lxc/lxc_monitor_dispatch.h): Likewise.
(access/viraccessapi*): Likewise.
(locking/lock_daemon_dispatch_stubs.h): Likewise.
* daemon/Makeflie.am (DAEMON_GENERATED, remote_dispatch.h):
Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
fixup DAEMON_GENERATED
2013-09-06 22:54:39 +00:00
|
|
|
locking/lock_protocol.h \
|
|
|
|
locking/lock_protocol.c \
|
2011-07-06 16:20:04 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-12-13 16:00:17 +00:00
|
|
|
LOCK_PROTOCOL = $(srcdir)/locking/lock_protocol.x
|
|
|
|
EXTRA_DIST += $(LOCK_PROTOCOL) \
|
|
|
|
$(LOCK_PROTOCOL_GENERATED)
|
2011-07-06 16:20:04 +00:00
|
|
|
BUILT_SOURCES += $(LOCK_PROTOCOL_GENERATED)
|
|
|
|
MAINTAINERCLEANFILES += $(LOCK_PROTOCOL_GENERATED)
|
|
|
|
|
2012-08-03 09:27:07 +00:00
|
|
|
LOCK_DAEMON_GENERATED = \
|
2013-09-27 12:46:59 +00:00
|
|
|
locking/lock_daemon_dispatch_stubs.h
|
2012-08-03 09:27:07 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
BUILT_SOURCES += $(LOCK_DAEMON_GENERATED)
|
2012-12-13 16:00:17 +00:00
|
|
|
EXTRA_DIST += $(LOCK_DAEMON_GENERATED)
|
2012-08-03 09:27:07 +00:00
|
|
|
MAINTAINERCLEANFILES += $(LOCK_DAEMON_GENERATED)
|
|
|
|
|
2011-07-06 16:30:08 +00:00
|
|
|
LOCK_DRIVER_LOCKD_SOURCES = \
|
|
|
|
locking/lock_driver_lockd.c \
|
2016-01-12 15:47:13 +00:00
|
|
|
locking/lock_driver_lockd.h \
|
2011-07-06 16:30:08 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-08-02 19:06:50 +00:00
|
|
|
LOCK_DAEMON_SOURCES = \
|
|
|
|
locking/lock_daemon.h \
|
|
|
|
locking/lock_daemon.c \
|
|
|
|
locking/lock_daemon_config.h \
|
|
|
|
locking/lock_daemon_config.c \
|
2012-08-03 09:27:07 +00:00
|
|
|
locking/lock_daemon_dispatch.c \
|
|
|
|
locking/lock_daemon_dispatch.h \
|
2012-08-02 19:06:50 +00:00
|
|
|
$(NULL)
|
|
|
|
|
build: avoid $(srcdir) in *_SOURCES
Trying to enable automake's subdir-objects option resulted in
the creation of literal directories such as src/$(srcdir)/remote/.
I traced this to the fact that we had used a literal $(srcdir)
in a location that later fed an automake *_SOURCES variable.
This has also been reported as an automake bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
but it's better to fix our code than to wait for an automake fix.
Some things to remember that affect VPATH builds, and where an
in-tree build is blissfully unaware of the issues: if a VPATH
build fails to find a file that was used as a prereq of any
other target, then the rule for that file will expand $@ to
prefer the current build dir (bad because a VPATH build on a
fresh checkout will then stick $@ in the current directory
instead of the desired srcdir); conversely, if a VPATH build
finds the file in srcdir but decides it needs to be rebuilt,
then the rule for that file will expand $@ to include the
directory where it was found out-of-date (bad for an explicit
listing of $(srcdir)/$@ because an incremental VPATH build will
then expand srcdir twice). As we want these files to go into
srcdir unconditionally, we have to massage or avoid $@ for any
recipe that involves one of these files.
Therefore, this patch removes all uses of $(srcdir) from any
generated file name that later feeds a *_SOURCES variable, and
then rewrites all the recipes to generate those files to
hard-code their creation into srcdir without the use of $@.
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Drop $(srcdir); VPATH
builds know how to find the files, and automake subdir-objects
fails with it in place.
(LXC_MONITOR_PROTOCOL_GENERATED, (LXC_MONITOR_GENERATED)
(ACCESS_DRIVER_GENERATED, LOCK_PROTOCOL_GENERATED): Likewise.
(*_client_bodies.h): Hard-code rules to write into srcdir, as
VPATH tries to build $@ locally if missing.
(util/virkeymaps.h): Likewise.
(lxc/lxc_monitor_dispatch.h): Likewise.
(access/viraccessapi*): Likewise.
(locking/lock_daemon_dispatch_stubs.h): Likewise.
* daemon/Makeflie.am (DAEMON_GENERATED, remote_dispatch.h):
Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
fixup DAEMON_GENERATED
2013-09-06 22:54:39 +00:00
|
|
|
locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
|
2012-12-13 16:00:17 +00:00
|
|
|
$(srcdir)/rpc/gendispatch.pl Makefile.am
|
2013-04-18 10:29:56 +00:00
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
|
|
|
|
virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
|
build: avoid $(srcdir) in *_SOURCES
Trying to enable automake's subdir-objects option resulted in
the creation of literal directories such as src/$(srcdir)/remote/.
I traced this to the fact that we had used a literal $(srcdir)
in a location that later fed an automake *_SOURCES variable.
This has also been reported as an automake bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
but it's better to fix our code than to wait for an automake fix.
Some things to remember that affect VPATH builds, and where an
in-tree build is blissfully unaware of the issues: if a VPATH
build fails to find a file that was used as a prereq of any
other target, then the rule for that file will expand $@ to
prefer the current build dir (bad because a VPATH build on a
fresh checkout will then stick $@ in the current directory
instead of the desired srcdir); conversely, if a VPATH build
finds the file in srcdir but decides it needs to be rebuilt,
then the rule for that file will expand $@ to include the
directory where it was found out-of-date (bad for an explicit
listing of $(srcdir)/$@ because an incremental VPATH build will
then expand srcdir twice). As we want these files to go into
srcdir unconditionally, we have to massage or avoid $@ for any
recipe that involves one of these files.
Therefore, this patch removes all uses of $(srcdir) from any
generated file name that later feeds a *_SOURCES variable, and
then rewrites all the recipes to generate those files to
hard-code their creation into srcdir without the use of $@.
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Drop $(srcdir); VPATH
builds know how to find the files, and automake subdir-objects
fails with it in place.
(LXC_MONITOR_PROTOCOL_GENERATED, (LXC_MONITOR_GENERATED)
(ACCESS_DRIVER_GENERATED, LOCK_PROTOCOL_GENERATED): Likewise.
(*_client_bodies.h): Hard-code rules to write into srcdir, as
VPATH tries to build $@ locally if missing.
(util/virkeymaps.h): Likewise.
(lxc/lxc_monitor_dispatch.h): Likewise.
(access/viraccessapi*): Likewise.
(locking/lock_daemon_dispatch_stubs.h): Likewise.
* daemon/Makeflie.am (DAEMON_GENERATED, remote_dispatch.h):
Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
fixup DAEMON_GENERATED
2013-09-06 22:54:39 +00:00
|
|
|
$(LOCK_PROTOCOL) > $(srcdir)/locking/lock_daemon_dispatch_stubs.h
|
2012-08-03 09:27:07 +00:00
|
|
|
|
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
|
2015-04-15 14:13:22 +00:00
|
|
|
ADMIN_PROTOCOL = $(srcdir)/admin/admin_protocol.x
|
|
|
|
|
|
|
|
ADMIN_PROTOCOL_GENERATED = \
|
2017-11-03 12:09:47 +00:00
|
|
|
admin/admin_protocol.c \
|
|
|
|
admin/admin_protocol.h \
|
2018-01-19 11:30:31 +00:00
|
|
|
admin/admin_client.h \
|
|
|
|
admin/admin_server_dispatch_stubs.h \
|
|
|
|
$(NULL)
|
2015-04-16 12:23:16 +00:00
|
|
|
|
|
|
|
admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \
|
|
|
|
$(ADMIN_PROTOCOL) Makefile.am
|
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
|
|
|
|
admin ADMIN $(ADMIN_PROTOCOL) \
|
|
|
|
> $(srcdir)/admin/admin_client.h
|
2015-04-15 14:13:22 +00:00
|
|
|
|
2018-01-19 11:30:31 +00:00
|
|
|
admin/admin_server_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \
|
|
|
|
$(ADMIN_PROTOCOL) Makefile.am
|
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \
|
|
|
|
admin ADMIN $(ADMIN_PROTOCOL) \
|
|
|
|
> $(srcdir)/admin/admin_server_dispatch_stubs.h
|
|
|
|
|
2015-04-15 14:13:22 +00:00
|
|
|
EXTRA_DIST += $(ADMIN_PROTOCOL) $(ADMIN_PROTOCOL_GENERATED)
|
|
|
|
BUILT_SOURCES += $(ADMIN_PROTOCOL_GENERATED)
|
|
|
|
MAINTAINERCLEANFILES += $(ADMIN_PROTOCOL_GENERATED)
|
|
|
|
|
2010-05-07 14:01:26 +00:00
|
|
|
# Ensure that we don't change the struct or member names or member ordering
|
|
|
|
# in remote_protocol.x The embedded perl below needs a few comments, and
|
|
|
|
# presumes you know what pdwtags output looks like:
|
|
|
|
# * use -0777 -n to slurp the entire file into $_.
|
|
|
|
# * the "split" splits on the /* DD */ comments, so that $p iterates
|
|
|
|
# through the struct definitions.
|
|
|
|
# * process only "struct remote_..." entries
|
|
|
|
# * remove comments and preceding TAB throughout
|
|
|
|
# * remove empty lines throughout
|
|
|
|
# * remove white space at end of buffer
|
2010-05-19 13:36:27 +00:00
|
|
|
|
|
|
|
# With pdwtags 1.8, --verbose output includes separators like these:
|
|
|
|
# /* 93 */
|
|
|
|
# /* <0> (null):0 */
|
2011-07-14 16:18:40 +00:00
|
|
|
# with the second line omitted for intrinsic types.
|
|
|
|
# Whereas with pdwtags 1.3, they look like this:
|
2010-05-19 13:36:27 +00:00
|
|
|
# /* <2d2> /usr/include/libio.h:180 */
|
2011-07-14 16:18:40 +00:00
|
|
|
# The alternation of the following regexps matches both cases.
|
|
|
|
r1 = /\* \d+ \*/
|
2010-05-19 13:36:27 +00:00
|
|
|
r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/
|
2015-04-15 14:13:22 +00:00
|
|
|
libs_prefix = remote_|qemu_|lxc_|admin_
|
|
|
|
other_prefix = keepalive|vir(Net|LockSpace|LXCMonitor)
|
|
|
|
struct_prefix = ($(libs_prefix)|$(other_prefix))
|
2010-05-19 13:36:27 +00:00
|
|
|
|
build: check correct protocol.o file
By default, libtool builds two .o files for every .lo rule:
src/foo.o - static builds
src/.libs/foo.o - shared library builds
But since commit ad42b34b disabled static builds, src/foo.o is
no longer built by default. On a fresh checkout, this means our
protocol check rules using pdwtags were testing a missing file,
and thanks to a lousy behavior of pdwtags happily giving no output
and 0 exit status (http://bugzilla.redhat.com/949034), we were
merely claiming that "dwarves is too old" and skipping the test.
However, if you swap between branches and do incremental builds,
such as building v0.10.2-maint and then switching back to master,
you end up with src/foo.o being leftover from its 0.10.2 state,
and then 'make check' fails because the .o file does not match
the protocol-structs file due to API additions in the meantime.
A simpler fix would be to always look in .libs for the .o to
be parsed; but since it is possible to pass ./configure options
to tell libtool to do a static-only build with no shared .o,
I went with the approach of finding the newest of the two files,
whenever both exist.
* src/Makefile.am (PDWTAGS): Ensure we test just-built file.
2013-04-05 17:09:32 +00:00
|
|
|
# Depending on configure options, libtool creates one or both of
|
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation
for that change, automake 1.14 outputs LOADS of warnings:
daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
automake-1.14: warning: possible forward-incompatibility.
automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.14: automake option hasn't been enabled. For now, the corresponding output
automake-1.14: object file(s) will be placed in the top-level directory. However,
automake-1.14: this behaviour will change in future Automake versions: they will
automake-1.14: unconditionally cause object files to be placed in the same subdirectory
automake-1.14: of the corresponding sources.
automake-1.14: You are advised to start using 'subdir-objects' option throughout your
automake-1.14: project, to avoid future incompatibilities.
daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
...
As automake 1.9 also supported this option, and the previous patches
fixed up the code base to work with it, it is safe to now turn it on
unconditionally.
* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects.
* .gitignore: Ignore .dirstamp directories.
* src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to
new subdir-object location of .lo files.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-07 22:18:06 +00:00
|
|
|
# remote/{,.libs/}libvirt_driver_remote_la-remote_protocol.o. We want
|
|
|
|
# the newest of the two, in case configure options changed and a stale
|
build: check correct protocol.o file
By default, libtool builds two .o files for every .lo rule:
src/foo.o - static builds
src/.libs/foo.o - shared library builds
But since commit ad42b34b disabled static builds, src/foo.o is
no longer built by default. On a fresh checkout, this means our
protocol check rules using pdwtags were testing a missing file,
and thanks to a lousy behavior of pdwtags happily giving no output
and 0 exit status (http://bugzilla.redhat.com/949034), we were
merely claiming that "dwarves is too old" and skipping the test.
However, if you swap between branches and do incremental builds,
such as building v0.10.2-maint and then switching back to master,
you end up with src/foo.o being leftover from its 0.10.2 state,
and then 'make check' fails because the .o file does not match
the protocol-structs file due to API additions in the meantime.
A simpler fix would be to always look in .libs for the .o to
be parsed; but since it is possible to pass ./configure options
to tell libtool to do a static-only build with no shared .o,
I went with the approach of finding the newest of the two files,
whenever both exist.
* src/Makefile.am (PDWTAGS): Ensure we test just-built file.
2013-04-05 17:09:32 +00:00
|
|
|
# file is left around from an earlier build.
|
2018-02-28 14:38:20 +00:00
|
|
|
# The pdwtags output is completely different when building with clang
|
|
|
|
# which causes the comparison against expected output to fail, so skip
|
|
|
|
# if using clang as CC.
|
2011-07-13 15:35:03 +00:00
|
|
|
PDWTAGS = \
|
2018-03-01 16:32:08 +00:00
|
|
|
$(AM_V_GEN)if $(CC) -v 2>&1 | grep -q clang; then \
|
2018-02-28 14:38:20 +00:00
|
|
|
echo 'WARNING: skipping pdwtags test with Clang' >&2; \
|
|
|
|
exit 0; \
|
|
|
|
fi; \
|
|
|
|
if (pdwtags --help) > /dev/null 2>&1; then \
|
2017-11-03 12:09:47 +00:00
|
|
|
o=`ls -t $(<:.lo=.$(OBJEXT)) \
|
|
|
|
$(subst /,/.libs/,$(<:.lo=.$(OBJEXT))) \
|
|
|
|
2>/dev/null | sed -n 1p`; \
|
|
|
|
test -f "$$o" || { echo ".o for $< not found" >&2; exit 1; }; \
|
|
|
|
pdwtags --verbose $$o > $(@F)-t1 2> $(@F)-t2; \
|
|
|
|
if test ! -s $(@F)-t1 && test -s $(@F)-t2; then \
|
|
|
|
rm -rf $(@F)-t?; \
|
2012-01-06 23:07:34 +00:00
|
|
|
echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\
|
2017-11-03 12:09:47 +00:00
|
|
|
else \
|
|
|
|
$(PERL) -0777 -n \
|
|
|
|
-e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \
|
|
|
|
-e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \
|
|
|
|
-e ' $$p =~ /^enum \{/) {' \
|
|
|
|
-e ' $$p =~ s!\t*/\*.*?\*/!!sg;' \
|
|
|
|
-e ' $$p =~ s!\s+\n!\n!sg;' \
|
|
|
|
-e ' $$p =~ s!\s+$$!!;' \
|
|
|
|
-e ' $$p =~ s!\t! !g;' \
|
|
|
|
-e ' print "$$p\n";' \
|
|
|
|
-e ' $$n++;' \
|
|
|
|
-e ' }' \
|
|
|
|
-e '}' \
|
|
|
|
-e 'BEGIN {' \
|
|
|
|
-e ' print "/* -*- c -*- */\n";' \
|
|
|
|
-e '}' \
|
|
|
|
-e 'END {' \
|
|
|
|
-e ' if ($$n < 1) {' \
|
2010-05-19 13:36:27 +00:00
|
|
|
-e ' warn "WARNING: your pdwtags program is too old\n";' \
|
2017-11-03 12:09:47 +00:00
|
|
|
-e ' warn "WARNING: skipping the $@ test\n";' \
|
2010-05-19 13:36:27 +00:00
|
|
|
-e ' warn "WARNING: install dwarves-1.3 or newer\n";' \
|
2017-11-03 12:09:47 +00:00
|
|
|
-e ' exit 8;' \
|
|
|
|
-e ' }' \
|
|
|
|
-e '}' \
|
|
|
|
< $(@F)-t1 > $(@F)-t3; \
|
2012-01-06 23:07:34 +00:00
|
|
|
case $$? in 8) rm -f $(@F)-t?; exit 0;; 0) ;; *) exit 1;; esac;\
|
2017-11-03 12:09:47 +00:00
|
|
|
diff -u $(@)s $(@F)-t3; st=$$?; rm -f $(@F)-t?; exit $$st; \
|
|
|
|
fi; \
|
|
|
|
else \
|
|
|
|
echo 'WARNING: you lack pdwtags; skipping the $@ test' >&2; \
|
2010-05-19 13:36:27 +00:00
|
|
|
echo 'WARNING: install the dwarves package to get pdwtags' >&2; \
|
2010-05-07 14:01:26 +00:00
|
|
|
fi
|
2011-07-13 15:35:03 +00:00
|
|
|
|
2012-08-21 20:33:03 +00:00
|
|
|
# .libs/libvirt.so is built by libtool as a side-effect of the Makefile
|
2012-09-05 19:10:18 +00:00
|
|
|
# rule for libvirt.la. However, checking symbols relies on Linux ELF layout
|
|
|
|
if WITH_LINUX
|
2012-08-21 20:33:03 +00:00
|
|
|
check-symfile: libvirt.syms libvirt.la
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \
|
|
|
|
.libs/libvirt.so
|
2015-08-31 09:35:46 +00:00
|
|
|
check-admin-symfile: libvirt_admin.syms libvirt-admin.la
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt_admin.syms \
|
|
|
|
.libs/libvirt-admin.so
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_LINUX
|
2012-09-05 19:10:18 +00:00
|
|
|
check-symfile:
|
2015-08-31 09:35:46 +00:00
|
|
|
check-admin-symfile:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_LINUX
|
2012-12-11 22:21:17 +00:00
|
|
|
check-symsorting:
|
2013-02-20 00:59:20 +00:00
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \
|
2013-02-22 23:46:25 +00:00
|
|
|
$(srcdir) $(SYM_FILES)
|
2015-08-31 10:45:16 +00:00
|
|
|
check-admin-symsorting:
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \
|
|
|
|
$(srcdir) $(ADMIN_SYM_FILES)
|
2012-12-13 22:13:21 +00:00
|
|
|
EXTRA_DIST += check-symfile.pl check-symsorting.pl
|
2012-07-24 13:37:48 +00:00
|
|
|
|
2013-09-07 21:22:18 +00:00
|
|
|
# Keep this list synced with RPC_PROBE_FILES
|
2011-07-13 15:35:03 +00:00
|
|
|
PROTOCOL_STRUCTS = \
|
|
|
|
$(srcdir)/remote_protocol-structs \
|
2012-12-21 14:20:04 +00:00
|
|
|
$(srcdir)/lxc_protocol-structs \
|
2011-07-13 15:35:03 +00:00
|
|
|
$(srcdir)/qemu_protocol-structs \
|
2011-09-22 10:51:55 +00:00
|
|
|
$(srcdir)/virnetprotocol-structs \
|
2013-09-07 21:22:18 +00:00
|
|
|
$(srcdir)/virkeepaliveprotocol-structs \
|
|
|
|
$(srcdir)/lxc_monitor_protocol-structs \
|
|
|
|
$(srcdir)/lock_protocol-structs \
|
2015-04-15 14:16:24 +00:00
|
|
|
$(srcdir)/admin_protocol-structs \
|
2013-09-07 21:22:18 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2011-07-13 15:35:03 +00:00
|
|
|
if WITH_REMOTE
|
2012-06-13 03:49:22 +00:00
|
|
|
check-protocol: $(PROTOCOL_STRUCTS) $(PROTOCOL_STRUCTS:structs=struct)
|
|
|
|
|
2011-07-13 15:35:03 +00:00
|
|
|
# The .o file that pdwtags parses is created as a side effect of running
|
|
|
|
# libtool; but from make's perspective we depend on the .lo file.
|
2012-12-21 14:20:04 +00:00
|
|
|
$(srcdir)/remote_protocol-struct \
|
|
|
|
$(srcdir)/qemu_protocol-struct \
|
|
|
|
$(srcdir)/lxc_protocol-struct: \
|
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation
for that change, automake 1.14 outputs LOADS of warnings:
daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
automake-1.14: warning: possible forward-incompatibility.
automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.14: automake option hasn't been enabled. For now, the corresponding output
automake-1.14: object file(s) will be placed in the top-level directory. However,
automake-1.14: this behaviour will change in future Automake versions: they will
automake-1.14: unconditionally cause object files to be placed in the same subdirectory
automake-1.14: of the corresponding sources.
automake-1.14: You are advised to start using 'subdir-objects' option throughout your
automake-1.14: project, to avoid future incompatibilities.
daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
...
As automake 1.9 also supported this option, and the previous patches
fixed up the code base to work with it, it is safe to now turn it on
unconditionally.
* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects.
* .gitignore: Ignore .dirstamp directories.
* src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to
new subdir-object location of .lo files.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-07 22:18:06 +00:00
|
|
|
$(srcdir)/%-struct: remote/libvirt_driver_remote_la-%.lo
|
2011-07-13 15:35:03 +00:00
|
|
|
$(PDWTAGS)
|
2012-06-13 03:49:22 +00:00
|
|
|
$(srcdir)/virnetprotocol-struct $(srcdir)/virkeepaliveprotocol-struct: \
|
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation
for that change, automake 1.14 outputs LOADS of warnings:
daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
automake-1.14: warning: possible forward-incompatibility.
automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.14: automake option hasn't been enabled. For now, the corresponding output
automake-1.14: object file(s) will be placed in the top-level directory. However,
automake-1.14: this behaviour will change in future Automake versions: they will
automake-1.14: unconditionally cause object files to be placed in the same subdirectory
automake-1.14: of the corresponding sources.
automake-1.14: You are advised to start using 'subdir-objects' option throughout your
automake-1.14: project, to avoid future incompatibilities.
daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
...
As automake 1.9 also supported this option, and the previous patches
fixed up the code base to work with it, it is safe to now turn it on
unconditionally.
* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects.
* .gitignore: Ignore .dirstamp directories.
* src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to
new subdir-object location of .lo files.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-07 22:18:06 +00:00
|
|
|
$(srcdir)/%-struct: rpc/libvirt_net_rpc_la-%.lo
|
2011-11-24 13:16:36 +00:00
|
|
|
$(PDWTAGS)
|
2013-09-07 21:22:18 +00:00
|
|
|
$(srcdir)/lxc_monitor_protocol-struct: \
|
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation
for that change, automake 1.14 outputs LOADS of warnings:
daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
automake-1.14: warning: possible forward-incompatibility.
automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.14: automake option hasn't been enabled. For now, the corresponding output
automake-1.14: object file(s) will be placed in the top-level directory. However,
automake-1.14: this behaviour will change in future Automake versions: they will
automake-1.14: unconditionally cause object files to be placed in the same subdirectory
automake-1.14: of the corresponding sources.
automake-1.14: You are advised to start using 'subdir-objects' option throughout your
automake-1.14: project, to avoid future incompatibilities.
daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
...
As automake 1.9 also supported this option, and the previous patches
fixed up the code base to work with it, it is safe to now turn it on
unconditionally.
* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects.
* .gitignore: Ignore .dirstamp directories.
* src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to
new subdir-object location of .lo files.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-07 22:18:06 +00:00
|
|
|
$(srcdir)/%-struct: lxc/libvirt_driver_lxc_impl_la-%.lo
|
2013-09-07 21:22:18 +00:00
|
|
|
$(PDWTAGS)
|
|
|
|
$(srcdir)/lock_protocol-struct: \
|
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation
for that change, automake 1.14 outputs LOADS of warnings:
daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
automake-1.14: warning: possible forward-incompatibility.
automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.14: automake option hasn't been enabled. For now, the corresponding output
automake-1.14: object file(s) will be placed in the top-level directory. However,
automake-1.14: this behaviour will change in future Automake versions: they will
automake-1.14: unconditionally cause object files to be placed in the same subdirectory
automake-1.14: of the corresponding sources.
automake-1.14: You are advised to start using 'subdir-objects' option throughout your
automake-1.14: project, to avoid future incompatibilities.
daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory,
daemon/Makefile.am:38: but option 'subdir-objects' is disabled
...
As automake 1.9 also supported this option, and the previous patches
fixed up the code base to work with it, it is safe to now turn it on
unconditionally.
* configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects.
* .gitignore: Ignore .dirstamp directories.
* src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to
new subdir-object location of .lo files.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-07 22:18:06 +00:00
|
|
|
$(srcdir)/%-struct: locking/lockd_la-%.lo
|
2013-09-07 21:22:18 +00:00
|
|
|
$(PDWTAGS)
|
2015-04-15 14:16:24 +00:00
|
|
|
$(srcdir)/admin_protocol-struct: \
|
|
|
|
$(srcdir)/%-struct: admin/libvirt_admin_la-%.lo
|
|
|
|
$(PDWTAGS)
|
2013-09-07 21:22:18 +00:00
|
|
|
|
2011-05-11 20:26:06 +00:00
|
|
|
else !WITH_REMOTE
|
2012-06-13 03:49:22 +00:00
|
|
|
# The $(PROTOCOL_STRUCTS) files must live in git, because they cannot be
|
|
|
|
# re-generated when configured --without-remote.
|
|
|
|
check-protocol:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif !WITH_REMOTE
|
2012-12-13 22:13:21 +00:00
|
|
|
EXTRA_DIST += $(PROTOCOL_STRUCTS)
|
2013-04-22 17:25:01 +00:00
|
|
|
|
|
|
|
check-drivername:
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-drivername.pl \
|
|
|
|
$(srcdir)/driver.h \
|
|
|
|
$(srcdir)/libvirt_public.syms \
|
2015-08-19 08:38:31 +00:00
|
|
|
$(srcdir)/libvirt_admin_public.syms \
|
2013-04-22 17:25:01 +00:00
|
|
|
$(srcdir)/libvirt_qemu.syms \
|
|
|
|
$(srcdir)/libvirt_lxc.syms
|
|
|
|
|
|
|
|
EXTRA_DIST += check-drivername.pl
|
|
|
|
|
2013-04-23 12:50:18 +00:00
|
|
|
check-driverimpls:
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-driverimpls.pl \
|
2013-05-16 06:16:13 +00:00
|
|
|
$(filter /%,$(DRIVER_SOURCE_FILES)) \
|
2013-07-29 13:00:00 +00:00
|
|
|
$(filter $(srcdir)/%,$(DRIVER_SOURCE_FILES)) \
|
|
|
|
$(addprefix $(srcdir)/,$(filter-out $(srcdir)/%, \
|
|
|
|
$(filter-out /%,$(DRIVER_SOURCE_FILES))))
|
2013-04-23 12:50:18 +00:00
|
|
|
|
2013-04-29 15:37:07 +00:00
|
|
|
check-aclrules:
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-aclrules.pl \
|
2013-07-29 13:00:00 +00:00
|
|
|
$(REMOTE_PROTOCOL) \
|
2013-06-24 22:03:05 +00:00
|
|
|
$(addprefix $(srcdir)/,$(filter-out /%,$(STATEFUL_DRIVER_SOURCE_FILES)))
|
2013-04-29 15:37:07 +00:00
|
|
|
|
2013-09-12 13:35:45 +00:00
|
|
|
check-aclperms:
|
|
|
|
$(AM_V_GEN)$(PERL) $(srcdir)/check-aclperms.pl \
|
|
|
|
$(srcdir)/access/viraccessperm.h \
|
|
|
|
$(srcdir)/access/viraccessperm.c
|
|
|
|
|
2013-09-26 11:27:18 +00:00
|
|
|
EXTRA_DIST += check-driverimpls.pl check-aclrules.pl check-aclperms.pl
|
2013-04-23 12:50:18 +00:00
|
|
|
|
2013-04-22 17:25:01 +00:00
|
|
|
check-local: check-protocol check-symfile check-symsorting \
|
2013-09-12 13:35:45 +00:00
|
|
|
check-drivername check-driverimpls check-aclrules \
|
2015-08-31 10:45:16 +00:00
|
|
|
check-aclperms check-admin-symfile check-admin-symsorting
|
2012-06-13 03:49:22 +00:00
|
|
|
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
|
2010-05-07 14:01:26 +00:00
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
UTIL_IO_HELPER_SOURCES = \
|
2011-02-22 12:05:20 +00:00
|
|
|
util/iohelper.c
|
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
VMX_SOURCES = \
|
2010-12-21 21:39:55 +00:00
|
|
|
vmx/vmx.c vmx/vmx.h
|
|
|
|
|
2015-01-09 22:06:52 +00:00
|
|
|
|
2009-12-22 11:06:01 +00:00
|
|
|
pkgdata_DATA = cpu/cpu_map.xml
|
|
|
|
|
2010-05-07 17:11:02 +00:00
|
|
|
EXTRA_DIST += $(pkgdata_DATA)
|
2009-12-18 15:11:42 +00:00
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
#########################
|
|
|
|
#
|
|
|
|
# Build up list of libvirt.la source files based on configure conditions
|
|
|
|
#
|
|
|
|
# First deal with sources usable in non-daemon context
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
noinst_LTLIBRARIES += libvirt_util.la
|
2010-05-15 00:19:58 +00:00
|
|
|
libvirt_la_LIBADD = $(libvirt_la_BUILT_LIBADD)
|
2018-02-21 18:05:56 +00:00
|
|
|
libvirt_la_BUILT_LIBADD += libvirt_util.la
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_util_la_SOURCES = \
|
2008-11-17 10:43:30 +00:00
|
|
|
$(UTIL_SOURCES)
|
2010-06-09 18:35:49 +00:00
|
|
|
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
|
2012-04-19 14:34:35 +00:00
|
|
|
$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
|
2017-11-03 12:09:47 +00:00
|
|
|
$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
|
2017-02-20 13:54:12 +00:00
|
|
|
$(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) $(ACL_CFLAGS)
|
2010-09-15 13:44:11 +00:00
|
|
|
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
|
2011-11-29 12:11:01 +00:00
|
|
|
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
|
2016-12-15 10:48:38 +00:00
|
|
|
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \
|
2016-11-22 10:14:08 +00:00
|
|
|
$(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(ACL_LIBS) \
|
2017-09-20 08:08:40 +00:00
|
|
|
$(POLKIT_LIBS) $(GNUTLS_LIBS)
|
2008-11-17 10:43:30 +00:00
|
|
|
|
Move all XML configuration handling to src/conf/
* src/capabilities.c, src/capabilities.h, src/domain_conf.c,
src/domain_conf.h, src/domain_event.c, src/domain_event.h,
src/interface_conf.c, src/interface_conf.h,
src/network_conf.c, src/network_conf.h, src/node_device_conf.c,
src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h,
src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c,
src/storage_encryption_conf.h: Move to src/conf/
* src/Makefile.am: Add -Isrc/conf to the individual build targets
which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
and SELINUX_CFLAGS from global INCLUDES and only have them in build
targets which actually need them. Create a libvirt_conf.la
convenience library for all config parsers
* src/hostusb.h: Remove bogus include of domain_conf.h
* tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src
since it never has any generated header files
* daemon/Makefile.am: Add -Isrc/conf
* proxy/Makefile.am: Add -Isrc/conf and cope with renamed files
* src/hash.c: Remove bogus include of libxml/threads.h
2009-09-16 14:39:12 +00:00
|
|
|
|
2010-12-21 21:39:55 +00:00
|
|
|
if WITH_VMX
|
|
|
|
noinst_LTLIBRARIES += libvirt_vmx.la
|
|
|
|
libvirt_la_BUILT_LIBADD += libvirt_vmx.la
|
|
|
|
libvirt_vmx_la_CFLAGS = \
|
2015-01-08 00:05:36 +00:00
|
|
|
-I$(srcdir)/conf $(AM_CFLAGS)
|
2010-12-21 21:39:55 +00:00
|
|
|
libvirt_vmx_la_SOURCES = $(VMX_SOURCES)
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_VMX
|
2010-12-21 21:39:55 +00:00
|
|
|
|
Move all XML configuration handling to src/conf/
* src/capabilities.c, src/capabilities.h, src/domain_conf.c,
src/domain_conf.h, src/domain_event.c, src/domain_event.h,
src/interface_conf.c, src/interface_conf.h,
src/network_conf.c, src/network_conf.h, src/node_device_conf.c,
src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h,
src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c,
src/storage_encryption_conf.h: Move to src/conf/
* src/Makefile.am: Add -Isrc/conf to the individual build targets
which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
and SELINUX_CFLAGS from global INCLUDES and only have them in build
targets which actually need them. Create a libvirt_conf.la
convenience library for all config parsers
* src/hostusb.h: Remove bogus include of domain_conf.h
* tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src
since it never has any generated header files
* daemon/Makefile.am: Add -Isrc/conf
* proxy/Makefile.am: Add -Isrc/conf and cope with renamed files
* src/hash.c: Remove bogus include of libxml/threads.h
2009-09-16 14:39:12 +00:00
|
|
|
|
2008-11-17 10:43:30 +00:00
|
|
|
noinst_LTLIBRARIES += libvirt_driver.la
|
2010-05-15 00:19:58 +00:00
|
|
|
libvirt_la_BUILT_LIBADD += libvirt_driver.la
|
Move all XML configuration handling to src/conf/
* src/capabilities.c, src/capabilities.h, src/domain_conf.c,
src/domain_conf.h, src/domain_event.c, src/domain_event.h,
src/interface_conf.c, src/interface_conf.h,
src/network_conf.c, src/network_conf.h, src/node_device_conf.c,
src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h,
src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c,
src/storage_encryption_conf.h: Move to src/conf/
* src/Makefile.am: Add -Isrc/conf to the individual build targets
which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
and SELINUX_CFLAGS from global INCLUDES and only have them in build
targets which actually need them. Create a libvirt_conf.la
convenience library for all config parsers
* src/hostusb.h: Remove bogus include of domain_conf.h
* tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src
since it never has any generated header files
* daemon/Makefile.am: Add -Isrc/conf
* proxy/Makefile.am: Add -Isrc/conf and cope with renamed files
* src/hash.c: Remove bogus include of libxml/threads.h
2009-09-16 14:39:12 +00:00
|
|
|
libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
|
2008-11-21 12:20:45 +00:00
|
|
|
|
2013-02-01 12:36:06 +00:00
|
|
|
libvirt_driver_la_CFLAGS = \
|
2016-08-06 13:27:03 +00:00
|
|
|
$(GNUTLS_CFLAGS) $(CURL_CFLAGS) $(XDR_CFLAGS) \
|
2015-01-08 00:05:36 +00:00
|
|
|
-I$(srcdir)/conf $(AM_CFLAGS)
|
2013-02-01 12:36:06 +00:00
|
|
|
libvirt_driver_la_LIBADD = \
|
2013-03-20 15:02:34 +00:00
|
|
|
$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
|
2008-08-20 20:48:35 +00:00
|
|
|
|
2013-07-02 16:28:20 +00:00
|
|
|
# All .syms files should be placed in exactly one of these three lists,
|
|
|
|
# depending on whether they are stored in git and/or used in the build.
|
2018-02-21 18:05:56 +00:00
|
|
|
SYM_FILES += $(USED_SYM_FILES)
|
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_private.syms
|
|
|
|
GENERATED_SYM_FILES += \
|
2013-07-02 16:28:20 +00:00
|
|
|
libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \
|
2015-08-31 09:37:45 +00:00
|
|
|
libvirt_admin.syms libvirt_admin.def \
|
2013-07-02 16:28:20 +00:00
|
|
|
$(NULL)
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-04-17 02:09:25 +00:00
|
|
|
|
2018-02-20 13:16:28 +00:00
|
|
|
|
2011-06-24 13:37:25 +00:00
|
|
|
%protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl
|
2012-05-29 21:57:31 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \
|
build: fix VPATH build of remote driver
Commit 073e1575 tried to set things up so that 1) generated files
to be shipped in the tarball always live in srcdir, and 2) we have
no files in SOURCES that depend on any other files with a literal
$(srcdir) in the name, because that situation can cause confusing
results for the make expansion of $@ depending on whether the file
is found locally or via VPATH. But all my testing for that patch
was done incrementally, where all the protocol.[ch] files had
already been generated prior to the patch and were up-to-date in
the srcdir, and thus I missed one case where $@ causes grief in a
VPATH build from a fresh checkout:
We have a pattern rule for generating remote_protocol.[ch], and
what's more, the rule for protocol.c depends on protocol.h AND
on the protocol.x file. The pattern for protocol.c is only
satisfied via the VPATH lookup for protocol.x, and if protocol.h
doesn't yet exist, the VPATH rule kicks in and we end up with a
dependency on a file with $(srcdir) in the name. Based on make's
rules for $@, this resulted in make building remote_protocol.h
into srcdir (where we want it), then remote_protocol.c into
builddir (oops, not so good for the tarball), and also causes
the build to fail (the compiler can't find the .h if it lives
in a different directory than the .c):
CC remote/libvirt_driver_remote_la-remote_protocol.lo
remote/remote_protocol.c:7:29: fatal error: remote_protocol.h: No such file or directory
#include "remote_protocol.h"
^
compilation terminated.
As before, the fix is to hard-code the output file to go into
srcdir in spite of $@; but since this is in a pattern rule, we
are forced to use $@ in the recipe, so the patch is a bit
trickier than what was done in commit 073e1575.
* src/Makefile.am (%protocol.c, %protocol.h): Force output to srcdir.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-17 11:29:23 +00:00
|
|
|
$< $(srcdir)/$(subst $(srcdir)/,,$@)
|
2011-05-06 13:11:32 +00:00
|
|
|
|
2010-12-10 12:27:33 +00:00
|
|
|
%protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl
|
2012-05-29 21:57:31 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
|
build: fix VPATH build of remote driver
Commit 073e1575 tried to set things up so that 1) generated files
to be shipped in the tarball always live in srcdir, and 2) we have
no files in SOURCES that depend on any other files with a literal
$(srcdir) in the name, because that situation can cause confusing
results for the make expansion of $@ depending on whether the file
is found locally or via VPATH. But all my testing for that patch
was done incrementally, where all the protocol.[ch] files had
already been generated prior to the patch and were up-to-date in
the srcdir, and thus I missed one case where $@ causes grief in a
VPATH build from a fresh checkout:
We have a pattern rule for generating remote_protocol.[ch], and
what's more, the rule for protocol.c depends on protocol.h AND
on the protocol.x file. The pattern for protocol.c is only
satisfied via the VPATH lookup for protocol.x, and if protocol.h
doesn't yet exist, the VPATH rule kicks in and we end up with a
dependency on a file with $(srcdir) in the name. Based on make's
rules for $@, this resulted in make building remote_protocol.h
into srcdir (where we want it), then remote_protocol.c into
builddir (oops, not so good for the tarball), and also causes
the build to fail (the compiler can't find the .h if it lives
in a different directory than the .c):
CC remote/libvirt_driver_remote_la-remote_protocol.lo
remote/remote_protocol.c:7:29: fatal error: remote_protocol.h: No such file or directory
#include "remote_protocol.h"
^
compilation terminated.
As before, the fix is to hard-code the output file to go into
srcdir in spite of $@; but since this is in a pattern rule, we
are forced to use $@ in the recipe, so the patch is a bit
trickier than what was done in commit 073e1575.
* src/Makefile.am (%protocol.c, %protocol.h): Force output to srcdir.
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-17 11:29:23 +00:00
|
|
|
$< $(srcdir)/$(subst $(srcdir)/,,$@)
|
2009-09-16 15:55:16 +00:00
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
|
2009-09-16 11:31:13 +00:00
|
|
|
|
2017-01-17 14:10:55 +00:00
|
|
|
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2010-03-25 17:46:09 +00:00
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
check-local: check-augeas
|
|
|
|
|
2011-07-06 16:30:08 +00:00
|
|
|
.PHONY: check-augeas \
|
|
|
|
check-augeas-sanlock \
|
|
|
|
check-augeas-lockd \
|
|
|
|
$(NULL)
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
check-augeas: $(AUGEAS_DIRS:%=check-augeas-%) \
|
2018-02-21 18:05:56 +00:00
|
|
|
check-augeas-sanlock \
|
2018-02-21 18:05:56 +00:00
|
|
|
check-augeas-lockd check-augeas-virtlockd
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
|
2012-05-29 21:49:13 +00:00
|
|
|
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
|
2012-05-30 02:15:13 +00:00
|
|
|
EXTRA_DIST += $(top_srcdir)/build-aux/augeas-gentest.pl
|
2010-03-24 08:39:54 +00:00
|
|
|
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
|
2012-09-20 11:58:07 +00:00
|
|
|
if WITH_SANLOCK
|
2012-05-29 21:49:13 +00:00
|
|
|
test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
|
|
|
|
locking/qemu-sanlock.conf $(AUG_GENTEST)
|
build: fix 'make distcheck' issues
We had a distributed file (remote_protocol.h, which in turn was
a prereq to remote_driver.c) depending on a generated file
(libvirt_probes.h), which is a no-no for a VPATH build from a
read-only source tree (no wonder 'make distcheck' tests precisely
that situation):
File `libvirt_driver_remote.la' does not exist.
File `libvirt_driver_remote_la-remote_driver.lo' does not exist.
Prerequisite `libvirt_probes.h' is newer than target `../../src/remote/remote_protocol.h'.
Must remake target `../../src/remote/remote_protocol.h'.
Invoking recipe from Makefile:7464 to update target `../../src/remote/remote_protocol.h'.
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/libvirt-0.9.12/_build/src'
GEN ../../src/remote/remote_protocol.h
cannot create ../../src/remote/remote_protocol.h: Permission denied at ../../src/rpc/genprotocol.pl line 31.
make[3]: *** [../../src/remote/remote_protocol.h] Error 13
Rather than making distributed .c files depend on generated files, we
really want to ensure that compilation into .lo files is not attempted
until the generated files are present, done by this patch. Since there
were two different sets of conditionally generated files that both
feed the .lo file, I had to introduce a new variable REMOTE_DRIVER_PREREQS
to keep automake happy.
After that fix, the next issue was that make treats './foo' and 'foo'
differently in determining whether an implicit %foo rule is applicable,
with the result that locking/qemu-sanlock.conf wasn't properly being
built at the right times. Also, the output for using the .aug test
files was a bit verbose.
After fixing the src directory, the next error is related to the docs
directory, where the tarball is missing a stamp file and thus tries to
regenerate files that are already present:
GEN ../../docs/apibuild.py.stamp
Traceback (most recent call last):
File "../../docs/apibuild.py", line 2511, in <module>
rebuild("libvirt")
File "../../docs/apibuild.py", line 2495, in rebuild
builder.serialize()
File "../../docs/apibuild.py", line 2424, in serialize
output = open(filename, "w")
IOError: [Errno 13] Permission denied: '../../docs/libvirt-api.xml'
make[5]: *** [../../docs/apibuild.py.stamp] Error 1
and fixing that exposed another case of a distributed file (generated
html) depending on a built file (libvirt.h), but only when doing an
in-tree build, because of a file glob.
* src/Makefile.am ($(srcdir)/remote/remote_driver.c): Change...
(libvirt_driver_remote_la-remote_driver.lo): ...to the real
dependency.
($(builddir)/locking/%-sanlock.conf): Drop $(builddir), so that
rule gets run in time for test_libvirt_sanlock.aug.
(test_libvir*.aug): Cater to silent build.
(conf_DATA): Don't ship qemu-sanlock.conf in the tarball, since it
is trivial to regenerate.
* docs/Makefile.am (EXTRA_DIST): Ship our stamp file.
($(APIBUILD_STAMP)): Don't depend on generated file.
2012-05-30 17:30:18 +00:00
|
|
|
$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
|
2012-05-29 21:49:13 +00:00
|
|
|
check-augeas-sanlock: test_libvirt_sanlock.aug
|
2011-06-14 08:20:49 +00:00
|
|
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
2012-05-29 21:49:13 +00:00
|
|
|
'$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \
|
2011-06-14 08:20:49 +00:00
|
|
|
fi
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SANLOCK
|
2012-05-30 15:15:22 +00:00
|
|
|
check-augeas-sanlock:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SANLOCK
|
2009-10-08 16:06:40 +00:00
|
|
|
|
2014-01-23 16:51:46 +00:00
|
|
|
if WITH_QEMU
|
2011-07-06 16:30:08 +00:00
|
|
|
test_libvirt_lockd.aug: locking/test_libvirt_lockd.aug.in \
|
|
|
|
locking/qemu-lockd.conf $(AUG_GENTEST)
|
|
|
|
$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-lockd.conf $< $@
|
2014-03-08 16:51:45 +00:00
|
|
|
else ! WITH_QEMU
|
|
|
|
test_libvirt_lockd.aug:
|
|
|
|
endif ! WITH_QEMU
|
2011-07-06 16:30:08 +00:00
|
|
|
|
2013-08-08 15:06:31 +00:00
|
|
|
test_virtlockd.aug: locking/test_virtlockd.aug.in \
|
|
|
|
locking/virtlockd.conf $(AUG_GENTEST)
|
2013-08-08 10:51:01 +00:00
|
|
|
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< $@
|
2013-08-08 15:06:31 +00:00
|
|
|
|
2014-01-23 16:51:46 +00:00
|
|
|
if WITH_QEMU
|
2011-07-06 16:30:08 +00:00
|
|
|
check-augeas-lockd: test_libvirt_lockd.aug
|
|
|
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
|
|
|
'$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_lockd.aug; \
|
|
|
|
fi
|
2014-01-23 16:51:46 +00:00
|
|
|
else ! WITH_QEMU
|
|
|
|
check-augeas-lockd:
|
|
|
|
endif ! WITH_QEMU
|
2011-07-06 16:30:08 +00:00
|
|
|
|
2013-08-08 15:06:31 +00:00
|
|
|
check-augeas-virtlockd: test_virtlockd.aug
|
|
|
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
|
|
|
'$(AUGPARSE)' -I $(srcdir)/locking test_virtlockd.aug; \
|
|
|
|
fi
|
|
|
|
|
2009-01-05 14:05:29 +00:00
|
|
|
#
|
|
|
|
# Build our version script. This is composed of three parts:
|
|
|
|
#
|
|
|
|
# 1. libvirt_public.syms - public API. These functions are always
|
|
|
|
# present in the library and should never change incompatibly.
|
|
|
|
#
|
|
|
|
# 2. libvirt_private.syms - private API. These symbols are private and
|
|
|
|
# semantics may change on every release, hence the version number is
|
|
|
|
# spliced in at build time. This ensures that if libvirtd, virsh, or a
|
|
|
|
# driver module was built against one libvirt release, it will refuse to
|
|
|
|
# load with another where symbols may have same names but different
|
|
|
|
# semantics. Such symbols should never be visible in an (installed)
|
|
|
|
# public header file.
|
|
|
|
#
|
|
|
|
# 3. libvirt_*.syms - dynamic private API. Like libvirt_private.syms,
|
|
|
|
# except that build options (such as --enable-debug) can mean these
|
|
|
|
# symbols aren't present at all.
|
|
|
|
#
|
|
|
|
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
|
2009-01-05 14:07:31 +00:00
|
|
|
|
2009-01-05 14:08:26 +00:00
|
|
|
if WITH_LINUX
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_linux.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_LINUX
|
2013-02-22 23:46:25 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_linux.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_LINUX
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2010-12-21 21:39:55 +00:00
|
|
|
if WITH_VMX
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_vmx.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_VMX
|
2013-02-22 23:46:25 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_vmx.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_VMX
|
2010-12-21 21:39:55 +00:00
|
|
|
|
2012-09-20 11:58:29 +00:00
|
|
|
if WITH_SASL
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SASL
|
2013-02-22 23:46:25 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_sasl.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SASL
|
2011-10-11 22:22:44 +00:00
|
|
|
|
2013-03-13 13:37:29 +00:00
|
|
|
if WITH_GNUTLS
|
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_gnutls.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_GNUTLS
|
2013-03-13 13:37:29 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_gnutls.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_GNUTLS
|
2013-03-13 13:37:29 +00:00
|
|
|
|
2013-01-08 21:34:15 +00:00
|
|
|
if WITH_SSH2
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SSH2
|
2013-02-22 23:46:25 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_libssh2.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SSH2
|
2011-11-14 14:30:23 +00:00
|
|
|
|
2012-07-11 13:35:43 +00:00
|
|
|
if WITH_ATOMIC_OPS_PTHREAD
|
2012-12-12 16:15:25 +00:00
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_atomic.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_ATOMIC_OPS_PTHREAD
|
2013-02-22 23:46:25 +00:00
|
|
|
SYM_FILES += $(srcdir)/libvirt_atomic.syms
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_ATOMIC_OPS_PTHREAD
|
2012-07-11 13:35:43 +00:00
|
|
|
|
2016-11-09 14:28:35 +00:00
|
|
|
if WITH_LIBSSH
|
|
|
|
USED_SYM_FILES += $(srcdir)/libvirt_libssh.syms
|
|
|
|
else ! WITH_LIBSSH
|
|
|
|
SYM_FILES += $(srcdir)/libvirt_libssh.syms
|
|
|
|
endif ! WITH_LIBSSH
|
|
|
|
|
2009-01-06 15:16:43 +00:00
|
|
|
EXTRA_DIST += \
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_public.syms \
|
|
|
|
libvirt_lxc.syms \
|
|
|
|
libvirt_qemu.syms \
|
|
|
|
libvirt_admin_public.syms \
|
|
|
|
$(SYM_FILES) \
|
|
|
|
$(ADMIN_SYM_FILES) \
|
2013-05-02 23:35:50 +00:00
|
|
|
$(NULL)
|
2009-01-05 14:05:29 +00:00
|
|
|
|
2011-06-24 14:04:11 +00:00
|
|
|
BUILT_SOURCES += $(GENERATED_SYM_FILES)
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2013-07-18 15:37:52 +00:00
|
|
|
libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
|
|
|
|
$(ACCESS_DRIVER_SYM_FILES) \
|
2011-02-17 20:16:53 +00:00
|
|
|
$(top_builddir)/config.status
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)rm -f $@-tmp $@ ; \
|
|
|
|
printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
|
|
|
|
cat $(srcdir)/libvirt_public.syms >>$@-tmp && \
|
|
|
|
printf '\n\n# Private symbols\n\n' >>$@-tmp && \
|
|
|
|
printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \
|
|
|
|
printf 'global:\n\n' >>$@-tmp && \
|
2013-07-02 16:28:20 +00:00
|
|
|
cat $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) >>$@-tmp && \
|
2010-03-31 12:10:08 +00:00
|
|
|
printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
|
|
|
|
chmod a-w $@-tmp && \
|
2009-01-05 14:05:29 +00:00
|
|
|
mv $@-tmp libvirt.syms
|
2008-02-20 15:45:33 +00:00
|
|
|
|
2015-05-21 23:39:26 +00:00
|
|
|
%.def: %.syms
|
2010-03-22 01:25:36 +00:00
|
|
|
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
|
|
|
|
printf 'EXPORTS\n' > $@-tmp && \
|
2017-11-03 12:09:47 +00:00
|
|
|
sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d' \
|
2013-07-18 15:37:52 +00:00
|
|
|
-e 's/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
|
2010-03-22 01:25:36 +00:00
|
|
|
chmod a-w $@-tmp && \
|
2015-05-21 23:39:26 +00:00
|
|
|
mv $@-tmp $@
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
|
2015-08-19 08:38:31 +00:00
|
|
|
libvirt_admin.syms: libvirt_admin_public.syms $(ADMIN_SYM_FILES) \
|
|
|
|
$(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN)rm -f $@-tmp $@ ; \
|
|
|
|
printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
|
|
|
|
cat $(srcdir)/libvirt_admin_public.syms >>$@-tmp && \
|
|
|
|
printf '\n\n# Private symbols\n\n' >>$@-tmp && \
|
|
|
|
printf 'LIBVIRT_ADMIN_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \
|
|
|
|
printf 'global:\n\n' >>$@-tmp && \
|
|
|
|
cat $(ADMIN_SYM_FILES) >>$@-tmp && \
|
|
|
|
printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
|
|
|
|
chmod a-w $@-tmp && \
|
|
|
|
mv $@-tmp libvirt_admin.syms
|
|
|
|
|
2018-01-19 11:30:31 +00:00
|
|
|
|
|
|
|
admin/admin_server_dispatch.c: admin/admin_server_dispatch_stubs.h
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES += libvirt_driver_admin.la
|
|
|
|
libvirt_driver_admin_la_SOURCES = \
|
|
|
|
admin/admin_protocol.c \
|
|
|
|
admin/admin_protocol.h \
|
|
|
|
admin/admin_server.c \
|
|
|
|
admin/admin_server.h \
|
|
|
|
admin/admin_server_dispatch.c \
|
|
|
|
admin/admin_server_dispatch.h \
|
|
|
|
admin/admin_server_dispatch_stubs.h \
|
|
|
|
$(NULL)
|
|
|
|
libvirt_driver_admin_la_CFLAGS = \
|
|
|
|
$(AM_CFLAGS) \
|
2018-01-31 19:05:32 +00:00
|
|
|
$(XDR_CFLAGS) \
|
2018-01-19 11:30:31 +00:00
|
|
|
-I$(top_srcdir)/src/util \
|
|
|
|
-I$(top_srcdir)/src/admin \
|
|
|
|
$(NULL)
|
|
|
|
libvirt_driver_admin_la_LIBADD = ../gnulib/lib/libgnu.la
|
|
|
|
libvirt_driver_admin_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
|
|
|
|
|
2015-12-01 07:58:02 +00:00
|
|
|
# admin/admin_remote.c is being included in libvirt-admin.c, so we
|
|
|
|
# need to include it in the dist
|
|
|
|
EXTRA_DIST += admin/admin_remote.c
|
|
|
|
|
2015-04-15 14:16:24 +00:00
|
|
|
lib_LTLIBRARIES += libvirt-admin.la
|
|
|
|
libvirt_admin_la_SOURCES = \
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt-admin.c \
|
|
|
|
$(ADMIN_PROTOCOL_GENERATED) \
|
2015-04-15 14:16:24 +00:00
|
|
|
$(DATATYPES_SOURCES)
|
|
|
|
|
|
|
|
libvirt_admin_la_LDFLAGS = \
|
2017-11-03 12:09:47 +00:00
|
|
|
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE) \
|
|
|
|
-version-info $(LIBVIRT_VERSION_INFO) \
|
2016-08-06 13:43:06 +00:00
|
|
|
$(AM_LDFLAGS)
|
2015-04-15 14:16:24 +00:00
|
|
|
|
|
|
|
libvirt_admin_la_LIBADD = \
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt.la \
|
2015-04-15 14:16:24 +00:00
|
|
|
$(CYGWIN_EXTRA_LIBADD)
|
|
|
|
|
|
|
|
libvirt_admin_la_CFLAGS = \
|
2017-11-03 12:09:47 +00:00
|
|
|
$(AM_CFLAGS) \
|
|
|
|
-I$(srcdir)/remote \
|
|
|
|
-I$(srcdir)/rpc \
|
2015-04-15 14:16:24 +00:00
|
|
|
-I$(srcdir)/admin
|
|
|
|
|
|
|
|
libvirt_admin_la_CFLAGS += \
|
2017-11-03 12:09:47 +00:00
|
|
|
$(XDR_CFLAGS) \
|
|
|
|
$(CAPNG_CFLAGS) \
|
|
|
|
$(YAJL_CFLAGS) \
|
|
|
|
$(SSH2_CFLAGS) \
|
|
|
|
$(SASL_CFLAGS) \
|
|
|
|
$(GNUTLS_CFLAGS) \
|
2016-11-09 14:28:35 +00:00
|
|
|
$(LIBSSH_CFLAGS)
|
2015-04-15 14:16:24 +00:00
|
|
|
|
|
|
|
libvirt_admin_la_LIBADD += \
|
2017-11-03 12:09:47 +00:00
|
|
|
$(CAPNG_LIBS) \
|
|
|
|
$(YAJL_LIBS) \
|
|
|
|
$(DEVMAPPER_LIBS) \
|
|
|
|
$(LIBXML_LIBS) \
|
|
|
|
$(SSH2_LIBS) \
|
|
|
|
$(SASL_LIBS) \
|
|
|
|
$(GNUTLS_LIBS) \
|
2016-11-09 14:28:35 +00:00
|
|
|
$(LIBSSH_LIBS)
|
2015-04-15 14:16:24 +00:00
|
|
|
|
2015-08-19 08:38:31 +00:00
|
|
|
ADMIN_SYM_FILES = $(srcdir)/libvirt_admin_private.syms
|
|
|
|
|
2015-04-15 14:16:24 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
|
|
|
libvirt_admin_la_LIBADD += libvirt_probes.lo
|
|
|
|
endif WITH_DTRACE_PROBES
|
|
|
|
|
2008-11-17 10:43:30 +00:00
|
|
|
# Empty source list - it merely links a bunch of convenience libs together
|
|
|
|
libvirt_la_SOURCES =
|
2013-04-03 11:36:32 +00:00
|
|
|
libvirt_la_LDFLAGS = \
|
|
|
|
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
|
|
|
|
-version-info $(LIBVIRT_VERSION_INFO) \
|
|
|
|
$(LIBVIRT_NODELETE) \
|
2018-01-25 09:35:58 +00:00
|
|
|
$(NO_UNDEFINED_LDFLAGS) \
|
2013-04-03 11:36:32 +00:00
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(NULL)
|
2010-05-15 00:19:58 +00:00
|
|
|
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
|
2012-07-03 14:37:08 +00:00
|
|
|
libvirt_la_LIBADD += \
|
2016-11-14 14:34:04 +00:00
|
|
|
$(DRIVER_MODULES_LIBS) \
|
2010-05-15 00:19:58 +00:00
|
|
|
$(CYGWIN_EXTRA_LIBADD)
|
2010-06-09 18:35:49 +00:00
|
|
|
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
|
2010-05-15 00:19:58 +00:00
|
|
|
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
|
|
|
|
# lose automake's automatic dependencies on an appropriate subset of
|
|
|
|
# $(libvirt_la_LIBADD). But we were careful to create
|
|
|
|
# $(libvirt_la_BUILT_LIBADD) as the subset that automake would have
|
|
|
|
# picked out for us.
|
|
|
|
libvirt_la_DEPENDENCIES = $(libvirt_la_BUILT_LIBADD) $(LIBVIRT_SYMBOL_FILE)
|
2007-06-15 01:21:18 +00:00
|
|
|
|
2012-02-24 15:10:53 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
2012-05-25 15:57:56 +00:00
|
|
|
libvirt_la_BUILT_LIBADD += libvirt_probes.lo
|
2012-05-28 11:33:23 +00:00
|
|
|
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
|
2012-04-02 17:24:29 +00:00
|
|
|
nodist_libvirt_la_SOURCES = libvirt_probes.h
|
build: fix 'make dist' without dtrace
probes.h can only be generated on Linux, and then only with dtrace
installed. If it is part of the tarball, then either 'make dist'
will fail if you don't have that setup, or we would have to start
keeping probes.h in libvirt.git. Since we only need it to be
generated when dtrace is in use, it's better to avoid shipping
it in the first place, and avoid tracking it in git.
Meanwhile, there is a build dependency - since the RPC code is
generated, it can be built early; but when dtrace is enabled, we
must ensure probes.h is built even earlier. Commit 1afcfbdd tried
to fix this, but did so in a way that added probes.h into the
tarball, and broke VPATH as well. Commit ecbca767 fixed VPATH,
but didn't fix the more fundamental problem. This patch solves
the issue by adding a dependency instead.
Tested with 'make dist' in a clean VPATH builds, for both
'./configure --without-dtrace' and './configure --with-dtrace';
all configurations were able to correctly build a tarball, and
the dtrace configuration no longer sticks probes.h in the tarball.
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Don't ship probes.h;
rather, make it a dependency.
2011-12-01 16:02:53 +00:00
|
|
|
if WITH_REMOTE
|
2012-06-06 15:45:04 +00:00
|
|
|
nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h
|
build: fix 'make dist' without dtrace
probes.h can only be generated on Linux, and then only with dtrace
installed. If it is part of the tarball, then either 'make dist'
will fail if you don't have that setup, or we would have to start
keeping probes.h in libvirt.git. Since we only need it to be
generated when dtrace is in use, it's better to avoid shipping
it in the first place, and avoid tracking it in git.
Meanwhile, there is a build dependency - since the RPC code is
generated, it can be built early; but when dtrace is enabled, we
must ensure probes.h is built even earlier. Commit 1afcfbdd tried
to fix this, but did so in a way that added probes.h into the
tarball, and broke VPATH as well. Commit ecbca767 fixed VPATH,
but didn't fix the more fundamental problem. This patch solves
the issue by adding a dependency instead.
Tested with 'make dist' in a clean VPATH builds, for both
'./configure --without-dtrace' and './configure --with-dtrace';
all configurations were able to correctly build a tarball, and
the dtrace configuration no longer sticks probes.h in the tarball.
* src/Makefile.am (REMOTE_DRIVER_GENERATED): Don't ship probes.h;
rather, make it a dependency.
2011-12-01 16:02:53 +00:00
|
|
|
endif WITH_REMOTE
|
2012-08-10 21:14:21 +00:00
|
|
|
DTRACE2SYSTEMTAP_FLAGS = --with-modules
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2012-04-02 17:24:29 +00:00
|
|
|
BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp
|
|
|
|
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
|
|
|
tapsetdir = $(datadir)/systemtap/tapset
|
2018-02-21 18:05:56 +00:00
|
|
|
tapset_DATA += libvirt_probes.stp libvirt_functions.stp
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2012-04-02 17:24:29 +00:00
|
|
|
%_probes.h: %_probes.d
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
$(AM_V_GEN)$(DTRACE) -o $@ -h -s $<
|
|
|
|
|
2012-05-29 20:58:56 +00:00
|
|
|
.PRECIOUS: %_probes.o
|
2012-04-02 17:24:29 +00:00
|
|
|
%_probes.o: %_probes.d
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
$(AM_V_GEN)$(DTRACE) -o $@ -G -s $<
|
|
|
|
|
2012-05-25 15:57:56 +00:00
|
|
|
%_probes.lo: %_probes.o
|
|
|
|
$(AM_V_GEN)printf %s\\n \
|
|
|
|
'# $@ - a libtool object file' \
|
|
|
|
'# Generated by libtool (GNU libtool) 2.4' \
|
|
|
|
'# Actually generated by Makefile.am, in order to shut up libtool' \
|
|
|
|
"pic_object='$<'" \
|
|
|
|
"non_pic_object='$<'" \
|
|
|
|
> $@
|
|
|
|
|
2013-09-07 21:22:18 +00:00
|
|
|
# Keep this list synced with PROTOCOL_STRUCTS
|
2018-02-21 18:05:56 +00:00
|
|
|
RPC_PROBE_FILES += $(srcdir)/rpc/virnetprotocol.x \
|
2011-09-22 10:51:55 +00:00
|
|
|
$(srcdir)/rpc/virkeepaliveprotocol.x \
|
|
|
|
$(srcdir)/remote/remote_protocol.x \
|
2012-12-21 14:20:04 +00:00
|
|
|
$(srcdir)/remote/lxc_protocol.x \
|
2013-03-13 19:19:22 +00:00
|
|
|
$(srcdir)/remote/qemu_protocol.x \
|
2015-04-15 14:13:22 +00:00
|
|
|
$(srcdir)/locking/lock_protocol.x \
|
|
|
|
$(srcdir)/admin/admin_protocol.x
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
|
|
|
libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl
|
2012-05-29 21:57:31 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2013-07-18 15:37:52 +00:00
|
|
|
%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl \
|
|
|
|
$(top_builddir)/config.status
|
2012-05-29 21:57:31 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \
|
2012-08-10 21:14:21 +00:00
|
|
|
$(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2012-05-25 15:57:56 +00:00
|
|
|
CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \
|
2018-02-21 18:05:56 +00:00
|
|
|
libvirt_functions.stp libvirt_probes.stp
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_DTRACE_PROBES
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
EXTRA_DIST += libvirt_probes.d
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
|
2010-04-13 18:02:46 +00:00
|
|
|
libvirt_qemu_la_SOURCES = libvirt-qemu.c
|
2013-04-03 11:36:32 +00:00
|
|
|
libvirt_qemu_la_LDFLAGS = \
|
|
|
|
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_QEMU_SYMBOL_FILE) \
|
|
|
|
-version-info $(LIBVIRT_VERSION_INFO) \
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(NULL)
|
2010-06-09 18:35:49 +00:00
|
|
|
libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
|
2010-04-13 18:02:46 +00:00
|
|
|
libvirt_qemu_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
|
2008-10-15 18:39:34 +00:00
|
|
|
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
libvirt_lxc_la_SOURCES = libvirt-lxc.c
|
2013-04-03 11:36:32 +00:00
|
|
|
libvirt_lxc_la_LDFLAGS = \
|
|
|
|
$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \
|
|
|
|
-version-info $(LIBVIRT_VERSION_INFO) \
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(NULL)
|
Introduce an LXC specific public API & library
This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.
The actual APIs are
int virDomainLxcOpenNamespace(virDomainPtr domain,
int **fdlist,
unsigned int flags);
int virDomainLxcEnterNamespace(virDomainPtr domain,
unsigned int nfdlist,
int *fdlist,
unsigned int *noldfdlist,
int **oldfdlist,
unsigned int flags);
which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.
NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-21 13:15:19 +00:00
|
|
|
libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
|
|
|
|
libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
|
|
|
|
|
2013-10-10 12:09:08 +00:00
|
|
|
# Since virt-login-shell will be setuid, we must do everything
|
|
|
|
# we can to avoid linking to other libraries. Many of them do
|
|
|
|
# unsafe things in functions marked __atttribute__((constructor)).
|
|
|
|
# This library is built to include the bare minimum required to
|
|
|
|
# have a RPC client for local UNIX socket access only. We use
|
|
|
|
# the ../config-post.h header to disable all external deps that
|
|
|
|
# we don't want
|
2015-11-09 22:36:40 +00:00
|
|
|
if WITH_SETUID_RPC_CLIENT
|
2013-10-10 12:09:08 +00:00
|
|
|
noinst_LTLIBRARIES += libvirt-setuid-rpc-client.la
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_setuid_rpc_client_la_SOURCES = \
|
|
|
|
util/viralloc.c \
|
2017-12-14 12:26:26 +00:00
|
|
|
util/virarch.c \
|
2017-11-03 12:09:47 +00:00
|
|
|
util/viratomic.c \
|
|
|
|
util/viratomic.h \
|
|
|
|
util/virbitmap.c \
|
|
|
|
util/virbuffer.c \
|
|
|
|
util/vircgroup.c \
|
|
|
|
util/vircommand.c \
|
|
|
|
util/virconf.c \
|
|
|
|
util/virdbus.c \
|
|
|
|
util/virerror.c \
|
|
|
|
util/virevent.c \
|
|
|
|
util/vireventpoll.c \
|
|
|
|
util/virfile.c \
|
|
|
|
util/virgettext.c \
|
|
|
|
util/virhash.c \
|
|
|
|
util/virhashcode.c \
|
|
|
|
util/virhostcpu.c \
|
|
|
|
util/virjson.c \
|
|
|
|
util/virlog.c \
|
|
|
|
util/virobject.c \
|
|
|
|
util/virpidfile.c \
|
|
|
|
util/virprocess.c \
|
|
|
|
util/virrandom.c \
|
|
|
|
util/virsocketaddr.c \
|
|
|
|
util/virstring.c \
|
|
|
|
util/virsystemd.c \
|
|
|
|
util/virtime.c \
|
|
|
|
util/virthread.c \
|
|
|
|
util/virthreadjob.c \
|
|
|
|
util/virtypedparam.c \
|
|
|
|
util/viruri.c \
|
|
|
|
util/virutil.c \
|
|
|
|
util/viruuid.c \
|
|
|
|
conf/domain_event.c \
|
|
|
|
conf/network_event.c \
|
|
|
|
conf/object_event.c \
|
|
|
|
conf/storage_event.c \
|
|
|
|
conf/node_device_event.c \
|
|
|
|
conf/secret_event.c \
|
|
|
|
rpc/virnetsocket.c \
|
|
|
|
rpc/virnetsocket.h \
|
|
|
|
rpc/virnetmessage.h \
|
|
|
|
rpc/virnetmessage.c \
|
|
|
|
rpc/virkeepalive.c \
|
|
|
|
rpc/virkeepalive.h \
|
|
|
|
rpc/virnetclient.c \
|
|
|
|
rpc/virnetclientprogram.c \
|
|
|
|
rpc/virnetclientstream.c \
|
|
|
|
rpc/virnetprotocol.c \
|
|
|
|
remote/remote_driver.c \
|
|
|
|
remote/remote_protocol.c \
|
|
|
|
remote/qemu_protocol.c \
|
|
|
|
remote/lxc_protocol.c \
|
|
|
|
datatypes.c \
|
|
|
|
libvirt.c \
|
|
|
|
libvirt-domain.c \
|
|
|
|
libvirt-domain-snapshot.c \
|
|
|
|
libvirt-host.c \
|
|
|
|
libvirt-interface.c \
|
|
|
|
libvirt-network.c \
|
|
|
|
libvirt-nodedev.c \
|
|
|
|
libvirt-nwfilter.c \
|
|
|
|
libvirt-secret.c \
|
|
|
|
libvirt-storage.c \
|
|
|
|
libvirt-stream.c \
|
|
|
|
libvirt-lxc.c \
|
2013-10-10 12:09:08 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_setuid_rpc_client_la_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(LIBXML_LIBS) \
|
|
|
|
$(SECDRIVER_LIBS) \
|
2013-10-10 12:09:08 +00:00
|
|
|
$(NULL)
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_setuid_rpc_client_la_CFLAGS = \
|
|
|
|
-DLIBVIRT_SETUID_RPC_CLIENT \
|
|
|
|
-I$(srcdir)/conf \
|
|
|
|
-I$(srcdir)/rpc \
|
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(SECDRIVER_CFLAGS) \
|
|
|
|
$(XDR_CFLAGS) \
|
2013-10-10 12:09:08 +00:00
|
|
|
$(NULL)
|
2015-11-09 22:36:40 +00:00
|
|
|
endif WITH_SETUID_RPC_CLIENT
|
2013-10-10 12:09:08 +00:00
|
|
|
|
2011-07-06 16:30:08 +00:00
|
|
|
lockdriverdir = $(libdir)/libvirt/lock-driver
|
|
|
|
lockdriver_LTLIBRARIES =
|
|
|
|
|
2012-08-02 19:06:50 +00:00
|
|
|
if WITH_LIBVIRTD
|
2011-07-06 16:30:08 +00:00
|
|
|
lockdriver_LTLIBRARIES += lockd.la
|
|
|
|
lockd_la_SOURCES = \
|
|
|
|
$(LOCK_DRIVER_LOCKD_SOURCES) \
|
|
|
|
$(LOCK_PROTOCOL_GENERATED) \
|
|
|
|
$(NULL)
|
2015-01-08 00:05:36 +00:00
|
|
|
lockd_la_CFLAGS = -I$(srcdir)/conf \
|
2013-05-30 01:52:58 +00:00
|
|
|
$(XDR_CFLAGS) \
|
|
|
|
$(AM_CFLAGS)
|
2018-01-25 09:35:58 +00:00
|
|
|
lockd_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
|
2018-01-25 09:35:56 +00:00
|
|
|
lockd_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
|
2012-12-13 22:13:21 +00:00
|
|
|
augeas_DATA += locking/libvirt_lockd.aug
|
2011-07-06 16:30:08 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
|
|
|
lockd_la_LIBADD += libvirt_probes.lo
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_DTRACE_PROBES
|
2011-07-06 16:30:08 +00:00
|
|
|
if WITH_QEMU
|
2014-03-08 16:51:45 +00:00
|
|
|
augeastest_DATA += test_libvirt_lockd.aug
|
|
|
|
CLEANFILES += test_libvirt_lockd.aug
|
2012-12-14 10:54:16 +00:00
|
|
|
nodist_conf_DATA += locking/qemu-lockd.conf
|
2011-07-06 16:30:08 +00:00
|
|
|
BUILT_SOURCES += locking/qemu-lockd.conf
|
|
|
|
DISTCLEANFILES += locking/qemu-lockd.conf
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_QEMU
|
2011-07-06 16:30:08 +00:00
|
|
|
|
2015-04-14 20:38:46 +00:00
|
|
|
if WITH_LIBXL
|
|
|
|
nodist_conf_DATA += locking/libxl-lockd.conf
|
|
|
|
BUILT_SOURCES += locking/libxl-lockd.conf
|
|
|
|
DISTCLEANFILES += locking/libxl-lockd.conf
|
|
|
|
endif WITH_LIBXL
|
|
|
|
|
2011-07-06 16:30:08 +00:00
|
|
|
locking/%-lockd.conf: $(srcdir)/locking/lockd.conf
|
|
|
|
$(AM_V_GEN)$(MKDIR_P) locking ; \
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
sbin_PROGRAMS += virtlockd
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2011-07-06 16:20:04 +00:00
|
|
|
virtlockd_SOURCES = \
|
|
|
|
$(LOCK_DAEMON_SOURCES) \
|
|
|
|
$(LOCK_PROTOCOL_GENERATED) \
|
2012-08-03 09:27:07 +00:00
|
|
|
$(LOCK_DAEMON_GENERATED) \
|
2011-07-06 16:20:04 +00:00
|
|
|
$(NULL)
|
2012-08-02 19:06:50 +00:00
|
|
|
virtlockd_CFLAGS = \
|
|
|
|
$(AM_CFLAGS) \
|
2013-04-03 10:32:15 +00:00
|
|
|
$(PIE_CFLAGS) \
|
2013-05-30 21:49:40 +00:00
|
|
|
$(XDR_CFLAGS) \
|
2012-08-02 19:06:50 +00:00
|
|
|
$(NULL)
|
|
|
|
virtlockd_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
2013-04-03 10:32:15 +00:00
|
|
|
$(PIE_LDFLAGS) \
|
2018-01-25 09:35:58 +00:00
|
|
|
$(NO_UNDEFINED_LDFLAGS) \
|
2012-08-02 19:06:50 +00:00
|
|
|
$(NULL)
|
|
|
|
virtlockd_LDADD = \
|
2018-01-19 14:54:00 +00:00
|
|
|
libvirt_driver_admin.la \
|
2012-08-02 19:06:50 +00:00
|
|
|
libvirt-net-rpc-server.la \
|
|
|
|
libvirt-net-rpc.la \
|
|
|
|
libvirt_util.la \
|
|
|
|
../gnulib/lib/libgnu.la \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD) \
|
|
|
|
$(NULL)
|
|
|
|
if WITH_DTRACE_PROBES
|
|
|
|
virtlockd_LDADD += libvirt_probes.lo
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_DTRACE_PROBES
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2015-02-09 16:35:05 +00:00
|
|
|
|
|
|
|
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_LIBVIRTD
|
2011-07-06 16:30:08 +00:00
|
|
|
EXTRA_DIST += $(LOCK_DAEMON_SOURCES) \
|
2018-02-21 18:05:56 +00:00
|
|
|
$(LOCK_DRIVER_LOCKD_SOURCES)
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_LIBVIRTD
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
SYSCONF_FILES += \
|
2015-02-09 16:35:05 +00:00
|
|
|
locking/virtlockd.sysconf \
|
2018-02-20 14:28:00 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
EXTRA_DIST += \
|
2012-12-13 22:13:21 +00:00
|
|
|
locking/lockd.conf \
|
|
|
|
locking/libvirt_lockd.aug \
|
2015-02-09 16:35:05 +00:00
|
|
|
locking/test_libvirt_lockd.aug.in \
|
2018-02-20 14:28:00 +00:00
|
|
|
$(SYSCONF_FILES) \
|
|
|
|
$(NULL)
|
2012-08-02 19:06:50 +00:00
|
|
|
|
|
|
|
install-sysconfig:
|
2012-12-13 23:28:27 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
2018-02-20 14:28:00 +00:00
|
|
|
for f in $(SYSCONF_FILES:%.sysconf=%) ; \
|
|
|
|
do \
|
|
|
|
tgt=`basename $$f`; \
|
2018-02-22 15:45:38 +00:00
|
|
|
$(INSTALL_SCRIPT) $(srcdir)/$$f.sysconf \
|
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
|
2018-02-20 14:28:00 +00:00
|
|
|
done
|
2012-08-02 19:06:50 +00:00
|
|
|
|
|
|
|
uninstall-sysconfig:
|
2018-02-20 14:28:00 +00:00
|
|
|
for f in $(SYSCONF_FILES:%.sysconf=%) ; \
|
|
|
|
do \
|
|
|
|
tgt=`basename $$f`; \
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
|
|
|
|
done
|
2012-12-13 23:28:27 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
SYSVINIT_FILES_IN += \
|
2018-02-20 14:28:00 +00:00
|
|
|
locking/virtlockd.init.in \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
SYSVINIT_FILES = $(notdir $(SYSVINIT_FILES_IN:%.in=%))
|
|
|
|
|
|
|
|
EXTRA_DIST += $(SYSVINIT_FILES_IN)
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
|
2018-02-21 12:48:23 +00:00
|
|
|
|
|
|
|
EXTRA_DIST += $(LOGROTATE_FILES_IN)
|
|
|
|
|
|
|
|
BUILT_SOURCES += $(LOGROTATE_FILES)
|
2018-02-22 13:23:02 +00:00
|
|
|
CLEANFILES += $(LOGROTATE_FILES)
|
2018-02-21 12:48:23 +00:00
|
|
|
|
|
|
|
%.logrotate: remote/%.logrotate.in
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
< $< > $@-t && \
|
|
|
|
mv $@-t $@
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
if WITH_LIBVIRTD
|
2018-02-21 12:48:23 +00:00
|
|
|
install-logrotate: $(LOGROTATE_FILES)
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/logrotate.d/
|
|
|
|
for f in $(LOGROTATE_FILES) ; \
|
|
|
|
do \
|
|
|
|
tgt=`echo $$f | sed -e 's/.logrotate//'`; \
|
|
|
|
$(INSTALL_DATA) $$f \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/$$tgt; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall-logrotate:
|
|
|
|
rm -f $(LOGROTATE_FILES:%.logrotate=$(DESTDIR)$(sysconfdir)/logrotate.d/%)
|
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
|
2018-02-21 18:05:56 +00:00
|
|
|
else ! WITH_LIBVIRTD
|
|
|
|
install-logrotate:
|
|
|
|
uninstall-logrotate:
|
|
|
|
endif ! WITH_LIBVIRTD
|
2018-02-21 11:15:30 +00:00
|
|
|
|
2012-08-02 19:06:50 +00:00
|
|
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
2018-02-20 14:28:00 +00:00
|
|
|
install-init:: $(SYSVINIT_FILES) install-sysconfig
|
2012-12-13 23:28:27 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
2018-02-20 14:28:00 +00:00
|
|
|
for f in $(SYSVINIT_FILES:%.init=%) ; \
|
|
|
|
do \
|
|
|
|
$(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
|
|
|
|
done
|
2012-08-02 19:06:50 +00:00
|
|
|
|
|
|
|
uninstall-init:: uninstall-sysconfig
|
2018-02-20 14:28:00 +00:00
|
|
|
rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
|
2012-12-13 23:28:27 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2018-02-20 14:28:00 +00:00
|
|
|
BUILT_SOURCES += $(SYSVINIT_FILES)
|
|
|
|
DISTCLEANFILES += $(SYSVINIT_FILES)
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2012-08-02 19:06:50 +00:00
|
|
|
install-init::
|
|
|
|
uninstall-init::
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2018-02-21 11:15:30 +00:00
|
|
|
|
2018-02-20 17:41:45 +00:00
|
|
|
|
2012-08-02 19:06:50 +00:00
|
|
|
virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
|
2017-11-03 12:09:47 +00:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
< $< > $@-t && \
|
|
|
|
chmod a+x $@-t && \
|
2012-08-02 19:06:50 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
2016-04-12 20:28:27 +00:00
|
|
|
virtlockd.8.in: locking/virtlockd.pod
|
2016-04-13 16:52:12 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
|
|
|
|
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
|
|
|
|
sed \
|
|
|
|
-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
|
|
|
|
-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
|
|
|
|
< $@-t1 > $@-t2 && \
|
|
|
|
rm -f $@-t1 && \
|
|
|
|
mv $@-t2 $@
|
2013-08-08 14:10:38 +00:00
|
|
|
|
2015-02-09 16:35:05 +00:00
|
|
|
|
2016-04-12 20:28:27 +00:00
|
|
|
%.8: %.8.in $(top_srcdir)/configure.ac
|
2015-02-09 16:35:05 +00:00
|
|
|
$(AM_V_GEN)sed \
|
2016-04-12 20:28:27 +00:00
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
< $< > $@-t && \
|
2015-02-09 16:35:05 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
2013-08-31 02:16:06 +00:00
|
|
|
if WITH_LIBVIRTD
|
2018-02-21 18:05:56 +00:00
|
|
|
man8_MANS += virtlockd.8
|
2013-08-08 14:10:38 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
conf_DATA += locking/virtlockd.conf
|
2013-08-08 15:06:31 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
augeas_DATA += locking/virtlockd.aug
|
|
|
|
augeastest_DATA += test_virtlockd.aug
|
2013-08-31 02:16:06 +00:00
|
|
|
endif WITH_LIBVIRTD
|
2013-08-08 15:06:31 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
PODFILES += \
|
2016-04-13 15:09:14 +00:00
|
|
|
locking/virtlockd.pod \
|
|
|
|
$(NULL)
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
MANINFILES += \
|
2016-04-13 15:09:14 +00:00
|
|
|
virtlockd.8.in \
|
|
|
|
$(NULL)
|
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
CLEANFILES += test_virtlockd.aug $(man8_MANS)
|
2016-04-13 15:09:14 +00:00
|
|
|
MAINTAINERCLEANFILES += $(MANINFILES)
|
2013-08-08 14:10:38 +00:00
|
|
|
|
2018-02-21 18:05:56 +00:00
|
|
|
SYSTEMD_UNIT_FILES_IN += \
|
2018-02-20 14:28:00 +00:00
|
|
|
locking/virtlockd.service.in \
|
|
|
|
locking/virtlockd.socket.in \
|
|
|
|
locking/virtlockd-admin.socket.in \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-08-08 14:10:38 +00:00
|
|
|
EXTRA_DIST += \
|
2018-02-20 14:28:00 +00:00
|
|
|
$(SYSTEMD_UNIT_FILES_IN) \
|
2013-08-08 15:06:31 +00:00
|
|
|
locking/virtlockd.aug \
|
|
|
|
locking/virtlockd.conf \
|
|
|
|
locking/test_virtlockd.aug.in \
|
2016-04-13 15:09:14 +00:00
|
|
|
$(PODFILES) \
|
|
|
|
$(MANINFILES) \
|
2013-08-08 14:10:38 +00:00
|
|
|
$(NULL)
|
2012-08-02 19:06:50 +00:00
|
|
|
|
2011-07-07 14:02:32 +00:00
|
|
|
|
|
|
|
if WITH_LIBVIRTD
|
|
|
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
|
|
|
|
2014-01-17 12:11:58 +00:00
|
|
|
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
2018-02-20 14:28:00 +00:00
|
|
|
SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
|
2011-07-07 14:02:32 +00:00
|
|
|
|
2018-02-20 14:28:00 +00:00
|
|
|
BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
|
|
|
|
DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
|
2011-07-07 14:02:32 +00:00
|
|
|
|
2018-02-20 14:28:00 +00:00
|
|
|
install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
|
2012-12-13 23:28:27 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
2018-02-20 14:28:00 +00:00
|
|
|
for f in $(SYSTEMD_UNIT_FILES); \
|
|
|
|
do \
|
|
|
|
$(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
|
|
|
|
done
|
2011-07-07 14:02:32 +00:00
|
|
|
|
|
|
|
uninstall-systemd: uninstall-sysconfig
|
2018-02-20 14:28:00 +00:00
|
|
|
rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
|
2012-12-13 23:28:27 +00:00
|
|
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2011-07-07 14:02:32 +00:00
|
|
|
install-systemd:
|
|
|
|
uninstall-systemd:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
|
|
|
else ! WITH_LIBVIRTD
|
2011-07-07 14:02:32 +00:00
|
|
|
install-systemd:
|
|
|
|
uninstall-systemd:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_LIBVIRTD
|
2011-07-07 14:02:32 +00:00
|
|
|
|
|
|
|
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
|
2017-11-03 12:09:47 +00:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
|
|
|
< $< > $@-t && \
|
2011-07-07 14:02:32 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
|
|
|
virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
|
2017-11-03 12:09:47 +00:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
< $< > $@-t && \
|
2011-07-07 14:02:32 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
2018-02-06 15:51:08 +00:00
|
|
|
virtlockd-admin.socket: locking/virtlockd-admin.socket.in \
|
|
|
|
$(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
< $< > $@-t && \
|
|
|
|
mv $@-t $@
|
|
|
|
|
2015-02-09 16:35:05 +00:00
|
|
|
|
2011-07-07 14:02:32 +00:00
|
|
|
|
2018-02-20 17:41:45 +00:00
|
|
|
EXTRA_DIST += $(UPSTART_FILES)
|
|
|
|
|
|
|
|
if WITH_LIBVIRTD
|
|
|
|
if LIBVIRT_INIT_SCRIPT_UPSTART
|
|
|
|
|
|
|
|
install-upstart: install-sysconfig
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
|
|
|
|
for f in $(UPSTART_FILES:%.upstart=%); \
|
|
|
|
do \
|
|
|
|
tgt=`basename $$f` ; \
|
2018-02-23 11:36:37 +00:00
|
|
|
$(INSTALL_SCRIPT) $(srcdir)/$$f.upstart \
|
|
|
|
$(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
|
2018-02-20 17:41:45 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
uninstall-upstart: uninstall-sysconfig
|
|
|
|
for f in $(UPSTART_FILES:%.upstart=%); \
|
|
|
|
do \
|
|
|
|
tgt=`basename $$f` ; \
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
|
|
|
|
done
|
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/event.d || :
|
|
|
|
else ! LIBVIRT_INIT_SCRIPT_UPSTART
|
|
|
|
install-upstart:
|
|
|
|
uninstall-upstart:
|
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_UPSTART
|
|
|
|
else ! WITH_LIBVIRTD
|
|
|
|
install-upstart:
|
|
|
|
uninstall-upstart:
|
|
|
|
endif ! WITH_LIBVIRTD
|
|
|
|
|
2012-09-20 11:58:07 +00:00
|
|
|
if WITH_SANLOCK
|
2011-07-06 16:30:08 +00:00
|
|
|
lockdriver_LTLIBRARIES += sanlock.la
|
2011-01-18 18:37:45 +00:00
|
|
|
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
|
2015-01-08 00:05:36 +00:00
|
|
|
sanlock_la_CFLAGS = -I$(srcdir)/conf $(AM_CFLAGS)
|
2018-01-25 09:35:58 +00:00
|
|
|
sanlock_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
|
2018-01-25 09:35:56 +00:00
|
|
|
sanlock_la_LIBADD = -lsanlock_client libvirt.la ../gnulib/lib/libgnu.la
|
2011-06-14 08:20:49 +00:00
|
|
|
|
|
|
|
augeas_DATA += locking/libvirt_sanlock.aug
|
2012-05-29 21:49:13 +00:00
|
|
|
augeastest_DATA += test_libvirt_sanlock.aug
|
|
|
|
CLEANFILES += test_libvirt_sanlock.aug
|
2011-06-14 08:20:49 +00:00
|
|
|
|
build: fix 'make distcheck' issues
We had a distributed file (remote_protocol.h, which in turn was
a prereq to remote_driver.c) depending on a generated file
(libvirt_probes.h), which is a no-no for a VPATH build from a
read-only source tree (no wonder 'make distcheck' tests precisely
that situation):
File `libvirt_driver_remote.la' does not exist.
File `libvirt_driver_remote_la-remote_driver.lo' does not exist.
Prerequisite `libvirt_probes.h' is newer than target `../../src/remote/remote_protocol.h'.
Must remake target `../../src/remote/remote_protocol.h'.
Invoking recipe from Makefile:7464 to update target `../../src/remote/remote_protocol.h'.
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/libvirt-0.9.12/_build/src'
GEN ../../src/remote/remote_protocol.h
cannot create ../../src/remote/remote_protocol.h: Permission denied at ../../src/rpc/genprotocol.pl line 31.
make[3]: *** [../../src/remote/remote_protocol.h] Error 13
Rather than making distributed .c files depend on generated files, we
really want to ensure that compilation into .lo files is not attempted
until the generated files are present, done by this patch. Since there
were two different sets of conditionally generated files that both
feed the .lo file, I had to introduce a new variable REMOTE_DRIVER_PREREQS
to keep automake happy.
After that fix, the next issue was that make treats './foo' and 'foo'
differently in determining whether an implicit %foo rule is applicable,
with the result that locking/qemu-sanlock.conf wasn't properly being
built at the right times. Also, the output for using the .aug test
files was a bit verbose.
After fixing the src directory, the next error is related to the docs
directory, where the tarball is missing a stamp file and thus tries to
regenerate files that are already present:
GEN ../../docs/apibuild.py.stamp
Traceback (most recent call last):
File "../../docs/apibuild.py", line 2511, in <module>
rebuild("libvirt")
File "../../docs/apibuild.py", line 2495, in rebuild
builder.serialize()
File "../../docs/apibuild.py", line 2424, in serialize
output = open(filename, "w")
IOError: [Errno 13] Permission denied: '../../docs/libvirt-api.xml'
make[5]: *** [../../docs/apibuild.py.stamp] Error 1
and fixing that exposed another case of a distributed file (generated
html) depending on a built file (libvirt.h), but only when doing an
in-tree build, because of a file glob.
* src/Makefile.am ($(srcdir)/remote/remote_driver.c): Change...
(libvirt_driver_remote_la-remote_driver.lo): ...to the real
dependency.
($(builddir)/locking/%-sanlock.conf): Drop $(builddir), so that
rule gets run in time for test_libvirt_sanlock.aug.
(test_libvir*.aug): Cater to silent build.
(conf_DATA): Don't ship qemu-sanlock.conf in the tarball, since it
is trivial to regenerate.
* docs/Makefile.am (EXTRA_DIST): Ship our stamp file.
($(APIBUILD_STAMP)): Don't depend on generated file.
2012-05-30 17:30:18 +00:00
|
|
|
locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
|
2011-06-29 15:24:12 +00:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) locking ; \
|
2011-06-14 08:20:49 +00:00
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
if WITH_QEMU
|
2012-12-14 10:54:16 +00:00
|
|
|
nodist_conf_DATA += locking/qemu-sanlock.conf
|
2011-06-14 08:20:49 +00:00
|
|
|
BUILT_SOURCES += locking/qemu-sanlock.conf
|
2011-10-11 21:10:17 +00:00
|
|
|
DISTCLEANFILES += locking/qemu-sanlock.conf
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_QEMU
|
2015-04-14 20:38:46 +00:00
|
|
|
|
|
|
|
if WITH_LIBXL
|
|
|
|
nodist_conf_DATA += locking/libxl-sanlock.conf
|
|
|
|
BUILT_SOURCES += locking/libxl-sanlock.conf
|
|
|
|
DISTCLEANFILES += locking/libxl-sanlock.conf
|
|
|
|
endif WITH_LIBXL
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SANLOCK
|
2011-06-29 15:24:12 +00:00
|
|
|
EXTRA_DIST += $(LOCK_DRIVER_SANLOCK_SOURCES)
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SANLOCK
|
2011-06-29 15:24:12 +00:00
|
|
|
EXTRA_DIST += locking/sanlock.conf \
|
|
|
|
locking/libvirt_sanlock.aug \
|
Autogenerate augeas test case from default config files
When adding new config file parameters, the corresponding
additions to the augeas lens' are constantly forgotten.
Also there are augeas test cases, these don't catch the
error, since they too are never updated.
To address this, the augeas test cases need to be auto-generated
from the example config files.
* build-aux/augeas-gentest.pl: Helper to generate an
augeas test file, substituting in elements from the
example config files
* src/Makefile.am, daemon/Makefile.am: Switch to
auto-generated augeas test cases
* daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
src/locking/test_libvirt_sanlock.aug,
src/locking/test_libvirt_sanlock.aug.in,
src/lxc/test_libvirtd_lxc.aug,
src/lxc/test_libvirtd_lxc.aug.in,
src/qemu/test_libvirtd_qemu.aug,
src/qemu/test_libvirtd_qemu.aug.in: Remove example
config file data, replacing with a ::CONFIG:: placeholder
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-25 10:14:15 +00:00
|
|
|
locking/test_libvirt_sanlock.aug.in
|
2011-01-18 18:37:45 +00:00
|
|
|
|
2011-06-29 15:24:12 +00:00
|
|
|
noinst_LTLIBRARIES += \
|
|
|
|
libvirt-net-rpc.la \
|
|
|
|
libvirt-net-rpc-server.la \
|
|
|
|
libvirt-net-rpc-client.la
|
2010-12-06 17:03:10 +00:00
|
|
|
|
2018-01-25 09:35:47 +00:00
|
|
|
libvirt_la_BUILT_LIBADD += \
|
|
|
|
libvirt-net-rpc.la \
|
|
|
|
libvirt-net-rpc-server.la \
|
|
|
|
libvirt-net-rpc-client.la
|
|
|
|
|
2010-12-10 12:27:33 +00:00
|
|
|
EXTRA_DIST += \
|
2011-10-11 20:33:43 +00:00
|
|
|
dtrace2systemtap.pl \
|
|
|
|
rpc/gendispatch.pl \
|
|
|
|
rpc/genprotocol.pl \
|
|
|
|
rpc/gensystemtap.pl \
|
2011-09-22 10:51:55 +00:00
|
|
|
rpc/virnetprotocol.x \
|
|
|
|
rpc/virkeepaliveprotocol.x
|
2010-12-10 12:27:33 +00:00
|
|
|
|
2011-06-25 02:48:49 +00:00
|
|
|
VIR_NET_RPC_GENERATED = \
|
2013-09-27 17:12:20 +00:00
|
|
|
rpc/virnetprotocol.h \
|
|
|
|
rpc/virnetprotocol.c \
|
|
|
|
rpc/virkeepaliveprotocol.h \
|
|
|
|
rpc/virkeepaliveprotocol.c
|
2011-06-24 13:37:25 +00:00
|
|
|
|
2011-06-24 14:04:11 +00:00
|
|
|
BUILT_SOURCES += $(VIR_NET_RPC_GENERATED)
|
2011-06-24 13:37:25 +00:00
|
|
|
|
2010-12-06 17:03:10 +00:00
|
|
|
libvirt_net_rpc_la_SOURCES = \
|
2010-12-06 17:03:22 +00:00
|
|
|
rpc/virnetmessage.h rpc/virnetmessage.c \
|
2010-11-23 20:17:41 +00:00
|
|
|
rpc/virnetsocket.h rpc/virnetsocket.c \
|
2013-09-27 17:12:20 +00:00
|
|
|
rpc/virkeepalive.h rpc/virkeepalive.c \
|
|
|
|
$(VIR_NET_RPC_GENERATED)
|
2013-01-08 21:34:15 +00:00
|
|
|
if WITH_SSH2
|
2011-11-14 14:30:23 +00:00
|
|
|
libvirt_net_rpc_la_SOURCES += \
|
|
|
|
rpc/virnetsshsession.h rpc/virnetsshsession.c
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SSH2
|
2011-11-14 14:30:23 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
rpc/virnetsshsession.h rpc/virnetsshsession.c
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SSH2
|
2013-01-08 21:02:05 +00:00
|
|
|
if WITH_GNUTLS
|
2013-01-07 14:54:18 +00:00
|
|
|
libvirt_net_rpc_la_SOURCES += \
|
|
|
|
rpc/virnettlscontext.h rpc/virnettlscontext.c
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_GNUTLS
|
2013-01-07 14:54:18 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
rpc/virnettlscontext.h rpc/virnettlscontext.c
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_GNUTLS
|
2012-09-20 11:58:29 +00:00
|
|
|
if WITH_SASL
|
2010-12-10 12:21:18 +00:00
|
|
|
libvirt_net_rpc_la_SOURCES += \
|
|
|
|
rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SASL
|
2010-12-10 12:21:18 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SASL
|
2016-11-09 14:28:35 +00:00
|
|
|
if WITH_LIBSSH
|
|
|
|
libvirt_net_rpc_la_SOURCES += \
|
|
|
|
rpc/virnetlibsshsession.h rpc/virnetlibsshsession.c
|
|
|
|
else ! WITH_LIBSSH
|
|
|
|
EXTRA_DIST += \
|
|
|
|
rpc/virnetlibsshsession.h rpc/virnetlibsshsession.c
|
|
|
|
endif ! WITH_LIBSSH
|
2010-12-06 17:03:10 +00:00
|
|
|
libvirt_net_rpc_la_CFLAGS = \
|
2010-11-23 20:17:41 +00:00
|
|
|
$(GNUTLS_CFLAGS) \
|
2010-12-10 12:21:18 +00:00
|
|
|
$(SASL_CFLAGS) \
|
2013-01-08 21:47:55 +00:00
|
|
|
$(SSH2_CFLAGS) \
|
2016-11-09 14:28:35 +00:00
|
|
|
$(LIBSSH_CFLAGS) \
|
2011-06-28 15:44:59 +00:00
|
|
|
$(XDR_CFLAGS) \
|
2010-12-06 17:03:10 +00:00
|
|
|
$(AM_CFLAGS)
|
|
|
|
libvirt_net_rpc_la_LDFLAGS = \
|
2010-11-23 20:17:41 +00:00
|
|
|
$(GNUTLS_LIBS) \
|
2010-12-10 12:21:18 +00:00
|
|
|
$(SASL_LIBS) \
|
2013-01-08 21:47:55 +00:00
|
|
|
$(SSH2_LIBS)\
|
2016-11-09 14:28:35 +00:00
|
|
|
$(LIBSSH_LIBS) \
|
2013-10-21 21:36:11 +00:00
|
|
|
$(SECDRIVER_LIBS) \
|
2010-12-06 17:03:10 +00:00
|
|
|
$(AM_LDFLAGS) \
|
2016-08-06 13:43:06 +00:00
|
|
|
$(NULL)
|
2010-12-06 17:03:10 +00:00
|
|
|
libvirt_net_rpc_la_LIBADD = \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD)
|
|
|
|
|
2010-12-01 16:36:40 +00:00
|
|
|
libvirt_net_rpc_server_la_SOURCES = \
|
|
|
|
rpc/virnetserverprogram.h rpc/virnetserverprogram.c \
|
|
|
|
rpc/virnetserverservice.h rpc/virnetserverservice.c \
|
|
|
|
rpc/virnetserverclient.h rpc/virnetserverclient.c \
|
2012-08-01 23:42:51 +00:00
|
|
|
rpc/virnetservermdns.h rpc/virnetservermdns.c \
|
2015-03-16 14:02:41 +00:00
|
|
|
rpc/virnetdaemon.h rpc/virnetdaemon.c \
|
2010-12-01 16:36:40 +00:00
|
|
|
rpc/virnetserver.h rpc/virnetserver.c
|
|
|
|
libvirt_net_rpc_server_la_CFLAGS = \
|
2011-03-02 17:11:42 +00:00
|
|
|
$(AVAHI_CFLAGS) \
|
2012-10-31 19:03:55 +00:00
|
|
|
$(DBUS_CFLAGS) \
|
2011-07-29 19:16:29 +00:00
|
|
|
$(XDR_CFLAGS) \
|
2013-08-22 16:09:03 +00:00
|
|
|
$(AM_CFLAGS)
|
2010-12-01 16:36:40 +00:00
|
|
|
libvirt_net_rpc_server_la_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
2011-03-02 17:11:42 +00:00
|
|
|
$(AVAHI_LIBS) \
|
2012-10-31 19:03:55 +00:00
|
|
|
$(DBUS_LIBS) \
|
2016-08-06 13:43:06 +00:00
|
|
|
$(NULL)
|
2010-12-01 16:36:40 +00:00
|
|
|
libvirt_net_rpc_server_la_LIBADD = \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD)
|
|
|
|
|
2010-12-01 16:35:50 +00:00
|
|
|
libvirt_net_rpc_client_la_SOURCES = \
|
|
|
|
rpc/virnetclientprogram.h rpc/virnetclientprogram.c \
|
|
|
|
rpc/virnetclientstream.h rpc/virnetclientstream.c \
|
|
|
|
rpc/virnetclient.h rpc/virnetclient.c
|
|
|
|
libvirt_net_rpc_client_la_CFLAGS = \
|
2011-07-29 19:16:29 +00:00
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(XDR_CFLAGS)
|
2016-08-06 13:43:06 +00:00
|
|
|
libvirt_net_rpc_client_la_LDFLAGS = $(AM_LDFLAGS)
|
2010-12-01 16:35:50 +00:00
|
|
|
libvirt_net_rpc_client_la_LIBADD = \
|
|
|
|
$(CYGWIN_EXTRA_LIBADD)
|
2010-12-01 16:36:40 +00:00
|
|
|
|
2011-04-08 03:26:47 +00:00
|
|
|
if WITH_LIBVIRTD
|
2011-02-22 12:05:20 +00:00
|
|
|
libexec_PROGRAMS += libvirt_iohelper
|
|
|
|
libvirt_iohelper_SOURCES = $(UTIL_IO_HELPER_SOURCES)
|
2013-04-03 10:32:15 +00:00
|
|
|
libvirt_iohelper_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(PIE_LDFLAGS) \
|
|
|
|
$(NULL)
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_iohelper_LDADD = \
|
|
|
|
libvirt_util.la \
|
2011-02-22 12:05:20 +00:00
|
|
|
../gnulib/lib/libgnu.la
|
2012-10-29 20:17:03 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
|
|
|
libvirt_iohelper_LDADD += libvirt_probes.lo
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_DTRACE_PROBES
|
2011-02-22 12:05:20 +00:00
|
|
|
|
2013-04-03 10:32:15 +00:00
|
|
|
libvirt_iohelper_CFLAGS = \
|
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(PIE_CFLAGS) \
|
|
|
|
$(NULL)
|
Add helper program to create custom leases
Introduce helper program to catch events from dnsmasq and maintain a custom
lease file per network. It supports dhcpv4 and dhcpv6. The file is saved as
"<interface-name>.status".
Each lease contains the following info:
<expiry-time (epoch time)> <mac> <iaid> <ip-address> <hostname> <clientid>
Example of custom leases file content:
[
{
"iaid": "1221229",
"ip-address": "2001:db8:ca2:2:1::95",
"mac-address": "52:54:00:12:a2:6d",
"hostname": "Fedora20",
"client-id": "00:04:1a:c1:d9:6b:5a:0a:e2:bc:f8:4b:1e:37:2e:38:22:55",
"expiry-time": 1393244216
},
{
"ip-address": "192.168.150.208",
"mac-address": "52:54:00:11:56:b3",
"hostname": "Wani-PC",
"client-id": "01:52:54:00:11:56:b3",
"expiry-time": 1393244248
}
]
src/Makefile.am:
* Add options to compile the helper program
src/network/bridge_driver.c:
* Introduce networkDnsmasqLeaseFileNameCustom()
* Invoke helper program along with dnsmasq
* Delete the .status file when corresponding n/w is destroyed.
src/network/leaseshelper.c
* Helper program to create the custom lease file
2014-06-02 10:19:26 +00:00
|
|
|
|
|
|
|
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_LIBVIRTD
|
2011-02-22 12:05:20 +00:00
|
|
|
|
2008-02-20 15:52:17 +00:00
|
|
|
|
2012-09-20 11:58:07 +00:00
|
|
|
if WITH_SANLOCK
|
2012-09-18 11:41:26 +00:00
|
|
|
libexec_PROGRAMS += libvirt_sanlock_helper
|
|
|
|
|
|
|
|
libvirt_sanlock_helper_SOURCES = $(LOCK_DRIVER_SANLOCK_HELPER_SOURCES)
|
2013-04-03 10:32:15 +00:00
|
|
|
libvirt_sanlock_helper_CFLAGS = \
|
2015-01-08 00:05:36 +00:00
|
|
|
-I$(srcdir)/conf \
|
2013-04-03 10:32:15 +00:00
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(PIE_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
libvirt_sanlock_helper_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
$(PIE_LDFLAGS) \
|
|
|
|
$(NULL)
|
2012-09-18 11:41:26 +00:00
|
|
|
libvirt_sanlock_helper_LDADD = libvirt.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SANLOCK
|
2012-09-18 11:41:26 +00:00
|
|
|
|
2008-08-20 20:55:32 +00:00
|
|
|
|
2009-10-08 14:34:22 +00:00
|
|
|
|
2016-12-25 14:56:57 +00:00
|
|
|
if WITH_NSS
|
2016-02-14 10:38:37 +00:00
|
|
|
noinst_LTLIBRARIES += libvirt-nss.la
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_nss_la_SOURCES = \
|
|
|
|
util/viralloc.c \
|
|
|
|
util/viralloc.h \
|
|
|
|
util/viratomic.c \
|
|
|
|
util/viratomic.h \
|
|
|
|
util/virbitmap.c \
|
|
|
|
util/virbitmap.h \
|
|
|
|
util/virbuffer.c \
|
|
|
|
util/virbuffer.h \
|
|
|
|
util/vircommand.c \
|
|
|
|
util/vircommand.h \
|
|
|
|
util/virerror.c \
|
|
|
|
util/virerror.h \
|
|
|
|
util/virfile.c \
|
|
|
|
util/virfile.h \
|
|
|
|
util/virhash.c \
|
|
|
|
util/virhash.h \
|
|
|
|
util/virhashcode.c \
|
|
|
|
util/virhashcode.h \
|
|
|
|
util/virjson.c \
|
|
|
|
util/virjson.h \
|
|
|
|
util/virkmod.c \
|
|
|
|
util/virkmod.h \
|
|
|
|
util/virlease.c \
|
|
|
|
util/virlease.h \
|
|
|
|
util/virlog.c \
|
|
|
|
util/virlog.h \
|
|
|
|
util/virmacmap.c \
|
|
|
|
util/virmacmap.h \
|
|
|
|
util/virobject.c \
|
|
|
|
util/virobject.h \
|
|
|
|
util/virpidfile.c \
|
|
|
|
util/virpidfile.h \
|
|
|
|
util/virprocess.c \
|
|
|
|
util/virprocess.h \
|
|
|
|
util/virrandom.c \
|
|
|
|
util/virrandom.h \
|
|
|
|
util/virsocketaddr.c \
|
|
|
|
util/virsocketaddr.h \
|
|
|
|
util/virstring.c \
|
|
|
|
util/virstring.h \
|
|
|
|
util/virthread.c \
|
|
|
|
util/virthread.h \
|
|
|
|
util/virthreadjob.c \
|
|
|
|
util/virthreadjob.h \
|
|
|
|
util/virtime.c \
|
|
|
|
util/virtime.h \
|
|
|
|
util/virutil.c \
|
|
|
|
util/virutil.h \
|
2016-02-14 10:38:37 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_nss_la_CFLAGS = \
|
|
|
|
-DLIBVIRT_NSS \
|
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(YAJL_CFLAGS) \
|
2016-02-14 10:38:37 +00:00
|
|
|
$(NULL)
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_nss_la_LDFLAGS = \
|
|
|
|
$(AM_LDFLAGS) \
|
2016-02-14 10:38:37 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
libvirt_nss_la_LIBADD = \
|
|
|
|
$(YAJL_LIBS) \
|
2016-02-14 10:38:37 +00:00
|
|
|
$(NULL)
|
2016-12-25 14:56:57 +00:00
|
|
|
endif WITH_NSS
|
2016-02-14 10:38:37 +00:00
|
|
|
|
|
|
|
|
2018-02-21 11:15:30 +00:00
|
|
|
install-data-local: install-init install-systemd install-upstart \
|
2018-02-21 12:48:23 +00:00
|
|
|
install-sysctl install-polkit install-sasl \
|
2018-02-26 16:56:03 +00:00
|
|
|
install-logrotate $(INSTALL_DATA_DIRS:%=install-data-%)
|
2012-08-02 19:06:50 +00:00
|
|
|
if WITH_LIBVIRTD
|
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd"
|
2012-08-14 15:46:08 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files"
|
2012-08-02 19:06:50 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lockd"
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_LIBVIRTD
|
2009-01-20 22:36:10 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
|
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
|
2011-11-01 11:21:21 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
|
2009-01-20 22:36:10 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
|
2012-09-20 11:58:07 +00:00
|
|
|
if WITH_SANLOCK
|
2011-07-22 08:38:46 +00:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock"
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SANLOCK
|
2009-09-16 11:31:13 +00:00
|
|
|
|
2018-02-21 11:15:30 +00:00
|
|
|
uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart \
|
2018-02-21 12:48:23 +00:00
|
|
|
uninstall-sysctl uninstall-polkit uninstall-sasl \
|
2018-02-26 16:56:03 +00:00
|
|
|
uninstall-logrotate $(INSTALL_DATA_DIRS:%=uninstall-data-%)
|
2012-08-02 19:06:50 +00:00
|
|
|
if WITH_LIBVIRTD
|
2012-08-14 15:46:08 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||:
|
2012-08-02 19:06:50 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||:
|
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" ||:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_LIBVIRTD
|
2009-09-16 11:31:13 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
|
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
|
2011-11-01 11:21:21 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems" ||:
|
2009-09-16 11:31:13 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||:
|
2012-09-20 11:58:07 +00:00
|
|
|
if WITH_SANLOCK
|
2011-07-22 08:38:46 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SANLOCK
|
2009-09-16 11:31:13 +00:00
|
|
|
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt" ||:
|
2008-06-10 10:43:28 +00:00
|
|
|
|
Rewrite all the DTrace/SystemTAP probing
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.
The master probes file is now src/probes.d. This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.
The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.
The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum
The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.
* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
src/util/event_poll.c: Insert probe points, removing any
DEBUG statements that duplicate the info
2011-09-30 13:40:23 +00:00
|
|
|
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
|
|
|
|
DISTCLEANFILES += $(GENERATED_SYM_FILES)
|
2018-02-20 13:16:28 +00:00
|
|
|
MAINTAINERCLEANFILES += \
|
|
|
|
$(VIR_NET_RPC_GENERATED) \
|
|
|
|
$(NULL)
|