2007-02-14 01:40:09 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2014-01-17 12:11:58 +00:00
|
|
|
## Copyright (C) 2005-2014 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
|
|
|
|
2011-07-28 12:55:21 +00:00
|
|
|
INCLUDES = \
|
2012-02-02 20:20:09 +00:00
|
|
|
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
|
2013-10-10 12:09:08 +00:00
|
|
|
-I$(top_srcdir) \
|
2012-02-02 20:20:09 +00:00
|
|
|
-I$(top_builddir)/include -I$(top_srcdir)/include \
|
|
|
|
-I$(top_builddir)/src -I$(top_srcdir)/src \
|
2011-07-28 12:55:21 +00:00
|
|
|
-I$(top_srcdir)/src/util \
|
|
|
|
-I$(top_srcdir)/src/conf \
|
|
|
|
-I$(top_srcdir)/src/rpc \
|
|
|
|
-I$(top_srcdir)/src/remote \
|
2013-04-17 11:01:24 +00:00
|
|
|
-I$(top_srcdir)/src/access \
|
2011-07-28 12:55:21 +00:00
|
|
|
$(GETTEXT_CPPFLAGS)
|
|
|
|
|
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 =
|
|
|
|
|
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
|
|
|
DAEMON_GENERATED = \
|
|
|
|
remote_dispatch.h \
|
|
|
|
lxc_dispatch.h \
|
|
|
|
qemu_dispatch.h \
|
2012-12-21 14:20:04 +00:00
|
|
|
$(NULL)
|
2011-05-06 13:11:32 +00:00
|
|
|
|
|
|
|
DAEMON_SOURCES = \
|
|
|
|
libvirtd.c libvirtd.h \
|
|
|
|
remote.c remote.h \
|
|
|
|
stream.c stream.h \
|
|
|
|
$(DAEMON_GENERATED)
|
2008-08-20 20:48:35 +00:00
|
|
|
|
2013-09-08 02:49:17 +00:00
|
|
|
LIBVIRTD_CONF_SOURCES = libvirtd-config.c libvirtd-config.h
|
|
|
|
|
2008-12-10 19:21:00 +00:00
|
|
|
DISTCLEANFILES =
|
2008-08-20 20:48:35 +00:00
|
|
|
EXTRA_DIST = \
|
2011-05-16 17:13:11 +00:00
|
|
|
remote_dispatch.h \
|
2012-12-21 14:20:04 +00:00
|
|
|
lxc_dispatch.h \
|
2011-05-16 17:13:11 +00:00
|
|
|
qemu_dispatch.h \
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd.conf \
|
|
|
|
libvirtd.init.in \
|
2011-02-18 18:45:49 +00:00
|
|
|
libvirtd.upstart \
|
2012-10-12 14:51:48 +00:00
|
|
|
libvirtd.policy.in \
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd.sasl \
|
2013-01-09 21:36:25 +00:00
|
|
|
libvirtd.service.in \
|
2008-08-20 20:48:35 +00:00
|
|
|
libvirtd.sysconf \
|
2011-10-04 15:44:25 +00:00
|
|
|
libvirtd.sysctl \
|
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 \
|
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
|
|
|
test_libvirtd.aug.in \
|
2011-05-31 19:13:24 +00:00
|
|
|
THREADS.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 \
|
2013-09-08 02:49:17 +00:00
|
|
|
$(DAEMON_SOURCES) \
|
|
|
|
$(LIBVIRTD_CONF_SOURCES) \
|
|
|
|
$(NULL)
|
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
|
|
|
|
2011-05-13 08:02:13 +00:00
|
|
|
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
|
2012-12-21 14:20:04 +00:00
|
|
|
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
|
2011-05-13 08:02:13 +00:00
|
|
|
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
|
|
|
|
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
|
|
|
remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
2011-05-13 08:02:13 +00:00
|
|
|
$(REMOTE_PROTOCOL)
|
2013-04-18 10:29:56 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
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
|
|
|
--mode=server remote REMOTE $(REMOTE_PROTOCOL) \
|
|
|
|
> $(srcdir)/remote_dispatch.h
|
2011-05-13 08:02:13 +00:00
|
|
|
|
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
|
|
|
lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
2012-12-21 14:20:04 +00:00
|
|
|
$(LXC_PROTOCOL)
|
2013-04-18 10:29:56 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
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
|
|
|
--mode=server lxc LXC $(LXC_PROTOCOL) \
|
|
|
|
> $(srcdir)/lxc_dispatch.h
|
2012-12-21 14:20:04 +00:00
|
|
|
|
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
|
|
|
qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
2011-05-13 08:02:13 +00:00
|
|
|
$(QEMU_PROTOCOL)
|
2013-04-18 10:29:56 +00:00
|
|
|
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
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
|
|
|
--mode=server qemu QEMU $(QEMU_PROTOCOL) \
|
|
|
|
> $(srcdir)/qemu_dispatch.h
|
2011-05-13 08:02:13 +00:00
|
|
|
|
2007-12-06 16:34:48 +00:00
|
|
|
if WITH_LIBVIRTD
|
|
|
|
|
2013-09-08 02:49:17 +00:00
|
|
|
# Build a convenience library, for reuse in tests/libvirtdconftest
|
|
|
|
noinst_LTLIBRARIES = libvirtd_conf.la
|
|
|
|
libvirtd_conf_la_SOURCES = $(LIBVIRTD_CONF_SOURCES)
|
|
|
|
libvirtd_conf_la_CFLAGS = \
|
|
|
|
$(LIBXML_CFLAGS) \
|
2013-09-26 21:14:38 +00:00
|
|
|
$(XDR_CFLAGS) \
|
2013-09-08 02:49:17 +00:00
|
|
|
$(WARN_CFLAGS) $(PIE_CFLAGS) \
|
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
libvirtd_conf_la_LDFLAGS = \
|
|
|
|
$(RELRO_LDFLAGS) \
|
|
|
|
$(PIE_LDFLAGS) \
|
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
$(NO_INDIRECT_LDFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
|
|
|
|
|
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
|
|
|
|
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
|
|
|
CLEANFILES += test_libvirtd.aug
|
|
|
|
|
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
|
2012-10-13 14:12:04 +00:00
|
|
|
$(AM_V_GEN)sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
2012-10-13 14:12:04 +00:00
|
|
|
< $< > $@-t && \
|
2010-07-09 09:21:39 +00:00
|
|
|
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
|
|
|
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
2012-07-21 13:02:22 +00:00
|
|
|
$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
|
2013-04-03 10:32:15 +00:00
|
|
|
$(WARN_CFLAGS) $(PIE_CFLAGS) \
|
2008-02-28 17:06:32 +00:00
|
|
|
$(COVERAGE_CFLAGS) \
|
2012-08-13 04:44:48 +00:00
|
|
|
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
2008-02-28 17:06:32 +00:00
|
|
|
|
2010-12-21 15:58:03 +00:00
|
|
|
libvirtd_LDFLAGS = \
|
2013-08-20 09:20:46 +00:00
|
|
|
$(RELRO_LDFLAGS) \
|
2013-04-03 10:32:15 +00:00
|
|
|
$(PIE_LDFLAGS) \
|
2013-08-20 09:20:46 +00:00
|
|
|
$(COVERAGE_LDFLAGS) \
|
2013-08-13 11:49:05 +00:00
|
|
|
$(NO_INDIRECT_LDFLAGS) \
|
2013-08-20 09:20:46 +00:00
|
|
|
$(NULL)
|
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) \
|
2012-04-19 14:34:35 +00:00
|
|
|
$(DBUS_LIBS) \
|
2012-07-21 13:02:22 +00:00
|
|
|
$(POLKIT_LIBS) \
|
|
|
|
$(LIBNL_LIBS)
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2012-02-24 15:10:53 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
2012-05-28 11:33:23 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_probes.lo
|
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
|
|
|
|
2011-05-16 17:13:11 +00:00
|
|
|
libvirtd_LDADD += \
|
2013-09-08 02:49:17 +00:00
|
|
|
libvirtd_conf.la \
|
2012-12-21 14:20:04 +00:00
|
|
|
../src/libvirt-lxc.la \
|
2013-09-08 02:49:17 +00:00
|
|
|
../src/libvirt-qemu.la \
|
|
|
|
../src/libvirt_driver_remote.la \
|
|
|
|
$(NULL)
|
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
|
2012-04-02 17:24:29 +00:00
|
|
|
if WITH_DTRACE_PROBES
|
2012-05-28 11:33:23 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_qemu_probes.lo
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_DTRACE_PROBES
|
|
|
|
endif WITH_QEMU
|
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
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_LXC
|
2008-11-17 12:18:18 +00:00
|
|
|
|
2012-08-30 18:53:02 +00:00
|
|
|
if WITH_XEN
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_xen.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_XEN
|
2012-08-30 18:53:02 +00:00
|
|
|
|
2011-02-10 22:42:34 +00:00
|
|
|
if WITH_LIBXL
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_libxl.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_LIBXL
|
2011-02-10 22:42:34 +00:00
|
|
|
|
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
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_UML
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2013-05-16 20:56:56 +00:00
|
|
|
if WITH_VBOX
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_vbox.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_VBOX
|
2013-05-16 20:56:56 +00:00
|
|
|
|
2012-06-05 16:28:52 +00:00
|
|
|
if WITH_STORAGE
|
2009-02-17 10:34:30 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_STORAGE
|
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
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_NETWORK
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2012-09-18 01:27:06 +00:00
|
|
|
if WITH_INTERFACE
|
2009-07-21 14:02:16 +00:00
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_interface.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_INTERFACE
|
2009-07-21 14:02:16 +00:00
|
|
|
|
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
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_NODE_DEVICES
|
2009-12-22 13:50:50 +00:00
|
|
|
|
|
|
|
if WITH_SECRETS
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_secret.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_SECRETS
|
2010-03-25 17:46:09 +00:00
|
|
|
|
|
|
|
if WITH_NWFILTER
|
|
|
|
libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
|
2013-09-04 02:39:16 +00:00
|
|
|
endif WITH_NWFILTER
|
|
|
|
endif ! WITH_DRIVER_MODULES
|
2008-11-17 12:18:18 +00:00
|
|
|
|
|
|
|
libvirtd_LDADD += ../src/libvirt.la
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2013-01-08 22:19:00 +00:00
|
|
|
if WITH_POLKIT
|
|
|
|
if WITH_POLKIT0
|
2007-12-05 18:21:27 +00:00
|
|
|
policydir = $(datadir)/PolicyKit/policy
|
2012-10-12 14:51:48 +00:00
|
|
|
policyauth = auth_admin_keep_session
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_POLKIT0
|
2009-08-06 12:54:08 +00:00
|
|
|
policydir = $(datadir)/polkit-1/actions
|
2012-10-12 14:51:48 +00:00
|
|
|
policyauth = auth_admin_keep
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_POLKIT0
|
|
|
|
endif WITH_POLKIT
|
2007-12-05 18:21:27 +00:00
|
|
|
|
2012-10-12 14:51:48 +00:00
|
|
|
libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
|
|
|
|
$(AM_V_GEN) sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
-e 's|[@]authaction[@]|$(policyauth)|g' \
|
2012-10-12 14:51:48 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
mv $@-t $@
|
|
|
|
BUILT_SOURCES += libvirtd.policy
|
|
|
|
|
2013-07-18 15:37:52 +00:00
|
|
|
install-data-local: install-init-redhat install-init-systemd \
|
|
|
|
install-init-upstart \
|
2011-07-07 13:45:07 +00:00
|
|
|
install-data-sasl install-data-polkit \
|
|
|
|
install-logrotate install-sysctl
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \
|
|
|
|
$(DESTDIR)$(localstatedir)/run/libvirt \
|
|
|
|
$(DESTDIR)$(localstatedir)/lib/libvirt
|
2007-03-07 11:54:29 +00:00
|
|
|
|
2013-07-18 15:37:52 +00:00
|
|
|
uninstall-local:: uninstall-init-redhat uninstall-init-systemd \
|
|
|
|
uninstall-init-upstart \
|
2011-07-07 13:45:07 +00:00
|
|
|
uninstall-data-sasl uninstall-data-polkit \
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
uninstall-logrotate uninstall-sysctl
|
2009-09-16 11:31:13 +00:00
|
|
|
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
|
|
|
|
2013-01-08 22:19:00 +00:00
|
|
|
if WITH_POLKIT
|
2011-07-07 13:45:07 +00:00
|
|
|
install-data-polkit::
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(policydir)
|
2012-10-12 14:51:48 +00:00
|
|
|
$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
2011-07-07 13:45:07 +00:00
|
|
|
uninstall-data-polkit::
|
2008-07-11 09:51:25 +00:00
|
|
|
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(policydir) || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_POLKIT
|
2008-07-11 09:51:25 +00:00
|
|
|
install-data-polkit::
|
|
|
|
uninstall-data-polkit::
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_POLKIT
|
2008-07-11 09:51:25 +00:00
|
|
|
|
2011-05-06 13:11:32 +00:00
|
|
|
remote.c: $(DAEMON_GENERATED)
|
|
|
|
remote.h: $(DAEMON_GENERATED)
|
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-05-11 14:51:03 +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
|
2012-10-13 14:12:04 +00:00
|
|
|
$(AM_V_GEN)sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
2012-10-13 14:12:04 +00:00
|
|
|
< $< > $@-t && \
|
2011-03-03 07:26:22 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
2010-03-04 14:17:08 +00:00
|
|
|
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
2012-10-13 14:12:04 +00:00
|
|
|
$(AM_V_GEN)sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
2012-10-13 14:12:04 +00:00
|
|
|
< $< > $@-t && \
|
2010-03-04 14:17:08 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
|
|
|
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +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 \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +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)
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt/qemu/ \
|
|
|
|
$(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \
|
|
|
|
$(DESTDIR)$(localstatedir)/log/libvirt/uml/ \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/
|
2013-07-18 15:37:52 +00:00
|
|
|
$(INSTALL_DATA) libvirtd.logrotate \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
|
|
|
$(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
|
|
|
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
uninstall-logrotate:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
|
|
|
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
|
|
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
|
|
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
|
|
|
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || :
|
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
|
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
install-sysconfig:
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +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
|
2011-07-07 13:45:07 +00:00
|
|
|
uninstall-sysconfig:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2012-04-04 10:16:34 +00:00
|
|
|
if WITH_SYSCTL
|
2013-01-04 21:21:59 +00:00
|
|
|
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
|
|
|
|
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
|
2011-07-07 13:45:07 +00:00
|
|
|
install-sysctl:
|
2013-01-04 21:21:59 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
|
2011-10-04 15:44:25 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
2013-01-04 21:21:59 +00:00
|
|
|
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
2007-02-23 12:50:58 +00:00
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
uninstall-sysctl:
|
2013-01-04 21:21:59 +00:00
|
|
|
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
|
|
|
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SYSCTL
|
2012-04-04 10:16:34 +00:00
|
|
|
install-sysctl:
|
|
|
|
uninstall-sysctl:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SYSCTL
|
2011-07-07 13:45:07 +00:00
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
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
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
install-init-redhat: install-sysconfig libvirtd.init
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
2011-07-07 13:45:07 +00:00
|
|
|
$(INSTALL_SCRIPT) libvirtd.init \
|
|
|
|
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
|
|
|
|
|
|
|
uninstall-init-redhat: uninstall-sysconfig
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2011-07-07 13:45:07 +00:00
|
|
|
install-init-redhat:
|
|
|
|
uninstall-init-redhat:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2011-07-07 13:45:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPT_UPSTART
|
|
|
|
|
|
|
|
install-init-upstart: install-sysconfig
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
|
2011-07-07 13:45:07 +00:00
|
|
|
$(INSTALL_SCRIPT) libvirtd.upstart \
|
|
|
|
$(DESTDIR)$(sysconfdir)/event.d/libvirtd
|
|
|
|
|
|
|
|
uninstall-init-upstart: uninstall-sysconfig
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/event.d/libvirtd
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/event.d || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_UPSTART
|
2011-07-07 13:45:07 +00:00
|
|
|
install-init-upstart:
|
|
|
|
uninstall-init-upstart:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_UPSTART
|
2011-07-07 13:45:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
|
|
|
|
2014-01-17 12:11:58 +00:00
|
|
|
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
2011-07-07 13:45:07 +00:00
|
|
|
BUILT_SOURCES += libvirtd.service
|
|
|
|
|
|
|
|
install-init-systemd: install-sysconfig libvirtd.service
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
2012-06-26 07:53:33 +00:00
|
|
|
$(INSTALL_DATA) libvirtd.service \
|
2011-07-07 13:45:07 +00:00
|
|
|
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
|
|
|
|
|
|
|
uninstall-init-systemd: uninstall-sysconfig
|
|
|
|
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2011-07-07 13:45:07 +00:00
|
|
|
install-init-systemd:
|
|
|
|
uninstall-init-systemd:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2010-08-25 12:07:26 +00:00
|
|
|
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +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 && \
|
2010-03-31 12:10:08 +00:00
|
|
|
mv $@-t $@
|
2007-06-26 23:03:48 +00:00
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
< $< > $@-t && \
|
2011-07-07 13:45:07 +00:00
|
|
|
mv $@-t $@
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-05-29 21:49:13 +00:00
|
|
|
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
|
|
|
|
|
|
|
|
test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf
|
|
|
|
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.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
|
|
|
|
|
|
|
check-augeas: test_libvirtd.aug
|
2011-01-28 20:52:20 +00:00
|
|
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
2012-05-29 21:49:13 +00:00
|
|
|
'$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
|
2011-01-28 20:52:20 +00:00
|
|
|
fi
|
2008-09-04 10:44:23 +00:00
|
|
|
|
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
|
|
|
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_LIBVIRTD
|
2009-09-16 15:02:38 +00:00
|
|
|
install-data-local: install-data-sasl
|
|
|
|
uninstall-local:: uninstall-data-sasl
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_LIBVIRTD
|
2008-02-28 17:06:32 +00:00
|
|
|
|
2011-03-09 03:18:36 +00:00
|
|
|
POD2MAN = pod2man -c "Virtualization Support" \
|
|
|
|
-r "$(PACKAGE)-$(VERSION)" -s 8
|
|
|
|
|
2013-01-29 10:32:41 +00:00
|
|
|
$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \
|
|
|
|
&& if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
|
2011-03-09 03:18:36 +00:00
|
|
|
|
2009-09-16 15:02:38 +00:00
|
|
|
# This is needed for clients too, so can't wrap in
|
|
|
|
# the WITH_LIBVIRTD conditional
|
2012-09-20 11:58:29 +00:00
|
|
|
if WITH_SASL
|
2009-09-16 15:02:38 +00:00
|
|
|
install-data-sasl:
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
|
2013-07-18 15:37:52 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sasl \
|
|
|
|
$(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
2009-09-16 15:02:38 +00:00
|
|
|
|
|
|
|
uninstall-data-sasl:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
2011-12-09 20:58:32 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sasl2/ || :
|
2013-09-04 02:39:16 +00:00
|
|
|
else ! WITH_SASL
|
2009-10-07 10:18:31 +00:00
|
|
|
install-data-sasl:
|
|
|
|
uninstall-data-sasl:
|
2013-09-04 02:39:16 +00:00
|
|
|
endif ! WITH_SASL
|
2009-09-16 15:02:38 +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
|
|
|
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
|
2008-02-28 17:06:32 +00:00
|
|
|
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
|
2011-05-06 13:11:32 +00:00
|
|
|
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in $(DAEMON_GENERATED)
|