Honour more configure variables in various places (iteration 2)
PATCH 1/17 oxenstored: honour XEN_{LOG, RUN}_DIR in oxenstored.conf
In reply to Wei LiuGenerate oxenstored.conf with configure. This involves modifying tools/configure.ac and rerun autogen.sh.
---
.gitignore | 1 +
tools/configure | 3 ++-
tools/configure.ac | 1 +
tools/ocaml/xenstored/{oxenstored.conf => oxenstored.conf.in} | 6 +++---
4 files changed, 7 insertions(+), 4 deletions(-)
rename tools/ocaml/xenstored/{oxenstored.conf => oxenstored.conf.in} (84%).gitignore +1 -0
@@ -346,6 +346,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.* tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli tools/ocaml/xenstored/oxenstored +tools/ocaml/xenstored/oxenstored.conf tools/ocaml/test/xtl tools/ocaml/test/send_debug_keys tools/ocaml/test/list_domains
tools/configure +2 -1
@@ -2408,7 +2408,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in" +ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in ocaml/xenstored/oxenstored.conf" ac_config_headers="$ac_config_headers config.h"
@@ -10374,6 +10374,7 @@ do "hotplug/NetBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/NetBSD/rc.d/xendriverdomain" ;; "libxl/xenlight.pc.in") CONFIG_FILES="$CONFIG_FILES libxl/xenlight.pc.in" ;; "libxl/xlutil.pc.in") CONFIG_FILES="$CONFIG_FILES libxl/xlutil.pc.in" ;; + "ocaml/xenstored/oxenstored.conf") CONFIG_FILES="$CONFIG_FILES ocaml/xenstored/oxenstored.conf" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "hotplug/Linux/systemd/proc-xen.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/proc-xen.mount" ;; "hotplug/Linux/systemd/var-lib-xenstored.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/var-lib-xenstored.mount" ;;
tools/configure.ac +1 -0
@@ -21,6 +21,7 @@ hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in +ocaml/xenstored/oxenstored.conf ]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([../])
tools/ocaml/xenstored/oxenstored.conf.in renamed from tools/ocaml/xenstored/oxenstored.conf +3 -3
@@ -1,7 +1,7 @@ # default xenstored config # Where the pid file is stored -pid-file = /var/run/xenstored.pid +pid-file = @XEN_RUN_DIR@/xenstored.pid # Randomly failed a transaction with EAGAIN. Used for testing Xs user test-eagain = false
@@ -24,12 +24,12 @@ quota-maxrequests = 1024 persistent = false # Xenstored logs -# xenstored-log-file = /var/log/xenstored.log +# xenstored-log-file = @XEN_LOG_DIR@/xenstored.log # xenstored-log-level = null # xenstored-log-nb-files = 10 # Xenstored access logs -# access-log-file = /var/log/xenstored-access.log +# access-log-file = @XEN_LOG_DIR@/xenstored-access.log # access-log-nb-lines = 13215 # acesss-log-nb-chars = 180 # access-log-special-ops = false
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 3/17 oxenstored: honour XEN_LOG_DIR defined by configure
In reply to Wei LiuWe generate a corresponding constant (in lower case) in paths.ml. Use that in source code to get rid of hard-coded path.
---
Cc: Ian Jackson <[email protected]>
Cc: David Scot <[email protected]>
--- tools/ocaml/xenstored/logging.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/ocaml/xenstored/logging.ml +2 -2
@@ -154,7 +154,7 @@ let make_syslog_logger facility = Syslog.log facility level s in { stop = nothing; restart = nothing; rotate = nothing; write=write } -let xenstored_log_destination = ref (File "/var/log/xenstored.log") +let xenstored_log_destination = ref (File (Paths.xen_log_dir ^ "/xenstored.log")) let xenstored_log_level = ref Warn let xenstored_log_nb_files = ref 10 let xenstored_log_nb_lines = ref 13215
@@ -262,7 +262,7 @@ let sanitize_data data = String.escaped data let activate_access_log = ref true -let access_log_destination = ref (File "/var/log/xenstored-access.log") +let access_log_destination = ref (File (Paths.xen_log_dir ^ "/xenstored-access.log")) let access_log_nb_files = ref 20 let access_log_nb_lines = ref 13215 let access_log_nb_chars = ref 180
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 5/17 tools: install and remove XEN_LIB_DIR in Makefile
In reply to Wei LiuThe intention of using wild card in uninstall target is to remove both xen and xenstored directories. Change that to two runes that explicitly remove each of those directories.
Note that the runes that use hard-coded paths are kept for now to keep the tree bisectable as I replace hard-coded paths component by component. Those runes will be removed eventually.
---
Cc: Ian Jackson <[email protected]>
--- tools/Makefile | 3 +++ 1 file changed, 3 insertions(+)
tools/Makefile +3 -0
@@ -64,6 +64,7 @@ install: subdirs-install $(INSTALL_DIR) $(DESTDIR)$(XEN_LOG_DIR) $(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_DIR) $(INSTALL_DIR) $(DESTDIR)/var/lib/xen + $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_DIR) .PHONY: uninstall uninstall: D=$(DESTDIR)
@@ -77,6 +78,8 @@ uninstall: rm -f $(D)$(sbindir)/xendomains rm -f $(D)$(SYSCONFIG_DIR)/xencommons rm -rf $(D)/var/lib/xen* + rm -rf $(D)$(XEN_LIB_DIR) + rm -rf $(D)$(XEN_LIB_STORED) rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen rm -rf $(D)$(bindir)/xc_shadow rm -rf $(D)$(bindir)/pygrub
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
cover Honour more configure variables in various places (iteration 2)
The first three patches are carried over from previous series.
The rest introduce some new variables and replace various hard-coded paths in code.
There is one more path /var/run, with which I'm not sure what to do for the moment. More patches will come to deal with it.
Wei.
Wei Liu (17):
oxenstored: honour XEN_{LOG,RUN}_DIR in oxenstored.conf
oxenstored: generate a paths module
oxenstored: honour XEN_LOG_DIR defined by configure
build: introduce and export XEN_LIB_DIR
tools: install and remove XEN_LIB_DIR in Makefile hotplug/Linux: honour XEN_LIB_DIR
libxl: honour XEN_LIB_DIR
tools: remove hard-coded /var/lib/xen in Makefile
docs: honour XEN_DUMP_DIR
build: introduce XEN_RUN_STORED
hotplug/Linux: honour XEN_RUN_STORED
libxenstore: honour XEN_RUN_STORED hotplug/FreeBSD: honour XEN_RUN_STORED ocaml/libxs: generate a paths.ml
ocaml/libxs: honour XEN_RUN_STORED
oxenstored: honour XEN_RUN_STORED and XEN_CONFIG_DIR
oxenstored: honour XEN_RUN_STORED in systemd C stub
.gitignore | 7 +
Config.mk | 3 +-
config/Paths.mk.in | 2 +
configure | 8 +
docs/configure | 188 ++++++++++++++++++++-
docs/configure.ac | 9 +-
docs/man/{xl.cfg.pod.5 => xl.cfg.pod.5.in} | 6 +-
docs/man/{xl.pod.1 => xl.pod.1.in} | 2 +-
m4/paths.m4 | 6 +
tools/Makefile | 7 +-
tools/configure | 12 +-
tools/configure.ac | 2 +
tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +-
...ysconfig.xendomains => sysconfig.xendomains.in} | 4 +-
tools/hotplug/Linux/systemd/xenstored.socket.in | 2 +-
tools/hotplug/Linux/systemd/xenstored_ro.socket.in | 2 +-
tools/libxl/libxl_dom.c | 4 +-
tools/libxl/libxl_internal.h | 4 +-
tools/ocaml/Makefile.rules | 11 ++
tools/ocaml/libs/xs/Makefile | 6 +-
tools/ocaml/libs/xs/xs.ml | 2 +-
tools/ocaml/xenstored/Makefile | 15 +-
tools/ocaml/xenstored/define.ml | 6 +-
tools/ocaml/xenstored/disk.ml | 2 +-
tools/ocaml/xenstored/logging.ml | 4 +-
.../{oxenstored.conf => oxenstored.conf.in} | 6 +-
tools/ocaml/xenstored/systemd_stubs.c | 6 +-
tools/ocaml/xenstored/xenstored.ml | 8 +-
tools/xenstore/Makefile | 1 +
tools/xenstore/xs_lib.c | 2 +-
30 files changed, 302 insertions(+), 37 deletions(-)
rename docs/man/{xl.cfg.pod.5 => xl.cfg.pod.5.in} (99%)
rename docs/man/{xl.pod.1 => xl.pod.1.in} (99%)
rename tools/hotplug/Linux/init.d/{sysconfig.xendomains => sysconfig.xendomains.in} (98%)
rename tools/ocaml/xenstored/{oxenstored.conf => oxenstored.conf.in} (84%)Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 2/17 oxenstored: generate a paths module
That file includes all paths generated by configure. It will be used to get rid of hard-coded paths in code.
---
Cc: Ian Jackson <[email protected]>
Cc: David Scot <[email protected]>
--- .gitignore | 1 + tools/ocaml/Makefile.rules | 11 +++++++++++ tools/ocaml/xenstored/Makefile | 8 +++++++- 3 files changed, 19 insertions(+), 1 deletion(-)
.gitignore +1 -0
@@ -347,6 +347,7 @@ tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli tools/ocaml/xenstored/oxenstored tools/ocaml/xenstored/oxenstored.conf +tools/ocaml/xenstored/paths.ml tools/ocaml/test/xtl tools/ocaml/test/send_debug_keys tools/ocaml/test/list_domains
tools/ocaml/Makefile.rules +11 -0
@@ -95,3 +95,14 @@ $(foreach lib,$(OCAML_LIBRARY),$(eval $(call OCAML_LIBRARY_template,$(lib)))) $(foreach lib,$(OCAML_NOC_LIBRARY),$(eval $(call OCAML_NOC_LIBRARY_template,$(lib)))) $(foreach p,$(OCAML_PROGRAM),$(eval $(call OCAML_PROGRAM_template,$(p)))) $(foreach p,$(C_PROGRAM),$(eval $(call C_PROGRAM_template,$(p)))) + +buildmakevars2module = $(eval $(call buildmakevars2module-closure,$(1))) +define buildmakevars2module-closure + $(1): .phony + rm -f $(1).tmp; \ + $(foreach var, $(BUILD_MAKE_VARS), \ + printf "let %s = \"%s\";;\n" \ + $(shell echo $(var) | tr '[:upper:]' '[:lower:]') \ + $($(var)) >>$(1).tmp;) \ + $(call move-if-changed,$(1).tmp,$(1)) +endef
tools/ocaml/xenstored/Makefile +7 -1
@@ -32,7 +32,8 @@ OCAML_LIBRARY += systemd LIBS_systemd += $(LDFLAGS-y) -OBJS = define \ +OBJS = paths \ + define \ stdext \ trie \ config \
@@ -87,3 +88,8 @@ install: all $(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR) include $(OCAML_TOPLEVEL)/Makefile.rules + +genpath-target = $(call buildmakevars2module,paths.ml) +$(eval $(genpath-target)) + +GENERATED_FILES += paths.ml
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 4/17 build: introduce and export XEN_LIB_DIR
In reply to Wei LiuThis variable defaults to /var/lib/xen. It will be used to substitute various hard-coded paths in tools.
The new variable points to $localstatedir/lib/xen, which defaults to /var/lib/xen, so there is no change in default configuration.
---
Cc: Ian Jackson <[email protected]>
Need to rerun autogen.sh
--- Config.mk | 3 ++- config/Paths.mk.in | 1 + configure | 4 ++++ m4/paths.m4 | 3 +++ tools/configure | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-)
Config.mk +2 -1
@@ -181,7 +181,8 @@ 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_DUMP_DIR XEN_LOG_DIR + XEN_RUN_DIR XEN_PAGING_DIR XEN_DUMP_DIR XEN_LOG_DIR \ + XEN_LIB_DIR buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) define buildmakevars2file-closure
config/Paths.mk.in +1 -0
@@ -40,6 +40,7 @@ MAN8DIR := $(mandir)/man8 XEN_RUN_DIR := @XEN_RUN_DIR@ XEN_LOG_DIR := @XEN_LOG_DIR@ +XEN_LIB_DIR := @XEN_LIB_DIR@ XEN_LIB_STORED := @XEN_LIB_STORED@ CONFIG_DIR := @CONFIG_DIR@
configure +4 -0
@@ -603,6 +603,7 @@ XEN_CONFIG_DIR INITD_DIR CONFIG_DIR SHAREDIR +XEN_LIB_DIR XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR
@@ -1980,6 +1981,9 @@ XEN_LOG_DIR=$localstatedir/log/xen XEN_LIB_STORED=$localstatedir/lib/xenstored +XEN_LIB_DIR=$localstatedir/lib/xen + + SHAREDIR=$prefix/share
m4/paths.m4 +3 -0
@@ -107,6 +107,9 @@ AC_SUBST(XEN_LOG_DIR) XEN_LIB_STORED=$localstatedir/lib/xenstored AC_SUBST(XEN_LIB_STORED) +XEN_LIB_DIR=$localstatedir/lib/xen +AC_SUBST(XEN_LIB_DIR) + SHAREDIR=$prefix/share AC_SUBST(SHAREDIR)
tools/configure +4 -0
@@ -722,6 +722,7 @@ XEN_CONFIG_DIR INITD_DIR CONFIG_DIR SHAREDIR +XEN_LIB_DIR XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR
@@ -3939,6 +3940,9 @@ XEN_LOG_DIR=$localstatedir/log/xen XEN_LIB_STORED=$localstatedir/lib/xenstored +XEN_LIB_DIR=$localstatedir/lib/xen + + SHAREDIR=$prefix/share
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 8/17 tools: remove hard-coded /var/lib/xen in Makefile
In reply to Wei LiuNow all conversations are done, remove the hard-coded paths.
---
Cc: Ian Jackson <[email protected]>
--- tools/Makefile | 2 -- 1 file changed, 2 deletions(-)
tools/Makefile +0 -2
@@ -63,7 +63,6 @@ install: subdirs-install $(INSTALL_DIR) -m 700 $(DESTDIR)$(XEN_DUMP_DIR) $(INSTALL_DIR) $(DESTDIR)$(XEN_LOG_DIR) $(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_DIR) - $(INSTALL_DIR) $(DESTDIR)/var/lib/xen $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_DIR) .PHONY: uninstall
@@ -77,7 +76,6 @@ uninstall: rm -f $(D)$(SYSCONFIG_DIR)/xendomains rm -f $(D)$(sbindir)/xendomains rm -f $(D)$(SYSCONFIG_DIR)/xencommons - rm -rf $(D)/var/lib/xen* rm -rf $(D)$(XEN_LIB_DIR) rm -rf $(D)$(XEN_LIB_STORED) rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 6/17 hotplug/Linux: honour XEN_LIB_DIR
In reply to Wei LiuUse configure to generate sysconfig.xendomains file.
---
Cc: Ian Jackson <[email protected]>
I've committed the result of autogen.sh. Rerun autogen.sh if necessary.
---
.gitignore | 1 +
tools/configure | 3 ++-
tools/configure.ac | 1 +
.../Linux/init.d/{sysconfig.xendomains => sysconfig.xendomains.in} | 4 ++--
4 files changed, 6 insertions(+), 3 deletions(-)
rename tools/hotplug/Linux/init.d/{sysconfig.xendomains => sysconfig.xendomains.in} (98%).gitignore +1 -0
@@ -149,6 +149,7 @@ tools/hotplug/common/hotplugpath.sh tools/hotplug/FreeBSD/rc.d/xencommons tools/hotplug/FreeBSD/rc.d/xendriverdomain tools/hotplug/Linux/init.d/sysconfig.xencommons +tools/hotplug/Linux/init.d/sysconfig.xendomains tools/hotplug/Linux/init.d/xen-watchdog tools/hotplug/Linux/init.d/xencommons tools/hotplug/Linux/init.d/xendomains
tools/configure +2 -1
@@ -2409,7 +2409,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in ocaml/xenstored/oxenstored.conf" +ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in ocaml/xenstored/oxenstored.conf" ac_config_headers="$ac_config_headers config.h"
@@ -10367,6 +10367,7 @@ do "hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;; "hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;; "hotplug/Linux/init.d/sysconfig.xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xencommons" ;; + "hotplug/Linux/init.d/sysconfig.xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xendomains" ;; "hotplug/Linux/init.d/xen-watchdog") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xen-watchdog" ;; "hotplug/Linux/init.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xencommons" ;; "hotplug/Linux/init.d/xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xendomains" ;;
tools/configure.ac +1 -0
@@ -10,6 +10,7 @@ AC_CONFIG_FILES([ hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons +hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains
tools/hotplug/Linux/init.d/sysconfig.xendomains.in renamed from tools/hotplug/Linux/init.d/sysconfig.xendomains +2 -2
@@ -45,7 +45,7 @@ XENDOMAINS_CREATE_USLEEP=5000000 XENDOMAINS_MIGRATE="" ## Type: string -## Default: /var/lib/xen/save +## Default: @XEN_LIB_DIR@/save # # Directory to save running domains to when the system (dom0) is # shut down. Will also be used to restore domains from if # XENDOMAINS_RESTORE
@@ -53,7 +53,7 @@ XENDOMAINS_MIGRATE="" # (e.g. because you rather shut domains down). # If domain saving does succeed, SHUTDOWN will not be executed. # -XENDOMAINS_SAVE=/var/lib/xen/save +XENDOMAINS_SAVE=@XEN_LIB_DIR@/save ## Type: string ## Default: "--wait"
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 7/17 libxl: honour XEN_LIB_DIR
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
--- tools/libxl/libxl_dom.c | 4 +++- tools/libxl/libxl_internal.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)
tools/libxl/libxl_dom.c +3 -1
@@ -25,6 +25,8 @@#include <xen/hvm/hvm_xs_strings.h> #include <xen/hvm/e820.h> +#include "_paths.h" +libxl_domain_type libxl__domain_type (libxl__gc *gc,uint32_t domid) {libxl_ctx *ctx =libxl__gc_owner (gc);
@@ -1129,7 +1131,7 @@ const char *libxl__userdata_path(libxl__gc *gc, uint32_t domid, goto out; } uuid_string =GCSPRINTF (LIBXL_UUID_FMT ,LIBXL_UUID_BYTES (info.uuid)); - path =GCSPRINTF ("/var/lib/xen/userdata-%s.%u.%s.%s" , + path =GCSPRINTF (XEN_LIB_DIR "/userdata-%s.%u.%s.%s" , wh, domid, uuid_string, userdata_userid); out:
tools/libxl/libxl_internal.h +2 -2
@@ -93,8 +93,8 @@/* QEMU may be slow to load and start due to a bug in Linux where the I/O * subsystem sometime produce high latency under load. */ #define LIBXL_DEVICE_MODEL_START_TIMEOUT 60 -#define LIBXL_DEVICE_MODEL_SAVE_FILE "/var/lib/xen/qemu-save"/* .$domid */ -#define LIBXL_DEVICE_MODEL_RESTORE_FILE "/var/lib/xen/qemu-resume"/* .$domid */ +#define LIBXL_DEVICE_MODEL_SAVE_FILE XEN_LIB_DIR "/qemu-save"/* .$domid */ +#define LIBXL_DEVICE_MODEL_RESTORE_FILE XEN_LIB_DIR "/qemu-resume"/* .$domid */ #define LIBXL_STUBDOM_START_TIMEOUT 30#define LIBXL_QEMU_BODGE_TIMEOUT 2#define LIBXL_XENCONSOLE_LIMIT 1048576
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 9/17 docs: honour XEN_DUMP_DIR
In reply to Wei LiuUse configure to generate xl.cfg and xl manpage. Add the generated files to gitignore.
---
Cc: Ian Jackson <[email protected]>
Not entirely sure if this is a good idea. I don't deem this patch important so I'm fine with dropping it.
I've committed the result of running autogen.sh here. Please rerun autogen.sh if necessary.
---
.gitignore | 2 +
docs/configure | 184 ++++++++++++++++++++++++++++-
docs/configure.ac | 9 +-
docs/man/{xl.cfg.pod.5 => xl.cfg.pod.5.in} | 6 +-
docs/man/{xl.pod.1 => xl.pod.1.in} | 2 +-
5 files changed, 197 insertions(+), 6 deletions(-)
rename docs/man/{xl.cfg.pod.5 => xl.cfg.pod.5.in} (99%)
rename docs/man/{xl.pod.1 => xl.pod.1.in} (99%).gitignore +2 -0
@@ -41,6 +41,8 @@ config/Paths.mk build-* dist/* docs/html/ +docs/man/xl.cfg.pod.5 +docs/man/xl.pod.1 docs/man1/ docs/man5/ docs/man8/
docs/configure +183 -1
220 lines not on this page · raw message
docs/configure.ac +8 -1
@@ -5,13 +5,20 @@ AC_PREREQ([2.67]) AC_INIT([Xen Hypervisor Documentation], m4_esyscmd([../version.sh ../xen/Makefile]), [[email protected]], [xen], [http://www.xen.org/]) AC_CONFIG_SRCDIR([misc/xen-command-line.markdown]) -AC_CONFIG_FILES([../config/Docs.mk]) +AC_CONFIG_FILES([ +../config/Docs.mk +man/xl.cfg.pod.5 +man/xl.pod.1 +]) AC_CONFIG_AUX_DIR([../]) # M4 Macro includes m4_include([../m4/docs_tool.m4]) m4_include([../m4/path_or_fail.m4]) m4_include([../m4/features.m4]) +m4_include([../m4/paths.m4]) + +AX_XEN_EXPAND_CONFIG() AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev]) AX_DOCS_TOOL_PROG([POD2MAN], [pod2man])
docs/man/xl.cfg.pod.5.in renamed from docs/man/xl.cfg.pod.5 +3 -3
@@ -343,12 +343,12 @@ destroy`. =item B<coredump-destroy> -write a "coredump" of the domain to F</var/lib/xen/dump/NAME> and then +write a "coredump" of the domain to F<@XEN_DUMP_DIR@/NAME> and then destroy the domain. =item B<coredump-restart> -write a "coredump" of the domain to F</var/lib/xen/dump/NAME> and then +write a "coredump" of the domain to F<@XEN_DUMP_DIR@/NAME> and then restart the domain. =item B<soft-reset>
@@ -2017,7 +2017,7 @@ natively or via hardware backwards compatibility support. =head1 FILES F</etc/xen/NAME.cfg> -F</var/lib/xen/dump/NAME> +F<@XEN_DUMP_DIR@/NAME> =head1 BUGS
docs/man/xl.pod.1.in renamed from docs/man/xl.pod.1 +1 -1
@@ -280,7 +280,7 @@ Change the domain name of I<domain-id> to I<new-name>. Dumps the virtual machine's memory for the specified domain to the I<filename> specified, without pausing the domain. The dump file will be written to a distribution specific directory for dump files. Such -as: /var/lib/xen/dump. +as: @XEN_DUMP_DIR@/dump. =item B<help> [I<--long>]
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 17/17 oxenstored: honour XEN_RUN_STORED in systemd C stub
In reply to Wei LiuGenerate a _paths.h for that and add proper dependency.
---
Cc: Ian Jackson <[email protected]>
Cc: David Scott <[email protected]>
--- .gitignore | 1 + tools/ocaml/xenstored/Makefile | 7 +++++++ tools/ocaml/xenstored/systemd_stubs.c | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-)
.gitignore +1 -0
@@ -349,6 +349,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.* tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli tools/ocaml/libs/xs/paths.ml +tools/ocaml/xenstored/_paths.h tools/ocaml/xenstored/oxenstored tools/ocaml/xenstored/oxenstored.conf tools/ocaml/xenstored/paths.ml
tools/ocaml/xenstored/Makefile +7 -0
@@ -30,6 +30,8 @@ systemd_OBJS = systemd systemd_C_OBJS = systemd_stubs OCAML_LIBRARY += systemd +$(foreach obj,$(systemd_C_OBJS),$(obj).o): _paths.h + LIBS_systemd += $(LDFLAGS-y) OBJS = paths \
@@ -93,3 +95,8 @@ genpath-target = $(call buildmakevars2module,paths.ml) $(eval $(genpath-target)) GENERATED_FILES += paths.ml + +genpath-target = $(call buildmakevars2header,_paths.h) +$(eval $(genpath-target)) + +GENERATE_FILES += _paths.h
tools/ocaml/xenstored/systemd_stubs.c +4 -2
@@ -28,6 +28,8 @@#include <sys/socket.h> #include <systemd/sd-daemon.h> +#include "_paths.h" +/* Will work regardless of the order systemd gives them to us */ static int oxen_get_sd_fd (const char *connect_to) {
@@ -46,8 +48,8 @@ static int oxen_get_sd_fd(const char *connect_to)static int oxen_verify_socket_socket (const char *connect_to) { -if ((strcmp ("/var/run/xenstored/socket_ro" , connect_to) !=0 ) && - (strcmp ("/var/run/xenstored/socket" , connect_to) !=0 )) { +if ((strcmp (XEN_RUN_STORED "/socket_ro" , connect_to) !=0 ) && + (strcmp (XEN_RUN_STORED "/socket" , connect_to) !=0 )) { sd_notifyf(0, "STATUS=unexpected socket: %s\n" "ERRNO=%i", connect_to,
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 11/17 hotplug/Linux: honour XEN_RUN_STORED
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
--- tools/hotplug/Linux/systemd/xenstored.socket.in | 2 +- tools/hotplug/Linux/systemd/xenstored_ro.socket.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/hotplug/Linux/systemd/xenstored.socket.in +1 -1
@@ -5,7 +5,7 @@ After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket] -ListenStream=/var/run/xenstored/socket +ListenStream=@XEN_RUN_STORED@/socket SocketMode=0600 Service=xenstored.service
tools/hotplug/Linux/systemd/xenstored_ro.socket.in +1 -1
@@ -5,7 +5,7 @@ After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket] -ListenStream=/var/run/xenstored/socket_ro +ListenStream=@XEN_RUN_STORED@/socket_ro SocketMode=0660 Service=xenstored.service
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 14/17 ocaml/libxs: generate a paths.ml
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
Cc: David Scot <[email protected]>
--- .gitignore | 1 + tools/ocaml/libs/xs/Makefile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)
.gitignore +1 -0
@@ -348,6 +348,7 @@ tools/ocaml/libs/xl/xenlight.mli tools/ocaml/libs/xentoollog/_xtl_levels.* tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli +tools/ocaml/libs/xs/paths.ml tools/ocaml/xenstored/oxenstored tools/ocaml/xenstored/oxenstored.conf tools/ocaml/xenstored/paths.ml
tools/ocaml/libs/xs/Makefile +5 -1
@@ -11,7 +11,7 @@ OCAMLOPTFLAGS += -for-pack Xenstore PREINTF = xsraw.cmi xst.cmi PREOBJS = queueop xsraw xst PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx) -OBJS = queueop xsraw xst xs +OBJS = paths queueop xsraw xst xs INTF = xsraw.cmi xst.cmi xs.cmi LIBS = xenstore.cma xenstore.cmxa
@@ -45,3 +45,7 @@ uninstall: include $(TOPLEVEL)/Makefile.rules +genpath-target = $(call buildmakevars2module,paths.ml) +$(eval $(genpath-target)) + +GENERATED_FILES += paths.ml
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 16/17 oxenstored: honour XEN_RUN_STORED and XEN_CONFIG_DIR
In reply to Wei LiuOnly contain changes to ocaml source code. C stub files will be handled separately.
---
Cc: Ian Jackson <[email protected]>
Cc: David Scott <[email protected]>
--- tools/ocaml/xenstored/define.ml | 6 +++--- tools/ocaml/xenstored/disk.ml | 2 +- tools/ocaml/xenstored/xenstored.ml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
tools/ocaml/xenstored/define.ml +3 -3
@@ -20,10 +20,10 @@ let xenstored_minor = 0 let xenstored_proc_kva = "/proc/xen/xsd_kva" let xenstored_proc_port = "/proc/xen/xsd_port" -let xs_daemon_socket = "/var/run/xenstored/socket" -let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro" +let xs_daemon_socket = Paths.xen_run_stored ^ "/socket" +let xs_daemon_socket_ro = Paths.xen_run_stored ^ "/socket_ro" -let default_config_dir = "/etc/xen" +let default_config_dir = Paths.xen_config_dir let maxwatch = ref (50) let maxtransaction = ref (20)
tools/ocaml/xenstored/disk.ml +1 -1
@@ -15,7 +15,7 @@ *) let enable = ref false -let xs_daemon_database = "/var/run/xenstored/db" +let xs_daemon_database = Paths.xen_run_stored ^ "/db" let error fmt = Logging.error "disk" fmt
tools/ocaml/xenstored/xenstored.ml +4 -4
@@ -66,7 +66,7 @@ let process_domains store cons domains = let sigusr1_handler store = try let channel = open_out_gen [ Open_wronly; Open_creat; Open_trunc; ] - 0o600 "/var/run/xenstored/db.debug" in + 0o600 (Paths.xen_run_stored ^ "/db.debug") in finally (fun () -> Store.dump store channel) (fun () -> close_out channel) with _ ->
@@ -266,7 +266,7 @@ let _ = let quit = ref false in if cf.restart then ( - DB.from_file store domains cons "/var/run/xenstored/db"; + DB.from_file store domains cons (Paths.xen_run_stored ^ "/db"); Event.bind_dom_exc_virq eventchn ) else ( if !Disk.enable then (
@@ -293,7 +293,7 @@ let _ = Logging.init_xenstored_log(); if cf.activate_access_log then begin - let post_rotate () = DB.to_file store cons "/var/run/xenstored/db" in + let post_rotate () = DB.to_file store cons (Paths.xen_run_stored ^ "/db") in Logging.init_access_log post_rotate end;
@@ -440,5 +440,5 @@ let _ = raise exc done; info "stopping xenstored"; - DB.to_file store cons "/var/run/xenstored/db"; + DB.to_file store cons (Paths.xen_run_stored ^ "/db"); ()
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 10/17 build: introduce XEN_RUN_STORED
In reply to Wei LiuIt defaults to /var/run/xenstored. It will be used later to remove some hard-coded paths in tree. There should be no visible change to default configuration.
Install and remove it in respective Makefile targets.
---
Cc: Ian Jackson <[email protected]>
Need to run autogen.sh.
--- Config.mk | 2 +- config/Paths.mk.in | 1 + configure | 4 ++++ docs/configure | 4 ++++ m4/paths.m4 | 3 +++ tools/Makefile | 2 ++ tools/configure | 4 ++++ 7 files changed, 19 insertions(+), 1 deletion(-)
Config.mk +1 -1
@@ -182,7 +182,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_DUMP_DIR XEN_LOG_DIR \ - XEN_LIB_DIR + XEN_LIB_DIR XEN_RUN_STORED buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1))) define buildmakevars2file-closure
config/Paths.mk.in +1 -0
@@ -42,6 +42,7 @@ XEN_RUN_DIR := @XEN_RUN_DIR@ XEN_LOG_DIR := @XEN_LOG_DIR@ XEN_LIB_DIR := @XEN_LIB_DIR@ XEN_LIB_STORED := @XEN_LIB_STORED@ +XEN_RUN_STORED := @XEN_RUN_STORED@ CONFIG_DIR := @CONFIG_DIR@ INITD_DIR := @INITD_DIR@
configure +4 -0
@@ -604,6 +604,7 @@ INITD_DIR CONFIG_DIR SHAREDIR XEN_LIB_DIR +XEN_RUN_STORED XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR
@@ -1981,6 +1982,9 @@ XEN_LOG_DIR=$localstatedir/log/xen XEN_LIB_STORED=$localstatedir/lib/xenstored +XEN_RUN_STORED=$localstatedir/run/xenstored + + XEN_LIB_DIR=$localstatedir/lib/xen
docs/configure +4 -0
@@ -603,6 +603,7 @@ INITD_DIR CONFIG_DIR SHAREDIR XEN_LIB_DIR +XEN_RUN_STORED XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR
@@ -1887,6 +1888,9 @@ XEN_LOG_DIR=$localstatedir/log/xen XEN_LIB_STORED=$localstatedir/lib/xenstored +XEN_RUN_STORED=$localstatedir/run/xenstored + + XEN_LIB_DIR=$localstatedir/lib/xen
m4/paths.m4 +3 -0
@@ -107,6 +107,9 @@ AC_SUBST(XEN_LOG_DIR) XEN_LIB_STORED=$localstatedir/lib/xenstored AC_SUBST(XEN_LIB_STORED) +XEN_RUN_STORED=$localstatedir/run/xenstored +AC_SUBST(XEN_RUN_STORED) + XEN_LIB_DIR=$localstatedir/lib/xen AC_SUBST(XEN_LIB_DIR)
tools/Makefile +2 -0
@@ -64,6 +64,7 @@ install: subdirs-install $(INSTALL_DIR) $(DESTDIR)$(XEN_LOG_DIR) $(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_DIR) $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_DIR) + $(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_STORED) .PHONY: uninstall uninstall: D=$(DESTDIR)
@@ -78,6 +79,7 @@ uninstall: rm -f $(D)$(SYSCONFIG_DIR)/xencommons rm -rf $(D)$(XEN_LIB_DIR) rm -rf $(D)$(XEN_LIB_STORED) + rm -rf $(D)$(XEN_RUN_STORED) rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen rm -rf $(D)$(bindir)/xc_shadow rm -rf $(D)$(bindir)/pygrub
tools/configure +4 -0
@@ -723,6 +723,7 @@ INITD_DIR CONFIG_DIR SHAREDIR XEN_LIB_DIR +XEN_RUN_STORED XEN_LIB_STORED XEN_LOG_DIR XEN_RUN_DIR
@@ -3940,6 +3941,9 @@ XEN_LOG_DIR=$localstatedir/log/xen XEN_LIB_STORED=$localstatedir/lib/xenstored +XEN_RUN_STORED=$localstatedir/run/xenstored + + XEN_LIB_DIR=$localstatedir/lib/xen
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 15/17 ocaml/libxs: honour XEN_RUN_STORED
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
Cc: David Scot <[email protected]>
--- tools/ocaml/libs/xs/xs.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/libs/xs/xs.ml +1 -1
@@ -147,7 +147,7 @@ let monitor_paths xsh l time callback = end; unwatch () -let daemon_socket = "/var/run/xenstored/socket" +let daemon_socket = Paths.xen_run_stored ^ "/socket" (** Throws this rather than a miscellaneous Unix.connect failed *) exception Failed_to_connect
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 13/17 hotplug/FreeBSD: honour XEN_RUN_STORED
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
Cc: Roger Pau Monné <[email protected]>
--- tools/hotplug/FreeBSD/rc.d/xencommons.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
@@ -25,7 +25,7 @@ XENCONSOLED_PIDFILE="@XEN_RUN_DIR@/xenconsoled.pid" xen_precmd() { - mkdir -p /var/run/xenstored || exit 1 + mkdir -p @XEN_LIB_STORED@ || exit 1 } xen_startcmd()
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
PATCH 12/17 libxenstore: honour XEN_RUN_STORED
In reply to Wei Liu---
Cc: Ian Jackson <[email protected]>
--- tools/xenstore/Makefile | 1 + tools/xenstore/xs_lib.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
tools/xenstore/Makefile +1 -0
@@ -12,6 +12,7 @@ CFLAGS += -I./include CFLAGS += $(CFLAGS_libxenevtchn) CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" +CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\"" CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
tools/xenstore/xs_lib.c +1 -1
@@ -35,7 +35,7 @@ const char *xs_daemon_rootdir(void)const char *xs_daemon_rundir (void ) {char *s =getenv ("XENSTORED_RUNDIR" ); -return (s ? s :"/var/run/xenstored" ); +return (s ? s :XEN_RUN_STORED ); }static const char *xs_daemon_path (void )
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH 13/17] hotplug/FreeBSD: honour XEN_RUN_STORED
In reply to Wei LiuQuoted 1 line · Wei Liu
Signed-off-by Wei Liu <[email protected]>
Thanks.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 03/17] oxenstored: honour XEN_LOG_DIR defined by configure
In reply to Wei LiuQuoted 5 lines · Wei Liu
We generate a corresponding constant (in lower case) in paths.ml. Use that in source code to get rid of hard-coded path.
Signed-off-by Wei Liu <[email protected]>Acked-by David Scot <[email protected]>
You have dropped a 't'.
You should also note in the commit message that this alters where oxenstored puts its log files.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 03/17] oxenstored: honour XEN_LOG_DIR defined by configure
Quoted 9 lines · Andrew Cooper
Quoted 5 lines · Wei Liu
We generate a corresponding constant (in lower case) in paths.ml. Use that in source code to get rid of hard-coded path.
Signed-off-by Wei Liu <[email protected]>Acked-by David Scot <[email protected]>You have dropped a 't'.
Oops, yes -- and I c&p this to various other patch. Sorry Dave.
I will fix this.
Quoted 3 lines
You should also note in the commit message that this alters where oxenstored puts its log files.
Ack.
Wei.
Quoted 1 line
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 04/17] build: introduce and export XEN_LIB_DIR
In reply to Wei LiuWei Liu writes ("[PATCH 04/17] build: introduce and export XEN_LIB_DIR"):
Quoted 5 lines
This variable defaults to
/var/lib/xen. It will be used to substitute various hard-coded paths in tools.The new variable points to $localstatedir/lib/xen, which defaults to
/var/lib/xen, so there is no change in default configuration.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 05/17] tools: install and remove XEN_LIB_DIR in Makefile
In reply to Wei LiuWei Liu writes ("[PATCH 05/17] tools: install and remove XEN_LIB_DIR in Makefile"):
Quoted 7 lines
The intention of using wild card in uninstall target is to remove both xen and xenstored directories. Change that to two runes that explicitly remove each of those directories.
Note that the runes that use hard-coded paths are kept for now to keep the tree bisectable as I replace hard-coded paths component by component. Those runes will be removed eventually.
Thanks for the attention to upgrade compatibility.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 06/17] hotplug/Linux: honour XEN_LIB_DIR
In reply to Wei LiuWei Liu writes ("[PATCH 06/17] hotplug/Linux: honour XEN_LIB_DIR"):
Quoted 3 lines
Use configure to generate sysconfig.xendomains file.
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 07/17] libxl: honour XEN_LIB_DIR
In reply to Wei LiuWei Liu writes ("[PATCH 07/17] libxl: honour XEN_LIB_DIR"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
In reply to Wei LiuWei Liu writes ("[PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile"):
Quoted 1 line
Now all conversations are done, remove the hard-coded paths.
Should we not keep these for (most of) a release cycle ?
Otherwise someone who tries to use the new feature in 4.8 will find it doesn't uninstall their previous install.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 09/17] docs: honour XEN_DUMP_DIR
In reply to Wei LiuWei Liu writes ("[PATCH 09/17] docs: honour XEN_DUMP_DIR"):
Quoted 2 lines
Use configure to generate xl.cfg and xl manpage. Add the generated files to gitignore.
...
Quoted 2 lines
Not entirely sure if this is a good idea. I don't deem this patch important so I'm fine with dropping it.
It seems like a lot of effort to go to for something which is mostly cosmetic and will affect a small minority of users (given that we expect distros not to use weird paths).
But I don't object to it. We should wait a bit and see if anyone else does.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH 12/17 libxenstore: honour XEN_RUN_STORED
In reply to Wei LiuWei Liu writes ("[PATCH 12/17] libxenstore: honour XEN_RUN_STORED"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 11/17] hotplug/Linux: honour XEN_RUN_STORED
In reply to Wei LiuWei Liu writes ("[PATCH 11/17] hotplug/Linux: honour XEN_RUN_STORED"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 14/17] ocaml/libxs: generate a paths.ml
In reply to Wei LiuWei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
FAOD I don't consider myself qualified to review this.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 13/17] hotplug/FreeBSD: honour XEN_RUN_STORED
In reply to Wei LiuWei Liu writes ("[PATCH 13/17] hotplug/FreeBSD: honour XEN_RUN_STORED"):
Quoted 4 lines
Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Roger Pau Monné <[email protected]>
We should probably get an ack from Roger too.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 14/17] ocaml/libxs: generate a paths.ml
In reply to Ian JacksonQuoted 5 lines · Ian Jackson
Wei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>FAOD I don't consider myself qualified to review this.
David gave his ack to a similar path so I presume he will be fine with this, too.
I will wait for his ack anyway.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
In reply to Ian JacksonQuoted 8 lines · Ian Jackson
Wei Liu writes ("[PATCH 08/17] tools: remove hard-coded
/var/lib/xeninMakefile"):Quoted 1 line
Now all conversations are done, remove the hard-coded paths.
Should we not keep these for (most of) a release cycle ?
Otherwise someone who tries to use the new feature in 4.8 will find it doesn't uninstall their previous install.
TBH I think the uninstall target has been broken for a long time. I merely added the rm rune for completeness. Last time I tried it didn't remove things cleanly. For one there is no rune to remove systemd unit files.
For now, I'm fine with keeping the uninstall target rune.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
Wei Liu writes ("Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile"):
Quoted 4 lines
TBH I think the uninstall target has been broken for a long time. I merely added the rm rune for completeness. Last time I tried it didn't remove things cleanly. For one there is no rune to remove systemd unit files.
Mmmm. So maybe we should just drop this now.
Quoted 1 line
For now, I'm fine with keeping the uninstall target rune.
It might sit there forever and eventually remove some wrong thing...
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
Quoted 7 lines · Ian Jackson
Wei Liu writes ("Re: [PATCH 08/17] tools: remove hard-coded
/var/lib/xeninMakefile"):Quoted 4 lines
TBH I think the uninstall target has been broken for a long time. I merely added the rm rune for completeness. Last time I tried it didn't remove things cleanly. For one there is no rune to remove systemd unit files.
Mmmm. So maybe we should just drop this now.
Drop what? Drop the uninstall target all together? Or just the rune in this patch?
Quoted 5 lines
Quoted 2 lines
For now, I'm fine with keeping the uninstall target rune.
It might sit there forever and eventually remove some wrong thing...
Indeed.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
Wei Liu writes ("Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile"):
Quoted 5 lines · Ian Jackson
Quoted 1 line
Mmmm. So maybe we should just drop this now.
Drop what? Drop the uninstall target all together? Or just the rune in this patch?
I meant we should keep this patch and therefore drop the rune that is being deleted by this patch.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
Quoted 10 lines · Ian Jackson
Wei Liu writes ("Re: [PATCH 08/17] tools: remove hard-coded
/var/lib/xeninMakefile"):Quoted 5 lines · Ian Jackson
Quoted 1 line
Mmmm. So maybe we should just drop this now.
Drop what? Drop the uninstall target all together? Or just the rune in this patch?
I meant we should keep this patch and therefore drop the rune that is being deleted by this patch.
Does that mean you're satisfied with this patch? Can I translate this thread into an ack?
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
David Scott
Acked-byRe: [PATCH 14/17] ocaml/libxs: generate a paths.ml
In reply to Wei LiuQuoted 7 lines · Wei Liu
Quoted 3 lines · Ian Jackson
Wei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
Quoted 7 lines
Quoted 2 lines
FAOD I don't consider myself qualified to review this.
David gave his ack to a similar path so I presume he will be fine with this, too.
I will wait for his ack anyway.
Looks fine to me.
Cheers,
Dave
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 14/17] ocaml/libxs: generate a paths.ml
Quoted 10 lines · David Scott
Quoted 10 lines · Wei Liu
Quoted 5 lines · Ian Jackson
Wei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>FAOD I don't consider myself qualified to review this.
Quoted 9 lines
Quoted 4 lines
David gave his ack to a similar path so I presume he will be fine with this, too.
I will wait for his ack anyway.
Looks fine to me.
Acked-by David Scott <[email protected]>
Thanks.
FAOD: I think this ack is only for this patch. I will hold off pushing this one and wait until other ocaml patches are acked.
Wei.
Quoted 2 lines
Cheers,
Dave
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ian Jackson
Acked-byRe: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile
In reply to Wei LiuWei Liu writes ("Re: [PATCH 08/17] tools: remove hard-coded /var/lib/xen in Makefile"):
Quoted 2 lines
Does that mean you're satisfied with this patch? Can I translate this thread into an ack?
Err, sorry, yes, I should have said
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · Wei Liu
The first three patches are carried over from previous series.
The rest introduce some new variables and replace various hard-coded paths in code.
There is one more path
/var/run, with which I'm not sure what to do for the moment. More patches will come to deal with it.Wei.
Quoted 9 lines
Wei Liu (17):
oxenstored: honour XEN_{LOG,RUN}_DIR in oxenstored.conf
oxenstored: generate a paths module
oxenstored: honourXEN_LOG_DIRdefined by configure
build: introduce and exportXEN_LIB_DIR
tools: install and removeXEN_LIB_DIRinMakefilehotplug/Linux: honourXEN_LIB_DIR
libxl: honourXEN_LIB_DIR
tools: remove hard-coded/var/lib/xeninMakefile
I've queued up these seven.
Quoted 1 line
docs: honour
XEN_DUMP_DIR
This is acked but we would like to wait a bit.
Quoted 1 line
build: introduce
XEN_RUN_STORED
This is not yet acked.
Quoted 3 lines
hotplug/Linux: honour
XEN_RUN_STORED
libxenstore: honourXEN_RUN_STORED
hotplug/FreeBSD: honourXEN_RUN_STORED
These are acked but depend on the introduction of XEN_RUN_STORED.
Quoted 4 lines
ocaml/libxs: generate a paths.ml ocaml/libxs: honour
XEN_RUN_STORED
oxenstored: honourXEN_RUN_STOREDandXEN_CONFIG_DIR
oxenstored: honourXEN_RUN_STOREDin systemd C stub
The last three are not yet acked. Will wait for David to express his opinion.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 10/17] build: introduce XEN_RUN_STORED
In reply to Wei LiuWei Liu writes ("[PATCH 10/17] build: introduce XEN_RUN_STORED"):
Quoted 3 lines
It defaults to
/var/run/xenstored. It will be used later to remove some hard-coded paths in tree. There should be no visible change to default configuration.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 15/17] ocaml/libxs: honour XEN_RUN_STORED
In reply to Wei LiuQuoted 23 lines · Wei Liu
Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: David Scot <[email protected]>
---tools/ocaml/libs/xs/xs.ml| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tools/ocaml/libs/xs/xs.ml +1
-1@@ -147,7 +147,7 @@ let monitor_paths xsh l time callback = end; unwatch () -let daemon_socket = "/var/run/xenstored/socket" +let daemon_socket = Paths.xen_run_stored ^ "/socket" (** Throws this rather than a miscellaneous Unix.connect failed *)
Quoted 4 lines
exception
Failed_to_connectSignature · 1 line
2.1.4
This looks fine to me
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 16/17] oxenstored: honour XEN_RUN_STORED and XEN_CONFIG_DIR
In reply to Wei LiuQuoted 88 lines · Wei Liu
Only contain changes to ocaml source code. C stub files will be handled separately.
Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: David Scott <[email protected]>
---tools/ocaml/xenstored/define.ml | 6 +++--- tools/ocaml/xenstored/disk.ml | 2 +- tools/ocaml/xenstored/xenstored.ml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)tools/ocaml/xenstored/define.ml +0
-0@@ -20,10 +20,10 @@ let xenstored_minor = 0let
xenstored_proc_kva= "/proc/xen/xsd_kva" letxenstored_proc_port= "/proc/xen/xsd_port"tools/ocaml/xenstored/define.ml +3
-3-let xs_daemon_socket = "/var/run/xenstored/socket" -let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro" +let xs_daemon_socket = Paths.xen_run_stored ^ "/socket" +let xs_daemon_socket_ro = Paths.xen_run_stored ^ "/socket_ro" -let default_config_dir = "/etc/xen" +let default_config_dir = Paths.xen_config_dirlet maxwatch = ref (50)
let maxtransaction = ref (20)tools/ocaml/xenstored/disk.ml +0
-0@@ -15,7 +15,7 @@ *)let enable = ref false
tools/ocaml/xenstored/disk.ml +1
-1-let xs_daemon_database = "/var/run/xenstored/db" +let xs_daemon_database = Paths.xen_run_stored ^ "/db"let error fmt = Logging.error "disk" fmt
tools/ocaml/xenstored/xenstored.ml +0
-0@@ -66,7 +66,7 @@ let process_domains store cons domains =let
sigusr1_handlerstore =
try
let channel =open_out_gen[Open_wronly;Open_creat;Open_trunc; ]tools/ocaml/xenstored/xenstored.ml +1
-1- 0o600 "/var/run/xenstored/db.debug" in + 0o600 (Paths.xen_run_stored ^ "/db.debug") infinally (fun () -> Store.dump store channel) (fun () -> close_out channel) with _ ->tools/ocaml/xenstored/xenstored.ml +3
-3@@ -266,7 +266,7 @@ let _ = let quit = ref false in if cf.restart then ( - DB.from_file store domains cons "/var/run/xenstored/db"; + DB.from_file store domains cons (Paths.xen_run_stored ^ "/db"); Event.bind_dom_exc_virq eventchn ) else ( if !Disk.enable then (@@ -293,7 +293,7 @@ let _ = Logging.init_xenstored_log(); if cf.activate_access_log then begin - let post_rotate () = DB.to_file store cons "/var/run/xenstored/db" in + let post_rotate () = DB.to_file store cons (Paths.xen_run_stored ^ "/db") in Logging.init_access_log post_rotate end;@@ -440,5 +440,5 @@ let _ = raise exc done; info "stopping xenstored"; - DB.to_file store cons "/var/run/xenstored/db"; + DB.to_file store cons (Paths.xen_run_stored ^ "/db"); ()Signature · 1 line
2.1.4
This also looks fine to me
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 17/17] oxenstored: honour XEN_RUN_STORED in systemd C stub
In reply to Wei LiuQuoted 76 lines · Wei Liu
Generate a
_paths.hfor that and add proper dependency.Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: David Scott <[email protected]>
---.gitignore | 1 + tools/ocaml/xenstored/Makefile | 7 +++++++ tools/ocaml/xenstored/systemd_stubs.c | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-).gitignore +0
-0@@ -349,6 +349,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.*
tools/ocaml/libs/xentoollog/xentoollog.mltools/ocaml/libs/xentoollog/xentoollog.mlitools/ocaml/libs/xs/paths.ml+tools/ocaml/xenstored/_paths.htools/ocaml/xenstored/oxenstoredtools/ocaml/xenstored/oxenstored.conftools/ocaml/xenstored/paths.mltools/ocaml/xenstored/Makefile +0
-0@@ -30,6 +30,8 @@ systemd_OBJS = systemd
systemd_C_OBJS=systemd_stubsOCAML_LIBRARY+= systemd+$(foreach obj,$(systemd_C_OBJS),$(obj).o):
_paths.h+LIBS_systemd+= $(LDFLAGS-y)OBJS = paths \
tools/ocaml/xenstored/Makefile +0
-0@@ -93,3 +95,8 @@ genpath-target = $(call buildmakevars2module,paths.ml) $(eval $(genpath-target))
GENERATED_FILES+= paths.mltools/ocaml/xenstored/Makefile +5
-0+ +genpath-target = $(call buildmakevars2header,_paths.h) +$(eval $(genpath-target)) + +GENERATE_FILES += _paths.htools/ocaml/xenstored/systemd_stubs.c +4
-2@@ -28,6 +28,8 @@#include <sys/socket.h> #include <systemd/sd-daemon.h> +#include "_paths.h" +/* Will work regardless of the order systemd gives them to us */ static int oxen_get_sd_fd (const char *connect_to) {@@ -46,8 +48,8 @@ static int oxen_get_sd_fd(const char *connect_to)static int oxen_verify_socket_socket (const char *connect_to) { -if ((strcmp ("/var/run/xenstored/socket_ro" , connect_to) !=0 ) && - (strcmp ("/var/run/xenstored/socket" , connect_to) !=0 )) { +if ((strcmp (XEN_RUN_STORED "/socket_ro" , connect_to) !=0 ) && + (strcmp (XEN_RUN_STORED "/socket" , connect_to) !=0 )) { sd_notifyf(0, "STATUS=unexpected socket: %s\n" "ERRNO=%i", connect_to,Signature · 1 line
2.1.4
This also looks fine to me
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 14/17] ocaml/libxs: generate a paths.ml
In reply to Wei LiuQuoted 21 lines · Wei Liu
Quoted 17 lines · David Scott
Quoted 7 lines · Wei Liu
Quoted 3 lines · Ian Jackson
Wei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Quoted 7 lines
Quoted 2 lines
FAOD I don't consider myself qualified to review this.
David gave his ack to a similar path so I presume he will be fine with this, too.
I will wait for his ack anyway.
Looks fine to me.
Quoted 7 lines
Quoted 2 lines
Acked-by David Scott <[email protected]>Thanks.
FAOD: I think this ack is only for this patch. I will hold off pushing this one and wait until other ocaml patches are asked.
I think I’ve acked the rest — let me know if I missed one :)
Cheers,
Dave
Quoted 6 lines
Wei.
Quoted 2 lines
Cheers,
Dave
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 14/17] ocaml/libxs: generate a paths.ml
Quoted 24 lines · David Scott
Quoted 24 lines · Wei Liu
Quoted 19 lines · David Scott
Quoted 7 lines · Wei Liu
Quoted 3 lines · Ian Jackson
Wei Liu writes ("[PATCH 14/17] ocaml/libxs: generate a paths.ml"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Quoted 7 lines
Quoted 2 lines
FAOD I don't consider myself qualified to review this.
David gave his ack to a similar path so I presume he will be fine with this, too.
I will wait for his ack anyway.
Looks fine to me.
Acked-by David Scott <[email protected]>
Quoted 7 lines
Quoted 4 lines
Thanks.
FAOD: I think this ack is only for this patch. I will hold off pushing this one and wait until other ocaml patches are asked.
I think I’ve acked the rest — let me know if I missed one :)
Thanks. I think that's all I need for this series.
Wei.
Quoted 10 lines
Cheers,
DaveQuoted 6 lines
Wei.
Quoted 2 lines
Cheers,
Dave
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 7 lines · Wei Liu
Quoted 2 lines
docs: honour
XEN_DUMP_DIRThis is acked but we would like to wait a bit.
Quoted 1 line
build: introduce
XEN_RUN_STORED
Quoted 13 lines
This is not yet acked.
Quoted 3 lines
hotplug/Linux: honour
XEN_RUN_STORED
libxenstore: honourXEN_RUN_STORED
hotplug/FreeBSD: honourXEN_RUN_STOREDThese are acked but depend on the introduction of
XEN_RUN_STORED.Quoted 4 lines
ocaml/libxs: generate a paths.ml ocaml/libxs: honour
XEN_RUN_STORED
oxenstored: honourXEN_RUN_STOREDandXEN_CONFIG_DIR
oxenstored: honourXEN_RUN_STOREDin systemd C stub
I've pushed the remaining patches to staging.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel