tools: allow configure time choice of libexec subdirectory.
PATCH 1/1 tools: allow configure time choice of libexec subdirectory.
Currently we hardcode various paths such as $libexec/xen/{bin,boot}, however some downstreams (notably Debian) would like instead to install things into $libexec/xen-X.Y/{bin,boot} as part of allowing multiple versions of the tools packages to be installed.
Since this currently involves patching configure its a bit fiddly, provide a configure option for the leaf dir instead, name it --with-libexec-leaf-dir similar to the existing --with-sysconfig-leaf-dir.
Rather than have the determination of the full path in both configure and config/Paths.mk.in move it into configure only. Also for consistency move the other LIBEXEC_* to configure, even though they are only substituted into Paths.mk.
Please rerun autogen.sh when applying.
--- config/Paths.mk.in | 6 +++--- m4/paths.m4 | 24 ++++++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-)
config/Paths.mk.in +3 -3
@@ -29,10 +29,10 @@ includedir := @includedir@ localstatedir := @localstatedir@ sysconfdir := @sysconfdir@ -LIBEXEC := $(libexecdir)/$(PACKAGE_TARNAME) +LIBEXEC := @LIBEXEC@ LIBEXEC_BIN := @LIBEXEC_BIN@ -LIBEXEC_LIB := $(LIBEXEC)/lib -LIBEXEC_INC := $(LIBEXEC)/include +LIBEXEC_LIB := @LIBEXEC_LIB@ +LIBEXEC_INC := @LIBEXEC_INC@ SHAREDIR := @SHAREDIR@ MAN1DIR := $(mandir)/man1
m4/paths.m4 +18 -6
@@ -62,6 +62,14 @@ AC_ARG_WITH([sysconfig-leaf-dir], CONFIG_LEAF_DIR=$config_leaf_dir AC_SUBST(CONFIG_LEAF_DIR) +dnl autoconf docs suggest to use a "package name" subdir. We make it +dnl configurable for the benefit of those who want e.g. xen-X.Y instead. +AC_ARG_WITH([libexec-leaf-dir], + AS_HELP_STRING([--with-libexec-leaf-dir=SUBDIR], + [Name of subdirectory in libexecdir to use.]), + [libexec_subdir=$withval], + [libexec_subdir=$PACKAGE_TARNAME]) + AC_ARG_WITH([xen-dumpdir], AS_HELP_STRING([--with-xen-dumpdir=DIR], [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]),
@@ -77,13 +85,17 @@ if test "$libexecdir" = '${exec_prefix}/libexec' ; then esac fi dnl expand exec_prefix or it will endup in substituted variables -libexecdir=`eval echo $libexecdir` -dnl autoconf doc suggest to use a "package name" subdir -dnl This variable will be substituted in various .in files -LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin` -AC_SUBST(LIBEXEC_BIN) +LIBEXEC=`eval echo $libexecdir/$libexec_subdir` +AC_SUBST(LIBEXEC) -XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` +dnl These variables will be substituted in various .in files +LIBEXEC_BIN=${LIBEXEC}/bin +AC_SUBST(LIBEXEC_BIN) +LIBEXEC_LIB=${LIBEXEC}/lib +AC_SUBST(LIBEXEC_LIB) +LIBEXEC_INC=${LIBEXEC}/include +AC_SUBST(LIBEXEC_INC) +XENFIRMWAREDIR=${LIBEXEC}/boot` AC_SUBST(XENFIRMWAREDIR) XEN_RUN_DIR=$localstatedir/run/xen
Signature · 1 line
2.1.4
m4/paths.m4 if test "$libexecdir" = '${exec_prefix}/libexec' ; then · line 98
Quoted 9 lines · Ian Campbell
m4/paths.m4 +8
-1-XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` +dnl These variables will be substituted in various .in files +LIBEXEC_BIN=${LIBEXEC}/bin +AC_SUBST(LIBEXEC_BIN) +LIBEXEC_LIB=${LIBEXEC}/lib +AC_SUBST(LIBEXEC_LIB) +LIBEXEC_INC=${LIBEXEC}/include +AC_SUBST(LIBEXEC_INC) +XENFIRMWAREDIR=${LIBEXEC}/boot`
I somehow slipped a stray ` in there and didn't notice, sorry.
Ian.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Doug Goldstein
Reviewed-byQuoted 13 lines · Ian Campbell
m4/paths.m4 if test "$libexecdir" = '${exec_prefix}/libexec' ; then · line 98
Quoted 9 lines · Ian Campbell
m4/paths.m4 +8
-1-XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` +dnl These variables will be substituted in various .in files +LIBEXEC_BIN=${LIBEXEC}/bin +AC_SUBST(LIBEXEC_BIN) +LIBEXEC_LIB=${LIBEXEC}/lib +AC_SUBST(LIBEXEC_LIB) +LIBEXEC_INC=${LIBEXEC}/include +AC_SUBST(LIBEXEC_INC) +XENFIRMWAREDIR=${LIBEXEC}/boot`I somehow slipped a stray ` in there and didn't notice, sorry.
Quoted 2 lines
Ian.
Squashing in the above fix:
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ian Jackson
Acked-byIan Campbell writes ("Re: [PATCH] tools: allow configure time choice of libexec subdirectory."):
Quoted 1 line
I somehow slipped a stray ` in there and didn't notice, sorry.
This looks like a reasonable change aside from that but we should definitely do some build tests at commit time.
With the stray ` removed:
Ian.
Ian Campbell
AppliedQuoted 6 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH] tools: allow configure time choice of libexec subdirectory."):
Quoted 1 line
I somehow slipped a stray ` in there and didn't notice, sorry.
This looks like a reasonable change aside from that but we should definitely do some build tests at commit time.
Right, my pre-push scripting involves a build on all architectures and a diff of the lists of installed files, I think that would have caught any remaining issues (and didn't).
Quoted 3 lines
With the stray ` removed:
Acked-by Ian Jackson <[email protected]>
Applied, thanks (and to Doug).