autoconf: xen: enable explicit preference option for xenstored preference
authorLuis R. Rodriguez <mcgrof@suse.com>
Wed, 30 Jul 2014 16:40:02 +0000 (09:40 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 4 Aug 2014 13:58:24 +0000 (14:58 +0100)
commitdff4c31163804a4262b5fcbe0dd57d167474fee0
tree231e104982d3cdd06605e6138a83049d1cd86065
parentfafbc2926c3ef2c9270fc765a4b3c36d868651a5
autoconf: xen: enable explicit preference option for xenstored preference

As it stands oxenstored will be used by default if ocaml tools are
found, the init system will also try to use oxenstored first if its
found otherwise the cxenstored will be used. Lets simplify the init
script and let users be explicit about the preference through configure.

This adds support to let you be explicit about the xenstored preference,
you can only use one of these two options:

./configure --with-xenstored=xenstored
./configure --with-xenstored=oxenstored

We continue with the old behaviour and default oxenstored will be used
but only if you have ocaml dependencies. Since the xenstored preference
is explicit now and since we require configure substitutions for it we
make use of the AX_XEN_EXPAND_CONFIG() helpers as otherwise substitution
for SBINDIR is not propagated from the top level configuration.

All this allows us to simplify the init script to use the configured
xenstore from the start. We update the sysconfig/default xencommons file
with the paths for the different options though, this can be used by
users to override the default xenstored, this follows the old behaviour
but we now just explicitly provide the full configured paths for users.

As before, changing the xenstore requires a reboot.

In order to help with documentation we update the README with some
details on configure usage refer to the wiki [0] [1] [2] for more elaborate
details.

Since we are now parsing an entry within Paths.mk.in on tools we let
the move the parsing of the file to be the tool's configure.

[0] http://wiki.xen.org/wiki/Xenstored
[1] http://wiki.xen.org/wiki/XenStore
[2] http://wiki.xen.org/wiki/XenStoreReference

Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
README
m4/xenstored.m4 [new file with mode: 0644]
tools/configure
tools/configure.ac
tools/hotplug/Linux/init.d/sysconfig.xencommons [deleted file]
tools/hotplug/Linux/init.d/sysconfig.xencommons.in [new file with mode: 0644]
tools/hotplug/Linux/init.d/xencommons.in [deleted file]
tools/hotplug/Linux/init.d/xencommons.in.in [new file with mode: 0644]