tool changes to honor configure --prefix=DIR
v3 cover tool changes to honor configure --prefix=DIR
In my attempt to get a xen.rpm from 'make rpmball' which operates entirely below the configured --prefix= I came up with these changes.
This is a resend of the same series with the comments incorporated:
http://lists.xenproject.org/archives/html/xen-devel/2014-04/msg03240.html
http://lists.xenproject.org/archives/html/xen-devel/2014-07/msg03447.html
In v3 of this series configure is updated to provide all paths:
sysconfdir, docdir, mandir, includedir, libexecdir, localstatedir.
Additional options: with-initd-dir, with-linux-backend-modules, with-bash_completion-dir and enable-rpath
Every path is now stored in config/Paths.mk.
With this series its now possible to run everything except pygrub below the configured --prefix=.
NOTE: the renaming of tools/hotplug/Linux/init.d/xencommons.in may cause trouble in configured working copies. Use 'git clean -dfx' to wipe all and everything before git pull.
One outstanding bug is pygrub, which does not know about $prefix/$lib/python/site-packages. This is still on my todo list.
Also ocamlfind behaves odd. Its required to pass OCAMLDESTDIR=$PWD/dist/install/${prefix}/lib64/ocaml to make rpmball. This looks like a limitation of ocaml-findlib. The rpath change includes an ocaml patch to pass rpath to the oxenstored link command.
Please review and apply.
Olaf
Olaf Hering (46):
stubdom: fix lwip compile
tools/xenpaging: create dumpdir with mode 0700
install.sh: Preserve permissions from make install tools/mkrpm: allow custom rpm package name
tools: remove obsolete path.py from tools/python tools/pygrub: store kernels in /var/run/xen/pygrub tools/hotplug: create XEN_RUN_DIR at runtime tools/hotplug: create XEN_LOCK_DIR at runtime tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path tools/examples: remove obsolete install targets
remove obsolete SUBSYS_DIR variable
Config.mk: move directory list into BUILD_MAKE_VARS Config.mk: replace dependency to genpath with actual target Config.mk: add new macro buildmakevars2header
tools/libxl: use buildmakevars2header to create _paths.h tools/libxc: provide variable paths to libxc
tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE
Use configure --sysconfdir=DIR to set CONFIG_DIR
Add configure --with-initd-dir=DIR
tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path tools/configure.ac: sort AC_CONFIG_FILES
tools: use INITD_DIR instead of CONFIG_DIR/init.d|rc.d tools/hotplug: substitute XEN_SCRIPT_DIR on FreeBSD
remove duplicate variables from config
Use configure --mandir=DIR to set MANDIR
Use configure --docdir=DIR to set DOCDIR
Use configure --includedir=DIR to set INCLUDEDIR
Use configure --libexecdir=BASEDIR to set LIBEXEC
Use configure --prefix=DIR to set PREFIX
Use configure --localstatedir=BASEDIR to set path to /var Add configure --enable-rpath
Add configure --with-linux-backend-modules="mod1 mod2"
Add configure --with-bash_completion-dir=DIR
Make XENFIRMWAREDIR a subdir of libexecdir
Use just PREFIX to reference the path in Paths.mk
tools: remove private copies of includedir and libdir from libxenstat Use Paths.mk for docs, stubdom and tools build
Move xenconsoled to libexec
Move xenstored to libexec
Move xenwatchdogd to libexec
tools: use XEN_LIB_STORED instead of /var/lib/xenstored Use XEN_RUN_DIR instead of /var/run/xen
Move systemd paths to Paths.mk
Include Paths.mk in toplevel Makefile to fix uninstall Move MAN1DIR and MAN8DIR to Paths.mk
rerun autogen.sh
.gitignore | 8 +
Config.mk | 35 ++--
Makefile | 7 +-
README | 12 --
config/Docs.mk.in | 7 -
config/FreeBSD.mk | 2 -
config/Linux.modules | 20 --
config/NetBSD.mk | 5 -
config/NetBSDRump.mk | 2 -
config/Paths.mk.in | 23 ++-
config/StdGNU.mk | 22 --
config/Stubdom.mk.in | 8 -
config/SunOS.mk | 20 --
config/Tools.mk.in | 13 +-
configure | 125 ++++++++++--
docs/Makefile | 1 +
docs/misc/distro_mapping.txt | 4 +-
install.sh | 3 -
m4/paths.m4 | 110 ++++++++--
m4/systemd.m4 | 4 +-
m4/xenstored.m4 | 8 +-
stubdom/Makefile | 24 ++-
stubdom/lwip.dhcp_create_request-hwaddr_len.patch | 26 +++
tools/Makefile | 25 ++-
tools/Rules.mk | 2 +-
tools/configure | 222 ++++++++++++++++++---
tools/configure.ac | 53 ++++-
tools/console/Makefile | 7 +-
tools/examples/Makefile | 21 +-
tools/hotplug/FreeBSD/Makefile | 5 +-
.../FreeBSD/rc.d/{xencommons => xencommons.in} | 18 +-
tools/hotplug/FreeBSD/vif-bridge | 2 +-
tools/hotplug/Linux/Makefile | 18 +-
tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 +-
.../Linux/init.d/{xen-watchdog => xen-watchdog.in} | 4 +-
.../init.d/{xencommons.in.in => xencommons.in} | 18 +-
.../Linux/init.d/{xendomains => xendomains.in} | 14 +-
tools/hotplug/Linux/systemd/Makefile | 33 +--
.../systemd/xen-qemu-dom0-disk-backend.service.in | 4 +-
.../hotplug/Linux/systemd/xen-watchdog.service.in | 2 +-
tools/hotplug/Linux/systemd/xenconsoled.service.in | 2 +-
tools/hotplug/Linux/systemd/xendomains.service.in | 6 +-
tools/hotplug/Linux/update-modules.sh | 36 ----
tools/hotplug/Linux/{vif-setup => vif-setup.in} | 2 +-
.../{xen-backend.rules => xen-backend.rules.in} | 16 +-
...-hotplug-common.sh => xen-hotplug-common.sh.in} | 4 +-
tools/hotplug/Linux/{xendomains => xendomains.in} | 9 +-
tools/hotplug/NetBSD/Makefile | 6 +-
tools/hotplug/NetBSD/block | 2 +-
tools/hotplug/NetBSD/rc.d/xen-watchdog | 2 +-
.../NetBSD/rc.d/{xencommons => xencommons.in} | 16 +-
tools/hotplug/NetBSD/vif-bridge | 2 +-
tools/hotplug/NetBSD/vif-ip | 2 +-
tools/hotplug/common/Makefile | 2 +-
tools/libxc/Makefile | 9 +
tools/libxc/xc_private.h | 1 +
tools/libxc/xc_suspend.c | 2 +-
tools/libxl/Makefile | 13 +-
tools/libxl/libxl_dm.c | 4 +-
tools/libxl/libxl_internal.h | 1 -
tools/libxl/libxl_paths.c | 7 +-
tools/libxl/libxl_save_callout.c | 2 +-
tools/misc/Makefile | 8 +-
tools/misc/mkrpm | 2 +-
tools/ocaml/xenstored/Makefile | 5 +-
tools/pygrub/Makefile | 8 +-
tools/pygrub/src/pygrub | 8 +-
tools/python/Makefile | 9 +-
tools/vtpmmgr/Makefile | 6 +-
tools/xcutils/Makefile | 4 +-
tools/xenpaging/Makefile | 6 +-
tools/xenstat/libxenstat/Makefile | 4 -
tools/xenstore/Makefile | 7 +-
tools/xenstore/xs_lib.c | 2 +-
tools/xentrace/Makefile | 4 +-
75 files changed, 695 insertions(+), 469 deletions(-)
delete mode 100644 config/Linux.modules
create mode 100644 stubdom/lwip.dhcp_create_request-hwaddr_len.patch
rename tools/hotplug/FreeBSD/rc.d/{xencommons => xencommons.in} (81%)
rename tools/hotplug/Linux/init.d/{xen-watchdog => xen-watchdog.in} (95%)
rename tools/hotplug/Linux/init.d/{xencommons.in.in => xencommons.in} (88%)
rename tools/hotplug/Linux/init.d/{xendomains => xendomains.in} (79%)
delete mode 100755 tools/hotplug/Linux/update-modules.sh
rename tools/hotplug/Linux/{vif-setup => vif-setup.in} (61%)
rename tools/hotplug/Linux/{xen-backend.rules => xen-backend.rules.in} (62%)
rename tools/hotplug/Linux/{xen-hotplug-common.sh => xen-hotplug-common.sh.in} (94%)
rename tools/hotplug/Linux/{xendomains => xendomains.in} (98%)
rename tools/hotplug/NetBSD/rc.d/{xencommons => xencommons.in} (83%)PATCH 1/46 stubdom: fix lwip compile
stubdom/lwip-x86_64/src/core/dhcp.c: In function 'dhcp_create_request':stubdom/lwip-x86_64/src/core/dhcp.c:1359:71: error: array subscript is above array bounds [-Werror=array-bounds]
dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/;
gcc can not know if hwaddr_len exceeds the hwaddr array size, so force an upper limit to assist gcc.
--- stubdom/Makefile | 1 + stubdom/lwip.dhcp_create_request-hwaddr_len.patch | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+)
stubdom/Makefile +1 -0
@@ -145,6 +145,7 @@ lwip-$(XEN_TARGET_ARCH): lwip-$(LWIP_VERSION).tar.gz tar xzf $< mv lwip $@ patch -d $@ -p0 < lwip.patch-cvs + patch -d $@ -p0 < lwip.dhcp_create_request-hwaddr_len.patch touch $@ #############
stubdom/lwip.dhcp_create_request-hwaddr_len.patch new file +26 -0
@@ -0,0 +1,26 @@ +--- + lwip-x86_64/src/core/dhcp.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: src/core/dhcp.c +=================================================================== +--- src/core/dhcp.c ++++ src/core/dhcp.c +@@ -1322,6 +1322,8 @@ dhcp_create_request(struct netif *netif) + { + struct dhcp *dhcp; + u16_t i; ++ /* gcc can not know if hwaddr_len exceeds the hwaddr array size */ ++ u8_t hwaddr_len = netif->hwaddr_len > NETIF_MAX_HWADDR_LEN ? NETIF_MAX_HWADDR_LEN : netif->hwaddr_len; + LWIP_ERROR("dhcp_create_request: netif != NULL", (netif != NULL), return ERR_ARG;); + dhcp = netif->dhcp; + LWIP_ERROR("dhcp_create_request: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); +@@ -1356,7 +1358,7 @@ dhcp_create_request(struct netif *netif) + dhcp->msg_out->giaddr.addr = 0; + for (i = 0; i < DHCP_CHADDR_LEN; i++) { + /* copy netif hardware address, pad with zeroes */ +- dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; ++ dhcp->msg_out->chaddr[i] = (i < hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; + } + for (i = 0; i < DHCP_SNAME_LEN; i++) { + dhcp->msg_out->sname[i] = 0;
PATCH 2/46 tools/xenpaging: create dumpdir with mode 0700
In reply to Olaf HeringThe swapfile contain sensitive guest info.
--- tools/xenpaging/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xenpaging/Makefile +1 -1
@@ -23,7 +23,7 @@ xenpaging: $(OBJS) $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) install: all - $(INSTALL_DIR) $(DESTDIR)$(XEN_PAGING_DIR) + $(INSTALL_DIR) -m 0700 $(DESTDIR)$(XEN_PAGING_DIR) $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC) $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC)
Re: [PATCH 02/46] tools/xenpaging: create dumpdir with mode 0700
Quoted 3 lines · Olaf Hering
The swapfile contain sensitive guest info.
Signed-off-by Olaf Hering <[email protected]>
PATCH 3/46 install.sh: Preserve permissions from make install
In reply to Olaf Hering--- install.sh | 3 --- 1 file changed, 3 deletions(-)
install.sh +0 -3
@@ -27,9 +27,6 @@ tmp="`mktemp -d`" echo "Installing Xen from '$src' to '$dst'..." (cd $src; tar -cf - * ) | tar -C "$tmp" -xf - -echo " - modifying permissions" -chmod -R a+rX "$tmp" - (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf - rm -rf "$tmp"
Re: [PATCH 03/46] install.sh: Preserve permissions from make install
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
I wonder what this will break. Only one way to find out:
Although, do you suppose that the tar unpack right above it ought to use -p/--preserve-permissions ?
Quoted 18 lines
--- install.sh | 3 --- 1 file changed, 3 deletions(-)install.sh +0
-3@@ -27,9 +27,6 @@ tmp="`mktemp -d`" echo "Installing Xen from '$src' to '$dst'..." (cd $src; tar -cf - * ) | tar -C "$tmp" -xf - -echo " - modifying permissions" -chmod -R a+rX "$tmp" - (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf - rm -rf "$tmp"
Re: [PATCH 03/46] install.sh: Preserve permissions from make install
Quoted 3 lines · Ian Campbell
On Mon, 2014-09-22 at 14:59 +0200, Olaf Hering wrote:
Although, do you suppose that the tar unpack right above it ought to use -p/--preserve-permissions ?
At least the tar I use preserves permissions automatically. I wonder what the removed chmod tried to fix anyway.
Olaf
Quoted 13 lines
Quoted 11 lines
+++
b/install.shinstall.sh +0
-3@@ -27,9 +27,6 @@ tmp="`mktemp -d`" echo "Installing Xen from '$src' to '$dst'..." (cd $src; tar -cf - * ) | tar -C "$tmp" -xf - -echo " - modifying permissions" -chmod -R a+rX "$tmp" - (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf - rm -rf "$tmp"
Re: [PATCH 03/46] install.sh: Preserve permissions from make install
Quoted 7 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
On Mon, 2014-09-22 at 14:59 +0200, Olaf Hering wrote:
Although, do you suppose that the tar unpack right above it ought to use -p/--preserve-permissions ?At least the tar I use preserves permissions automatically.
Only for root I expect, if yours is anything like my manpage:
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
Quoted 1 line
I wonder what the removed chmod tried to fix anyway.
No idea...
PATCH 4/46 tools/mkrpm: allow custom rpm package name
In reply to Olaf HeringEven if xen is configured and compiled with different --prefix= so that it operates entirely below $prefix, the resulting package from 'make rpmball' is always called "xen.rpm".
Use an environment name to give a different name.
This can be used like this:
suffix=-bugN
prefix=/opx/xen/staging${suffix}
./configure --prefix=${prefix}
make rpmball PKG_SUFFIX=${suffix}
The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that many xen${suffix}.rpm packages can be installed at the same time.
--- tools/misc/mkrpm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/misc/mkrpm +1 -1
@@ -31,7 +31,7 @@ rm -rf rpm mkdir -p rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS} cat >rpm/SPECS/xen.spec <<EOF Summary: Xen development build, version $version -Name: xen +Name: xen$PKG_SUFFIX Version: $version Release: $release License: GPL
Re: [PATCH 04/46] tools/mkrpm: allow custom rpm package name
Quoted 12 lines · Olaf Hering
Even if xen is configured and compiled with different --prefix= so that it operates entirely below $prefix, the resulting package from 'make rpmball' is always called "xen.rpm".
Use an environment name to give a different name.
This can be used like this:suffix=-bugN
prefix=/opx/xen/staging${suffix}
./configure --prefix=${prefix}
make rpmball PKG_SUFFIX=${suffix}
Quoted 4 lines
The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that many xen${suffix}.rpm packages can be installed at the same time.
Signed-off-by Olaf Hering <[email protected]>
Quoted 17 lines
--- tools/misc/mkrpm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/misc/mkrpm +1
-1@@ -31,7 +31,7 @@ rm -rf rpm mkdir -p rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS} cat >rpm/SPECS/xen.spec <<EOF Summary: Xen development build, version $version -Name: xen +Name: xen$PKG_SUFFIX Version: $version Release: $release License: GPL
PATCH 5/46 tools: remove obsolete path.py from tools/python
In reply to Olaf HeringThe directory tools/python/xen/util does not exist. Upcoming changes to genpath will fail if the rule persists. Nothing uses path.py (anymore?), so get rid it.
--- tools/python/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
tools/python/Makefile +2 -7
@@ -4,13 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: all all: build -XENPATH = "xen/util/path.py" - -genpath-target = $(call buildmakevars2file,$(XENPATH)) -$(eval $(genpath-target)) - .PHONY: build -build: genpath genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \ +build: genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \ $(XEN_ROOT)/tools/libxl/idl.py PYTHONPATH=$(XEN_ROOT)/tools/libxl $(PYTHON) genwrap.py \ $(XEN_ROOT)/tools/libxl/libxl_types.idl \
@@ -31,6 +26,6 @@ test: clean: find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete rm -rf build/ - rm -f $(XENPATH) $(DEPS) + rm -f $(DEPS) -include $(DEPS)
Re: [PATCH 05/46] tools: remove obsolete path.py from tools/python
Quoted 5 lines · Olaf Hering
The directory
tools/python/xen/utildoes not exist. Upcoming changes to genpath will fail if the rule persists. Nothing usespath.py(anymore?), so get rid it.Signed-off-by Olaf Hering <[email protected]>
Shall I remove from .gitignore as I apply?
PATCH 6/46 tools/pygrub: store kernels in /var/run/xen/pygrub
In reply to Olaf HeringMove location of temporary bootfiles from /var/run/xend/boot to /var/run/xen/pygrub. Create the subdirectory if does not exist. The <dir> argument --output-directory must be an existing directory.
The reason for this change is that all entrys below /var/run have to be created at runtime in case /var/run is cleared on every boot.
--- tools/pygrub/src/pygrub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tools/pygrub/src/pygrub +7 -1
@@ -778,7 +778,7 @@ if __name__ == "__main__": debug = False not_really = False output_format = "sxp" - output_directory = "/var/run/xend/boot" + output_directory = "/var/run/xen/pygrub" # what was passed in incfg = { "kernel": None, "ramdisk": None, "args": "" }
@@ -829,11 +829,17 @@ if __name__ == "__main__": sys.exit(1) output_format = a elif o in ("--output-directory",): + if not os.path.isdir(a): + print "%s is not an existing directory" % a + sys.exit(1) output_directory = a if debug: logging.basicConfig(level=logging.DEBUG) + if not os.path.isdir(output_directory): + os.mkdir(output_directory, 0700) + if output is None or output == "-": fd = sys.stdout.fileno() else:
Re: [PATCH 06/46] tools/pygrub: store kernels in /var/run/xen/pygrub
Quoted 30 lines · Olaf Hering
Move location of temporary bootfiles from
/var/run/xend/bootto/var/run/xen/pygrub. Create the subdirectory if does not exist. The <dir> argument --output-directory must be an existing directory.The reason for this change is that all entrys below
/var/runhave to be created at runtime in case/var/runis cleared on every boot.Signed-off-by Olaf Hering <[email protected]>Acked-by Ian Campbell <[email protected]>--- tools/pygrub/src/pygrub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)tools/pygrub/src/pygrub +1
-1@@ -778,7 +778,7 @@ if __name__ == "__main__": debug = False not_really = False output_format = "sxp" - output_directory = "/var/run/xend/boot" + output_directory = "/var/run/xen/pygrub" # what was passed in incfg = { "kernel": None, "ramdisk": None, "args": "" }@@ -829,11 +829,17 @@ if __name__ == "__main__": sys.exit(1) output_format = a elif o in ("--output-directory",):
tools/pygrub/src/pygrub if __name__ == "__main__": · line 841
Quoted 10 lines
tools/pygrub/src/pygrub +5
-0+ if not os.path.isdir(a): + print "%s is not an existing directory" % a + sys.exit(1) output_directory = a if debug: logging.basicConfig(level=logging.DEBUG) + if not os.path.isdir(output_directory): + os.mkdir(output_directory, 0700)
This can fail if output_directory exists but is not a directory. It needs wrapping to catch OSError and provide a more useful error to the user.
~Andrew
Quoted 9 lines
tools/pygrub/src/pygrub +1
-0+ if output is None or output == "-": fd = sys.stdout.fileno() else:_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 06/46] tools/pygrub: store kernels in /var/run/xen/pygrub
Quoted 36 lines · Andrew Cooper
Quoted 35 lines · Olaf Hering
Move location of temporary bootfiles from
/var/run/xend/bootto/var/run/xen/pygrub. Create the subdirectory if does not exist. The <dir> argument --output-directory must be an existing directory.The reason for this change is that all entrys below
/var/runhave to be created at runtime in case/var/runis cleared on every boot.Signed-off-by Olaf Hering <[email protected]>Acked-by Ian Campbell <[email protected]>--- tools/pygrub/src/pygrub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)tools/pygrub/src/pygrub +4
-1@@ -778,7 +778,7 @@ if __name__ == "__main__": debug = False not_really = False output_format = "sxp" - output_directory = "/var/run/xend/boot" + output_directory = "/var/run/xen/pygrub" # what was passed in incfg = { "kernel": None, "ramdisk": None, "args": "" }@@ -829,11 +829,17 @@ if __name__ == "__main__": sys.exit(1) output_format = a elif o in ("--output-directory",): + if not os.path.isdir(a): + print "%s is not an existing directory" % a + sys.exit(1) output_directory = a
Quoted 8 lines
tools/pygrub/src/pygrub if __name__ == "__main__": · line 841
Quoted 5 lines
tools/pygrub/src/pygrub +2
-0if debug: logging.basicConfig(level=logging.DEBUG) + if not os.path.isdir(output_directory): + os.mkdir(output_directory, 0700)This can fail if
output_directoryexists but is not a directory. It needs wrapping to catch OSError and provide a more useful error to the user.
It'll already log something like
OSError: [Errno 17] File exists: '/tmp/notadir'
Not sure what else could be logged.
Ian.
PATCH 7/46 tools/hotplug: create XEN_RUN_DIR at runtime
In reply to Olaf HeringCreate XEN_RUN_DIR instead of hardcoded path because it is a compiletime setting. Also /var/run might be empty on startup because it is a tmpfs mount point.
--- tools/hotplug/Linux/init.d/xencommons.in.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/Linux/init.d/xencommons.in.in +1 -1
@@ -60,7 +60,7 @@ do_start () { local timeout=30 @LOAD_MODULES@ - mkdir -p /var/run/xen + mkdir -p ${XEN_RUN_DIR} if ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` then
PATCH 8/46 tools/hotplug: create XEN_LOCK_DIR at runtime
In reply to Olaf HeringCreate XEN_LOCK_DIR because it is a compiletime setting. Also /var/lock might be empty on startup because it is a tmpfs mount point.
--- tools/hotplug/Linux/init.d/xencommons.in.in | 1 + 1 file changed, 1 insertion(+)
tools/hotplug/Linux/init.d/xencommons.in.in +1 -0
@@ -61,6 +61,7 @@ do_start () { @LOAD_MODULES@ mkdir -p ${XEN_RUN_DIR} + mkdir -p ${XEN_LOCK_DIR} if ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` then
PATCH 9/46 tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path
In reply to Olaf HeringUse XEN_LOCK_DIR because it is a compiletime setting.
--- tools/hotplug/Linux/xendomains | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
tools/hotplug/Linux/xendomains +1 -6
@@ -49,12 +49,7 @@ if ! [ -e /proc/xen/privcmd ]; then exit 0 fi -# See docs/misc/distro_mapping.txt -if [ -d /var/lock/subsys ]; then - LOCKFILE=/var/lock/subsys/xendomains -else - LOCKFILE=/var/lock/xendomains -fi +LOCKFILE=${XEN_LOCK_DIR}/xendomains if [ -d /etc/sysconfig ]; then XENDOM_CONFIG=/etc/sysconfig/xendomains
Re: [PATCH 09/46] tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path
Quoted 13 lines · Olaf Hering
Use
XEN_LOCK_DIRbecause it is a compiletime setting.Signed-off-by Olaf Hering <[email protected]>Acked-by Ian Campbell <[email protected]>--- tools/hotplug/Linux/xendomains | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)tools/hotplug/Linux/xendomains +0
-0
tools/hotplug/Linux/xendomains if ! [ -e /proc/xen/privcmd ]; then · line 52
Quoted 10 lines
tools/hotplug/Linux/xendomains +1
-6@@ -49,12 +49,7 @@ if ! [ -e /proc/xen/privcmd ]; then exit 0 fi -# See docs/misc/distro_mapping.txt -if [ -d /var/lock/subsys ]; then - LOCKFILE=/var/lock/subsys/xendomains -else - LOCKFILE=/var/lock/xendomains -fi +LOCKFILE=${XEN_LOCK_DIR}/xendomains
Unfortunately, this is wrong.
On RHEL-based systems, the sysv init system uses /var/lock/subsys/${service} as an indicator of whether it should call "${service} stop". With this change, xendomains will no longer be run on shutdown on RHEL-based systems, even if it successfully touched* ${LOCKFILE}.
I'm not 100% sure what a proper non-hardcoded fix would be. Maybe something like this?
if [ -d ${XEN_LOCK_DIR}/subsys ] ; then
LOCKFILE=${XEN_LOCK_DIR}/subsys/xendomains
else
LOCKFILE=${XEN_LOCK_DIR}/xendomainsfi
-George
(* I say "successfully touched ${LOCKFILE}" because there's apparently another bug on RHEL-based systems:
- "xendomains start" will only touch ${LOCKFILE} if it actually started at least one domain
- As noted above, the sysv init will only call "xendomains stop" on shutdown if the lockfile exists
- So "xendomains start" didn't create any VMs, running VMs won't be saved when you reboot on RHEL-based systems
This patch just made things consistently never run at all.)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 09/46] tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path
Quoted 5 lines · George Dunlap
if [ -d ${XEN_LOCK_DIR}/subsys ] ; then
LOCKFILE=${XEN_LOCK_DIR}/subsys/xendomains else LOCKFILE=${XEN_LOCK_DIR}/xendomainsfi
This will probably work, yes.
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 10/46 tools/examples: remove obsolete install targets
In reply to Olaf Heringinstall-hotplug and install-udev are obsolete since commit 57bcfa11 ("tools/hotplug: Separate OS-specific scripts.")
--- tools/examples/Makefile | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-)
tools/examples/Makefile +1 -20
@@ -19,7 +19,7 @@ all: build: .PHONY: install -install: all install-readmes install-configs $(HOTPLUGS) +install: all install-readmes install-configs .PHONY: install-readmes install-readmes:
@@ -41,24 +41,5 @@ install-configs: $(XEN_CONFIGS) $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ done -.PHONY: install-hotplug -install-hotplug: - [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR) - set -e; for i in $(XEN_HOTPLUG_SCRIPTS); \ - do \ - $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \ - done - -.PHONY: install-udev -install-udev: - [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d - set -e; for i in $(UDEV_RULES); \ - do \ - $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \ - ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \ - done - .PHONY: clean clean:
PATCH 11/46 remove obsolete SUBSYS_DIR variable
In reply to Olaf Hering/var/run is a runtime directory. It is not supposed to be packaged. Remove unused SUBSYS_DIR variable from Config.mk and distro_mapping.txt.
--- Config.mk | 1 - docs/misc/distro_mapping.txt | 1 - 2 files changed, 2 deletions(-)
Config.mk +0 -1
@@ -76,7 +76,6 @@ endef # See distro_mapping.txt for other options $(eval $(call setvar_dir,CONFIG_LEAF_DIR,,/etc/sysconfig,sysconfig,default)) -$(eval $(call setvar_dir,SUBSYS_DIR,/var/run,/subsys,/subsys,)) $(eval $(call setvar_dir,INITD_DIR,/etc,/rc.d/init.d,/rc.d/init.d,/init.d)) ifneq ($(EXTRA_PREFIX),)
docs/misc/distro_mapping.txt +0 -1
@@ -5,7 +5,6 @@ other distros one needs to set the variables for the elements below | Red Hat | Debian | Suse | -----------------+------------------+---------------+----------------+ CONFIG_LEAF_DIR | sysconfig | default | sysconfig | -SUBSYS_DIR | /var/run/subsys | /var/run | /var/run | INITD_DIR | /etc/rc.d/init.d | /etc/init.d | /etc/init.d | -----------------+------------------+---------------+----------------+
PATCH 12/46 Config.mk: move directory list into BUILD_MAKE_VARS
In reply to Olaf HeringTo maintain the list of directories in a single place, move the existing list into its own variable and use it in buildmakevars2file. Required for upcoming changes.
Trim also whitespaces.
--- Config.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
Config.mk +7 -6
@@ -166,16 +166,17 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \ + XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \ + XEN_RUN_DIR XEN_PAGING_DIR + buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) define buildmakevars2file-closure .PHONY: genpath genpath: - rm -f $(1).tmp; \ - $(foreach var, \ - SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \ - XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \ - XEN_RUN_DIR XEN_PAGING_DIR, \ - echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \ + rm -f $(1).tmp; \ + $(foreach var, $(BUILD_MAKE_VARS), \ + echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \ $(call move-if-changed,$(1).tmp,$(1)) endef
PATCH 13/46 Config.mk: replace dependency to genpath with actual target
In reply to Olaf Heringgenpath is a detail of buildmakevars2file. Replace the dependency to genpath with the actual buildmakevars2file target. This change by itself does not fix any bug. Upcoming changes will add dependencies to $(target), but no rule exist to create $(target).
To force a rebuild of the $(1) rule the target now depends on the existing .phony target. This dummy target is already used elsewhere in the code.
No change in behaviour is expected by this patch.
--- Config.mk | 3 +-- stubdom/Makefile | 16 ++++++++-------- tools/hotplug/common/Makefile | 2 +- tools/libxl/Makefile | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-)
Config.mk +1 -2
@@ -172,8 +172,7 @@ BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \ buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) define buildmakevars2file-closure - .PHONY: genpath - genpath: + $(1): .phony rm -f $(1).tmp; \ $(foreach var, $(BUILD_MAKE_VARS), \ echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \
stubdom/Makefile +8 -8
@@ -48,18 +48,18 @@ TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib TARGETS=$(STUBDOM_TARGETS) +STUBDOMPATH="stubdompath.sh" +genpath-target = $(call buildmakevars2file,$(STUBDOMPATH)) +$(eval $(genpath-target)) + .PHONY: all all: build ifeq ($(STUBDOM_SUPPORTED),1) -build: genpath $(STUBDOM_BUILD) +build: $(STUBDOMPATH) $(STUBDOM_BUILD) else -build: genpath +build: $(STUBDOMPATH) endif -STUBDOMPATH="stubdompath.sh" -genpath-target = $(call buildmakevars2file,$(STUBDOMPATH)) -$(eval $(genpath-target)) - ############## # Cross-newlib ##############
@@ -450,9 +450,9 @@ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore ######### ifeq ($(STUBDOM_SUPPORTED),1) -install: genpath install-readme $(STUBDOM_INSTALL) +install: $(STUBDOMPATH) install-readme $(STUBDOM_INSTALL) else -install: genpath +install: $(STUBDOMPATH) endif install-readme:
tools/hotplug/common/Makefile +1 -1
@@ -16,7 +16,7 @@ $(eval $(genpath-target)) all: build .PHONY: build -build: genpath +build: $(HOTPLUGPATH) .PHONY: install install: all install-scripts
tools/libxl/Makefile +1 -1
@@ -163,7 +163,7 @@ _%.api-for-check: %.h $(AUTOINCS) >[email protected] mv -f [email protected] $@ -_paths.h: genpath +_paths.h: _paths.h.tmp sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" [email protected] >[email protected] rm -f [email protected] $(call move-if-changed,[email protected],$@)
Re: [PATCH 13/46] Config.mk: replace dependency to genpath with actual target
Quoted 5 lines · Olaf Hering
genpath is a detail of buildmakevars2file. Replace the dependency to genpath with the actual buildmakevars2file target. This change by itself does not fix any bug. Upcoming changes will add dependencies to $(target), but no rule exist to create $(target).
Quoted 7 lines
To force a rebuild of the $(1) rule the target now depends on the existing .phony target. This dummy target is already used elsewhere in the code.
No change in behaviour is expected by this patch.
Signed-off-by Olaf Hering <[email protected]>
PATCH 14/46 Config.mk: add new macro buildmakevars2header
In reply to Olaf HeringThis macro is similar to buildmakevars2file, it just creates a C header file instead of shell style syntax. Upcoming changes will use this macro in libxl and libxc.
--- Config.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
Config.mk +9 -0
@@ -179,6 +179,15 @@ define buildmakevars2file-closure $(call move-if-changed,$(1).tmp,$(1)) endef +buildmakevars2header = $(eval $(call buildmakevars2header-closure,$(1))) +define buildmakevars2header-closure + $(1): .phony + rm -f $(1).tmp; \ + $(foreach var, $(BUILD_MAKE_VARS), \ + echo "#define $(var) \"$($(var))\"" >>$(1).tmp;) \ + $(call move-if-changed,$(1).tmp,$(1)) +endef + ifeq ($(debug_symbols),y) CFLAGS += -g endif
Re: [PATCH 14/46] Config.mk: add new macro buildmakevars2header
Quoted 5 lines · Olaf Hering
This macro is similar to buildmakevars2file, it just creates a C header file instead of shell style syntax. Upcoming changes will use this macro in libxl and libxc.
Signed-off-by Olaf Hering <[email protected]>
PATCH 15/46 tools/libxl: use buildmakevars2header to create _paths.h
In reply to Olaf HeringReplace usage of buildmakevars2file with buildmakevars2header. The macro generates a C header file, so remove code which converts shell variables into C defines. Also update the dependency, the macro itself creates a dependency for _paths.h. A temporary file is not needed anymore.
--- tools/libxl/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
tools/libxl/Makefile +1 -6
@@ -150,7 +150,7 @@ $(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS) \ @rm -f $*.[ch] $(FLEX) --header-file=$*.h --outfile=$*.c $< -genpath-target = $(call buildmakevars2file,_paths.h.tmp) +genpath-target = $(call buildmakevars2header,_paths.h) $(eval $(genpath-target)) libxl.api-ok: check-libxl-api-rules _libxl.api-for-check
@@ -163,11 +163,6 @@ _%.api-for-check: %.h $(AUTOINCS) >[email protected] mv -f [email protected] $@ -_paths.h: _paths.h.tmp - sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" [email protected] >[email protected] - rm -f [email protected] - $(call move-if-changed,[email protected],$@) - _libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h $(PERL) $^ --prefix=libxl >[email protected] $(call move-if-changed,[email protected],$@)
PATCH 16/46 tools/libxc: provide variable paths to libxc
In reply to Olaf HeringIn preparation to remove hardcoded /var/run/xen paths, provide XEN_RUN_DIR and related directories to xc_private.h. Similar code exists already for libxl, stubdom and other parts.
--- .gitignore | 1 + tools/libxc/Makefile | 9 +++++++++ tools/libxc/xc_private.h | 1 + 3 files changed, 11 insertions(+)
.gitignore +1 -0
@@ -307,6 +307,7 @@ tools/include/xen-foreign/arm64.h .git tools/misc/xen-hptool tools/misc/xen-mfndump +tools/libxc/_*.[ch] tools/libxl/_*.[ch] tools/libxl/testidl tools/libxl/testidl.c
tools/libxc/Makefile +9 -0
@@ -122,6 +122,14 @@ ifneq ($(nosharedlibs),y) LIB += xenctrl_osdep_ENOSYS.so endif +genpath-target = $(call buildmakevars2header,_paths.h) +$(eval $(genpath-target)) + +xc_private.h: _paths.h + +$(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) $(OSDEP_LIB_OBJS) \ +$(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS): xc_private.h + .PHONY: all all: build
@@ -154,6 +162,7 @@ TAGS: .PHONY: clean clean: rm -rf *.rpm $(LIB) *~ $(DEPS) \ + _paths.h \ $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \ $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) \ $(OSDEP_LIB_OBJS) $(OSDEP_PIC_OBJS)
tools/libxc/xc_private.h +1 -0
@@ -29,6 +29,7 @@#include <stdlib.h> #include <sys/ioctl.h> +#include "_paths.h" #include "xenctrl.h" #include "xenctrlosdep.h"
PATCH 17/46 tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE
In reply to Olaf HeringRemove hardcoded /var/run/xen directory path, use XEN_RUN_DIR instead.
--- tools/libxc/xc_suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxc/xc_suspend.c +1 -1
@@ -20,7 +20,7 @@#include "xc_private.h" #include "xenguest.h" -#define SUSPEND_LOCK_FILE "/var/run/xen/suspend-evtchn-%d.lock" +#define SUSPEND_LOCK_FILE XEN_RUN_DIR "/suspend-evtchn-%d.lock"/* * locking
PATCH 18/46 Use configure --sysconfdir=DIR to set CONFIG_DIR
In reply to Olaf HeringPreserve existing behaviour: if the option was not given, set existing defaults for FreeBSD, Solaris and everything else.
--- config/FreeBSD.mk | 2 -- config/StdGNU.mk | 1 - config/SunOS.mk | 5 ----- m4/paths.m4 | 21 ++++++++++++++++++++- 4 files changed, 20 insertions(+), 9 deletions(-)
config/FreeBSD.mk +0 -2
@@ -4,5 +4,3 @@ DLOPEN_LIBS = # No wget on FreeBSD base system WGET = ftp - -CONFIG_DIR = $(PREFIX)/etc
config/StdGNU.mk +0 -1
@@ -41,7 +41,6 @@ XENFIRMWAREDIR = $(PREFIX)/lib/xen/boot PRIVATE_PREFIX = $(LIBDIR)/xen PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin -CONFIG_DIR = /etc XEN_LOCK_DIR = /var/lock XEN_RUN_DIR = /var/run/xen XEN_PAGING_DIR = /var/lib/xen/xenpaging
config/SunOS.mk +0 -5
@@ -31,11 +31,6 @@ XENFIRMWAREDIR = $(LIBDIR)/xen/boot PRIVATE_PREFIX = $(LIBDIR)/xen PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin -ifeq ($(PREFIX),/usr) -CONFIG_DIR = /etc -else -CONFIG_DIR = $(PREFIX)/etc -endif XEN_CONFIG_DIR = $(CONFIG_DIR)/xen XEN_SCRIPT_DIR = $(PRIVATE_PREFIX)/scripts
m4/paths.m4 +20 -1
@@ -3,6 +3,25 @@ dnl expand these early so we can use this for substitutions test "x$prefix" = "xNONE" && prefix=$ac_default_prefix test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix} +dnl +if test "x$sysconfdir" = 'x${prefix}/etc' ; then + case "$host_os" in + *freebsd*) + sysconfdir=$prefix/etc + ;; + *solaris*) + if test "$prefix" = "/usr" ; then + sysconfdir=/etc + else + sysconfdir=$prefix/etc + fi + ;; + *) + sysconfdir=/etc + ;; + esac +fi + BINDIR=$prefix/bin AC_SUBST(BINDIR)
@@ -41,7 +60,7 @@ AC_SUBST(PRIVATE_BINDIR) XENFIRMWAREDIR=$prefix/lib/xen/boot AC_SUBST(XENFIRMWAREDIR) -CONFIG_DIR=/etc +CONFIG_DIR=$sysconfdir AC_SUBST(CONFIG_DIR) XEN_CONFIG_DIR=$CONFIG_DIR/xen
Re: [PATCH 18/46] Use configure --sysconfdir=DIR to set CONFIG_DIR
Quoted 4 lines · Olaf Hering
Preserve existing behaviour: if the option was not given, set existing defaults for FreeBSD, Solaris and everything else.
Signed-off-by Olaf Hering <[email protected]>
Hopefully this does the right thing to XEN_CONFIG_DIR?
Ian.
Ian Campbell
AppliedRe: [PATCH 18/46] Use configure --sysconfdir=DIR to set CONFIG_DIR
Quoted 7 lines · Ian Campbell
Quoted 4 lines · Olaf Hering
Preserve existing behaviour: if the option was not given, set existing defaults for FreeBSD, Solaris and everything else.
Signed-off-by Olaf Hering <[email protected]>Acked-by Ian Campbell <[email protected]>
I've applied up to and including this point.
66f71ce stubdom: fix lwip compile
51f7272 tools/xenpaging: create dumpdir with mode 0700 4cd7463 install.sh: Preserve permissions from make install b8ebc6b tools/mkrpm: allow custom rpm package name dcf4dd2 tools: remove obsolete path.py from tools/python 63dcc68 tools/pygrub: store kernels in /var/run/xen/pygrub 7a5e21a tools/hotplug: create XEN_RUN_DIR at runtime ffa86a8 tools/hotplug: create XEN_LOCK_DIR at runtime c996572 tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path 9c8dd4d tools/examples: remove obsolete install targets 0021ddc remove obsolete SUBSYS_DIR variable
c0f5ce5 Config.mk: move directory list into BUILD_MAKE_VARS 19a5856 Config.mk: replace dependency to genpath with actual target e8a23cf Config.mk: add new macro buildmakevars2header a25968b tools/libxl: use buildmakevars2header to create _paths.h ad1f562 tools/libxc: provide variable paths to libxc 7538911 tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE 7d71477 Use configure --sysconfdir=DIR to set CONFIG_DIR
Ian.
PATCH 19/46 Add configure --with-initd-dir=DIR
In reply to Olaf Hering--- Config.mk | 1 - config/Paths.mk.in | 1 + docs/misc/distro_mapping.txt | 3 +-- m4/paths.m4 | 20 ++++++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-)
Config.mk +0 -1
@@ -76,7 +76,6 @@ endef # See distro_mapping.txt for other options $(eval $(call setvar_dir,CONFIG_LEAF_DIR,,/etc/sysconfig,sysconfig,default)) -$(eval $(call setvar_dir,INITD_DIR,/etc,/rc.d/init.d,/rc.d/init.d,/init.d)) ifneq ($(EXTRA_PREFIX),) EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
config/Paths.mk.in +1 -0
@@ -24,6 +24,7 @@ XEN_LOG_DIR := @XEN_LOG_DIR@ XEN_LIB_STORED := @XEN_LIB_STORED@ CONFIG_DIR := @CONFIG_DIR@ +INITD_DIR := @INITD_DIR@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@
docs/misc/distro_mapping.txt +1 -2
@@ -13,8 +13,7 @@ build host, via the "setvar_dir" macro in Config.mk) and for some scripts at run-time. If the Red Hat directory exists, it is used; otherwise the Debian one is used. -You can override this by setting the variables in the environment or -your ".config" (which is included by .config). +The path can be changed with configure --with-initd-dir=DIR To add support for new distributions that don't use the above locations, one must grep for the above elements and add appropriate checks.
m4/paths.m4 +20 -0
@@ -22,6 +22,23 @@ if test "x$sysconfdir" = 'x${prefix}/etc' ; then esac fi +AC_ARG_WITH([initd-dir], + AS_HELP_STRING([--with-initd-dir=DIR], + [Path to directory with sysv runlevel scripts. [PREFIX/etc/init.d]]), + [initd_dir_path=$withval], + [case "$host_os" in + *linux*) + if test -d $sysconfdir/rc.d/init.d ; then + initd_dir_path=$sysconfdir/rc.d/init.d + else + initd_dir_path=$sysconfdir/init.d + fi + ;; + *) + initd_dir_path=$sysconfdir/rc.d + ;; + esac]) + BINDIR=$prefix/bin AC_SUBST(BINDIR)
@@ -63,6 +80,9 @@ AC_SUBST(XENFIRMWAREDIR) CONFIG_DIR=$sysconfdir AC_SUBST(CONFIG_DIR) +INITD_DIR=$initd_dir_path +AC_SUBST(INITD_DIR) + XEN_CONFIG_DIR=$CONFIG_DIR/xen AC_SUBST(XEN_CONFIG_DIR)
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
Google suggests that this is more commonly --with-initddir and that matches the existing --with-foodir options.
It also looks like they commonly default to just $sysconfdir/init.d rather than detecting based on $host.
docs/misc/distro_mapping.txt build host, via the "setvar_dir" macro in Config.mk) and for some · line 16
Quoted 11 lines
docs/misc/distro_mapping.txt +1
-2@@ -13,8 +13,7 @@ build host, via the "setvar_dir" macro in Config.mk) and for some scripts at run-time. If the Red Hat directory exists, it is used; otherwise the Debian one is used. -You can override this by setting the variables in the environment or -your ".config" (which is included by .config). +The path can be changed with configure --with-initd-dir=DIR
This only applies to one of the three variables discussed here, doesn't it? While the other two are still configured via .config we should say so (and long term we should aim to move those over too IMHO, ideally this file becomes obsolete).
Ian.
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
Quoted 8 lines · Ian Campbell
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>Google suggests that this is more commonly --with-initddir and that matches the existing --with-foodir options.
It also looks like they commonly default to just $sysconfdir/init.d rather than detecting based on $host.
I will check how others solved this part. My intent was to preserve existing behaviour.
Will update the patch.
Olaf
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
In reply to Ian CampbellQuoted 8 lines · Ian Campbell
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>Google suggests that this is more commonly --with-initddir and that matches the existing --with-foodir options.
It also looks like they commonly default to just $sysconfdir/init.d rather than detecting based on $host.
Are you saying the detection should be removed, and configure --opt=dir has to be specified on Fedora or BSD?
Olaf
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
Quoted 8 lines
Quoted 5 lines
Google suggests that this is more commonly --with-initddir and that matches the existing --with-foodir options.
It also looks like they commonly default to just $sysconfdir/init.d rather than detecting based on $host.
Are you saying the detection should be removed, and configure --opt=dir has to be specified on Fedora or BSD?
It's something we could consider if we think that they are already dealing with this (perhaps automatically) for the majority of things which they package.
Ian.
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
Quoted 6 lines · Ian Campbell
Quoted 2 lines · Olaf Hering
Are you saying the detection should be removed, and configure --opt=dir has to be specified on Fedora or BSD?
It's something we could consider if we think that they are already dealing with this (perhaps automatically) for the majority of things which they package.
"they" as in packagers at RHAT is different from people who compile xen on their on.
Today everyone has to pass at least --libdir= for 64bit builds.
If the 4.5 release notes state clearly that building the tools slightly changed compared to 4.4 I'm fine with removing the detection.
I plan to add documentation for configure to the README and the Wiki, once my prefix series goes into 4.5.
Olaf
Re: [PATCH 19/46] Add configure --with-initd-dir=DIR
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 2 lines · Olaf Hering
Are you saying the detection should be removed, and configure --opt=dir has to be specified on Fedora or BSD?
Quoted 7 lines
Quoted 3 lines
It's something we could consider if we think that they are already dealing with this (perhaps automatically) for the majority of things which they package.
"they" as in packagers at RHAT is different from people who compile xen on their on.
Today everyone has to pass at least --libdir= for 64bit builds.
"They" here would be both, since both cases would need to deal with this regardless of who they are.
The important bit is "if we think that they are already dealing with this" where "this" is "variation in initscript install dir between distros". I don't know if that is the case. It depends on what the norm among autoconf using projects is. TBH I would have expected there to be a standard macro for this, if that's not the case then either projects ignore this or they are all hand coding their own detection.
Quoted 5 lines
If the 4.5 release notes state clearly that building the tools slightly changed compared to 4.4 I'm fine with removing the detection.
I plan to add documentation for configure to the README and the Wiki, once my prefix series goes into 4.5.
Excellent.
Have you raised this series with Konrad for a release ack (I can't remember if I mentioned this already).
Ian.
PATCH 20/46 tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path
In reply to Olaf HeringHelper scripts get installed into XEN_SCRIPT_DIR, but initscripts, helper scripts and udev rules still refer to the hardcoded location /etc/xen/scripts/. Update scripts, rules and Makefile to refer to @XEN_SCRIPT_DIR@ instead.
Update configure.ac to substitute the path in files using XEN_SCRIPT_DIR. Remove XEN_SCRIPT_DIR from StdGNU.mk and SunOS.mk, its already in Paths.mk. Note: In SunOS.mk it refered to PRIVATE_PREFIX, which was likely a typo introduced by 9f6d07bac9f14aaa8bafe38b4a217e61a3a57842 ("tools: get rid of hardcoded config dirs")
---
.gitignore | 6 ++++++
config/StdGNU.mk | 1 -
config/SunOS.mk | 1 -
tools/configure.ac | 6 ++++++
.../Linux/init.d/{xen-watchdog => xen-watchdog.in} | 2 +-
tools/hotplug/Linux/init.d/xencommons.in.in | 2 +-
tools/hotplug/Linux/init.d/{xendomains => xendomains.in} | 2 +-
tools/hotplug/Linux/{vif-setup => vif-setup.in} | 2 +-
.../Linux/{xen-backend.rules => xen-backend.rules.in} | 16 ++++++++--------
.../{xen-hotplug-common.sh => xen-hotplug-common.sh.in} | 2 +-
tools/hotplug/Linux/{xendomains => xendomains.in} | 2 +-
11 files changed, 26 insertions(+), 16 deletions(-).gitignore +6 -0
@@ -160,6 +160,12 @@ tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci tools/fs-back/fs-backend tools/hotplug/common/hotplugpath.sh +tools/hotplug/Linux/init.d/xen-watchdog +tools/hotplug/Linux/init.d/xendomains +tools/hotplug/Linux/vif-setup +tools/hotplug/Linux/xen-backend.rules +tools/hotplug/Linux/xen-hotplug-common.sh +tools/hotplug/Linux/xendomains tools/include/xen/* tools/include/xen-foreign/*.(c|h|size) tools/include/xen-foreign/checker
config/StdGNU.mk +0 -1
@@ -48,7 +48,6 @@ XEN_PAGING_DIR = /var/lib/xen/xenpaging SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR) XEN_CONFIG_DIR = $(CONFIG_DIR)/xen -XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts BOOT_DIR ?= /boot
config/SunOS.mk +0 -1
@@ -32,7 +32,6 @@ PRIVATE_PREFIX = $(LIBDIR)/xen PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin XEN_CONFIG_DIR = $(CONFIG_DIR)/xen -XEN_SCRIPT_DIR = $(PRIVATE_PREFIX)/scripts BOOT_DIR ?= /boot
tools/configure.ac +6 -0
@@ -9,6 +9,8 @@ AC_CONFIG_FILES([ ../config/Tools.mk hotplug/Linux/init.d/xencommons.in hotplug/Linux/init.d/sysconfig.xencommons +hotplug/Linux/init.d/xen-watchdog +hotplug/Linux/init.d/xendomains hotplug/Linux/systemd/proc-xen.mount hotplug/Linux/systemd/var-lib-xenstored.mount hotplug/Linux/systemd/xenstored.socket
@@ -18,6 +20,10 @@ hotplug/Linux/systemd/xenconsoled.service hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service hotplug/Linux/systemd/xendomains.service hotplug/Linux/systemd/xen-watchdog.service +hotplug/Linux/vif-setup +hotplug/Linux/xen-backend.rules +hotplug/Linux/xen-hotplug-common.sh +hotplug/Linux/xendomains ]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([../])
tools/hotplug/Linux/init.d/xen-watchdog.in renamed from tools/hotplug/Linux/init.d/xen-watchdog +1 -1
@@ -17,7 +17,7 @@ ### END INIT INFO # -. /etc/xen/scripts/hotplugpath.sh +. @XEN_SCRIPT_DIR@/hotplugpath.sh DAEMON=${SBINDIR}/xenwatchdogd base=$(basename $DAEMON)
tools/hotplug/Linux/init.d/xencommons.in.in +1 -1
@@ -20,7 +20,7 @@ XENSTORED=@XENSTORED@ -. /etc/xen/scripts/hotplugpath.sh +. @XEN_SCRIPT_DIR@/hotplugpath.sh if [ -d /etc/sysconfig ]; then xencommons_config=/etc/sysconfig
tools/hotplug/Linux/init.d/xendomains.in renamed from tools/hotplug/Linux/init.d/xendomains +1 -1
@@ -24,7 +24,7 @@ # systemd systems. ### END INIT INFO -. /etc/xen/scripts/hotplugpath.sh +. @XEN_SCRIPT_DIR@/hotplugpath.sh case "$1" in start)
tools/hotplug/Linux/vif-setup.in renamed from tools/hotplug/Linux/vif-setup +1 -1
@@ -4,6 +4,6 @@ if test "$script" then exec $script $* else - exec /etc/xen/scripts/vif-bridge $* + exec @XEN_SCRIPT_DIR@/vif-bridge $* fi
tools/hotplug/Linux/xen-backend.rules.in renamed from tools/hotplug/Linux/xen-backend.rules +8 -8
@@ -1,10 +1,10 @@ -SUBSYSTEM=="xen-backend", KERNEL=="tap*", ENV{UDEV_CALL}="1", RUN+="/etc/xen/scripts/blktap $env{ACTION}" -SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ENV{UDEV_CALL}="1", RUN+="/etc/xen/scripts/block $env{ACTION}" -SUBSYSTEM=="xen-backend", KERNEL=="vif2-*", RUN+="/etc/xen/scripts/vif2 $env{ACTION}" -SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="online", RUN+="/etc/xen/scripts/vif-setup online type_if=vif" -SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="offline", RUN+="/etc/xen/scripts/vif-setup offline type_if=vif" -SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}" -SUBSYSTEM=="xen-backend", ACTION=="remove", ENV{UDEV_CALL}="1", RUN+="/etc/xen/scripts/xen-hotplug-cleanup" +SUBSYSTEM=="xen-backend", KERNEL=="tap*", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/blktap $env{ACTION}" +SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/block $env{ACTION}" +SUBSYSTEM=="xen-backend", KERNEL=="vif2-*", RUN+="@XEN_SCRIPT_DIR@/vif2 $env{ACTION}" +SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="online", RUN+="@XEN_SCRIPT_DIR@/vif-setup online type_if=vif" +SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="offline", RUN+="@XEN_SCRIPT_DIR@/vif-setup offline type_if=vif" +SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="@XEN_SCRIPT_DIR@/vscsi $env{ACTION}" +SUBSYSTEM=="xen-backend", ACTION=="remove", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/xen-hotplug-cleanup" KERNEL=="evtchn", NAME="xen/%k" SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600" SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", MODE="0600"
@@ -12,4 +12,4 @@ KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600" KERNEL=="gntdev", NAME="xen/%k", MODE="0600" KERNEL=="pci_iomul", NAME="xen/%k", MODE="0600" KERNEL=="tapdev[a-z]*", NAME="xen/blktap-2/tapdev%m", MODE="0600" -SUBSYSTEM=="net", KERNEL=="vif*-emu", ACTION=="add", ENV{UDEV_CALL}="1", RUN+="/etc/xen/scripts/vif-setup $env{ACTION} type_if=tap" +SUBSYSTEM=="net", KERNEL=="vif*-emu", ACTION=="add", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/vif-setup $env{ACTION} type_if=tap"
tools/hotplug/Linux/xen-hotplug-common.sh.in renamed from tools/hotplug/Linux/xen-hotplug-common.sh +1 -1
@@ -112,7 +112,7 @@ xenstore_write() { # Execute each hook in the <hook> directory. # call_hooks() { - for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do + for f in @XEN_SCRIPT_DIR@/${1}-${2}.d/*.hook; do if [ -x "$f" ]; then . "$f"; fi done }
tools/hotplug/Linux/xendomains.in renamed from tools/hotplug/Linux/xendomains +1 -1
@@ -27,7 +27,7 @@ # boots / shuts down. ### END INIT INFO -. /etc/xen/scripts/hotplugpath.sh +. @XEN_SCRIPT_DIR@/hotplugpath.sh CMD=${SBINDIR}/xl HEADCOMP="Xen saved domain"
Re: [PATCH 20/46] tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path
Quoted 11 lines · Olaf Hering
Helper scripts get installed into
XEN_SCRIPT_DIR, but initscripts, helper scripts and udev rules still refer to the hardcoded location/etc/xen/scripts/. Update scripts, rules andMakefileto refer to @XEN_SCRIPT_DIR@ instead.
Update configure.ac to substitute the path in files usingXEN_SCRIPT_DIR. RemoveXEN_SCRIPT_DIRfrom StdGNU.mk and SunOS.mk, its already in Paths.mk.Note: In SunOS.mk it refered to
PRIVATE_PREFIX, which was likely a typo introduced by9f6d07bac9f14aaa8bafe38b4a217e61a3a57842("tools: get rid of hardcoded config dirs")
Are you sure? It seems like a plausible place for some OS to want it.
Not sure how relevant that is though, SunOS.mk won't be used much these days, and I'm not 100% sure it isn't already broken... If it becomes an issue we can add --with-scriptdir
Quoted 1 line
Signed-off-by Olaf Hering <[email protected]>
Quoted 1 line
tools/configure.ac| 6 ++++++
Please do mention the need to rerun autogen.sh in the commit log for the benefit of the committer, who might otherwise forget...
PATCH 21/46 tools/configure.ac: sort AC_CONFIG_FILES
In reply to Olaf Hering--- tools/configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/configure.ac +6 -6
@@ -7,19 +7,19 @@ AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]), AC_CONFIG_SRCDIR([libxl/libxl.c]) AC_CONFIG_FILES([ ../config/Tools.mk -hotplug/Linux/init.d/xencommons.in hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog +hotplug/Linux/init.d/xencommons.in hotplug/Linux/init.d/xendomains hotplug/Linux/systemd/proc-xen.mount hotplug/Linux/systemd/var-lib-xenstored.mount -hotplug/Linux/systemd/xenstored.socket -hotplug/Linux/systemd/xenstored_ro.socket -hotplug/Linux/systemd/xenstored.service -hotplug/Linux/systemd/xenconsoled.service hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service -hotplug/Linux/systemd/xendomains.service hotplug/Linux/systemd/xen-watchdog.service +hotplug/Linux/systemd/xenconsoled.service +hotplug/Linux/systemd/xendomains.service +hotplug/Linux/systemd/xenstored.service +hotplug/Linux/systemd/xenstored.socket +hotplug/Linux/systemd/xenstored_ro.socket hotplug/Linux/vif-setup hotplug/Linux/xen-backend.rules hotplug/Linux/xen-hotplug-common.sh
Re: [PATCH 21/46] tools/configure.ac: sort AC_CONFIG_FILES
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
PATCH 22/46 tools: use INITD_DIR instead of CONFIG_DIR/init.d|rc.d
In reply to Olaf Hering--- Makefile | 4 ++-- tools/hotplug/FreeBSD/Makefile | 4 ++-- tools/hotplug/NetBSD/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
Makefile +2 -2
@@ -211,8 +211,8 @@ uninstall: D=$(DESTDIR) uninstall: [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true $(MAKE) -C xen uninstall - rm -rf $(D)$(CONFIG_DIR)/init.d/xendomains $(D)$(CONFIG_DIR)/init.d/xend - rm -rf $(D)$(CONFIG_DIR)/init.d/xencommons $(D)$(CONFIG_DIR)/init.d/xen-watchdog + rm -rf $(D)$(INITD_DIR)/xendomains $(D)$(INITD_DIR)/xend + rm -rf $(D)$(INITD_DIR)/xencommons $(D)$(INITD_DIR)/xen-watchdog rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules rm -f $(D)$(SYSCONFIG_DIR)/xendomains
tools/hotplug/FreeBSD/Makefile +2 -2
@@ -31,10 +31,10 @@ install-scripts: .PHONY: install-rcd install-rcd: - $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/rc.d + $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) set -e; for i in $(XEN_RCD_PROG); \ do \ - $(INSTALL_PROG) $$i $(DESTDIR)$(CONFIG_DIR)/rc.d; \ + $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \ sed -i '' 's,@xen_script_dir@,$(DESTDIR)$(XEN_SCRIPT_DIR),g' $(DESTDIR)$(CONFIG_DIR)/$$i; \ done $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(XEN_SCRIPT_DIR)
tools/hotplug/NetBSD/Makefile +3 -3
@@ -33,12 +33,12 @@ install-scripts: .PHONY: install-rcd install-rcd: - $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/rc.d + $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) set -e; for i in $(XEN_RCD_PROG); \ do \ - $(INSTALL_PROG) $$i $(DESTDIR)$(CONFIG_DIR)/rc.d; \ + $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \ done - $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(CONFIG_DIR)/rc.d/xen-hotplugpath.sh + $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh .PHONY: clean clean:
Re: [PATCH 22/46] tools: use INITD_DIR instead of CONFIG_DIR/init.d|rc.d
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
PATCH 23/46 tools/hotplug: substitute XEN_SCRIPT_DIR on FreeBSD
In reply to Olaf HeringAlso remove DESTDIR from the path, this was most likely not intended.
---
.gitignore | 1 +
tools/configure.ac | 1 +
tools/hotplug/FreeBSD/Makefile | 1 -
tools/hotplug/FreeBSD/rc.d/{xencommons => xencommons.in} | 2 +-
4 files changed, 3 insertions(+), 2 deletions(-).gitignore +1 -0
@@ -160,6 +160,7 @@ tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci tools/fs-back/fs-backend tools/hotplug/common/hotplugpath.sh +tools/hotplug/FreeBSD/rc.d/xencommons tools/hotplug/Linux/init.d/xen-watchdog tools/hotplug/Linux/init.d/xendomains tools/hotplug/Linux/vif-setup
tools/configure.ac +1 -0
@@ -7,6 +7,7 @@ AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]), AC_CONFIG_SRCDIR([libxl/libxl.c]) AC_CONFIG_FILES([ ../config/Tools.mk +hotplug/FreeBSD/rc.d/xencommons hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons.in
tools/hotplug/FreeBSD/Makefile +0 -1
@@ -35,7 +35,6 @@ install-rcd: set -e; for i in $(XEN_RCD_PROG); \ do \ $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \ - sed -i '' 's,@xen_script_dir@,$(DESTDIR)$(XEN_SCRIPT_DIR),g' $(DESTDIR)$(CONFIG_DIR)/$$i; \ done $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(XEN_SCRIPT_DIR)
tools/hotplug/FreeBSD/rc.d/xencommons.in renamed from tools/hotplug/FreeBSD/rc.d/xencommons +1 -1
@@ -5,7 +5,7 @@ . /etc/rc.subr -. @xen_script_dir@/hotplugpath.sh +. @XEN_SCRIPT_DIR@/hotplugpath.sh LD_LIBRARY_PATH="${LIBDIR}" export LD_LIBRARY_PATH
Re: [PATCH 23/46] tools/hotplug: substitute XEN_SCRIPT_DIR on FreeBSD
Quoted 3 lines · Olaf Hering
Also remove DESTDIR from the path, this was most likely not intended.
Signed-off-by Olaf Hering <[email protected]>
PATCH 24/46 remove duplicate variables from config
In reply to Olaf Hering... because they are already in Paths.mk:
BINDIR, LIBEXEC, PRIVATE_BINDIR, PRIVATE_PREFIX, SBINDIR, SHAREDIR, XEN_CONFIG_DIR, XENFIRMWAREDIR, XEN_LOCK_DIR, XEN_PAGING_DIR, XEN_RUN_DIR. Remove unused PKG_XEN_PREFIX, which was also incorrectly assigned to PRIVATE_PREFIX.
--- Config.mk | 1 - config/NetBSD.mk | 5 ----- config/NetBSDRump.mk | 2 -- config/Paths.mk.in | 1 - config/StdGNU.mk | 14 -------------- config/SunOS.mk | 8 -------- m4/paths.m4 | 20 ++++++++++++++------ 7 files changed, 14 insertions(+), 37 deletions(-)
Config.mk +0 -1
@@ -58,7 +58,6 @@ endif include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk -SHAREDIR ?= $(PREFIX)/share DOCDIR ?= $(SHAREDIR)/doc/xen MANDIR ?= $(SHAREDIR)/man BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
config/NetBSD.mk +0 -5
@@ -1,11 +1,6 @@ include $(XEN_ROOT)/config/StdGNU.mk # Override settings for this OS -LIBEXEC = $(PREFIX)/libexec -PRIVATE_BINDIR = $(BINDIR) - DLOPEN_LIBS = -XEN_LOCK_DIR = /var/lib - WGET = ftp
config/NetBSDRump.mk +0 -2
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/config/StdGNU.mk DLOPEN_LIBS = PTHREAD_LIBS = -XEN_LOCK_DIR = /var/lib - WGET = ftp XENSTORE_XENSTORED=n
config/Paths.mk.in +0 -1
@@ -29,7 +29,6 @@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@ PRIVATE_PREFIX := @PRIVATE_PREFIX@ -PRIVATE_PREFIX := @PKG_XEN_PREFIX@ PRIVATE_BINDIR := @PRIVATE_BINDIR@ XENFIRMWAREDIR := @XENFIRMWAREDIR@
config/StdGNU.mk +0 -14
@@ -28,27 +28,13 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include -LIBEXEC = $(PREFIX)/lib/xen/bin -SHAREDIR = $(PREFIX)/share MANDIR = $(SHAREDIR)/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8 -SBINDIR = $(PREFIX)/sbin -XENFIRMWAREDIR = $(PREFIX)/lib/xen/boot - -PRIVATE_PREFIX = $(LIBDIR)/xen -PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin - -XEN_LOCK_DIR = /var/lock -XEN_RUN_DIR = /var/run/xen -XEN_PAGING_DIR = /var/lib/xen/xenpaging SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR) -XEN_CONFIG_DIR = $(CONFIG_DIR)/xen - BOOT_DIR ?= /boot SOCKET_LIBS =
config/SunOS.mk +0 -8
@@ -20,18 +20,10 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include MANDIR = $(PREFIX)/share/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8 -SBINDIR = $(PREFIX)/sbin -XENFIRMWAREDIR = $(LIBDIR)/xen/boot - -PRIVATE_PREFIX = $(LIBDIR)/xen -PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin - -XEN_CONFIG_DIR = $(CONFIG_DIR)/xen BOOT_DIR ?= /boot
m4/paths.m4 +14 -6
@@ -47,7 +47,10 @@ AC_SUBST(SBINDIR) dnl XXX: this should be changed to use the passed $libexec dnl but can be done as a second step -LIBEXEC=$prefix/lib/xen/bin +case "$host_os" in +*netbsd*) LIBEXEC=$prefix/libexec ;; +*) LIBEXEC=$prefix/lib/xen/bin ;; +esac AC_SUBST(LIBEXEC) LIBDIR=`eval echo $libdir`
@@ -68,10 +71,11 @@ AC_SUBST(SHAREDIR) PRIVATE_PREFIX=$LIBDIR/xen AC_SUBST(PRIVATE_PREFIX) -PKG_XEN_PREFIX=$LIBDIR/xen -AC_SUBST(PKG_XEN_PREFIX) - -PRIVATE_BINDIR=$PRIVATE_PREFIX/bin +case "$host_os" in +*freebsd*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; +*netbsd*) PRIVATE_BINDIR=$BINDIR ;; +*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; +esac AC_SUBST(PRIVATE_BINDIR) XENFIRMWAREDIR=$prefix/lib/xen/boot
@@ -89,7 +93,11 @@ AC_SUBST(XEN_CONFIG_DIR) XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts AC_SUBST(XEN_SCRIPT_DIR) -XEN_LOCK_DIR=/var/lock +case "$host_os" in +*freebsd*) XEN_LOCK_DIR=/var/lib ;; +*netbsd*) XEN_LOCK_DIR=/var/lib ;; +*) XEN_LOCK_DIR=/var/lock ;; +esac AC_SUBST(XEN_LOCK_DIR) XEN_RUN_DIR=/var/run/xen
Re: [PATCH 24/46] remove duplicate variables from config
Quoted 7 lines · Olaf Hering
... because they are already in Paths.mk:
BINDIR, LIBEXEC,PRIVATE_BINDIR,PRIVATE_PREFIX, SBINDIR, SHAREDIR,XEN_CONFIG_DIR, XENFIRMWAREDIR,XEN_LOCK_DIR,XEN_PAGING_DIR,XEN_RUN_DIR. Remove unusedPKG_XEN_PREFIX, which was also incorrectly assigned toPRIVATE_PREFIX.Signed-off-by Olaf Hering <[email protected]>
(note to committer: run autogen.sh)
Quoted 168 lines
--- Config.mk | 1 - config/NetBSD.mk | 5 ----- config/NetBSDRump.mk | 2 -- config/Paths.mk.in | 1 - config/StdGNU.mk | 14 -------------- config/SunOS.mk | 8 -------- m4/paths.m4 | 20 ++++++++++++++------ 7 files changed, 14 insertions(+), 37 deletions(-)Config.mk +0
-1@@ -58,7 +58,6 @@ endif include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk -SHAREDIR ?= $(PREFIX)/share DOCDIR ?= $(SHAREDIR)/doc/xen MANDIR ?= $(SHAREDIR)/man BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.dconfig/NetBSD.mk +0
-5@@ -1,11 +1,6 @@ include $(XEN_ROOT)/config/StdGNU.mk # Override settings for this OS -LIBEXEC = $(PREFIX)/libexec -PRIVATE_BINDIR = $(BINDIR) - DLOPEN_LIBS = -XEN_LOCK_DIR = /var/lib - WGET = ftpconfig/NetBSDRump.mk +0
-2@@ -3,8 +3,6 @@ include $(XEN_ROOT)/config/StdGNU.mk DLOPEN_LIBS = PTHREAD_LIBS = -XEN_LOCK_DIR = /var/lib - WGET = ftp XENSTORE_XENSTORED=nconfig/Paths.mk.in +0
-1@@ -29,7 +29,6 @@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@ PRIVATE_PREFIX := @PRIVATE_PREFIX@ -PRIVATE_PREFIX := @PKG_XEN_PREFIX@ PRIVATE_BINDIR := @PRIVATE_BINDIR@ XENFIRMWAREDIR := @XENFIRMWAREDIR@config/StdGNU.mk +0
-14@@ -28,27 +28,13 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include -LIBEXEC = $(PREFIX)/lib/xen/bin -SHAREDIR = $(PREFIX)/share MANDIR = $(SHAREDIR)/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8 -SBINDIR = $(PREFIX)/sbin -XENFIRMWAREDIR = $(PREFIX)/lib/xen/boot - -PRIVATE_PREFIX = $(LIBDIR)/xen -PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin - -XEN_LOCK_DIR = /var/lock -XEN_RUN_DIR = /var/run/xen -XEN_PAGING_DIR = /var/lib/xen/xenpaging SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR) -XEN_CONFIG_DIR = $(CONFIG_DIR)/xen - BOOT_DIR ?= /boot SOCKET_LIBS =config/SunOS.mk +0
-8@@ -20,18 +20,10 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include MANDIR = $(PREFIX)/share/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8 -SBINDIR = $(PREFIX)/sbin -XENFIRMWAREDIR = $(LIBDIR)/xen/boot - -PRIVATE_PREFIX = $(LIBDIR)/xen -PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin - -XEN_CONFIG_DIR = $(CONFIG_DIR)/xen BOOT_DIR ?= /bootm4/paths.m4 +14
-6@@ -47,7 +47,10 @@ AC_SUBST(SBINDIR) dnl XXX: this should be changed to use the passed $libexec dnl but can be done as a second step -LIBEXEC=$prefix/lib/xen/bin +case "$host_os" in +*netbsd*) LIBEXEC=$prefix/libexec ;; +*) LIBEXEC=$prefix/lib/xen/bin ;; +esac AC_SUBST(LIBEXEC) LIBDIR=`eval echo $libdir`@@ -68,10 +71,11 @@ AC_SUBST(SHAREDIR) PRIVATE_PREFIX=$LIBDIR/xen AC_SUBST(PRIVATE_PREFIX) -PKG_XEN_PREFIX=$LIBDIR/xen -AC_SUBST(PKG_XEN_PREFIX) - -PRIVATE_BINDIR=$PRIVATE_PREFIX/bin +case "$host_os" in +*freebsd*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; +*netbsd*) PRIVATE_BINDIR=$BINDIR ;; +*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; +esac AC_SUBST(PRIVATE_BINDIR) XENFIRMWAREDIR=$prefix/lib/xen/boot@@ -89,7 +93,11 @@ AC_SUBST(XEN_CONFIG_DIR) XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts AC_SUBST(XEN_SCRIPT_DIR) -XEN_LOCK_DIR=/var/lock +case "$host_os" in +*freebsd*) XEN_LOCK_DIR=/var/lib ;; +*netbsd*) XEN_LOCK_DIR=/var/lib ;; +*) XEN_LOCK_DIR=/var/lock ;; +esac AC_SUBST(XEN_LOCK_DIR) XEN_RUN_DIR=/var/run/xen_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 25/46 Use configure --mandir=DIR to set MANDIR
In reply to Olaf Hering--- Config.mk | 1 - config/Paths.mk.in | 1 + config/StdGNU.mk | 1 - config/SunOS.mk | 1 - m4/paths.m4 | 4 ++++ 5 files changed, 5 insertions(+), 3 deletions(-)
Config.mk +0 -1
@@ -59,7 +59,6 @@ include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk DOCDIR ?= $(SHAREDIR)/doc/xen -MANDIR ?= $(SHAREDIR)/man BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d # arguments: variable, common path part, path to test, if yes, if no
config/Paths.mk.in +1 -0
@@ -17,6 +17,7 @@ BINDIR := @BINDIR@ LIBEXEC := @LIBEXEC@ SHAREDIR := @SHAREDIR@ +MANDIR := @MANDIR@ LIBDIR := @LIBDIR@ XEN_RUN_DIR := @XEN_RUN_DIR@
config/StdGNU.mk +0 -1
@@ -29,7 +29,6 @@ INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr INCLUDEDIR = $(PREFIX)/include -MANDIR = $(SHAREDIR)/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
config/SunOS.mk +0 -1
@@ -21,7 +21,6 @@ INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr INCLUDEDIR = $(PREFIX)/include -MANDIR = $(PREFIX)/share/man MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
m4/paths.m4 +4 -0
@@ -68,6 +68,10 @@ AC_SUBST(XEN_LIB_STORED) SHAREDIR=$prefix/share AC_SUBST(SHAREDIR) +dnl double eval because default mandir includes datarootdir, which includes prefix +MANDIR=`eval eval echo $mandir` +AC_SUBST(MANDIR) + PRIVATE_PREFIX=$LIBDIR/xen AC_SUBST(PRIVATE_PREFIX)
Re: [PATCH 25/46] Use configure --mandir=DIR to set MANDIR
m4/paths.m4 AC_SUBST(XEN_LIB_STORED) · line 73
Quoted 11 lines · Olaf Hering
m4/paths.m4 +3
-0@@ -68,6 +68,10 @@ AC_SUBST(XEN_LIB_STORED) SHAREDIR=$prefix/share AC_SUBST(SHAREDIR) +dnl double eval because default mandir includes datarootdir, which includes prefix +MANDIR=`eval eval echo $mandir` +AC_SUBST(MANDIR)
Would it be better to add datarootdir to the "expand these early" at the top, something like
datarootdir=eval echo $datarootdir
?
Quoted 4 lines
m4/paths.m4 +1
-0+ PRIVATE_PREFIX=$LIBDIR/xen AC_SUBST(PRIVATE_PREFIX)
Re: [PATCH 25/46] Use configure --mandir=DIR to set MANDIR
Quoted 9 lines · Ian Campbell
Quoted 8 lines · Olaf Hering
m4/paths.m4 +0
-0@@ -68,6 +68,10 @@ AC_SUBST(XEN_LIB_STORED) SHAREDIR=$prefix/share AC_SUBST(SHAREDIR)
Quoted 8 lines
m4/paths.m4 AC_SUBST(XEN_LIB_STORED) · line 73
Quoted 3 lines
m4/paths.m4 +3
-0+dnl double eval because default mandir includes datarootdir, which includes prefix +MANDIR=`eval eval echo $mandir` +AC_SUBST(MANDIR)Would it be better to add datarootdir to the "expand these early" at the top, something like
datarootdir=eval echo $datarootdir
?
Similarly for the following few patches...
Ideally there would be an autoconf mechanism to allow us to expand all of these vars before we got to the point of using them.
Maybe we are just using it wrong and we should be doing in Paths.mk.in:
prefix=@prefix@
datarootdir=@datarootdir@
mandir=@mandir@
...
MANDIR=\$mandir(or even just switching our code to $mandir). Perhaps looking at what automake would put in Makefile.in for a generic project would be informative?
That would be a bigger change though and I'd be OK with deferring for now.
Ian.
Re: [PATCH 25/46] Use configure --mandir=DIR to set MANDIR
Quoted 7 lines · Ian Campbell
Maybe we are just using it wrong and we should be doing in Paths.mk.in:
prefix=@prefix@ datarootdir=@datarootdir@ mandir=@mandir@ ... MANDIR=\$mandir
Quoted 6 lines
(or even just switching our code to $mandir). Perhaps looking at what automake would put in Makefile.in for a generic project would be informative?
That would be a bigger change though and I'd be OK with deferring for now.
With automake the resulting variables are all lowercase. Perhaps thats the reason why configure uses also lowercase. Just xen uses uppercase for all variables.
So my options are either: expand to lowercase variables and assign to existing uppercase variables later in that file. Or do a treewide conversion from upper to lowercase.
Looks like the simplest change would be to expand all variables from configure in Paths.mk and assign them later to existing variables.
Olaf
Re: [PATCH 25/46] Use configure --mandir=DIR to set MANDIR
Quoted 20 lines · Olaf Hering
Quoted 7 lines · Ian Campbell
Maybe we are just using it wrong and we should be doing in Paths.mk.in:
prefix=@prefix@ datarootdir=@datarootdir@ mandir=@mandir@ ... MANDIR=\$mandirQuoted 6 lines
(or even just switching our code to $mandir). Perhaps looking at what automake would put in Makefile.in for a generic project would be informative?
That would be a bigger change though and I'd be OK with deferring for now.
With automake the resulting variables are all lowercase. Perhaps thats the reason why configure uses also lowercase. Just xen uses uppercase for all variables.
Quoted 6 lines
So my options are either: expand to lowercase variables and assign to existing uppercase variables later in that file. Or do a treewide conversion from upper to lowercase.
Looks like the simplest change would be to expand all variables from configure in Paths.mk and assign them later to existing variables.
Ack.
PATCH 26/46 Use configure --docdir=DIR to set DOCDIR
In reply to Olaf Hering--- Config.mk | 1 - config/Paths.mk.in | 1 + m4/paths.m4 | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-)
Config.mk +0 -1
@@ -58,7 +58,6 @@ endif include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk -DOCDIR ?= $(SHAREDIR)/doc/xen BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d # arguments: variable, common path part, path to test, if yes, if no
config/Paths.mk.in +1 -0
@@ -18,6 +18,7 @@ LIBEXEC := @LIBEXEC@ SHAREDIR := @SHAREDIR@ MANDIR := @MANDIR@ +DOCDIR := @DOCDIR@ LIBDIR := @LIBDIR@ XEN_RUN_DIR := @XEN_RUN_DIR@
m4/paths.m4 +4 -0
@@ -72,6 +72,10 @@ dnl double eval because default mandir includes datarootdir, which includes pref MANDIR=`eval eval echo $mandir` AC_SUBST(MANDIR) +dnl double eval because default docdir includes datarootdir, which includes prefix +DOCDIR=`eval eval echo $docdir` +AC_SUBST(DOCDIR) + PRIVATE_PREFIX=$LIBDIR/xen AC_SUBST(PRIVATE_PREFIX)
PATCH 27/46 Use configure --includedir=DIR to set INCLUDEDIR
In reply to Olaf Hering--- config/Paths.mk.in | 1 + config/StdGNU.mk | 1 - config/SunOS.mk | 1 - m4/paths.m4 | 3 +++ 4 files changed, 4 insertions(+), 2 deletions(-)
config/Paths.mk.in +1 -0
@@ -16,6 +16,7 @@ SBINDIR := @SBINDIR@ BINDIR := @BINDIR@ LIBEXEC := @LIBEXEC@ +INCLUDEDIR := @INCLUDEDIR@ SHAREDIR := @SHAREDIR@ MANDIR := @MANDIR@ DOCDIR := @DOCDIR@
config/StdGNU.mk +0 -1
@@ -28,7 +28,6 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -INCLUDEDIR = $(PREFIX)/include MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
config/SunOS.mk +0 -1
@@ -20,7 +20,6 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p PREFIX ?= /usr -INCLUDEDIR = $(PREFIX)/include MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
m4/paths.m4 +3 -0
@@ -45,6 +45,9 @@ AC_SUBST(BINDIR) SBINDIR=$prefix/sbin AC_SUBST(SBINDIR) +INCLUDEDIR=`eval echo $includedir` +AC_SUBST(INCLUDEDIR) + dnl XXX: this should be changed to use the passed $libexec dnl but can be done as a second step case "$host_os" in
PATCH 28/46 Use configure --libexecdir=BASEDIR to set LIBEXEC
In reply to Olaf HeringThe current usage of LIBEXEC is bogus. It describes the directory for private xen executables. Other places create their own, similar libexecdir path as $prefix/lib/xen/*.
Additional two other variables are used to describe similar paths:PRIVATE_BINDIR and PRIVATE_PREFIX
The autotools configuration refers to libexec as a directory for executables and stuff which is called by other programs, not by the user.
Adjust all places that want libexecdir as a target path. LIBEXEC refers now to the base directory. Three convenience variables are used to refer to paths to private binaries, libs and include files.
Most users of LIBEXEC are updated to use LIBEXEC_BIN because that is what they want.
Users of PRIVATE_BINDIR are updated to use LIBEXEC_BIN because that is what they want.
An internal libxl function was removed. A single helper to retrieve LIBEXEC_BIN remains.
As suggested by the docs, configure appends the package name to LIBEXEC to make sure the provided directory really refers to xen. This makes sure "make uninstall" preserves the real libexecdir.
--- Config.mk | 2 +- config/Paths.mk.in | 6 ++-- m4/paths.m4 | 34 ++++++++++++---------- stubdom/Makefile | 6 ++-- tools/Makefile | 10 +++---- tools/console/Makefile | 4 +-- tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- tools/hotplug/FreeBSD/vif-bridge | 2 +- tools/hotplug/Linux/Makefile | 4 +-- tools/hotplug/Linux/init.d/xencommons.in.in | 4 +-- tools/hotplug/Linux/init.d/xendomains.in | 12 ++++---- .../systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- tools/hotplug/Linux/systemd/xendomains.service.in | 6 ++-- tools/hotplug/Linux/xen-hotplug-common.sh.in | 2 +- tools/hotplug/NetBSD/block | 2 +- tools/hotplug/NetBSD/rc.d/xencommons | 2 +- tools/hotplug/NetBSD/vif-bridge | 2 +- tools/hotplug/NetBSD/vif-ip | 2 +- tools/libxl/Makefile | 6 ++-- tools/libxl/libxl_dm.c | 4 +-- tools/libxl/libxl_internal.h | 1 - tools/libxl/libxl_paths.c | 7 +---- tools/libxl/libxl_save_callout.c | 2 +- tools/misc/Makefile | 4 +-- tools/pygrub/Makefile | 8 ++--- tools/vtpmmgr/Makefile | 6 ++-- tools/xcutils/Makefile | 4 +-- tools/xenpaging/Makefile | 4 +-- tools/xentrace/Makefile | 4 +-- 29 files changed, 75 insertions(+), 79 deletions(-)
Config.mk +1 -1
@@ -162,7 +162,7 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef -BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \ +BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBEXEC_BIN LIBDIR SHAREDIR \ XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \ XEN_RUN_DIR XEN_PAGING_DIR
config/Paths.mk.in +3 -3
@@ -15,6 +15,9 @@ SBINDIR := @SBINDIR@ BINDIR := @BINDIR@ LIBEXEC := @LIBEXEC@ +LIBEXEC_BIN := @LIBEXEC_BIN@ +LIBEXEC_LIB := @LIBEXEC_LIB@ +LIBEXEC_INC := @LIBEXEC_INC@ INCLUDEDIR := @INCLUDEDIR@ SHAREDIR := @SHAREDIR@
@@ -31,9 +34,6 @@ INITD_DIR := @INITD_DIR@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@ -PRIVATE_PREFIX := @PRIVATE_PREFIX@ -PRIVATE_BINDIR := @PRIVATE_BINDIR@ - XENFIRMWAREDIR := @XENFIRMWAREDIR@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@
m4/paths.m4 +18 -16
@@ -48,13 +48,25 @@ AC_SUBST(SBINDIR) INCLUDEDIR=`eval echo $includedir` AC_SUBST(INCLUDEDIR) -dnl XXX: this should be changed to use the passed $libexec -dnl but can be done as a second step -case "$host_os" in -*netbsd*) LIBEXEC=$prefix/libexec ;; -*) LIBEXEC=$prefix/lib/xen/bin ;; -esac +if test "x$libexecdir" = 'x${exec_prefix}/libexec' ; then + case "$host_os" in + *netbsd*) + libexecdir=$prefix/libexec + ;; + *) + libexecdir=$prefix/lib + ;; + esac +fi +dnl %configure uses --libexec=%libdir, so append package name +LIBEXEC=`eval echo $libexecdir/xen` +LIBEXEC_BIN=$LIBEXEC/bin +LIBEXEC_LIB=$LIBEXEC/lib +LIBEXEC_INC=$LIBEXEC/include AC_SUBST(LIBEXEC) +AC_SUBST(LIBEXEC_BIN) +AC_SUBST(LIBEXEC_LIB) +AC_SUBST(LIBEXEC_INC) LIBDIR=`eval echo $libdir` AC_SUBST(LIBDIR)
@@ -79,16 +91,6 @@ dnl double eval because default docdir includes datarootdir, which includes pref DOCDIR=`eval eval echo $docdir` AC_SUBST(DOCDIR) -PRIVATE_PREFIX=$LIBDIR/xen -AC_SUBST(PRIVATE_PREFIX) - -case "$host_os" in -*freebsd*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; -*netbsd*) PRIVATE_BINDIR=$BINDIR ;; -*) PRIVATE_BINDIR=$PRIVATE_PREFIX/bin ;; -esac -AC_SUBST(PRIVATE_BINDIR) - XENFIRMWAREDIR=$prefix/lib/xen/boot AC_SUBST(XENFIRMWAREDIR)
stubdom/Makefile +3 -3
@@ -460,9 +460,9 @@ install-readme: $(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.stubdom install-ioemu: ioemu-stubdom - $(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC)" - $(INSTALL_PROG) stubdom-dm "$(DESTDIR)$(LIBEXEC)" - $(INSTALL_DATA) stubdompath.sh "$(DESTDIR)$(LIBEXEC)" + $(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC_BIN)" + $(INSTALL_PROG) stubdom-dm "$(DESTDIR)$(LIBEXEC_BIN)" + $(INSTALL_DATA) stubdompath.sh "$(DESTDIR)$(LIBEXEC_BIN)" $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)" $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-ioemu/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/ioemu-stubdom.gz"
tools/Makefile +5 -5
@@ -86,7 +86,7 @@ uninstall: rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil* rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub rm -rf $(D)$(LIBDIR)/xen/ - rm -rf $(D)$(LIBEXEC)/xen* + rm -rf $(D)$(LIBEXEC) rm -rf $(D)$(SBINDIR)/setmask rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm rm -rf $(D)$(SHAREDIR)/doc/xen
@@ -187,9 +187,9 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find cd qemu-xen-dir; \ $$source/configure --enable-xen --target-list=i386-softmmu \ $(QEMU_XEN_ENABLE_DEBUG) \ - --prefix=$(PREFIX)/lib/xen \ - --libdir=$(PREFIX)/lib/xen/lib \ - --includedir=$(PREFIX)/lib/xen/include \ + --prefix=$(LIBEXEC) \ + --libdir=$(LIBEXEC_LIB) \ + --includedir=$(LIBEXEC_INC) \ --source-path=$$source \ --extra-cflags="-I$(XEN_ROOT)/tools/include \ -I$(XEN_ROOT)/tools/libxc \
@@ -199,7 +199,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \ -L$(XEN_ROOT)/tools/xenstore \ -Wl,-rpath=$(PREFIX)/lib/xen/lib" \ - --bindir=$(LIBEXEC) \ + --bindir=$(LIBEXEC_BIN) \ --datadir=$(SHAREDIR)/qemu-xen \ --localstatedir=/var \ --disable-kvm \
tools/console/Makefile +2 -2
@@ -32,7 +32,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c)) install: $(BIN) $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR) $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR) - $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) - $(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) -include $(DEPS)
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
@@ -65,7 +65,7 @@ xen_startcmd() printf "\n" printf "Setting domain 0 name, domid and JSON config...\n" - ${PRIVATE_BINDIR}/xen-init-dom0 + ${LIBEXEC_BIN}/xen-init-dom0 } xen_stop()
tools/hotplug/FreeBSD/vif-bridge +1 -1
@@ -13,7 +13,7 @@ DIR=$(dirname "$0") . "${DIR}/hotplugpath.sh" -PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin export PATH path=$1
tools/hotplug/Linux/Makefile +2 -2
@@ -54,8 +54,8 @@ install: all install-initd install-scripts install-udev subdirs-install install-initd: all [ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) [ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) - [ -d $(DESTDIR)$(LIBEXEC) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC) - $(INSTALL_PROG) $(XENDOMAINS_LIBEXEC) $(DESTDIR)$(LIBEXEC) + [ -d $(DESTDIR)$(LIBEXEC_BIN) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(XENDOMAINS_LIBEXEC) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(INITD_DIR) $(INSTALL_DATA) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(SYSCONFIG_DIR)/xendomains $(INSTALL_PROG) $(XENCOMMONS_INITD) $(DESTDIR)$(INITD_DIR)
tools/hotplug/Linux/init.d/xencommons.in.in +2 -2
@@ -92,14 +92,14 @@ do_start () { fi echo Setting domain 0 name, domid and JSON config... - ${PRIVATE_BINDIR}/xen-init-dom0 + ${LIBEXEC_BIN}/xen-init-dom0 fi echo Starting xenconsoled... test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE" ${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS echo Starting QEMU as disk backend for dom0 - test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC}/qemu-system-i386" + test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386" $QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ -pidfile $QEMU_PIDFILE
tools/hotplug/Linux/init.d/xendomains.in +6 -6
@@ -20,7 +20,7 @@ # Short-Description: Wrapper to start/stop secondary xen domains # Description: Wrapper for starting / stopping domains automatically # when domain 0 boots / shuts down on systems using init. -# The $LIBEXEC/xendomains helper is shared between init and +# The $LIBEXEC_BIN/xendomains helper is shared between init and # systemd systems. ### END INIT INFO
@@ -28,19 +28,19 @@ case "$1" in start) - $LIBEXEC/xendomains start + $LIBEXEC_BIN/xendomains start ;; stop) - $LIBEXEC/xendomains stop + $LIBEXEC_BIN/xendomains stop ;; restart) - $LIBEXEC/xendomains restart + $LIBEXEC_BIN/xendomains restart ;; reload) - $LIBEXEC/xendomains reload + $LIBEXEC_BIN/xendomains reload ;; status) - $LIBEXEC/xendomains status + $LIBEXEC_BIN/xendomains status ;; *) echo "Usage: $0 {start|stop|restart|reload|status}"
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -1
@@ -13,7 +13,7 @@ EnvironmentFile=-/etc/sysconfig/xenstored PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities ExecStartPre=/bin/mkdir -p /var/run/xen -ExecStart=@LIBEXEC@/qemu-system-i386 -xen-domid 0 \ +ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ -pidfile @XEN_RUN_DIR@/qemu-dom0.pid
tools/hotplug/Linux/systemd/xendomains.service.in +3 -3
@@ -8,9 +8,9 @@ ConditionVirtualization=xen Type=oneshot RemainAfterExit=true ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities -ExecStart=-@LIBEXEC@/xendomains start -ExecStop=@LIBEXEC@/xendomains stop -ExecReload=@LIBEXEC@/xendomains restart +ExecStart=-@LIBEXEC_BIN@/xendomains start +ExecStop=@LIBEXEC_BIN@/xendomains stop +ExecReload=@LIBEXEC_BIN@/xendomains restart [Install] WantedBy=multi-user.target
tools/hotplug/Linux/xen-hotplug-common.sh.in +1 -1
@@ -30,7 +30,7 @@ dir=$(dirname "$0") exec 2>>/var/log/xen/xen-hotplug.log -export PATH="${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH" +export PATH="${BINDIR}:${SBINDIR}:${LIBEXEC_BIN}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH" export LD_LIBRARY_PATH="${LIBDIR}${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH" export LANG="POSIX" unset $(set | grep ^LC_ | cut -d= -f1)
tools/hotplug/NetBSD/block +1 -1
@@ -7,7 +7,7 @@ DIR=$(dirname "$0") . "${DIR}/hotplugpath.sh" -PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin export PATH error() {
tools/hotplug/NetBSD/rc.d/xencommons +1 -1
@@ -69,7 +69,7 @@ xen_startcmd() printf "\n" printf "Setting domain 0 name, domid and JSON config...\n" - ${PRIVATE_BINDIR}/xen-init-dom0 + ${LIBEXEC_BIN}/xen-init-dom0 } xen_stop()
tools/hotplug/NetBSD/vif-bridge +1 -1
@@ -7,7 +7,7 @@ DIR=$(dirname "$0") . "${DIR}/hotplugpath.sh" -PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin export PATH xpath=$1
tools/hotplug/NetBSD/vif-ip +1 -1
@@ -7,7 +7,7 @@ DIR=$(dirname "$0") . "${DIR}/hotplugpath.sh" -PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin +PATH=${BINDIR}:${SBINDIR}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin export PATH xpath=$1
tools/libxl/Makefile +3 -3
@@ -239,10 +239,10 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR) - $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR) - $(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(PRIVATE_BINDIR) - $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR) $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
tools/libxl/libxl_dm.c +2 -2
@@ -38,7 +38,7 @@ static const char *qemu_xen_path(libxl__gc *gc)#ifdef QEMU_XEN_PATH return QEMU_XEN_PATH ;#else -return libxl__abs_path (gc,"qemu-system-i386" ,libxl__libexec_path ()); +return libxl__abs_path (gc,"qemu-system-i386" ,libxl__private_bindir_path ());#endif }
@@ -73,7 +73,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, }else {switch (info->device_model_version) {case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : - dm =libxl__abs_path (gc,"qemu-dm" ,libxl__libexec_path ()); + dm =libxl__abs_path (gc,"qemu-dm" ,libxl__private_bindir_path ());break ;case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : dm =qemu_xen_path (gc);
tools/libxl/libxl_internal.h +0 -1
@@ -2070,7 +2070,6 @@ _hidden int libxl__carefd_close(libxl__carefd*); _hidden int libxl__carefd_fd(const libxl__carefd*);/* common paths */ -_hidden const char *libxl__libexec_path(void); _hidden const char *libxl__private_bindir_path(void); _hidden const char *libxl__xenfirmwaredir_path(void); _hidden const char *libxl__xen_config_dir_path(void);
tools/libxl/libxl_paths.c +1 -6
@@ -15,14 +15,9 @@#include "libxl_osdeps.h" /* must come before any other headers */ #include "libxl_internal.h" -const char *libxl__libexec_path (void ) -{ -return LIBEXEC ; -} -const char *libxl__private_bindir_path (void ) { -return PRIVATE_BINDIR ; +return LIBEXEC_BIN ; }const char *libxl__xenfirmwaredir_path (void )
tools/libxl/libxl_save_callout.c +1 -1
@@ -174,7 +174,7 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs, shs->stdout_what =GCSPRINTF ("domain %" PRIu32" save/restore helper" " stdout pipe" , domid); - *arg++ =getenv ("LIBXL_SAVE_HELPER" ) ?:PRIVATE_BINDIR "/" "libxl-save-helper" ; + *arg++ =getenv ("LIBXL_SAVE_HELPER" ) ?:LIBEXEC_BIN "/" "libxl-save-helper" ; *arg++ = mode_arg;const char **stream_fd_arg = arg++;for (i=0 ; i<num_argnums; i++)
tools/misc/Makefile +2 -2
@@ -43,10 +43,10 @@ build: $(TARGETS) install: build $(INSTALL_DIR) $(DESTDIR)$(BINDIR) $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) - $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR) $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR) - $(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN) set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done .PHONY: clean
tools/pygrub/Makefile +4 -4
@@ -12,11 +12,11 @@ build: install: all CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py install \ $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ - --install-scripts=$(PRIVATE_BINDIR) --force - set -e; if [ $(BINDIR) != $(PRIVATE_BINDIR) -a \ + --install-scripts=$(LIBEXEC_BIN) --force + set -e; if [ $(BINDIR) != $(LIBEXEC_BIN) -a \ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \ - "`readlink -f $(PRIVATE_BINDIR)`" ]; then \ - ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \ + "`readlink -f $(LIBEXEC_BIN)`" ]; then \ + ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(BINDIR); \ fi .PHONY: clean
tools/vtpmmgr/Makefile +3 -3
@@ -5,9 +5,9 @@ all: @true install: - $(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC)" - $(INSTALL_DATA) calc.pl "$(DESTDIR)$(LIBEXEC)" - $(INSTALL_DATA) manage-vtpmmgr.pl "$(DESTDIR)$(LIBEXEC)" + $(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC_BIN)" + $(INSTALL_DATA) calc.pl "$(DESTDIR)$(LIBEXEC_BIN)" + $(INSTALL_DATA) manage-vtpmmgr.pl "$(DESTDIR)$(LIBEXEC_BIN)" clean: @true
tools/xcutils/Makefile +2 -2
@@ -32,8 +32,8 @@ lsevtchn: lsevtchn.o .PHONY: install install: build - $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) - $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(LIBEXEC_BIN) .PHONY: clean
tools/xenpaging/Makefile +2 -2
@@ -24,8 +24,8 @@ xenpaging: $(OBJS) install: all $(INSTALL_DIR) -m 0700 $(DESTDIR)$(XEN_PAGING_DIR) - $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC) - $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC_BIN) clean: rm -f *.o *~ $(DEPS) xen TAGS $(IBINS) $(LIB)
tools/xentrace/Makefile +2 -2
@@ -21,12 +21,12 @@ build: $(BIN) $(LIBBIN) .PHONY: install install: build $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) + [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR) $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR) $(INSTALL_PROG) $(BIN) $(DESTDIR)$(BINDIR) $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR) - [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR) + [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR) $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
Re: [PATCH 28/46] Use configure --libexecdir=BASEDIR to set LIBEXEC
Quoted 10 lines · Olaf Hering
The current usage of LIBEXEC is bogus. It describes the directory for private xen executables. Other places create their own, similar libexecdir path as $prefix/lib/xen/*.
Additional two other variables are used to describe similar paths:
PRIVATE_BINDIRandPRIVATE_PREFIXThe autotools configuration refers to libexec as a directory for executables and stuff which is called by other programs, not by the user.
IIRC that definition flows from either the FHS or the GNU coding standards.
Quoted 9 lines
Adjust all places that want libexecdir as a target path. LIBEXEC refers now to the base directory. Three convenience variables are used to refer to paths to private binaries, libs and include files.
Most users of LIBEXEC are updated to use
LIBEXEC_BINbecause that is what they want.Users of
PRIVATE_BINDIRare updated to useLIBEXEC_BINbecause that is what they want.
Is the end result of this that anything is moved by default? Please state it here either way.
Quoted 4 lines
An internal libxl function was removed. A single helper to retrieve
LIBEXEC_BINremains.As suggested by the docs,
which docs?
Quoted 6 lines
m4/paths.m4 +0
-6-dnl XXX: this should be changed to use the passed $libexec -dnl but can be done as a second step -case "$host_os" in -*netbsd*) LIBEXEC=$prefix/libexec ;; -*) LIBEXEC=$prefix/lib/xen/bin ;; -esac
m4/paths.m4 AC_SUBST(SBINDIR) · line 60
Quoted 10 lines
m4/paths.m4 +10
-0+if test "x$libexecdir" = 'x${exec_prefix}/libexec' ; then + case "$host_os" in + *netbsd*) + libexecdir=$prefix/libexec + ;; + *) + libexecdir=$prefix/lib + ;; + esac +fi
I'm wondering if we should just accept the autoconf default here. Distros which differ from that default (Debian? I thought RPM distros used libexec) are presumably used to passing ---with-libexecdir=.
Ian.
Re: [PATCH 28/46] Use configure --libexecdir=BASEDIR to set LIBEXEC
Quoted 6 lines · Ian Campbell
Quoted 3 lines · Olaf Hering
The autotools configuration refers to libexec as a directory for executables and stuff which is called by other programs, not by the user.
IIRC that definition flows from either the FHS or the GNU coding standards.
The above sentence should have been "autotools documentation".
Quoted 4 lines
Quoted 4 lines
Adjust all places that want libexecdir as a target path. LIBEXEC refers now to the base directory. Three convenience variables are used to refer to paths to private binaries, libs and include files.
Quoted 8 lines
Quoted 5 lines
Most users of LIBEXEC are updated to use
LIBEXEC_BINbecause that is what they want.Users of
PRIVATE_BINDIRare updated to useLIBEXEC_BINbecause that is what they want.Is the end result of this that anything is moved by default? Please state it here either way.
No change in paths is expected by this change.
Quoted 3 lines
Quoted 1 line
As suggested by the docs,
which docs?
The autoconf docs, they suggest $libexec/$package_name as target dir. Will update the commit msg to make this clear.
Quoted 12 lines
Quoted 12 lines
m4/paths.m4 +6
-6-dnl XXX: this should be changed to use the passed $libexec -dnl but can be done as a second step -case "$host_os" in -*netbsd*) LIBEXEC=$prefix/libexec ;; -*) LIBEXEC=$prefix/lib/xen/bin ;; -esac +if test "x$libexecdir" = 'x${exec_prefix}/libexec' ; then + case "$host_os" in + *netbsd*) + libexecdir=$prefix/libexec + ;; + *)
Quoted 8 lines
m4/paths.m4 AC_SUBST(SBINDIR) · line 60
Quoted 4 lines
m4/paths.m4 +4
-0+ libexecdir=$prefix/lib + ;; + esac +fiI'm wondering if we should just accept the autoconf default here. Distros which differ from that default (Debian? I thought RPM distros used libexec) are presumably used to passing ---with-libexecdir=.
At least SUSE uses /usr/lib as libexec. Also the rpm %configure macro uses %prefix/lib. So its up to the configure scripts to append "package name". I will check what other packages do, but I think my change is correct in that part.
Regarding libexec/ vs. lib/: it would change existing behaviour. In the end it would most likely not matter because the tools find the binaries anyway. Stuff will just end up in different directories. Existing domU.cfg files, which refer to a hardcoded path to qemu, hvmloader or whatever will need an update. Perhaps the offending line can be removed altogether from domU.cfg.
So if you want, the hunk above can be changed to a plain LIBEXEC=$libexecdir/xen
Olaf
Re: [PATCH 28/46] Use configure --libexecdir=BASEDIR to set LIBEXEC
Quoted 21 lines · Olaf Hering
Quoted 12 lines
Quoted 12 lines
m4/paths.m4 +6
-6-dnl XXX: this should be changed to use the passed $libexec -dnl but can be done as a second step -case "$host_os" in -*netbsd*) LIBEXEC=$prefix/libexec ;; -*) LIBEXEC=$prefix/lib/xen/bin ;; -esac +if test "x$libexecdir" = 'x${exec_prefix}/libexec' ; then + case "$host_os" in + *netbsd*) + libexecdir=$prefix/libexec + ;; + *)Quoted 8 lines
m4/paths.m4 AC_SUBST(SBINDIR) · line 60
Quoted 4 lines
m4/paths.m4 +4
-0+ libexecdir=$prefix/lib + ;; + esac +fiI'm wondering if we should just accept the autoconf default here. Distros which differ from that default (Debian? I thought RPM distros used libexec) are presumably used to passing ---with-libexecdir=.
Quoted 1 line
At least SUSE uses
/usr/libas libexec.
I stand corrected then.
Quoted 3 lines
So its up to the configure scripts to append "package name". I will check what other packages do, but I think my change is correct in that part.
Yes I agree, it was the prefix bit I was wondering about.
Quoted 8 lines
Regarding libexec/ vs.
lib/: it would change existing behaviour. In the end it would most likely not matter because the tools find the binaries anyway. Stuff will just end up in different directories. Existing domU.cfg files, which refer to a hardcoded path to qemu, hvmloader or whatever will need an update. Perhaps the offending line can be removed altogether from domU.cfg.So if you want, the hunk above can be changed to a plain LIBEXEC=$libexecdir/xen
We certainly shouldn't change it at the same time as this change. If at all it should be done as a separate change of the default. Perhaps we should revisit all the places where we deviate from/override the autoconf defaults after 4.5 instead of doing it now?
Ian.
PATCH 29/46 Use configure --prefix=DIR to set PREFIX
In reply to Olaf HeringPREFIX is set by configure --prefix=DIR, nothing outside tools,docs,stubdom is using this variable.
--- config/StdGNU.mk | 1 - config/SunOS.mk | 1 - 2 files changed, 2 deletions(-)
config/StdGNU.mk +0 -1
@@ -27,7 +27,6 @@ INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -PREFIX ?= /usr MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
config/SunOS.mk +0 -1
@@ -19,7 +19,6 @@ INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -PREFIX ?= /usr MAN1DIR = $(MANDIR)/man1 MAN8DIR = $(MANDIR)/man8
Re: [PATCH 29/46] Use configure --prefix=DIR to set PREFIX
Quoted 4 lines · Olaf Hering
PREFIX is set by configure --prefix=DIR, nothing outside tools,docs,stubdom is using this variable.
Signed-off-by Olaf Hering <[email protected]>
PATCH 30/46 Use configure --localstatedir=BASEDIR to set path to /var
In reply to Olaf HeringThis is helpful to test make uninstall with --prefix=/private/dir as unprivileged user. No change in behaviour is expected by this change.
--- m4/paths.m4 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
m4/paths.m4 +11 -8
@@ -2,6 +2,9 @@ AC_DEFUN([AX_XEN_EXPAND_CONFIG], [ dnl expand these early so we can use this for substitutions test "x$prefix" = "xNONE" && prefix=$ac_default_prefix test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix} +if test "x$localstatedir" = 'x${prefix}/var' ; then + localstatedir=/var +fi dnl if test "x$sysconfdir" = 'x${prefix}/etc' ; then
@@ -71,13 +74,13 @@ AC_SUBST(LIBEXEC_INC) LIBDIR=`eval echo $libdir` AC_SUBST(LIBDIR) -XEN_RUN_DIR=/var/run/xen +XEN_RUN_DIR=$localstatedir/run/xen AC_SUBST(XEN_RUN_DIR) -XEN_LOG_DIR=/var/log/xen +XEN_LOG_DIR=$localstatedir/log/xen AC_SUBST(XEN_LOG_DIR) -XEN_LIB_STORED=/var/lib/xenstored +XEN_LIB_STORED=$localstatedir/lib/xenstored AC_SUBST(XEN_LIB_STORED) SHAREDIR=$prefix/share
@@ -107,15 +110,15 @@ XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts AC_SUBST(XEN_SCRIPT_DIR) case "$host_os" in -*freebsd*) XEN_LOCK_DIR=/var/lib ;; -*netbsd*) XEN_LOCK_DIR=/var/lib ;; -*) XEN_LOCK_DIR=/var/lock ;; +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;; esac AC_SUBST(XEN_LOCK_DIR) -XEN_RUN_DIR=/var/run/xen +XEN_RUN_DIR=$localstatedir/run/xen AC_SUBST(XEN_RUN_DIR) -XEN_PAGING_DIR=/var/lib/xen/xenpaging +XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging AC_SUBST(XEN_PAGING_DIR) ])
Re: [PATCH 30/46] Use configure --localstatedir=BASEDIR to set path to /var
Quoted 2 lines · Olaf Hering
This is helpful to test make uninstall with --prefix=/private/dir as unprivileged user. No change in behaviour is expected by this change.
It would be worth noting here that this is somewhere where we (already) conciously decided to deviate from the default autoconf behaviour in favour of the FHS location for this stuff (which is /var
not /usr/local/var). So this change preserves our chosen default while now enabling the configure option to work.
m4/paths.m4 AC_DEFUN([AX_XEN_EXPAND_CONFIG], [ · line 4
Quoted 13 lines
Signed-off-by Olaf Hering <[email protected]>--- m4/paths.m4 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)m4/paths.m4 +0
-0@@ -2,6 +2,9 @@ AC_DEFUN([AX_XEN_EXPAND_CONFIG], [ dnl expand these early so we can use this for substitutions test "x$prefix" = "xNONE" && prefix=$ac_default_prefix test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
It might be worth reiterating some of what I said above in a comment here too.
m4/paths.m4 XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts · line 115
Quoted 7 lines
m4/paths.m4 +3
-3case "$host_os" in -*freebsd*) XEN_LOCK_DIR=/var/lib ;; -*netbsd*) XEN_LOCK_DIR=/var/lib ;; -*) XEN_LOCK_DIR=/var/lock ;; +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;;
I've been continually surprised in this series that autoconf doesn't just Do The Right Thing on different $host_os's. I thought that was the point of it.
Oh well, not your fault here (or in the other places).
Apart from the commit message/comment additions the code here looks correct to me.
Ian.
Re: [PATCH 30/46] Use configure --localstatedir=BASEDIR to set path to /var
Quoted 11 lines · Ian Campbell
m4/paths.m4 XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts · line 115
Quoted 7 lines
case "$host_os" in
m4/paths.m4 +3
-3-*freebsd*) XEN_LOCK_DIR=/var/lib ;; -*netbsd*) XEN_LOCK_DIR=/var/lib ;; -*) XEN_LOCK_DIR=/var/lock ;; +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;;I've been continually surprised in this series that autoconf doesn't just Do The Right Thing on different $host_os's. I thought that was the point of it.
I'm not sure what you mean. autoconf has no knowledge of a lockdir AFAICS. Its just that BSD puts the locks in /var/lib instead of /var/lock, so there has to be a place to describe that.
Olaf
Re: [PATCH 30/46] Use configure --localstatedir=BASEDIR to set path to /var
Quoted 14 lines · Olaf Hering
Quoted 11 lines · Ian Campbell
m4/paths.m4 XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts · line 115
Quoted 7 lines
case "$host_os" in
m4/paths.m4 +3
-3-*freebsd*) XEN_LOCK_DIR=/var/lib ;; -*netbsd*) XEN_LOCK_DIR=/var/lib ;; -*) XEN_LOCK_DIR=/var/lock ;; +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;;I've been continually surprised in this series that autoconf doesn't just Do The Right Thing on different $host_os's. I thought that was the point of it.
Quoted 2 lines
I'm not sure what you mean. autoconf has no knowledge of a lockdir AFAICS.
Right, and since this is something which varies between systems this surprises me...
Quoted 2 lines
Its just that BSD puts the locks in
/var/libinstead of/var/lock, so there has to be a place to describe that.
Understood, I just wonder why autoconf doesn't do it for us (not just here but most place that check $host_os)
Ian.
PATCH 31/46 Add configure --enable-rpath
In reply to Olaf HeringThis fixes the tools when xen is configured with --prefix=/odd/path
--- Config.mk | 3 +++ config/Tools.mk.in | 2 ++ tools/Makefile | 15 +++++++++++++-- tools/configure.ac | 1 + tools/ocaml/xenstored/Makefile | 1 + 5 files changed, 20 insertions(+), 2 deletions(-)
Config.mk +3 -0
@@ -208,6 +208,9 @@ LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) LDFLAGS += $(foreach i, $(PREPEND_LIB), -L$(i)) CFLAGS += $(foreach i, $(PREPEND_INCLUDES), -I$(i)) +ifeq ($(XEN_TOOLS_RPATH),y) +APPEND_LDFLAGS += -Wl,-rpath,$(LIBDIR) +endif APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i)) APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
config/Tools.mk.in +2 -0
@@ -43,6 +43,8 @@ PTHREAD_LIBS := @PTHREAD_LIBS@ PTYFUNCS_LIBS := @PTYFUNCS_LIBS@ +XEN_TOOLS_RPATH := @rpath@ + # Download GIT repositories via HTTP or GIT's own protocol? # GIT's protocol is faster and more robust, when it works at all (firewalls # may block it). We make it the default, but if your GIT repository downloads
tools/Makefile +13 -2
@@ -111,6 +111,14 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \ --interp-prefix=$(CROSS_SYS_ROOT) endif +ifeq ($(XEN_TOOLS_RPATH),y) +QEMU_UPSTREAM_RPATH := -Wl,-rpath,$(LIBEXEC_LIB):$(LIBDIR) +IOEMU_EXTRA_LDFLAGS := --extra-ldflags="-Wl,-rpath,$(LIBDIR)" +else +QEMU_UPSTREAM_RPATH := -Wl,-rpath,$(LIBEXEC_LIB) +IOEMU_EXTRA_LDFLAGS := +endif + QEMU_ROOT := $(shell if [ -d "$(QEMU_TRADITIONAL_LOC)" ]; then echo "$(QEMU_TRADITIONAL_LOC)"; else echo .; fi) ifneq ($(QEMU_ROOT),.) export QEMU_ROOT
@@ -146,7 +154,9 @@ subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find set -e; \ $(buildmakevars2shellvars); \ cd qemu-xen-traditional-dir; \ - $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \ + $(QEMU_ROOT)/xen-setup \ + $(IOEMU_EXTRA_LDFLAGS) \ + $(IOEMU_CONFIGURE_CROSS); \ $(MAKE) all subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
@@ -155,6 +165,7 @@ subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find cd qemu-xen-traditional-dir; \ $(QEMU_ROOT)/xen-setup \ --extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \ + $(IOEMU_EXTRA_LDFLAGS) \ $(IOEMU_CONFIGURE_CROSS); \ $(MAKE) install
@@ -198,7 +209,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find $(EXTRA_CFLAGS_QEMU_XEN)" \ --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \ -L$(XEN_ROOT)/tools/xenstore \ - -Wl,-rpath=$(PREFIX)/lib/xen/lib" \ + $(QEMU_UPSTREAM_RPATH)" \ --bindir=$(LIBEXEC_BIN) \ --datadir=$(SHAREDIR)/qemu-xen \ --localstatedir=/var \
tools/configure.ac +1 -0
@@ -80,6 +80,7 @@ m4_include([../m4/systemd.m4]) AX_XEN_EXPAND_CONFIG() # Enable/disable options +AX_ARG_DEFAULT_DISABLE([rpath], [Build tools with -Wl,-rpath,LIBDIR]) AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP]) AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools]) AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
tools/ocaml/xenstored/Makefile +1 -0
@@ -8,6 +8,7 @@ LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) CFLAGS += $(CFLAGS-y) LDFLAGS += $(LDFLAGS-y) +LDFLAGS += $(APPEND_LDFLAGS) OCAMLINCLUDE += \ -I $(OCAML_TOPLEVEL)/libs/xb \
Re: [PATCH 31/46] Add configure --enable-rpath
Quoted 16 lines · Olaf Hering
This fixes the tools when xen is configured with --prefix=/odd/path
Signed-off-by Olaf Hering <[email protected]>--- Config.mk | 3 +++ config/Tools.mk.in | 2 ++ tools/Makefile | 15 +++++++++++++-- tools/configure.ac | 1 + tools/ocaml/xenstored/Makefile | 1 + 5 files changed, 20 insertions(+), 2 deletions(-)Config.mk +0
-0
Config.mk LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) · line 213
Quoted 6 lines
Config.mk +3
-0@@ -208,6 +208,9 @@ LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) LDFLAGS += $(foreach i, $(PREPEND_LIB), -L$(i)) CFLAGS += $(foreach i, $(PREPEND_INCLUDES), -I$(i)) +ifeq ($(XEN_TOOLS_RPATH),y) +APPEND_LDFLAGS += -Wl,-rpath,$(LIBDIR) +endif
I thought APPEND_* was for user supplied things? Shouldn't this be just LDFLAGS-$(XEN_TOOLS_RPATH) += -Wl,....
Ian.
Re: [PATCH 31/46] Add configure --enable-rpath
Quoted 2 lines · Ian Campbell
I thought APPEND_* was for user supplied things? Shouldn't this be just LDFLAGS-$(XEN_TOOLS_RPATH) += -Wl,....
Good point. I will adjust this part in the next version.
Olaf
PATCH 32/46 Add configure --with-linux-backend-modules="mod1 mod2"
In reply to Olaf HeringThis replaces config/Linux.modules with a configure option. As a result of this change only a single xencomons.in is required, instead of a xencomons.in.in and sed hackery.
---
README | 12 --------
config/Linux.modules | 20 ------------
config/Tools.mk.in | 2 ++
tools/configure.ac | 34 +++++++++++++++++++-
tools/hotplug/Linux/Makefile | 14 +++------
.../init.d/{xencommons.in.in => xencommons.in} | 5 ++-
tools/hotplug/Linux/systemd/Makefile | 33 +++-----------------
tools/hotplug/Linux/update-modules.sh | 36 ----------------------
8 files changed, 48 insertions(+), 108 deletions(-)README +0 -12
@@ -231,15 +231,3 @@ There are optional targets as part of Xen's top-level makefile that will download and build tboot: install-tboot, build-tboot, dist-tboot, clean-tboot. These will download the latest tar file from the SourceForge site using wget, then build/install/dist according to Xen's settings. - -Required Kernel modules -====================== - -Xen has a set of Kernel modules which the init scripts ensure to load before -before starting Xen guests. The list of modules are maintained in one place: - - * config/$(XEN_OS).modules - -For more details refer to: - -http://wiki.xen.org/wiki/Category:Host_Configuration#Kernel_modules
config/Linux.modules deleted +0 -20
@@ -1,20 +0,0 @@ -# The file supports a simple language, comments are ignored, and if you there -# are module replacements this can be listed by using a pipe to show preference -# for the first module, followed by the older module. - -xen-evtchn -xen-gntdev -xen-gntalloc -xen-blkback -xen-netback -xen-pciback -evtchn -gntdev -netbk -blkbk -xen-scsibk -usbbk -pciback -xen-acpi-processor -# Prefer to load blktap2 if found, otherwise load blktap -blktap2|blktap
config/Tools.mk.in +2 -0
@@ -71,6 +71,8 @@ SYSTEMD_LIBS := @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ +LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@ + #System options ZLIB := @zlib@ CONFIG_LIBICONV := @libiconv@
tools/configure.ac +33 -1
@@ -10,7 +10,7 @@ AC_CONFIG_FILES([ hotplug/FreeBSD/rc.d/xencommons hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog -hotplug/Linux/init.d/xencommons.in +hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/systemd/proc-xen.mount hotplug/Linux/systemd/var-lib-xenstored.mount
@@ -90,6 +90,38 @@ AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS]) AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools]) AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools]) +AC_ARG_WITH([linux-backend-modules], + AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"], + [List of Linux backend module or modalias names to be autoloaded on startup.]), + [LINUX_BACKEND_MODULES="$withval"], + [case "$host_os" in +*linux*) +LINUX_BACKEND_MODULES=" +xen-evtchn +xen-gntdev +xen-gntalloc +xen-blkback +xen-netback +xen-pciback +evtchn +gntdev +netbk +blkbk +xen-scsibk +usbbk +pciback +xen-acpi-processor +blktap2 +blktap +" +;; +*) +LINUX_BACKEND_MODULES= +;; +esac]) +LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`" +AC_SUBST(LINUX_BACKEND_MODULES) + dnl Enable blktap2 on Linux only. AC_ARG_ENABLE([blktap2], AS_HELP_STRING([--enable-blktap2],
tools/hotplug/Linux/Makefile +4 -10
@@ -35,23 +35,17 @@ UDEV_RULES_DIR = $(CONFIG_DIR)/udev UDEV_RULES = xen-backend.rules $(UDEV_RULES-y) .PHONY: all -all: $(XENCOMMONS_INITD) subdirs-all - -$(XENCOMMONS_INITD): $(XEN_ROOT)/config/$(XEN_OS).modules $(XENCOMMONS_INITD).in - $(XEN_ROOT)/tools/hotplug/Linux/update-modules.sh \ - $(XEN_ROOT) \ - $(XEN_OS) \ - $(XENCOMMONS_INITD) > $@ +all: subdirs-all .PHONY: build -build: all +build: .PHONY: install install: all install-initd install-scripts install-udev subdirs-install # See docs/misc/distro_mapping.txt for INITD_DIR location .PHONY: install-initd -install-initd: all +install-initd: [ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) [ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) [ -d $(DESTDIR)$(LIBEXEC_BIN) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
@@ -63,7 +57,7 @@ install-initd: all $(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(INITD_DIR) .PHONY: install-scripts -install-scripts: all +install-scripts: [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \ $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) set -e; for i in $(XEN_SCRIPTS); \
tools/hotplug/Linux/init.d/xencommons.in renamed from tools/hotplug/Linux/init.d/xencommons.in.in +4 -1
@@ -19,6 +19,7 @@ ### END INIT INFO XENSTORED=@XENSTORED@ +BACKEND_MODULES="@LINUX_BACKEND_MODULES@" . @XEN_SCRIPT_DIR@/hotplugpath.sh
@@ -58,8 +59,10 @@ fi do_start () { local time=0 local timeout=30 + local mod + + for mod in $BACKEND_MODULES ; do modprobe "$mod" &>/dev/null ; done - @LOAD_MODULES@ mkdir -p ${XEN_RUN_DIR} mkdir -p ${XEN_LOCK_DIR}
tools/hotplug/Linux/systemd/Makefile +5 -28
@@ -37,31 +37,8 @@ install: $(ALL_XEN_SYSTEMD) $(INSTALL_DATA) *.mount $(DESTDIR)$(XEN_SYSTEMD_DIR) $(INSTALL_DATA) *.conf $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) -$(XEN_SYSTEMD_MODULES): $(XEN_ROOT)/config/$(XEN_OS).modules - @set -e ; \ - IFS='' ;\ - cat $(XEN_ROOT)/config/$(XEN_OS).modules | ( \ - while read l ; do \ - if echo $${l} | egrep -q "^#" ; then \ - continue ;\ - fi ;\ - if echo "$${l}" | egrep -q "\|" ; then \ - m1=$${l%%|*} ;\ - m2=$${l#*|} ;\ - # Systemd modules-load.d lacks support ;\ - # for module replacement options, we ;\ - # need to add that support upstream but ;\ - # its best instead to ensure this file ;\ - # is no longer needed. Some folks ;\ - # however have reported issues with ;\ - # some modules automatically loading ;\ - # so we just load all necessary xen ;\ - # modules and for replacements we load ;\ - # the latest module ;\ - echo "$$m1" ;\ - echo "$$m2" ;\ - else \ - echo "$$l" ;\ - fi ;\ - done \ - ) > $@ +$(XEN_SYSTEMD_MODULES): + for mod in $(LINUX_BACKEND_MODULES) ; do \ + echo $$mod ; \ + done > [email protected] ; \ + $(call move-if-changed,[email protected],$@)
tools/hotplug/Linux/update-modules.sh deleted +0 -36
@@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -set -e - -IFS='' - -XEN_ROOT=$1 -XEN_OS=$2 -XENCOMMONS_INITD=$3 - -cat $XEN_ROOT/config/${XEN_OS}.modules | ( - while read l ; do - if echo $l | egrep -q "^#" ; then - continue - fi - if echo "$l" | egrep -q "\|" ; then - m1=${l%%|*} - m2=${l#*|} - echo " modprobe $m1 2>/dev/null || modprobe $m2 2>/dev/null" - else - echo " modprobe $l 2>/dev/null" - fi - done -) > ${XENCOMMONS_INITD}.modules - -cat ${XENCOMMONS_INITD}.in | ( - while read l ; do - if echo "$l" | egrep -q "@LOAD_MODULES@" ; then - cat ${XENCOMMONS_INITD}.modules - else - echo $l - fi - done -) - -rm -f ${XENCOMMONS_INITD}.modules
Re: [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2"
Quoted 3 lines · Olaf Hering
This replaces config/Linux.modules with a configure option. As a result of this change only a single xencomons.in is required, instead of a xencomons.in.in and sed hackery.
I think the change wrt which blktap modules are loaded deserves mentioning here, since it is a functional change. It's almost worth making that trivial sounding change separately, in case there are knockon effects.
Yay to the lack of sed hackery though!
Quoted 14 lines
tools/configure.ac +14
-0+LINUX_BACKEND_MODULES=" +xen-evtchn +xen-gntdev +xen-gntalloc +xen-blkback +xen-netback +xen-pciback +evtchn +gntdev +netbk +blkbk +xen-scsibk +usbbk +pciback
tools/configure.ac AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS]) · line 122
Quoted 10 lines
tools/configure.ac +10
-0+xen-acpi-processor +blktap2 +blktap +" +;; +*) +LINUX_BACKEND_MODULES= +;; +esac]) +LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`"
Why does this need to be laundered via eval? There's no sensible way a user could want to pass in \$thing and expect it to expand to something useful, is there?
tools/hotplug/Linux/systemd/Makefile install: $(ALL_XEN_SYSTEMD) · line 44
Quoted 10 lines
tools/hotplug/Linux/systemd/Makefile +5
-0+$(XEN_SYSTEMD_MODULES): + for mod in $(LINUX_BACKEND_MODULES) ; do \ + echo $$mod ; \ + done > [email protected] ; \ + $(call move-if-changed,[email protected],$@)
No need for "; \" before the call, I think.
Ian.
Re: [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2"
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Olaf Hering
This replaces config/Linux.modules with a configure option. As a result of this change only a single xencomons.in is required, instead of a xencomons.in.in and sed hackery.
I think the change wrt which blktap modules are loaded deserves mentioning here, since it is a functional change. It's almost worth making that trivial sounding change separately, in case there are knockon effects.
At least systemd would load blktap2 and blktap via xen.conf. And the SUSE xencommons also loads both drivers. So I think they can coexist. No sure what the intent of the initial "modprobe blktap2 || modprobe blktap" was. I think doing it that way did not solve a real bug. The comments in the discussion at that time did not provide a hint that a bug was fixed.
Olaf
Re: [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2"
Quoted 12 lines · Olaf Hering
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Olaf Hering
This replaces config/Linux.modules with a configure option. As a result of this change only a single xencomons.in is required, instead of a xencomons.in.in and sed hackery.
I think the change wrt which blktap modules are loaded deserves mentioning here, since it is a functional change. It's almost worth making that trivial sounding change separately, in case there are knockon effects.
Quoted 6 lines
At least systemd would load blktap2 and blktap via xen.conf. And the SUSE xencommons also loads both drivers. So I think they can coexist. No sure what the intent of the initial "modprobe blktap2 || modprobe blktap" was. I think doing it that way did not solve a real bug. The comments in the discussion at that time did not provide a hint that a bug was fixed.
That's fine, and the sort of thing I'd like to see the commit message say so we know in 6 months time why this was subtly changed in the midst of another change.
Ian.
Re: [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2"
In reply to Ian CampbellQuoted 6 lines · Ian Campbell
Quoted 1 line · Olaf Hering
+LINUX_BACKEND_MODULES="
eval echo $LINUX_BACKEND_MODULES"Why does this need to be laundered via eval? There's no sensible way a user could want to pass in \$thing and expect it to expand to something useful, is there?
I decided to use a multiline assignment to make futher patches to the content easier to read. If the variable is expanded it will appear as is in the Makefile, resulting in syntax errors. Maybe a single echo would work as well.
Will check if this can be improved. But I fear there is not much that can be done to achieve "\$thing".
Olaf
Re: [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2"
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line · Olaf Hering
+LINUX_BACKEND_MODULES="
eval echo $LINUX_BACKEND_MODULES"
Quoted 7 lines
Quoted 3 lines
Why does this need to be laundered via eval? There's no sensible way a user could want to pass in \$thing and expect it to expand to something useful, is there?
I decided to use a multiline assignment to make futher patches to the content easier to read. If the variable is expanded it will appear as is in the
Makefile, resulting in syntax errors.
Ah, so you are just trying to fold the \n, ok.
Quoted 1 line
Maybe a single echo would work as well.
I would expect so.
It's possible that the application of some more "s (e..g in the initscript itself) might also work.
Quoted 2 lines
Will check if this can be improved. But I fear there is not much that can be done to achieve "\$thing".
Oh, we don't actually want that, I just thought that was what you were trying to do for some reason.
Ian.
PATCH 33/46 Add configure --with-bash_completion-dir=DIR
In reply to Olaf Hering--- Config.mk | 2 -- config/Paths.mk.in | 1 + m4/paths.m4 | 7 +++++++ 3 files changed, 8 insertions(+), 2 deletions(-)
Config.mk +0 -2
@@ -58,8 +58,6 @@ endif include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk -BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d - # arguments: variable, common path part, path to test, if yes, if no define setvar_dir ifndef $(1)
config/Paths.mk.in +1 -0
@@ -31,6 +31,7 @@ XEN_LIB_STORED := @XEN_LIB_STORED@ CONFIG_DIR := @CONFIG_DIR@ INITD_DIR := @INITD_DIR@ +BASH_COMPLETION_DIR := @BASH_COMPLETION_DIR@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@
m4/paths.m4 +7 -0
@@ -42,6 +42,13 @@ AC_ARG_WITH([initd-dir], ;; esac]) +AC_ARG_WITH([bash_completion-dir], + AS_HELP_STRING([--with-bash_completion-dir=DIR], + [Path to directory with sysv runlevel scripts. [SYSCONFDIR/bash_completion.d]]), + [BASH_COMPLETION_DIR=$withval], + [BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d]) +AC_SUBST(BASH_COMPLETION_DIR) + BINDIR=$prefix/bin AC_SUBST(BINDIR)
Re: [PATCH 33/46] Add configure --with-bash_completion-dir=DIR
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
I'm not so sure about this. If someone is installing things into $prefix or $prefix/etc etc then $prefix/etc/bash_completion.d seems like the right thing for us to do.
I worry that allowing people to say "install over here" and then to let them micromanage all of the things which that entails (presumably to put bits back where they normally go) is going to result in a plethora of not very useful configure options, with the associated maintenance overhead and potential for confusion.
e.g. in the case of bash_completion someone installing to a non-standard prefix ought IMHO to expect to have to do
ln -s $prefix/etc/bash_completion.d/* /etc/bash_complation.d/
or to add something to their .bashrc to search the new path too.
Ian.
Re: [PATCH 33/46] Add configure --with-bash_completion-dir=DIR
Quoted 3 lines · Ian Campbell
I'm not so sure about this. If someone is installing things into $prefix or $prefix/etc etc then $prefix/etc/bash_completion.d seems like the right thing for us to do.
I'm fine with using a hardcoded path, based on $sysconfdir. Will update the patch.
Olaf
PATCH 34/46 Make XENFIRMWAREDIR a subdir of libexecdir
In reply to Olaf HeringPut the firmware files below libexecdir. This is essentially just a new name for the existing path. It has the benefit that it can be configured via --libexecdir= if required.
--- config/Paths.mk.in | 2 +- m4/paths.m4 | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
config/Paths.mk.in +1 -1
@@ -35,7 +35,7 @@ BASH_COMPLETION_DIR := @BASH_COMPLETION_DIR@ XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@ -XENFIRMWAREDIR := @XENFIRMWAREDIR@ +XENFIRMWAREDIR := @LIBEXEC_BOOT@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@
m4/paths.m4 +2 -3
@@ -73,10 +73,12 @@ LIBEXEC=`eval echo $libexecdir/xen` LIBEXEC_BIN=$LIBEXEC/bin LIBEXEC_LIB=$LIBEXEC/lib LIBEXEC_INC=$LIBEXEC/include +LIBEXEC_BOOT=$LIBEXEC/boot AC_SUBST(LIBEXEC) AC_SUBST(LIBEXEC_BIN) AC_SUBST(LIBEXEC_LIB) AC_SUBST(LIBEXEC_INC) +AC_SUBST(LIBEXEC_BOOT) LIBDIR=`eval echo $libdir` AC_SUBST(LIBDIR)
@@ -101,9 +103,6 @@ dnl double eval because default docdir includes datarootdir, which includes pref DOCDIR=`eval eval echo $docdir` AC_SUBST(DOCDIR) -XENFIRMWAREDIR=$prefix/lib/xen/boot -AC_SUBST(XENFIRMWAREDIR) - CONFIG_DIR=$sysconfdir AC_SUBST(CONFIG_DIR)
Re: [PATCH 34/46] Make XENFIRMWAREDIR a subdir of libexecdir
Quoted 5 lines · Olaf Hering
Put the firmware files below libexecdir. This is essentially just a new name for the existing path. It has the benefit that it can be configured via --libexecdir= if required.
Signed-off-by Olaf Hering <[email protected]>
PATCH 35/46 Use just PREFIX to reference the path in Paths.mk
In reply to Olaf Hering--- m4/systemd.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
m4/systemd.m4 +2 -2
@@ -65,7 +65,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ dnl files. It would also be best to just extend the upstream dnl pkg-config pkg.m4 with an AC_DEFUN() to do this neatly. dnl SYSTEMD_DIR="`$PKG_CONFIG --define-variable=prefix=$PREFIX --variable=systemdsystemunitdir systemd`" - SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" + SYSTEMD_DIR="\$(PREFIX)/lib/systemd/system/" ], []) AS_IF([test "x$SYSTEMD_DIR" = x], [
@@ -74,7 +74,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ dnl There is no variable for this yet for some reason AS_IF([test "x$SYSTEMD_MODULES_LOAD" = x], [ - SYSTEMD_MODULES_LOAD="\$(prefix)/lib/modules-load.d/" + SYSTEMD_MODULES_LOAD="\$(PREFIX)/lib/modules-load.d/" ], []) AS_IF([test "x$SYSTEMD_MODULES_LOAD" = x], [
Re: [PATCH 35/46] Use just PREFIX to reference the path in Paths.mk
On Mon, 2014-09-22 at 15:00 +0200, Olaf Hering wrote:
What is the distinction between the two and why do we prefer the caps version?
Quoted 27 lines
Signed-off-by Olaf Hering <[email protected]>--- m4/systemd.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)m4/systemd.m4 +2
-2@@ -65,7 +65,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ dnl files. It would also be best to just extend the upstream dnl pkg-config pkg.m4 with an AC_DEFUN() to do this neatly. dnl SYSTEMD_DIR="`$PKG_CONFIG --define-variable=prefix=$PREFIX --variable=systemdsystemunitdir systemd`" - SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" + SYSTEMD_DIR="\$(PREFIX)/lib/systemd/system/" ], []) AS_IF([test "x$SYSTEMD_DIR" = x], [@@ -74,7 +74,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ dnl There is no variable for this yet for some reason AS_IF([test "x$SYSTEMD_MODULES_LOAD" = x], [ - SYSTEMD_MODULES_LOAD="\$(prefix)/lib/modules-load.d/" + SYSTEMD_MODULES_LOAD="\$(PREFIX)/lib/modules-load.d/" ], []) AS_IF([test "x$SYSTEMD_MODULES_LOAD" = x], [
Re: [PATCH 35/46] Use just PREFIX to reference the path in Paths.mk
Quoted 2 lines · Ian Campbell
What is the distinction between the two and why do we prefer the caps version?
$prefix comes from autoconf/automake, PREFIX is used in xen source. Since the variable SYSTEMD_DIR= is expanded, $(prefix)/something would expand to /something because prefix= does not exist anymore once this whole series is applied.
But as stated in an earier reply, maybe we expand to lowercase variables in Paths.mk and assign to our uppercase variables as needed. Then this patch can be dropped.
Olaf
Re: [PATCH 35/46] Use just PREFIX to reference the path in Paths.mk
Quoted 1 line · Olaf Hering
prefix= does not exist anymore once this whole series is applied.
That's the bit which wasn't clear to me when I reached this point...
Quoted 3 lines
But as stated in an earier reply, maybe we expand to lowercase variables in Paths.mk and assign to our uppercase variables as needed. Then this patch can be dropped.
I think it is worth trying that approach (i.e. closer to the autoconf/automake norm).
Whether we then take this a step further and start using the standard names throughout the code base (rather than just in Paths.mk) is a question for 4.6 I think.
Ian.
PATCH 36/46 tools: remove private copies of includedir and libdir from libxenstat
In reply to Olaf HeringThey are wrong and unused.
--- tools/xenstat/libxenstat/Makefile | 4 ---- 1 file changed, 4 deletions(-)
tools/xenstat/libxenstat/Makefile +0 -4
@@ -15,10 +15,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -prefix=$(PREFIX) -includedir=$(prefix)/include -libdir=$(prefix)/lib - LDCONFIG=ldconfig MAKE_LINK=ln -sf
Re: [PATCH 36/46] tools: remove private copies of includedir and libdir from libxenstat
Quoted 3 lines · Olaf Hering
They are wrong and unused.
Signed-off-by Olaf Hering <[email protected]>
PATCH 37/46 Use Paths.mk for docs, stubdom and tools build
In reply to Olaf HeringPaths.mk contains just directories set by configure. Source this file first when building docs,stubdom or tools. Remove unused path variables from Paths.mk
--- config/Docs.mk.in | 7 ------- config/Paths.mk.in | 2 ++ config/Stubdom.mk.in | 8 -------- config/Tools.mk.in | 7 ------- docs/Makefile | 1 + stubdom/Makefile | 1 + tools/Rules.mk | 2 +- 7 files changed, 5 insertions(+), 23 deletions(-)
config/Docs.mk.in +0 -7
@@ -1,10 +1,3 @@ -# Prefix and install folder -prefix := @prefix@ -PREFIX := $(prefix) -exec_prefix := @exec_prefix@ -libdir := @libdir@ -LIBDIR := $(libdir) - # Tools FIG2DEV := @FIG2DEV@ POD2MAN := @POD2MAN@
config/Paths.mk.in +2 -0
@@ -12,6 +12,8 @@ # # http://wiki.xen.org/wiki/Category:Host_Configuration#System_wide_xen_configuration +PREFIX := @prefix@ + SBINDIR := @SBINDIR@ BINDIR := @BINDIR@ LIBEXEC := @LIBEXEC@
config/Stubdom.mk.in +0 -8
@@ -1,11 +1,3 @@ -# Prefix and install folder --include $(XEN_ROOT)/config/Paths.mk -prefix := @prefix@ -PREFIX := $(prefix) -exec_prefix := @exec_prefix@ -libdir := @libdir@ -LIBDIR := $(libdir) - # Path Programs CMAKE := @CMAKE@ FETCHER := @FETCHER@
config/Tools.mk.in +0 -7
@@ -3,13 +3,6 @@ ifeq ($(CONFIG_RUMP),y) XEN_OS := NetBSDRump endif -# Prefix and install folder -prefix := @prefix@ -PREFIX := $(prefix) -exec_prefix := @exec_prefix@ -libdir := @libdir@ -LIBDIR := $(libdir) - # A debug build of tools? debug := @debug@
docs/Makefile +1 -0
@@ -1,4 +1,5 @@ XEN_ROOT=$(CURDIR)/.. +-include $(XEN_ROOT)/config/Paths.mk include $(XEN_ROOT)/Config.mk -include $(XEN_ROOT)/config/Docs.mk
stubdom/Makefile +1 -0
@@ -5,6 +5,7 @@ export XEN_OS=MiniOS export stubdom=y export debug=y +-include $(XEN_ROOT)/config/Paths.mk include $(XEN_ROOT)/Config.mk -include $(XEN_ROOT)/config/Stubdom.mk
tools/Rules.mk +1 -1
@@ -3,9 +3,9 @@ # `all' is the default target all: +-include $(XEN_ROOT)/config/Paths.mk -include $(XEN_ROOT)/config/Tools.mk include $(XEN_ROOT)/Config.mk --include $(XEN_ROOT)/config/Paths.mk export _INSTALL := $(INSTALL) INSTALL = $(XEN_ROOT)/tools/cross-install
Re: [PATCH 37/46] Use Paths.mk for docs, stubdom and tools build
Quoted 2 lines · Olaf Hering
Paths.mk contains just directories set by configure. Source this file first when building docs,stubdom or tools.
Is it important that this comes before something? (Config.mk? $subsystem.mk?) or could we incorporate this include into $subsystem.mk?
Alternatively could $subsystem.mk be moved before Config.mk?
Quoted 1 line
Remove unused path variables from Paths.mk
I think you mean config/$subsystem.mk.in?
Ian.
Re: [PATCH 37/46] Use Paths.mk for docs, stubdom and tools build
Quoted 8 lines · Ian Campbell
Quoted 2 lines · Olaf Hering
Paths.mk contains just directories set by configure. Source this file first when building docs,stubdom or tools.
Is it important that this comes before something? (Config.mk? $subsystem.mk?) or could we incorporate this include into $subsystem.mk?
Alternatively could $subsystem.mk be moved before Config.mk?
Right now docs and stubdom have a different order than tools. The reason is most likely that Tools.mk wants to know about XEN_OS to catch the rump kernel.
I will see what has to be done to make the order of inclusion consistent.
Olaf
PATCH 38/46 Move xenconsoled to libexec
In reply to Olaf Heringxenconsoled is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into LIBEXEC_BIN.
--- tools/console/Makefile | 3 +-- tools/hotplug/FreeBSD/rc.d/xencommons.in | 6 +++--- tools/hotplug/Linux/init.d/xencommons.in | 2 +- tools/hotplug/Linux/systemd/xenconsoled.service.in | 2 +- tools/hotplug/NetBSD/rc.d/xencommons | 6 +++--- 5 files changed, 9 insertions(+), 10 deletions(-)
tools/console/Makefile +1 -2
@@ -30,9 +30,8 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c)) .PHONY: install install: $(BIN) - $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR) - $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR) $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(LIBEXEC_BIN) $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) -include $(DEPS)
tools/hotplug/FreeBSD/rc.d/xencommons.in +3 -3
@@ -60,7 +60,7 @@ xen_startcmd() XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}" fi - ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS} + ${LIBEXEC_BIN}/xenconsoled ${XENCONSOLED_ARGS} printf "\n"
@@ -74,7 +74,7 @@ xen_stop() printf "Stopping xencommons.\n" printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n" - rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled) + rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${LIBEXEC_BIN}/xenconsoled) pids="$pids $rc_pid" kill -${sig_stop:-TERM} $pids
@@ -88,7 +88,7 @@ xen_status() pids="$pids $xenstored_pid" fi - xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled) + xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${LIBEXEC_BIN}/xenconsoled) if test -n ${xenconsoled_pid}; then pids="$pids $xenconsoled_pid" fi
tools/hotplug/Linux/init.d/xencommons.in +1 -1
@@ -100,7 +100,7 @@ do_start () { echo Starting xenconsoled... test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE" - ${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS + ${LIBEXEC_BIN}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS echo Starting QEMU as disk backend for dom0 test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386" $QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
tools/hotplug/Linux/systemd/xenconsoled.service.in +1 -1
@@ -14,7 +14,7 @@ EnvironmentFile=-/etc/sysconfig/xenconsoled PIDFile=@XEN_RUN_DIR@/xenconsoled.pid ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities ExecStartPre=/bin/mkdir -p ${XENCONSOLED_LOG_DIR} -ExecStart=@SBINDIR@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS +ExecStart=@LIBEXEC_BIN@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS [Install] WantedBy=multi-user.target
tools/hotplug/NetBSD/rc.d/xencommons +3 -3
@@ -64,7 +64,7 @@ xen_startcmd() XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}" fi - ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS} + ${LIBEXEC_BIN}/xenconsoled ${XENCONSOLED_ARGS} printf "\n"
@@ -78,7 +78,7 @@ xen_stop() printf "Stopping xencommons.\n" printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n" - rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled) + rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${LIBEXEC_BIN}/xenconsoled) pids="$pids $rc_pid" kill -${sig_stop:-TERM} $pids
@@ -92,7 +92,7 @@ xen_status() pids="$pids $xenstored_pid" fi - xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled) + xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${LIBEXEC_BIN}/xenconsoled) if test -n ${xenconsoled_pid}; then pids="$pids $xenconsoled_pid" fi
Re: [PATCH 38/46] Move xenconsoled to libexec
Quoted 2 lines · Olaf Hering
xenconsoled is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into
LIBEXEC_BIN.
It's pretty normal/conventional for daemons to be in $sbin, I think.
I think the point is that although daemons might normally be started by an initscript it is also allowable (and occasionally useful) to start them by hand or via other means. In contrast to something like the libxl-save-helper which is something which does belong in libexec.
I'd be reluctant to change this without a reference to something like the FHS to back up why it should be in libexec.
Ian.
Re: [PATCH 38/46] Move xenconsoled to libexec
Quoted 6 lines · Ian Campbell
Quoted 2 lines · Olaf Hering
xenconsoled is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into
LIBEXEC_BIN.It's pretty normal/conventional for daemons to be in $sbin, I think.
Quoted 7 lines
I think the point is that although daemons might normally be started by an initscript it is also allowable (and occasionally useful) to start them by hand or via other means. In contrast to something like the libxl-save-helper which is something which does belong in libexec.
I'd be reluctant to change this without a reference to something like the FHS to back up why it should be in libexec.
Is it possible to restart the daemons which I move to libexec? I think at least xenstored can not be restarted. So it does not make much sense to have it in $sbin, because its a run once thing.
Olaf
Re: [PATCH 38/46] Move xenconsoled to libexec
Quoted 13 lines · Olaf Hering
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Olaf Hering
xenconsoled is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into
LIBEXEC_BIN.It's pretty normal/conventional for daemons to be in $sbin, I think.
I think the point is that although daemons might normally be started by an initscript it is also allowable (and occasionally useful) to start them by hand or via other means. In contrast to something like the libxl-save-helper which is something which does belong in libexec.
Quoted 6 lines
Quoted 2 lines
I'd be reluctant to change this without a reference to something like the FHS to back up why it should be in libexec.
Is it possible to restart the daemons which I move to libexec? I think at least xenstored can not be restarted. So it does not make much sense to have it in $sbin, because its a run once thing.
I don't think run once vs restartable is a consideration here. Even the first run might be manual. I don't think FHS makes a distinction like this.
Ian.
PATCH 39/46 Move xenstored to libexec
In reply to Olaf Heringxenstored is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into LIBEXEC_BIN.
--- m4/xenstored.m4 | 8 ++++---- tools/hotplug/FreeBSD/rc.d/xencommons.in | 6 +++--- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++-- tools/hotplug/NetBSD/rc.d/xencommons | 6 +++--- tools/ocaml/xenstored/Makefile | 4 ++-- tools/xenstore/Makefile | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-)
m4/xenstored.m4 +4 -4
@@ -6,10 +6,10 @@ AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [ AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [ xenstore="oxenstored" - xenstored=$SBINDIR/oxenstored + xenstored=$LIBEXEC_BIN/oxenstored AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ xenstore="xenstored" - xenstored=$SBINDIR/xenstored + xenstored=$LIBEXEC_BIN/xenstored ]) ])
@@ -29,11 +29,11 @@ AC_ARG_WITH([xenstored], [ AS_IF([test "x$withval" = "xxenstored"], [ xenstore=$withval - xenstored=$SBINDIR/xenstored + xenstored=$LIBEXEC_BIN/xenstored ]) AS_IF([test "x$withval" = "xoxenstored"], [ xenstore=$withval - xenstored=$SBINDIR/oxenstored + xenstored=$LIBEXEC_BIN/oxenstored AX_XEN_OCAML_XENSTORE_CHECK() ]) AS_IF([test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"], [
tools/hotplug/FreeBSD/rc.d/xencommons.in +3 -3
@@ -33,7 +33,7 @@ xen_startcmd() local time=0 local timeout=30 - xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored) + xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${LIBEXEC_BIN}/xenstored) if test -z "$xenstored_pid"; then printf "Cleaning xenstore database.\n" if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -45,7 +45,7 @@ xen_startcmd() if [ -n "${XENSTORED_TRACE}" ]; then XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log" fi - ${SBINDIR}/xenstored ${XENSTORED_ARGS} + ${LIBEXEC_BIN}/xenstored ${XENSTORED_ARGS} while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` ; do printf "." time=$(($time+1))
@@ -83,7 +83,7 @@ xen_stop() xen_status() { - xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored) + xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${LIBEXEC_BIN}/xenstored) if test -n ${xenstored_pid}; then pids="$pids $xenstored_pid" fi
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +2 -2
@@ -14,8 +14,8 @@ # the XENSTORED variable there. # # This can be either of: -# * @SBINDIR@/oxenstored -# * @SBINDIR@/xenstored +# * @LIBEXEC_BIN@/oxenstored +# * @LIBEXEC_BIN@/xenstored # # Changing this requires a reboot to take effect. #XENSTORED=@XENSTORED@
tools/hotplug/NetBSD/rc.d/xencommons +3 -3
@@ -37,7 +37,7 @@ xen_startcmd() local time=0 local timeout=30 - xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored) + xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${LIBEXEC_BIN}/xenstored) if test -z "$xenstored_pid"; then printf "Cleaning xenstore database.\n" if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -49,7 +49,7 @@ xen_startcmd() if [ -n "${XENSTORED_TRACE}" ]; then XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log" fi - ${SBINDIR}/xenstored ${XENSTORED_ARGS} + ${LIBEXEC_BIN}/xenstored ${XENSTORED_ARGS} while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` ; do printf "." time=$(($time+1))
@@ -87,7 +87,7 @@ xen_stop() xen_status() { - xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored) + xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${LIBEXEC_BIN}/xenstored) if test -n ${xenstored_pid}; then pids="$pids $xenstored_pid" fi
tools/ocaml/xenstored/Makefile +2 -2
@@ -73,8 +73,8 @@ bins: $(PROGRAMS) libs: $(LIBS) install: all - $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) - $(INSTALL_PROG) oxenstored $(DESTDIR)$(SBINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) oxenstored $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) $(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR)
tools/xenstore/Makefile +2 -2
@@ -124,12 +124,12 @@ tarball: clean .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat ifeq ($(XENSTORE_XENSTORED),y) $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored - $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR) + $(INSTALL_PROG) xenstored $(DESTDIR)$(LIBEXEC_BIN) endif $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR) $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
Re: [PATCH 39/46] Move xenstored to libexec
Quoted 2 lines · Olaf Hering
xenstored is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into
LIBEXEC_BIN.
Same comment as the previous patch (and again on the next one).
PATCH 40/46 Move xenwatchdogd to libexec
In reply to Olaf Heringxenwatchdogd is started by runlevel scripts, its not supposed to be called by admin. So move it out of the way into LIBEXEC_BIN.
--- tools/hotplug/Linux/init.d/xen-watchdog.in | 2 +- tools/hotplug/Linux/systemd/xen-watchdog.service.in | 2 +- tools/hotplug/NetBSD/rc.d/xen-watchdog | 2 +- tools/misc/Makefile | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
tools/hotplug/Linux/init.d/xen-watchdog.in +1 -1
@@ -19,7 +19,7 @@ . @XEN_SCRIPT_DIR@/hotplugpath.sh -DAEMON=${SBINDIR}/xenwatchdogd +DAEMON=${LIBEXEC_BIN}/xenwatchdogd base=$(basename $DAEMON) # Source function library.
tools/hotplug/Linux/systemd/xen-watchdog.service.in +1 -1
@@ -6,7 +6,7 @@ ConditionVirtualization=xen [Service] Type=forking -ExecStart=@SBINDIR@/xenwatchdogd 30 15 +ExecStart=@LIBEXEC_BIN@/xenwatchdogd 30 15 KillSignal=USR1 [Install]
tools/hotplug/NetBSD/rc.d/xen-watchdog +1 -1
@@ -16,7 +16,7 @@ export LD_LIBRARY_PATH name="xenwatchdog" rcvar=$name -command="${SBINDIR}/xenwatchdogd" +command="${LIBEXEC_BIN}/xenwatchdogd" start_cmd="echo Starting ${name}. && PATH=${PATH}:${SBINDIR} ${command} 30 15" load_rc_config $name
tools/misc/Makefile +2 -2
@@ -21,12 +21,12 @@ INSTALL_BIN-$(CONFIG_X86) += xen-detect INSTALL_BIN := $(INSTALL_BIN-y) INSTALL_SBIN-y := xen-bugtool xen-python-path xenperf xenpm xen-tmem-list-parse gtraceview \ - gtracestat xenlockprof xenwatchdogd xen-ringwatch xencov + gtracestat xenlockprof xen-ringwatch xencov INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx xen-hvmcrash xen-lowmemd xen-mfndump INSTALL_SBIN-$(CONFIG_MIGRATE) += xen-hptool INSTALL_SBIN := $(INSTALL_SBIN-y) -INSTALL_PRIVBIN-y := xenpvnetboot +INSTALL_PRIVBIN-y := xenpvnetboot xenwatchdogd INSTALL_PRIVBIN := $(INSTALL_PRIVBIN-y) # Include configure output (config.h) to headers search path
PATCH 41/46 tools: use XEN_LIB_STORED instead of /var/lib/xenstored
In reply to Olaf Hering---
Config.mk | 2 +-
tools/configure.ac | 1 +
tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +-
tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++--
tools/hotplug/Linux/init.d/xencommons.in | 2 +-
tools/hotplug/NetBSD/rc.d/{xencommons => xencommons.in} | 2 +-
tools/xenstore/Makefile | 3 ++-
tools/xenstore/xs_lib.c | 2 +-
8 files changed, 10 insertions(+), 8 deletions(-)Config.mk +1 -1
@@ -162,7 +162,7 @@ endef BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBEXEC_BIN LIBDIR SHAREDIR \ XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \ - XEN_RUN_DIR XEN_PAGING_DIR + XEN_RUN_DIR XEN_PAGING_DIR XEN_LIB_STORED buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) define buildmakevars2file-closure
tools/configure.ac +1 -0
@@ -25,6 +25,7 @@ hotplug/Linux/vif-setup hotplug/Linux/xen-backend.rules hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains +hotplug/NetBSD/rc.d/xencommons ]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([../])
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
@@ -37,7 +37,7 @@ xen_startcmd() if test -z "$xenstored_pid"; then printf "Cleaning xenstore database.\n" if [ -z "${XENSTORED_ROOTDIR}" ]; then - XENSTORED_ROOTDIR="/var/lib/xenstored" + XENSTORED_ROOTDIR="@XEN_LIB_STORED@" fi rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1 printf "Starting xenservices: xenstored, xenconsoled."
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +2 -2
@@ -27,10 +27,10 @@ #XENSTORED_TRACE=[yes|on|1] ## Type: string -## Default: "/var/lib/xenstored" +## Default: "@XEN_LIB_STORED@" # # Running xenstored on XENSTORED_ROOTDIR -#XENSTORED_ROOTDIR=/var/lib/xenstored +#XENSTORED_ROOTDIR=@XEN_LIB_STORED@ ## Type: string ## Default: Not defined, xenbackendd debug mode off
tools/hotplug/Linux/init.d/xencommons.in +1 -1
@@ -68,7 +68,7 @@ do_start () { if ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` then - test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="/var/lib/xenstored" + test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="@XEN_LIB_STORED@" rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
tools/hotplug/NetBSD/rc.d/xencommons.in renamed from tools/hotplug/NetBSD/rc.d/xencommons +1 -1
@@ -41,7 +41,7 @@ xen_startcmd() if test -z "$xenstored_pid"; then printf "Cleaning xenstore database.\n" if [ -z "${XENSTORED_ROOTDIR}" ]; then - XENSTORED_ROOTDIR="/var/lib/xenstored" + XENSTORED_ROOTDIR="@XEN_LIB_STORED@" fi rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1 printf "Starting xenservices: xenstored, xenconsoled."
tools/xenstore/Makefile +2 -1
@@ -8,6 +8,7 @@ CFLAGS += -Werror CFLAGS += -I. CFLAGS += -I$(XEN_ROOT)/tools/ CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
@@ -128,7 +129,7 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat ifeq ($(XENSTORE_XENSTORED),y) - $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored + $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED) $(INSTALL_PROG) xenstored $(DESTDIR)$(LIBEXEC_BIN) endif $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
tools/xenstore/xs_lib.c +1 -1
@@ -30,7 +30,7 @@const char *xs_daemon_rootdir (void ) {char *s =getenv ("XENSTORED_ROOTDIR" ); -return (s ? s :"/var/lib/xenstored" ); +return (s ? s :XEN_LIB_STORED ); }const char *xs_daemon_rundir (void )
Re: [PATCH 41/46] tools: use XEN_LIB_STORED instead of /var/lib/xenstored
Quoted 10 lines · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>--- Config.mk | 2 +- tools/configure.ac | 1 + tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++-- tools/hotplug/Linux/init.d/xencommons.in | 2 +- tools/hotplug/NetBSD/rc.d/{xencommons => xencommons.in} | 2 +- tools/xenstore/Makefile | 3 ++- tools/xenstore/xs_lib.c | 2 +-
Does tools/ocaml/xenstore need a similar change?
Re: [PATCH 41/46] tools: use XEN_LIB_STORED instead of /var/lib/xenstored
Quoted 12 lines · Ian Campbell
Quoted 10 lines · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>--- Config.mk | 2 +- tools/configure.ac | 1 + tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++-- tools/hotplug/Linux/init.d/xencommons.in | 2 +- tools/hotplug/NetBSD/rc.d/{xencommons => xencommons.in} | 2 +- tools/xenstore/Makefile | 3 ++- tools/xenstore/xs_lib.c | 2 +-
Quoted 1 line
Does
tools/ocaml/xenstoreneed a similar change?
No, only the files above hardcode /var/lib/xenstored instead of using the existing XEN_LIB_STORED variable.
Olaf
Ian Campbell
Acked-byRe: [PATCH 41/46] tools: use XEN_LIB_STORED instead of /var/lib/xenstored
Quoted 14 lines · Olaf Hering
Quoted 12 lines · Ian Campbell
Quoted 10 lines · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>--- Config.mk | 2 +- tools/configure.ac | 1 + tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++-- tools/hotplug/Linux/init.d/xencommons.in | 2 +- tools/hotplug/NetBSD/rc.d/{xencommons => xencommons.in} | 2 +- tools/xenstore/Makefile | 3 ++- tools/xenstore/xs_lib.c | 2 +-
Quoted 4 lines
Quoted 1 line
Does
tools/ocaml/xenstoreneed a similar change?No, only the files above hardcode
/var/lib/xenstoredinstead of using the existingXEN_LIB_STOREDvariable.
Great!
PATCH 42/46 Use XEN_RUN_DIR instead of /var/run/xen
In reply to Olaf HeringAlso remove duplicate XEN_RUN_DIR from m4/paths.m4. Fix XEN_RUN_DIR expansion in toplevel Makefile
--- Makefile | 2 +- m4/paths.m4 | 3 --- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)
Makefile +1 -1
@@ -221,7 +221,7 @@ uninstall: rm -f $(D)$(XEN_SYSTEMD_DIR)/*.service rm -f $(D)$(XEN_SYSTEMD_DIR)/*.mount rm -f $(D)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf - rm -rf $(D)$(XEN_RUN_DIR)* $(D)/var/lib/xen* + rm -rf $(D)$(XEN_RUN_DIR)/* $(D)/var/lib/xen* make -C tools uninstall rm -rf $(D)/boot/tboot*
m4/paths.m4 +0 -3
@@ -122,9 +122,6 @@ case "$host_os" in esac AC_SUBST(XEN_LOCK_DIR) -XEN_RUN_DIR=$localstatedir/run/xen -AC_SUBST(XEN_RUN_DIR) - XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging AC_SUBST(XEN_PAGING_DIR) ])
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -1
@@ -12,7 +12,7 @@ EnvironmentFile=-/etc/default/xenstored EnvironmentFile=-/etc/sysconfig/xenstored PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities -ExecStartPre=/bin/mkdir -p /var/run/xen +ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \
Re: [PATCH 42/46] Use XEN_RUN_DIR instead of /var/run/xen
Quoted 15 lines · Olaf Hering
Also remove duplicate
XEN_RUN_DIRfrom m4/paths.m4. FixXEN_RUN_DIRexpansion in toplevelMakefileSigned-off-by Olaf Hering <[email protected]>--- Makefile | 2 +- m4/paths.m4 | 3 --- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)Makefile +0
-0
Makefile uninstall: · line 224
Quoted 5 lines
Makefile +1
-1@@ -221,7 +221,7 @@ uninstall: rm -f $(D)$(XEN_SYSTEMD_DIR)/*.service rm -f $(D)$(XEN_SYSTEMD_DIR)/*.mount rm -f $(D)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf - rm -rf $(D)$(XEN_RUN_DIR)* $(D)/var/lib/xen* + rm -rf $(D)$(XEN_RUN_DIR)/* $(D)/var/lib/xen*
This would previous have removed XEN_RUN_DIR itself and not just the contents. It would also have historically also cleaned up $(XEN_RUN_DIR)d (i.e. xend...)!
Perhaps just add an rmdir to follow this, globbing the dir is indeed pretty skanky (and probably annoies e.g. the xenomai maintainers!)
Ian.
Re: [PATCH 42/46] Use XEN_RUN_DIR instead of /var/run/xen
Quoted 26 lines · Ian Campbell
Quoted 15 lines · Olaf Hering
Also remove duplicate
XEN_RUN_DIRfrom m4/paths.m4. FixXEN_RUN_DIRexpansion in toplevelMakefileSigned-off-by Olaf Hering <[email protected]>--- Makefile | 2 +- m4/paths.m4 | 3 --- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)Makefile +0
-0Makefile uninstall: · line 224
Quoted 5 lines
Makefile +1
-1@@ -221,7 +221,7 @@ uninstall: rm -f $(D)$(XEN_SYSTEMD_DIR)/*.service rm -f $(D)$(XEN_SYSTEMD_DIR)/*.mount rm -f $(D)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf - rm -rf $(D)$(XEN_RUN_DIR)* $(D)/var/lib/xen* + rm -rf $(D)$(XEN_RUN_DIR)/* $(D)/var/lib/xen*This would previous have removed
XEN_RUN_DIRitself and not just the contents. It would also have historically also cleaned up $(XEN_RUN_DIR)d (i.e. xend...)!
Quoted 2 lines
Perhaps just add an rmdir to follow this, globbing the dir is indeed pretty skanky (and probably annoies e.g. the xenomai maintainers!)
The uninstall target is indeed special. It leaves half of the make install result on the system. And the globbing needs more work.
I will address this in the next version of the patch.
Olaf
Re: [PATCH 42/46] Use XEN_RUN_DIR instead of /var/run/xen
Quoted 28 lines · Olaf Hering
Quoted 26 lines · Ian Campbell
Quoted 15 lines · Olaf Hering
Also remove duplicate
XEN_RUN_DIRfrom m4/paths.m4. FixXEN_RUN_DIRexpansion in toplevelMakefileSigned-off-by Olaf Hering <[email protected]>--- Makefile | 2 +- m4/paths.m4 | 3 --- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)Makefile +0
-0Makefile uninstall: · line 224
Quoted 5 lines
Makefile +1
-1@@ -221,7 +221,7 @@ uninstall: rm -f $(D)$(XEN_SYSTEMD_DIR)/*.service rm -f $(D)$(XEN_SYSTEMD_DIR)/*.mount rm -f $(D)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf - rm -rf $(D)$(XEN_RUN_DIR)* $(D)/var/lib/xen* + rm -rf $(D)$(XEN_RUN_DIR)/* $(D)/var/lib/xen*This would previous have removed
XEN_RUN_DIRitself and not just the contents. It would also have historically also cleaned up $(XEN_RUN_DIR)d (i.e. xend...)!
Quoted 5 lines
Quoted 2 lines
Perhaps just add an rmdir to follow this, globbing the dir is indeed pretty skanky (and probably annoies e.g. the xenomai maintainers!)
The uninstall target is indeed special. It leaves half of the make install result on the system. And the globbing needs more work.
To say the least.
Quoted 1 line
I will address this in the next version of the patch.
Just the wrinkle above? Feel free to ignore the larger Yakk for the time bein ;-)
Ian.
PATCH 43/46 Move systemd paths to Paths.mk
In reply to Olaf HeringEvery path should be in Paths.mk.
--- config/Paths.mk.in | 3 +++ config/Tools.mk.in | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
config/Paths.mk.in +3 -0
@@ -41,3 +41,6 @@ XENFIRMWAREDIR := @LIBEXEC_BOOT@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ + +XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ +XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@
config/Tools.mk.in +0 -2
@@ -61,8 +61,6 @@ CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@ CONFIG_SYSTEMD := @systemd@ SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ SYSTEMD_LIBS := @SYSTEMD_LIBS@ -XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ -XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@
Re: [PATCH 43/46] Move systemd paths to Paths.mk
Quoted 1 line · Olaf Hering
Every path should be in Paths.mk.
XEN_SYSTEMD_MODULES_LOAD is a path?
Quoted 30 lines
Signed-off-by Olaf Hering <[email protected]>--- config/Paths.mk.in | 3 +++ config/Tools.mk.in | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)config/Paths.mk.in +3
-0@@ -41,3 +41,6 @@ XENFIRMWAREDIR := @LIBEXEC_BOOT@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ + +XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ +XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@config/Tools.mk.in +0
-2@@ -61,8 +61,6 @@ CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@ CONFIG_SYSTEMD := @systemd@ SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ SYSTEMD_LIBS := @SYSTEMD_LIBS@ -XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ -XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@
Re: [PATCH 43/46] Move systemd paths to Paths.mk
Quoted 4 lines · Ian Campbell
Quoted 1 line · Olaf Hering
Every path should be in Paths.mk.
XEN_SYSTEMD_MODULES_LOADis a path?
Yes, it contains various foo.conf files, with modules to load on boot. m4/systemd.m4:77: SYSTEMD_MODULES_LOAD="\$(PREFIX)/lib/modules-load.d/"
Olaf
Ian Campbell
Acked-byRe: [PATCH 43/46] Move systemd paths to Paths.mk
Quoted 9 lines · Olaf Hering
Quoted 4 lines · Ian Campbell
Quoted 1 line · Olaf Hering
Every path should be in Paths.mk.
XEN_SYSTEMD_MODULES_LOADis a path?Yes, it contains various foo.conf files, with modules to load on boot. m4/systemd.m4:77: SYSTEMD_MODULES_LOAD="\$(PREFIX)/lib/modules-load.d/"
Ah right.
PATCH 44/46 Include Paths.mk in toplevel Makefile to fix uninstall
In reply to Olaf Heringmake uninstall references various variable paths.
If they are not set it may wipe /*.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -6,6 +6,7 @@ .PHONY: all all: dist +-include config/Paths.mk -include config/Toplevel.mk SUBSYSTEMS?=xen tools stubdom docs TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS))
Re: [PATCH 44/46] Include Paths.mk in toplevel Makefile to fix uninstall
Quoted 3 lines · Olaf Hering
make uninstall references various variable paths.
If they are not set it may wipe /*.
Urk!
I think the uninstall run may need some sort of sanity check to ensure you have run configure then.
tools/Rules.mk has:
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
$(XEN_ROOT)/config/Tools.mk:
$(error You have to run ./configure before building or installing the tools)
endifwhich could perhaps be adapted. Alternatively splitting uninstall into uninstall-$subsystem and having the non-Xen subsystems start with a check that PREFIX (or some suitable variable) is non-empty?
Ian.
Re: [PATCH 44/46] Include Paths.mk in toplevel Makefile to fix uninstall
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Olaf Hering
make uninstall references various variable paths.
If they are not set it may wipe /*.
Urk!
I think the uninstall run may need some sort of sanity check to ensure you have run configure then.
I will rework this patch.
Olaf
PATCH 45/46 Move MAN1DIR and MAN8DIR to Paths.mk
In reply to Olaf Hering--- config/Paths.mk.in | 4 ++++ config/StdGNU.mk | 3 --- config/SunOS.mk | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-)
config/Paths.mk.in +4 -0
@@ -44,3 +44,7 @@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ + +MAN1DIR := $(MANDIR)/man1 +MAN8DIR := $(MANDIR)/man8 +
config/StdGNU.mk +0 -3
@@ -27,9 +27,6 @@ INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -MAN1DIR = $(MANDIR)/man1 -MAN8DIR = $(MANDIR)/man8 - SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR) BOOT_DIR ?= /boot
config/SunOS.mk +0 -3
@@ -19,9 +19,6 @@ INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -MAN1DIR = $(MANDIR)/man1 -MAN8DIR = $(MANDIR)/man8 - BOOT_DIR ?= /boot SunOS_LIBDIR = /usr/sfw/lib
Re: [PATCH 45/46] Move MAN1DIR and MAN8DIR to Paths.mk
Quoted 1 line · Olaf Hering
Signed-off-by Olaf Hering <[email protected]>
PATCH 46/46 rerun autogen.sh
In reply to Olaf Hering--- configure | 125 ++++++++++++++++++++++++++----- tools/configure | 222 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 298 insertions(+), 49 deletions(-)
configure +107 -18
@@ -598,19 +598,24 @@ XEN_PAGING_DIR XEN_LOCK_DIR XEN_SCRIPT_DIR XEN_CONFIG_DIR +INITD_DIR CONFIG_DIR -XENFIRMWAREDIR -PRIVATE_BINDIR -PKG_XEN_PREFIX -PRIVATE_PREFIX +DOCDIR +MANDIR SHAREDIR XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR LIBDIR +LIBEXEC_BOOT +LIBEXEC_INC +LIBEXEC_LIB +LIBEXEC_BIN LIBEXEC +INCLUDEDIR SBINDIR BINDIR +BASH_COMPLETION_DIR host_os host_vendor host_cpu
@@ -660,6 +665,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +with_initd_dir +with_bash_completion_dir enable_xen enable_tools enable_stubdom
@@ -1289,6 +1296,15 @@ Optional Features: --enable-stubdom Enable build and install of stubdom --disable-docs Disable build and install of docs +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-initd-dir=DIR Path to directory with sysv runlevel scripts. + [PREFIX/etc/init.d] + --with-bash_completion-dir=DIR + Path to directory with sysv runlevel scripts. + [SYSCONFDIR/bash_completion.d] + Report bugs to <[email protected]>. Xen Hypervisor home page: <http://www.xen.org/>. _ACEOF
@@ -1851,6 +1867,57 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac test "x$prefix" = "xNONE" && prefix=$ac_default_prefix test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix} +if test "x$localstatedir" = 'x${prefix}/var' ; then + localstatedir=/var +fi + +if test "x$sysconfdir" = 'x${prefix}/etc' ; then + case "$host_os" in + *freebsd*) + sysconfdir=$prefix/etc + ;; + *solaris*) + if test "$prefix" = "/usr" ; then + sysconfdir=/etc + else + sysconfdir=$prefix/etc + fi + ;; + *) + sysconfdir=/etc + ;; + esac +fi + + +# Check whether --with-initd-dir was given. +if test "${with_initd_dir+set}" = set; then : + withval=$with_initd_dir; initd_dir_path=$withval +else + case "$host_os" in + *linux*) + if test -d $sysconfdir/rc.d/init.d ; then + initd_dir_path=$sysconfdir/rc.d/init.d + else + initd_dir_path=$sysconfdir/init.d + fi + ;; + *) + initd_dir_path=$sysconfdir/rc.d + ;; + esac +fi + + + +# Check whether --with-bash_completion-dir was given. +if test "${with_bash_completion_dir+set}" = set; then : + withval=$with_bash_completion_dir; BASH_COMPLETION_DIR=$withval +else + BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d +fi + + BINDIR=$prefix/bin
@@ -1858,37 +1925,55 @@ BINDIR=$prefix/bin SBINDIR=$prefix/sbin -LIBEXEC=$prefix/lib/xen/bin +INCLUDEDIR=`eval echo $includedir` -LIBDIR=`eval echo $libdir` +if test "x$libexecdir" = 'x${exec_prefix}/libexec' ; then + case "$host_os" in + *netbsd*) + libexecdir=$prefix/libexec + ;; + *) + libexecdir=$prefix/lib + ;; + esac +fi +LIBEXEC=`eval echo $libexecdir/xen` +LIBEXEC_BIN=$LIBEXEC/bin +LIBEXEC_LIB=$LIBEXEC/lib +LIBEXEC_INC=$LIBEXEC/include +LIBEXEC_BOOT=$LIBEXEC/boot -XEN_RUN_DIR=/var/run/xen -XEN_LOG_DIR=/var/log/xen -XEN_LIB_STORED=/var/lib/xenstored +LIBDIR=`eval echo $libdir` -SHAREDIR=$prefix/share +XEN_RUN_DIR=$localstatedir/run/xen -PRIVATE_PREFIX=$LIBDIR/xen +XEN_LOG_DIR=$localstatedir/log/xen -PKG_XEN_PREFIX=$LIBDIR/xen +XEN_LIB_STORED=$localstatedir/lib/xenstored -PRIVATE_BINDIR=$PRIVATE_PREFIX/bin +SHAREDIR=$prefix/share -XENFIRMWAREDIR=$prefix/lib/xen/boot +MANDIR=`eval eval echo $mandir` -CONFIG_DIR=/etc +DOCDIR=`eval eval echo $docdir` + + +CONFIG_DIR=$sysconfdir + + +INITD_DIR=$initd_dir_path XEN_CONFIG_DIR=$CONFIG_DIR/xen
@@ -1897,13 +1982,17 @@ XEN_CONFIG_DIR=$CONFIG_DIR/xen XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts -XEN_LOCK_DIR=/var/lock +case "$host_os" in +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;; +esac -XEN_RUN_DIR=/var/run/xen +XEN_RUN_DIR=$localstatedir/run/xen -XEN_PAGING_DIR=/var/lib/xen/xenpaging +XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging
tools/configure +191 -31
373 lines not on this page · raw message
Re: [PATCH 46/46] rerun autogen.sh
On Mon, 2014-09-22 at 15:00 +0200, Olaf Hering wrote:
This should be done in the individual patches not all at once (or else bisectability goes out the window). As I mentioned as I came across those patches it's best if you mention the need to rerun autogen.sh in the commit message as a reminder to the committer. (This is irrespective of whether you choose to include changes to the generated files in your patches).
Ian.