2007-02-14 01:40:09 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
Add dtrace static probes in libvirtd
Adds initial support for dtrace static probes in libvirtd
daemon, assuming use of systemtap dtrace compat shim on
Linux. The probes are inserted for network client connect,
disconnect, TLS handshake states and authentication protocol
states.
This can be tested by running the xample program and then
attempting to connect with any libvirt client (virsh,
virt-manager, etc).
# stap examples/systemtap/client.stp
Client fd=44 connected readonly=0
Client fd=44 auth polkit deny pid:24997,uid:500
Client fd=44 disconnected
Client fd=46 connected readonly=1
Client fd=46 auth sasl allow test
Client fd=46 disconnected
The libvirtd.stp file should also really not be required,
since it is duplicated info that is already available in
the main probes.d definition file. A script to autogenerate
the .stp file is needed, either in libvirtd tree, or better
as part of systemtap itself.
* Makefile.am: Add examples/systemtap subdir
* autobuild.sh: Disable dtrace for mingw32
* configure.ac: Add check for dtrace
* daemon/.gitignore: Ignore generated dtrace probe file
* daemon/Makefile.am: Build dtrace probe header & object
files
* daemon/libvirtd.stp: SystemTAP convenience probeset
* daemon/libvirtd.c: Add connect/disconnect & TLS probes
* daemon/remote.c: Add SASL and PolicyKit auth probes
* daemon/probes.d: Master probe definition
* daemon/libvirtd.h: Add convenience macro for probes
so that compilation is a no-op when dtrace is not available
* examples/systemtap/Makefile.am, examples/systemtap/client.stp
Example systemtap script using dtrace probe markers
* libvirt.spec.in: Enable dtrace on F13/RHEL6
* mingw32-libvirt.spec.in: Force disable dtrace
2010-09-14 16:30:32 +00:00
|
|
|
CLEANFILES =
|
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
DAEMON_SOURCES = \
|
2009-09-16 11:37:26 +00:00
|
|
|
libvirtd.c libvirtd.h \
|
2009-07-10 11:20:03 +00:00
|
|
|
remote.c remote.h \
|
|
|
|
dispatch.c dispatch.h \
|
2009-07-10 12:06:36 +00:00
|
|
|
stream.c stream.h \
|
2008-08-20 20:48:35 +00:00
|
|
|
remote_dispatch_prototypes.h \
|
2008-12-04 22:03:24 +00:00
|
|
|
remote_dispatch_table.h \
|
|
|
|
remote_dispatch_args.h \
|
|
|
|
remote_dispatch_ret.h \
|
2010-07-29 20:19:40 +00:00
|
|
|
qemu_dispatch_prototypes.h \
|
|
|
|
qemu_dispatch_table.h \
|
|
|
|
qemu_dispatch_args.h \
|
|
|
|
qemu_dispatch_ret.h \
|
2010-04-17 02:09:25 +00:00
|
|
|
../src/remote/remote_protocol.c \
|
|
|
|
../src/remote/qemu_protocol.c
|
2008-08-20 20:48:35 +00:00
|
|
|
|
|
|
|
AVAHI_SOURCES = \
|
|
|
|
mdns.c mdns.h
|
|
|
|
|
2008-12-10 19:21:00 +00:00
|
|
|
DISTCLEANFILES =
|
2008-08-20 20:48:35 +00:00
|
|
|
EXTRA_DIST = \
|
2009-09-16 15:55:16 +00:00
|
|
|
remote_generate_stubs.pl \
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd.conf \
|
|
|
|
libvirtd.init.in \
|
2009-08-06 12:54:08 +00:00
|
|
|
libvirtd.policy-0 \
|
|
|
|
libvirtd.policy-1 \
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd.sasl \
|
|
|
|
libvirtd.sysconf \
|
2008-09-04 10:44:23 +00:00
|
|
|
libvirtd.aug \
|
2011-03-03 07:26:22 +00:00
|
|
|
libvirtd.logrotate.in \
|
2010-03-04 14:17:08 +00:00
|
|
|
libvirtd.qemu.logrotate.in \
|
|
|
|
libvirtd.lxc.logrotate.in \
|
|
|
|
libvirtd.uml.logrotate.in \
|
2008-09-04 10:44:23 +00:00
|
|
|
test_libvirtd.aug \
|
2010-05-19 17:51:49 +00:00
|
|
|
THREADING.txt \
|
2010-07-09 09:21:39 +00:00
|
|
|
libvirtd.pod.in \
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
libvirtd.8.in \
|
Add dtrace static probes in libvirtd
Adds initial support for dtrace static probes in libvirtd
daemon, assuming use of systemtap dtrace compat shim on
Linux. The probes are inserted for network client connect,
disconnect, TLS handshake states and authentication protocol
states.
This can be tested by running the xample program and then
attempting to connect with any libvirt client (virsh,
virt-manager, etc).
# stap examples/systemtap/client.stp
Client fd=44 connected readonly=0
Client fd=44 auth polkit deny pid:24997,uid:500
Client fd=44 disconnected
Client fd=46 connected readonly=1
Client fd=46 auth sasl allow test
Client fd=46 disconnected
The libvirtd.stp file should also really not be required,
since it is duplicated info that is already available in
the main probes.d definition file. A script to autogenerate
the .stp file is needed, either in libvirtd tree, or better
as part of systemtap itself.
* Makefile.am: Add examples/systemtap subdir
* autobuild.sh: Disable dtrace for mingw32
* configure.ac: Add check for dtrace
* daemon/.gitignore: Ignore generated dtrace probe file
* daemon/Makefile.am: Build dtrace probe header & object
files
* daemon/libvirtd.stp: SystemTAP convenience probeset
* daemon/libvirtd.c: Add connect/disconnect & TLS probes
* daemon/remote.c: Add SASL and PolicyKit auth probes
* daemon/probes.d: Master probe definition
* daemon/libvirtd.h: Add convenience macro for probes
so that compilation is a no-op when dtrace is not available
* examples/systemtap/Makefile.am, examples/systemtap/client.stp
Example systemtap script using dtrace probe markers
* libvirt.spec.in: Enable dtrace on F13/RHEL6
* mingw32-libvirt.spec.in: Force disable dtrace
2010-09-14 16:30:32 +00:00
|
|
|
libvirtd.stp \
|
2008-08-20 20:48:35 +00:00
|
|
|
$(AVAHI_SOURCES) \
|
|
|
|
$(DAEMON_SOURCES)
|
2007-12-06 16:34:48 +00:00
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
BUILT_SOURCES =
|
2009-05-19 13:22:00 +00:00
|
|
|
|
2007-12-06 16:34:48 +00:00
|
|
|
if WITH_LIBVIRTD
|
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
man8_MANS = libvirtd.8
|
2010-08-06 01:17:37 +00:00
|
|
|
|
2007-12-06 16:34:48 +00:00
|
|
|
sbin_PROGRAMS = libvirtd
|
|
|
|
|
|
|
|
confdir = $(sysconfdir)/libvirt/
|
|
|
|
conf_DATA = libvirtd.conf
|
2007-09-19 01:56:55 +00:00
|
|
|
|
2008-09-04 10:44:23 +00:00
|
|
|
augeasdir = $(datadir)/augeas/lenses
|
2009-09-16 11:31:13 +00:00
|
|
|
augeas_DATA = libvirtd.aug
|
2008-09-04 10:44:23 +00:00
|
|
|
|
|
|
|
augeastestsdir = $(datadir)/augeas/lenses/tests
|
2009-09-16 11:31:13 +00:00
|
|
|
augeastests_DATA = test_libvirtd.aug
|
2008-09-04 10:44:23 +00:00
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
libvirtd.8: $(srcdir)/libvirtd.8.in
|
2010-07-09 09:21:39 +00:00
|
|
|
sed \
|
|
|
|
-e 's![@]sysconfdir[@]!$(sysconfdir)!g' \
|
|
|
|
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
|
|
|
-e 's![@]remote_pid_file[@]!$(REMOTE_PID_FILE)!g' \
|
|
|
|
< $< > $@-t
|
|
|
|
mv $@-t $@
|
|
|
|
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd_SOURCES = $(DAEMON_SOURCES)
|
2007-09-19 01:56:55 +00:00
|
|
|
|
2007-02-14 01:40:09 +00:00
|
|
|
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
2007-06-26 23:04:49 +00:00
|
|
|
libvirtd_CFLAGS = \
|
2008-02-28 17:06:32 +00:00
|
|
|
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
|
|
|
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
Standardize use of header files, making internal.h primary.
* qemud/internal.h, qemud/qemud.h: Rename this file so it
doesn't conflict with src/internal.h.
* HACKING: Document how header files should be used.
* qemud/Makefile.am: Add src/ directory to includes.
* qemud/event.c, qemud/mdns.c, qemud/qemud.c, qemud/remote.c,
qemud/remote_protocol.c, qemud/remote_protocol.h,
qemud/remote_protocol.x, src/buf.c, src/libvirt.c,
src/nodeinfo.c, src/qemu_conf.c, src/qemu_driver.c,
src/stats_linux.c, src/storage_backend.c, src/storage_backend_fs.c,
src/storage_backend_iscsi.c, src/storage_backend_logical.c,
src/storage_conf.c, src/storage_driver.c, src/util.c,
src/util.h, src/virsh.c, src/virterror.c, src/xend_internal.c,
src/xml.c, tests/reconnect.c, tests/xmlrpctest.c,
tests/qparamtest.c: Standardize use of header files.
* docs/*, po/*: Rebuild docs.
2008-05-23 08:24:41 +00:00
|
|
|
-I$(top_srcdir)/src \
|
Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
src/qparams.h, src/stats_linux.c, src/stats_linux.h,
src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-16 15:28:46 +00:00
|
|
|
-I$(top_srcdir)/src/util \
|
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
|
|
|
-I$(top_srcdir)/src/conf \
|
2009-09-16 15:55:16 +00:00
|
|
|
-I$(top_srcdir)/src/remote \
|
2008-02-28 17:06:32 +00:00
|
|
|
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
|
|
|
$(POLKIT_CFLAGS) \
|
2010-11-16 14:54:17 +00:00
|
|
|
$(WARN_CFLAGS) \
|
2008-02-28 17:06:32 +00:00
|
|
|
$(COVERAGE_CFLAGS) \
|
2007-06-11 12:04:54 +00:00
|
|
|
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
2010-11-16 14:54:17 +00:00
|
|
|
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\""
|
2008-02-28 17:06:32 +00:00
|
|
|
|
2010-12-21 15:58:03 +00:00
|
|
|
libvirtd_LDFLAGS = \
|
|
|
|
$(WARN_CFLAGS) \
|
2008-12-08 12:04:27 +00:00
|
|
|
$(COVERAGE_LDFLAGS)
|
2007-06-26 20:51:00 +00:00
|
|
|
|
2008-11-17 12:18:18 +00:00
|
|
|
libvirtd_LDADD = \
|
2008-12-08 12:04:27 +00:00
|
|
|
$(LIBXML_LIBS) \
|
|
|
|
$(GNUTLS_LIBS) \
|
|
|
|
$(SASL_LIBS) \
|
2008-12-11 18:11:41 +00:00
|
|
|
$(POLKIT_LIBS)
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2010-10-12 11:23:18 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt-qemu.la
|
2009-08-03 12:37:44 +00:00
|
|
|
|
2010-10-12 11:23:18 +00:00
|
|
|
if ! WITH_DRIVER_MODULES
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_QEMU
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_qemu.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_LXC
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_lxc.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2011-02-10 22:42:34 +00:00
|
|
|
if WITH_LIBXL
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_libxl.la
|
|
|
|
endif
|
|
|
|
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_UML
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2009-05-25 11:56:00 +00:00
|
|
|
if WITH_ONE
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_one.la
|
|
|
|
endif
|
|
|
|
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_STORAGE_DIR
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_NETWORK
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_network.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2009-07-21 14:02:16 +00:00
|
|
|
if WITH_NETCF
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_interface.la
|
|
|
|
endif
|
|
|
|
|
2009-02-17 14:46:21 +00:00
|
|
|
if WITH_NODE_DEVICES
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
|
2009-02-17 14:46:21 +00:00
|
|
|
endif
|
2009-12-22 13:50:50 +00:00
|
|
|
|
|
|
|
if WITH_SECRETS
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_secret.la
|
|
|
|
endif
|
2010-03-25 17:46:09 +00:00
|
|
|
|
|
|
|
if WITH_NWFILTER
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
|
|
|
|
endif
|
2008-11-21 12:16:08 +00:00
|
|
|
endif
|
2008-11-17 12:18:18 +00:00
|
|
|
|
|
|
|
libvirtd_LDADD += ../src/libvirt.la
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2007-12-05 18:21:27 +00:00
|
|
|
if HAVE_POLKIT
|
2009-08-06 12:54:08 +00:00
|
|
|
if HAVE_POLKIT0
|
2007-12-05 18:21:27 +00:00
|
|
|
policydir = $(datadir)/PolicyKit/policy
|
2009-08-06 12:54:08 +00:00
|
|
|
policyfile = libvirtd.policy-0
|
|
|
|
else
|
|
|
|
policydir = $(datadir)/polkit-1/actions
|
|
|
|
policyfile = libvirtd.policy-1
|
|
|
|
endif
|
2007-12-05 18:21:27 +00:00
|
|
|
endif
|
|
|
|
|
2007-09-19 01:56:55 +00:00
|
|
|
if HAVE_AVAHI
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd_SOURCES += $(AVAHI_SOURCES)
|
2007-09-19 01:56:55 +00:00
|
|
|
libvirtd_CFLAGS += $(AVAHI_CFLAGS)
|
|
|
|
libvirtd_LDADD += $(AVAHI_LIBS)
|
|
|
|
endif
|
|
|
|
|
Add dtrace static probes in libvirtd
Adds initial support for dtrace static probes in libvirtd
daemon, assuming use of systemtap dtrace compat shim on
Linux. The probes are inserted for network client connect,
disconnect, TLS handshake states and authentication protocol
states.
This can be tested by running the xample program and then
attempting to connect with any libvirt client (virsh,
virt-manager, etc).
# stap examples/systemtap/client.stp
Client fd=44 connected readonly=0
Client fd=44 auth polkit deny pid:24997,uid:500
Client fd=44 disconnected
Client fd=46 connected readonly=1
Client fd=46 auth sasl allow test
Client fd=46 disconnected
The libvirtd.stp file should also really not be required,
since it is duplicated info that is already available in
the main probes.d definition file. A script to autogenerate
the .stp file is needed, either in libvirtd tree, or better
as part of systemtap itself.
* Makefile.am: Add examples/systemtap subdir
* autobuild.sh: Disable dtrace for mingw32
* configure.ac: Add check for dtrace
* daemon/.gitignore: Ignore generated dtrace probe file
* daemon/Makefile.am: Build dtrace probe header & object
files
* daemon/libvirtd.stp: SystemTAP convenience probeset
* daemon/libvirtd.c: Add connect/disconnect & TLS probes
* daemon/remote.c: Add SASL and PolicyKit auth probes
* daemon/probes.d: Master probe definition
* daemon/libvirtd.h: Add convenience macro for probes
so that compilation is a no-op when dtrace is not available
* examples/systemtap/Makefile.am, examples/systemtap/client.stp
Example systemtap script using dtrace probe markers
* libvirt.spec.in: Enable dtrace on F13/RHEL6
* mingw32-libvirt.spec.in: Force disable dtrace
2010-09-14 16:30:32 +00:00
|
|
|
EXTRA_DIST += probes.d libvirtd.stp
|
|
|
|
|
|
|
|
if WITH_DTRACE
|
|
|
|
libvirtd_LDADD += probes.o
|
2010-10-22 22:19:15 +00:00
|
|
|
nodist_libvirtd_SOURCES = probes.h
|
Add dtrace static probes in libvirtd
Adds initial support for dtrace static probes in libvirtd
daemon, assuming use of systemtap dtrace compat shim on
Linux. The probes are inserted for network client connect,
disconnect, TLS handshake states and authentication protocol
states.
This can be tested by running the xample program and then
attempting to connect with any libvirt client (virsh,
virt-manager, etc).
# stap examples/systemtap/client.stp
Client fd=44 connected readonly=0
Client fd=44 auth polkit deny pid:24997,uid:500
Client fd=44 disconnected
Client fd=46 connected readonly=1
Client fd=46 auth sasl allow test
Client fd=46 disconnected
The libvirtd.stp file should also really not be required,
since it is duplicated info that is already available in
the main probes.d definition file. A script to autogenerate
the .stp file is needed, either in libvirtd tree, or better
as part of systemtap itself.
* Makefile.am: Add examples/systemtap subdir
* autobuild.sh: Disable dtrace for mingw32
* configure.ac: Add check for dtrace
* daemon/.gitignore: Ignore generated dtrace probe file
* daemon/Makefile.am: Build dtrace probe header & object
files
* daemon/libvirtd.stp: SystemTAP convenience probeset
* daemon/libvirtd.c: Add connect/disconnect & TLS probes
* daemon/remote.c: Add SASL and PolicyKit auth probes
* daemon/probes.d: Master probe definition
* daemon/libvirtd.h: Add convenience macro for probes
so that compilation is a no-op when dtrace is not available
* examples/systemtap/Makefile.am, examples/systemtap/client.stp
Example systemtap script using dtrace probe markers
* libvirt.spec.in: Enable dtrace on F13/RHEL6
* mingw32-libvirt.spec.in: Force disable dtrace
2010-09-14 16:30:32 +00:00
|
|
|
|
|
|
|
BUILT_SOURCES += probes.h
|
|
|
|
|
|
|
|
tapsetdir = $(datadir)/systemtap/tapsets
|
|
|
|
tapset_DATA = libvirtd.stp
|
|
|
|
|
|
|
|
probes.h: probes.d
|
|
|
|
$(AM_V_GEN)$(DTRACE) -o $@ -h -s $<
|
|
|
|
|
|
|
|
probes.o: probes.d
|
|
|
|
$(AM_V_GEN)$(DTRACE) -o $@ -G -s $<
|
|
|
|
|
|
|
|
CLEANFILES += probes.h probes.o
|
|
|
|
endif
|
2008-11-28 11:20:27 +00:00
|
|
|
|
2008-12-09 20:22:39 +00:00
|
|
|
install-data-local: install-init install-data-sasl install-data-polkit \
|
|
|
|
install-logrotate
|
2009-09-16 11:31:13 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt
|
2007-03-08 23:31:28 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
|
2007-03-13 22:43:22 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
|
2007-03-07 11:54:29 +00:00
|
|
|
|
2009-09-16 11:31:13 +00:00
|
|
|
uninstall-local:: uninstall-init uninstall-data-sasl uninstall-data-polkit
|
|
|
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
|
2007-03-08 23:31:28 +00:00
|
|
|
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
2007-03-13 22:43:22 +00:00
|
|
|
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
2007-03-07 11:54:29 +00:00
|
|
|
|
2008-07-11 09:51:25 +00:00
|
|
|
if HAVE_POLKIT
|
|
|
|
install-data-polkit:: install-init
|
|
|
|
mkdir -p $(DESTDIR)$(policydir)
|
2009-08-06 12:54:08 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/$(policyfile) $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
2008-07-11 09:51:25 +00:00
|
|
|
uninstall-data-polkit:: install-init
|
|
|
|
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
|
|
|
else
|
|
|
|
install-data-polkit::
|
|
|
|
uninstall-data-polkit::
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2010-08-19 13:33:39 +00:00
|
|
|
remote.c: \
|
|
|
|
remote_dispatch_prototypes.h \
|
|
|
|
remote_dispatch_table.h \
|
|
|
|
qemu_dispatch_prototypes.h \
|
|
|
|
qemu_dispatch_table.h
|
|
|
|
|
|
|
|
remote.h: \
|
|
|
|
remote_dispatch_args.h \
|
|
|
|
remote_dispatch_ret.h \
|
|
|
|
qemu_dispatch_args.h \
|
|
|
|
qemu_dispatch_ret.h
|
2007-06-11 12:04:54 +00:00
|
|
|
|
2009-09-16 15:55:16 +00:00
|
|
|
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
|
2010-04-17 02:09:25 +00:00
|
|
|
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
2009-09-16 15:55:16 +00:00
|
|
|
|
|
|
|
remote_dispatch_prototypes.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
2010-04-17 02:09:25 +00:00
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -c -p remote $(REMOTE_PROTOCOL) > $@
|
2007-06-11 12:04:54 +00:00
|
|
|
|
2009-09-16 15:55:16 +00:00
|
|
|
remote_dispatch_table.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
2010-04-17 02:09:25 +00:00
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -c -t remote $(REMOTE_PROTOCOL) > $@
|
2008-12-04 22:03:24 +00:00
|
|
|
|
2009-09-16 15:55:16 +00:00
|
|
|
remote_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
2010-04-17 02:09:25 +00:00
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -c -a remote $(REMOTE_PROTOCOL) > $@
|
2008-12-04 22:03:24 +00:00
|
|
|
|
2009-09-16 15:55:16 +00:00
|
|
|
remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
2010-04-17 02:09:25 +00:00
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -c -r remote $(REMOTE_PROTOCOL) > $@
|
|
|
|
|
|
|
|
qemu_dispatch_prototypes.h: $(srcdir)/remote_generate_stubs.pl $(QEMU_PROTOCOL)
|
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -p qemu $(QEMU_PROTOCOL) > $@
|
|
|
|
|
|
|
|
qemu_dispatch_table.h: $(srcdir)/remote_generate_stubs.pl $(QEMU_PROTOCOL)
|
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -t qemu $(QEMU_PROTOCOL) > $@
|
|
|
|
|
|
|
|
qemu_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl $(QEMU_PROTOCOL)
|
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -a qemu $(QEMU_PROTOCOL) > $@
|
|
|
|
|
|
|
|
qemu_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl $(QEMU_PROTOCOL)
|
|
|
|
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -r qemu $(QEMU_PROTOCOL) > $@
|
2007-06-11 12:04:54 +00:00
|
|
|
|
2010-03-04 14:17:08 +00:00
|
|
|
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
2011-03-03 07:26:22 +00:00
|
|
|
libvirtd.uml.logrotate libvirtd.logrotate
|
2009-05-29 14:29:22 +00:00
|
|
|
|
2010-03-04 14:17:08 +00:00
|
|
|
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
|
|
|
|
2011-03-03 07:26:22 +00:00
|
|
|
libvirtd.logrotate: libvirtd.logrotate.in
|
|
|
|
sed \
|
|
|
|
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
|
|
|
< $< > $@-t
|
|
|
|
mv $@-t $@
|
|
|
|
|
2010-03-04 14:17:08 +00:00
|
|
|
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
|
|
|
sed \
|
|
|
|
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
|
|
|
< $< > $@-t
|
|
|
|
mv $@-t $@
|
|
|
|
|
|
|
|
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed \
|
2010-03-04 14:17:08 +00:00
|
|
|
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
2010-03-31 12:10:08 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
mv $@-t $@
|
2010-03-04 14:17:08 +00:00
|
|
|
|
|
|
|
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed \
|
2010-03-04 14:17:08 +00:00
|
|
|
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
2010-03-31 12:10:08 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
mv $@-t $@
|
2008-12-09 20:22:39 +00:00
|
|
|
|
2010-03-04 14:17:08 +00:00
|
|
|
install-logrotate: $(LOGROTATE_CONFS)
|
2008-12-09 20:22:39 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu/
|
2009-10-06 11:33:17 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/lxc/
|
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/uml/
|
2008-12-09 20:22:39 +00:00
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d/
|
2011-03-03 07:26:22 +00:00
|
|
|
$(INSTALL_DATA) libvirtd.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
2010-03-04 14:17:08 +00:00
|
|
|
$(INSTALL_DATA) libvirtd.qemu.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
|
|
|
|
$(INSTALL_DATA) libvirtd.lxc.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
|
|
|
|
$(INSTALL_DATA) libvirtd.uml.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
2008-12-09 20:22:39 +00:00
|
|
|
|
2009-11-02 16:55:40 +00:00
|
|
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
2010-08-25 12:07:26 +00:00
|
|
|
install-init: libvirtd.init
|
2007-06-26 23:03:48 +00:00
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
2007-11-15 13:04:28 +00:00
|
|
|
$(INSTALL_SCRIPT) libvirtd.init \
|
|
|
|
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
2007-06-26 23:48:46 +00:00
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
2010-09-02 14:53:38 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
|
2007-11-15 13:04:28 +00:00
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
2007-02-23 12:50:58 +00:00
|
|
|
|
2007-06-26 23:03:48 +00:00
|
|
|
uninstall-init:
|
2007-11-15 13:04:28 +00:00
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
|
2010-08-25 12:07:26 +00:00
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
2007-06-26 23:03:48 +00:00
|
|
|
|
2010-08-25 12:07:26 +00:00
|
|
|
BUILT_SOURCES += libvirtd.init
|
2009-05-29 14:29:22 +00:00
|
|
|
|
2010-08-25 12:07:26 +00:00
|
|
|
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed \
|
2007-06-27 00:12:29 +00:00
|
|
|
-e s!\@localstatedir\@!@localstatedir@!g \
|
|
|
|
-e s!\@sbindir\@!@sbindir@!g \
|
|
|
|
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
2010-03-31 12:10:08 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
chmod a+x $@-t && \
|
|
|
|
mv $@-t $@
|
2007-06-26 23:03:48 +00:00
|
|
|
|
2008-09-04 10:44:23 +00:00
|
|
|
check-local:
|
2011-01-28 20:52:20 +00:00
|
|
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
|
|
|
'$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
|
|
|
|
fi
|
2008-09-04 10:44:23 +00:00
|
|
|
|
2007-06-26 23:03:48 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
install-init:
|
|
|
|
uninstall-init:
|
2009-05-19 13:22:00 +00:00
|
|
|
libvirtd.init:
|
2007-02-23 12:50:58 +00:00
|
|
|
|
2009-11-02 16:55:40 +00:00
|
|
|
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
2007-12-06 16:34:48 +00:00
|
|
|
|
2008-12-11 18:11:41 +00:00
|
|
|
# This must be added last, since functions it provides/replaces
|
|
|
|
# are used by nearly every other library.
|
2009-01-08 20:42:01 +00:00
|
|
|
libvirtd_LDADD += ../gnulib/lib/libgnu.la $(LIBSOCKET)
|
2008-12-11 18:11:41 +00:00
|
|
|
|
2009-09-16 15:02:38 +00:00
|
|
|
else # WITH_LIBVIRTD
|
|
|
|
install-data-local: install-data-sasl
|
|
|
|
uninstall-local:: uninstall-data-sasl
|
Move safewrite and saferead to a separate file.
We currently use safewrite from inside libvirt and don't want to publish
any such function name. However, we do want to use it in applications
like virsh, libvirtd and libvirt_proxy that link with libvirt. To that
end, this change moves that function definition (along with the nearly
identical saferead) into a new file, util-lib.c. To avoid maintaining
separate copies of even such small functions, we simply include that new
file from util.c. Then, the separate applications that need to use
safewrite simply compile and link with util-lib.c.
Of course, this does mean that each of those applications will
containing two copies of these functions. However, the functions
are so small that it's not worth worrying about that.
* src/util.c (saferead, safewrite): Move function definitions to
util-lib.c and include that .c file.
* src/util-lib.c (saferead, safewrite): New file. Functions from src/util.c
with slight change (s/int r =/ssize_t r =/) to reflect read/write return type.
* src/util-lib.h: Declare the two moved functions.
* src/util.h: Remove declarations. Include src/util-lib.h.
* proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c.
* qemud/Makefile.am (libvirtd_SOURCES): Likewise.
* src/Makefile.am (virsh_SOURCES): Add util-lib.c. Remove some SP-before-TAB.
2008-02-22 15:53:13 +00:00
|
|
|
endif # WITH_LIBVIRTD
|
2008-02-28 17:06:32 +00:00
|
|
|
|
2011-03-09 03:18:36 +00:00
|
|
|
# This is needed for 'make dist' too, so can't wrap in WITH_LIBVIRTD.
|
|
|
|
POD2MAN = pod2man -c "Virtualization Support" \
|
|
|
|
-r "$(PACKAGE)-$(VERSION)" -s 8
|
|
|
|
|
|
|
|
$(srcdir)/libvirtd.8.in: libvirtd.pod.in
|
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $@
|
|
|
|
|
2009-09-16 15:02:38 +00:00
|
|
|
# This is needed for clients too, so can't wrap in
|
|
|
|
# the WITH_LIBVIRTD conditional
|
|
|
|
if HAVE_SASL
|
|
|
|
install-data-sasl:
|
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/sasl2/
|
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sasl $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
|
|
|
|
|
|
|
uninstall-data-sasl:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sasl2/
|
2009-10-07 10:18:31 +00:00
|
|
|
else
|
|
|
|
install-data-sasl:
|
|
|
|
uninstall-data-sasl:
|
2009-09-16 15:02:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
|
2008-02-28 17:06:32 +00:00
|
|
|
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in
|