WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1/5] integrate xen-ocaml-tools.hg with xen-unstable.h

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstored source
From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Date: Fri, 24 Apr 2009 13:03:03 +0100
Delivery-date: Fri, 24 Apr 2009 05:04:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)


Provide option of using xen-ocaml-tools.hg as source for xenstored dom0 deamon 
instead of tools/xenstore/xenstored_*.

To use, create a .config containing "CONFIG_OCAML_XENSTORED := y".
Then the build system will automatically download the remote repo
to tools/ocaml-xenstored.

Note: this patch depends on the xen-ocaml-tools.hg patch called 
install-xenstored-in-usr-sbin, which was previously posted.

Signed-off-by: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>

diff -r 3c64c820d601 .hgignore
--- a/.hgignore Fri Apr 24 10:20:23 2009 +0100
+++ b/.hgignore Fri Apr 24 11:20:50 2009 +0100
@@ -90,6 +90,7 @@
 ^stubdom/gcc-.*$
 ^stubdom/include$
 ^stubdom/ioemu$
+^stubdom/xenstore$
 ^stubdom/libxc-.*$
 ^stubdom/lwip-.*$
 ^stubdom/mini-os-.*$
@@ -252,6 +253,7 @@
 ^tools/xm-test/tests/.*\.test$
 ^tools/ioemu-remote
 ^tools/ioemu-dir$
+^tools/ocaml-xenstored
 ^xen/\.banner.*$
 ^xen/BLOG$
 ^xen/System.map$
diff -r 3c64c820d601 Config.mk
--- a/Config.mk Fri Apr 24 10:20:23 2009 +0100
+++ b/Config.mk Fri Apr 24 11:20:50 2009 +0100
@@ -119,6 +119,12 @@
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
+OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
+
+# Uncomment to build OCAML version of xenstored instead of the in-tree
+# C version.  This will cause $(OCAML_XENSTORED_REPO) to be cloned
+#CONFIG_OCAML_XENSTORED ?= y
+
 # Optional components
 XENSTAT_XENTOP     ?= y
 VTPM_TOOLS         ?= n
diff -r 3c64c820d601 tools/Makefile
--- a/tools/Makefile    Fri Apr 24 10:20:23 2009 +0100
+++ b/tools/Makefile    Fri Apr 24 11:20:50 2009 +0100
@@ -6,6 +6,9 @@
 SUBDIRS-y += include
 SUBDIRS-y += libxc
 SUBDIRS-y += flask
+ifeq ($(CONFIG_OCAML_XENSTORED),y)
+ SUBDIRS-y += ocaml-xenstored
+endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += misc
 SUBDIRS-y += examples
@@ -49,6 +52,7 @@
        $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
        $(INSTALL_DIR) $(DESTDIR)/var/log/xen
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
+       $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
 
 .PHONY: clean distclean
 clean distclean: subdirs-clean
@@ -101,3 +105,23 @@
                $(absolutify_xen_root); \
                $(MAKE) -C ioemu-dir clean; \
        fi
+
+ocaml-xenstored:
+       set -ex; \
+       rm -rf ocaml-xenstored.tmp; \
+       hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
+       if [ "$(OCAML_XENSTORED_TAG)" ]; then \
+               hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
+               hg -R ocaml-xenstored.tmp branch mybranch ;\
+       fi;                                             \
+       mv ocaml-xenstored.tmp ocaml-xenstored; \
+
+subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
+       $(absolutify_xen_root); \
+       $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
+
+subdir-clean-ocaml-xenstored:
+       set -e; if test -d ocaml-xenstored; then \
+               $(MAKE) -C ocaml-xenstored clean; \
+       fi
+
diff -r 3c64c820d601 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Fri Apr 24 10:20:23 2009 +0100
+++ b/tools/xenstore/Makefile   Fri Apr 24 11:20:50 2009 +0100
@@ -30,8 +30,13 @@
 CFLAGS += -DNO_SOCKETS=1 -DNO_LOCAL_XENBUS=1 -DNO_SYSLOG=1 -DNO_REOPEN_LOG=1
 endif
 
+ALL_TARGETS = libxenstore.so libxenstore.a clients xs_tdb_dump 
+ifeq ($(CONFIG_OCAML_XENSTORED),)
+ ALL_TARGETS += xenstored
+endif
+
 .PHONY: all
-all: libxenstore.so libxenstore.a xenstored clients xs_tdb_dump 
+all: $(ALL_TARGETS)
 
 .PHONY: clients
 clients: xenstore $(CLIENTS) xenstore-control
@@ -97,12 +102,14 @@
 
 .PHONY: install
 install: all
+ifeq ($(CONFIG_OCAML_XENSTORED),)
        $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
+       $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
+endif
        $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-       $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
        $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
        $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
        set -e ; for c in $(CLIENTS) ; do \


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 1/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstored source, Alex Zeffertt <=