From: Ian Campbell Subject: Re: [PATCH v6 12/13] autoconf: xen: enable explicit preference option for xenstored preference Date: Wed, 2 Jul 2014 14:54:31 +0100 Message-ID: <1404309271.5562.96.camel@kazak.uk.xensource.com> References: <1402622331-4282-1-git-send-email-mcgrof@do-not-panic.com> <1402622331-4282-13-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X2Kzd-0003W0-7o for xen-devel@lists.xenproject.org; Wed, 02 Jul 2014 13:54:37 +0000 In-Reply-To: <1402622331-4282-13-git-send-email-mcgrof@do-not-panic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Luis R. Rodriguez" Cc: Keir Fraser , Tim Deegan , "Luis R. Rodriguez" , Ian Jackson , Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-06-12 at 18:18 -0700, Luis R. Rodriguez wrote: > 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. I'm afraid I don't understand what is going on here. Why is SBINDIR not propagated? > 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. I can't parse this. > [0] http://wiki.xen.org/wiki/Xenstored > [1] http://wiki.xen.org/wiki/XenStore > [2] http://wiki.xen.org/wiki/XenStoreReference > > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Jan Beulich > Cc: Keir Fraser > Cc: Tim Deegan > Signed-off-by: Luis R. Rodriguez > --- > > Please run autogen.sh after merging please. > > diff --git a/m4/xenstored.m4 b/m4/xenstored.m4 > new file mode 100644 > index 0000000..5a4d891 > --- /dev/null > +++ b/m4/xenstored.m4 > @@ -0,0 +1,60 @@ > +AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [ > + AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ > + AC_MSG_ERROR([Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib]) > + ]) > +]) > + > +AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [ > + xenstore="oxenstored" > + xenstored=$SBINDIR/oxenstored > + AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ > + xenstore="xenstored" > + xenstored=$SBINDIR/xenstored > + ]) > +]) > + > +AC_DEFUN([AX_XENSTORE_OPTIONS], [ > +AS_IF([test "x$XENSTORE" = "x"], [ > +AC_ARG_WITH([xenstored], > + AS_HELP_STRING([--with-xenstored@<:@=oxenstored|xenstored@:>@], > + [This lets you choose which xenstore daemon you want, you have > + two options: the original xenstored written in C (xenstored) > + or the newer and robust one written in Ocaml (oxenstored). > + The oxenstored daemon is the default but will but can only > + be used if you have ocaml library / build dependencies solved, > + if you have not specified a preference and do not have ocaml > + dependencies resolved we'll enable the C xenstored for you. If > + you ask for oxenstored we'll complain until you resolve those > + dependencies]), > + [ > + AS_IF([test "x$withval" = "xxenstored"], [ > + xenstore=$withval > + xenstored=$SBINDIR/xenstored > + ]) > + AS_IF([test "x$withval" = "xoxenstored"], [ > + xenstore=$withval > + xenstored=$SBINDIR/oxenstored > + AX_XEN_OCAML_XENSTORE_CHECK() > + ]) > + AS_IF([test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"], [ > + AC_MSG_ERROR([Unsupported xenstored specified, supported types: oxenstored xenstored]) > + ]) > + ], > + [ > + AX_XEN_OCAML_XENSTORE_DEFAULTS() > + ]) > +]) > +]) > + > +AC_DEFUN([AX_XENSTORE_SET], [ > + XENSTORE=$xenstore > + AC_SUBST(XENSTORE) This isn't used any more. > + > + AS_IF([test "x$XENSTORED" = "x"], [ > + XENSTORED=$xenstored > + ]) > + AC_SUBST(XENSTORED) > + > + AS_IF([test "x$XENSTORE" != "xxenstored" && test "x$XENSTORE" != "xoxenstored"], > + [AC_MSG_ERROR([Invalid xenstore: $XENSTORE])]) You'll have already bailed from the previous incantation before you ever hit this, no? > diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in > similarity index 64% > rename from tools/hotplug/Linux/init.d/sysconfig.xencommons > rename to tools/hotplug/Linux/init.d/sysconfig.xencommons.in > index 25f7f00..d7d09ff 100644 > --- a/tools/hotplug/Linux/init.d/sysconfig.xencommons > +++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in > @@ -8,8 +8,17 @@ > ## Type: string > ## Default: xenstored > # > -# Select xenstored implementation > -#XENSTORED=[oxenstored|xenstored] > +# Select xenstore implementation, this can be either > +# of these below. If using systemd its preferred you "it's", and I think you are missing a "that" before you. Ian.