The following set of patches package up the ocaml libraries that are part of the standard xen build. The patches are also currently available at: https://github.com/jonludlam/pkg-xen/commits/for-debian There are some things to note: 1. The 5 patches imported from xen-unstable are not, and will not go into the xen-4.1-stable series. However, the patches were created at the request of the Debian Ocaml Task Force as the ocaml libraries were polluting the global namespace of packages with their too-short names. 2. The libraries have been installed under /usr/lib/xen-4.1/lib/ocaml, which is not the standard place to install ocaml findlib packages. It is in keeping with the current packaging of xen in debian though. To use the libraries, set an environment variable: OCAMLPATH=/usr/lib/xen-4.1/lib/ocaml and then findlib should locate the packages. 3. Compilation and running of non-custom bytecode executables requires the setting of an additional environment variable: CAML_LD_LIBRARY_PATH=/usr/lib/xen-4.1/lib/ocaml/stublibs:/usr/lib/\ xen-4.1/lib Bytecode executables compiled with the -custom flag work without this setting. 4. Only the last 2 patches actually change the packaging at all. The first of these two simply bumps the XS-Python-Version to 2.7. It's the last patch that needs the most eyes on it to check for bugs. These patches were created with the help and assistance of Ian Campbell, Thomas Goirand, and the Ocaml Debian Task Force. Jon Ludlam (9): Import patch 23936:cdb34816a40a from xen-unstable.hg - renaming the ocamlfind packages Import patch 23937:5173834e8476 from xen-unstable.hg Import patch 23938:fa04fbd56521 from xen-unstable.hg Import patch 23939:51288f69523f from xen-unstable.hg Import patch 23940:187d59e32a58 from xen-unstable.hg Fix the ocaml libraries to install correctly under /usr/lib/xen-4.1/lib/ocaml Put an annotation at the top of the tools-ocaml-fix-rpath patch Bump XS-Python-Version to 2.7 Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev. xen/debian/libxen-dev.install | 2 + xen/debian/libxen-ocaml-dev.install | 2 + xen/debian/libxen-ocaml.install | 3 + xen/debian/patches/series | 6 + xen/debian/patches/tools-ocaml-fix-rpath.diff | 24 + .../patches/tools-ocaml-fix-xc-dependencies.diff | 21 + xen/debian/patches/tools-ocaml-fix-xc.diff | 45 + xen/debian/patches/tools-ocaml-remove-log.diff | 1509 ++++ xen/debian/patches/tools-ocaml-remove-uuid.diff | 321 + .../tools-ocaml-rename-ocamlfind-packages.diff | 7924 ++++++++++++++++++++ xen/debian/rules | 2 +- xen/debian/rules.real | 36 + xen/debian/templates/control.main.in | 18 + xen/debian/templates/control.source.in | 7 +- 14 files changed, 9917 insertions(+), 3 deletions(-) create mode 100644 xen/debian/libxen-ocaml-dev.install create mode 100644 xen/debian/libxen-ocaml.install create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff create mode 100644 xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff create mode 100644 xen/debian/patches/tools-ocaml-remove-log.diff create mode 100644 xen/debian/patches/tools-ocaml-remove-uuid.diff create mode 100644 xen/debian/patches/tools-ocaml-rename-ocamlfind-packages.diff -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 2/9] Import patch 23937:5173834e8476 from xen-unstable.hg
--- xen/debian/patches/series | 1 + .../patches/tools-ocaml-fix-xc-dependencies.diff | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff diff --git a/xen/debian/patches/series b/xen/debian/patches/series index bcfa550..6d8b5af 100644 --- a/xen/debian/patches/series +++ b/xen/debian/patches/series @@ -55,3 +55,4 @@ tools-xenstore-compatibility.diff upstream-23044:d4ca456c0c25 upstream-23104:1976adbf2b80 tools-ocaml-rename-ocamlfind-packages.diff +tools-ocaml-fix-xc-dependencies.diff diff --git a/xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff b/xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff new file mode 100644 index 0000000..a7b7e4a --- /dev/null +++ b/xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff @@ -0,0 +1,21 @@ +# HG changeset patch +# User Jon Ludlam <jonathan.ludlam at eu.citrix.com> +# Date 1318261088 -3600 +# Node ID 5173834e8476074afceb5c0124126e74a3954e97 +# Parent cdb34816a40a2dd3aaf324f7dcba83a122cf9146 +tools/ocaml: Add a missing dependency to the xenctrl ocaml package + +Signed-off-by: Jon Ludlam <jonathan.ludlam at eu.citrix.com> +Acked-by: Ian Campbell <ian.campbell.com> +Committed-by: Ian Jackson <ian.jackson.citrix.com> + +diff -r cdb34816a40a -r 5173834e8476 tools/ocaml/libs/xc/META.in +--- a/tools/ocaml/libs/xc/META.in Mon Oct 10 16:37:07 2011 +0100 ++++ b/tools/ocaml/libs/xc/META.in Mon Oct 10 16:38:08 2011 +0100 +@@ -1,5 +1,5 @@ + version = "@VERSION@" + description = "Xen Control Interface" +-requires = "xenmmap,uuid" ++requires = "unix,xenmmap,uuid" + archive(byte) = "xenctrl.cma" + archive(native) = "xenctrl.cmxa" -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 3/9] Import patch 23938:fa04fbd56521 from xen-unstable.hg
--- xen/debian/patches/series | 1 + xen/debian/patches/tools-ocaml-remove-uuid.diff | 321 +++++++++++++++++++++++ 2 files changed, 322 insertions(+), 0 deletions(-) create mode 100644 xen/debian/patches/tools-ocaml-remove-uuid.diff diff --git a/xen/debian/patches/series b/xen/debian/patches/series index 6d8b5af..803b72b 100644 --- a/xen/debian/patches/series +++ b/xen/debian/patches/series @@ -56,3 +56,4 @@ upstream-23044:d4ca456c0c25 upstream-23104:1976adbf2b80 tools-ocaml-rename-ocamlfind-packages.diff tools-ocaml-fix-xc-dependencies.diff +tools-ocaml-remove-uuid.diff diff --git a/xen/debian/patches/tools-ocaml-remove-uuid.diff b/xen/debian/patches/tools-ocaml-remove-uuid.diff new file mode 100644 index 0000000..bb82bcf --- /dev/null +++ b/xen/debian/patches/tools-ocaml-remove-uuid.diff @@ -0,0 +1,321 @@ +# HG changeset patch +# User Jon Ludlam <jonathan.ludlam at eu.citrix.com> +# Date 1317295879 -3600 +# Node ID 6c87e9dc5331096e8bfbad60a4f560cae05c4034 +# Parent c5df5f625ee2a0339b2a6785f99a5a0f9727f836 +[OCAML] Remove the uuid library + +This patch has the same effect as xen-unstable.hg c/s +23938:fa04fbd56521 + +The library was only minimally used, and was really rather redundant. + +Signed-off-by: Zheng Li <zheng.li at eu.citrix.com> +Acked-by: Jon Ludlam <jonathan.ludlam at eu.citrix.com> + +--- a/tools/ocaml/libs/Makefile ++++ b/tools/ocaml/libs/Makefile +@@ -2,7 +2,7 @@ + include $(XEN_ROOT)/tools/Rules.mk + + SUBDIRS= \ +- uuid mmap \ ++ mmap \ + log xc eventchn \ + xb xs xl + +--- a/tools/ocaml/libs/uuid/META.in ++++ /dev/null +@@ -1,4 +0,0 @@ +-version = "@VERSION@" +-description = "Uuid - universal identifer" +-archive(byte) = "uuid.cma" +-archive(native) = "uuid.cmxa" +--- a/tools/ocaml/libs/uuid/uuid.ml ++++ /dev/null +@@ -1,100 +0,0 @@ +-(* +- * Copyright (C) 2006-2010 Citrix Systems Inc. +- * Author Vincent Hanquez <vincent.hanquez at eu.citrix.com> +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as published +- * by the Free Software Foundation; version 2.1 only. with the special +- * exception on linking described in file LICENSE. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU Lesser General Public License for more details. +- *) +- +-(* Internally, a UUID is simply a string. *) +-type 'a t = string +- +-type cookie = string +- +-let of_string s = s +-let to_string s = s +- +-let null = "" +- +-(* deprecated: we don't need to duplicate the uuid prefix/suffix *) +-let uuid_of_string = of_string +-let string_of_uuid = to_string +- +-let string_of_cookie s = s +- +-let cookie_of_string s = s +- +-let dev_random = "/dev/random" +-let dev_urandom = "/dev/urandom" +- +-let rnd_array n +- let fstbyte i = 0xff land i in +- let sndbyte i = fstbyte (i lsr 8) in +- let thdbyte i = sndbyte (i lsr 8) in +- let rec rnd_list n acc = match n with +- | 0 -> acc +- | 1 -> +- let b = fstbyte (Random.bits ()) in +- b :: acc +- | 2 -> +- let r = Random.bits () in +- let b1 = fstbyte r in +- let b2 = sndbyte r in +- b1 :: b2 :: acc +- | n -> +- let r = Random.bits () in +- let b1 = fstbyte r in +- let b2 = sndbyte r in +- let b3 = thdbyte r in +- rnd_list (n - 3) (b1 :: b2 :: b3 :: acc) +- in +- Array.of_list (rnd_list n []) +- +-let read_array dev n = +- let ic = open_in_bin dev in +- try +- let result = Array.init n (fun _ -> input_byte ic) in +- close_in ic; +- result +- with e -> +- close_in ic; +- raise e +- +-let uuid_of_int_array uuid +- Printf.sprintf "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" +- uuid.(0) uuid.(1) uuid.(2) uuid.(3) uuid.(4) uuid.(5) +- uuid.(6) uuid.(7) uuid.(8) uuid.(9) uuid.(10) uuid.(11) +- uuid.(12) uuid.(13) uuid.(14) uuid.(15) +- +-let make_uuid_prng () = uuid_of_int_array (rnd_array 16) +-let make_uuid_urnd () = uuid_of_int_array (read_array dev_urandom 16) +-let make_uuid_rnd () = uuid_of_int_array (read_array dev_random 16) +-let make_uuid = make_uuid_urnd +- +-let make_cookie() +- let bytes = Array.to_list (read_array dev_urandom 64) in +- String.concat "" (List.map (Printf.sprintf "%1x") bytes) +- +-let int_array_of_uuid s +- try +- let l = ref [] in +- Scanf.sscanf s "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" +- (fun a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 -> +- l := [ a0; a1; a2; a3; a4; a5; a6; a7; a8; a9; +- a10; a11; a12; a13; a14; a15; ]); +- Array.of_list !l +- with _ -> invalid_arg "Uuid.int_array_of_uuid" +- +-let is_uuid str +- try +- Scanf.sscanf str +- "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" +- (fun _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -> true) +- with _ -> false +--- a/tools/ocaml/libs/uuid/uuid.mli ++++ /dev/null +@@ -1,67 +0,0 @@ +-(* +- * Copyright (C) 2006-2010 Citrix Systems Inc. +- * Author Vincent Hanquez <vincent.hanquez at eu.citrix.com> +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as published +- * by the Free Software Foundation; version 2.1 only. with the special +- * exception on linking described in file LICENSE. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU Lesser General Public License for more details. +- *) +-(** Type-safe UUIDs. +- Probably need to refactor this; UUIDs are used in two places: +- + to uniquely name things across the cluster +- + as secure session IDs +- +- There is the additional constraint that current Xen tools use +- a particular format of UUID (the 16 byte variety generated by fresh ()) +- +- Also, cookies aren't UUIDs and should be put somewhere else. +-*) +- +-(** A 128-bit UUID. Using phantom types ('a) to achieve the requires type-safety. *) +-type 'a t +- +-(** Create a fresh UUID *) +-val make_uuid : unit -> 'a t +-val make_uuid_prng : unit -> 'a t +-val make_uuid_urnd : unit -> 'a t +-val make_uuid_rnd : unit -> 'a t +- +-(** Create a UUID from a string. *) +-val of_string : string -> 'a t +- +-(** Marshal a UUID to a string. *) +-val to_string : 'a t -> string +- +-(** A null UUID, as if such a thing actually existed. It turns out to be +- * useful though. *) +-val null : 'a t +- +-(** Deprecated alias for {! Uuid.of_string} *) +-val uuid_of_string : string -> 'a t +- +-(** Deprecated alias for {! Uuid.to_string} *) +-val string_of_uuid : 'a t -> string +- +-(** Convert an array to a UUID. *) +-val uuid_of_int_array : int array -> 'a t +- +-(** Convert a UUID to an array. *) +-val int_array_of_uuid : 'a t -> int array +- +-(** Check whether a string is a UUID. *) +-val is_uuid : string -> bool +- +-(** A 512-bit cookie. *) +-type cookie +- +-val make_cookie : unit -> cookie +- +-val cookie_of_string : string -> cookie +- +-val string_of_cookie : cookie -> string +--- a/tools/ocaml/libs/xc/META.in ++++ b/tools/ocaml/libs/xc/META.in +@@ -1,5 +1,5 @@ + version = "@VERSION@" + description = "Xen Control Interface" +-requires = "unix,xenmmap,uuid" ++requires = "unix,xenmmap" + archive(byte) = "xenctrl.cma" + archive(native) = "xenctrl.cmxa" +--- a/tools/ocaml/libs/xc/Makefile ++++ b/tools/ocaml/libs/xc/Makefile +@@ -3,7 +3,7 @@ + include $(TOPLEVEL)/common.make + + CFLAGS += -I../mmap -I./ -I$(XEN_ROOT)/tools/libxc +-OCAMLINCLUDE += -I ../mmap -I ../uuid -I $(XEN_ROOT)/tools/libxc ++OCAMLINCLUDE += -I ../mmap -I $(XEN_ROOT)/tools/libxc + + OBJS = xenctrl + INTF = xenctrl.cmi +--- a/tools/ocaml/libs/xc/xenctrl.ml ++++ b/tools/ocaml/libs/xc/xenctrl.ml +@@ -118,14 +118,23 @@ + external _domain_create: handle -> int32 -> domain_create_flag list -> int array -> domid + = "stub_xc_domain_create" + ++let int_array_of_uuid_string s ++ try ++ Scanf.sscanf s ++ "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" ++ (fun a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 -> ++ [| a0; a1; a2; a3; a4; a5; a6; a7; ++ a8; a9; a10; a11; a12; a13; a14; a15 |]) ++ with _ -> invalid_arg ("Xc.int_array_of_uuid_string: " ^ s) ++ + let domain_create handle n flags uuid +- _domain_create handle n flags (Uuid.int_array_of_uuid uuid) ++ _domain_create handle n flags (int_array_of_uuid_string uuid) + + external _domain_sethandle: handle -> domid -> int array -> unit + = "stub_xc_domain_sethandle" + + let domain_sethandle handle n uuid +- _domain_sethandle handle n (Uuid.int_array_of_uuid uuid) ++ _domain_sethandle handle n (int_array_of_uuid_string uuid) + + external domain_max_vcpus: handle -> domid -> int -> unit + = "stub_xc_domain_max_vcpus" +--- a/tools/ocaml/libs/xc/xenctrl.mli ++++ b/tools/ocaml/libs/xc/xenctrl.mli +@@ -74,12 +74,8 @@ + external is_fake : unit -> bool = "stub_xc_interface_is_fake" + external interface_close : handle -> unit = "stub_xc_interface_close" + val with_intf : (handle -> 'a) -> 'a +-external _domain_create : handle -> int32 -> domain_create_flag list -> int array -> domid +- = "stub_xc_domain_create" +-val domain_create : handle -> int32 -> domain_create_flag list -> 'a Uuid.t -> domid +-external _domain_sethandle : handle -> domid -> int array -> unit +- = "stub_xc_domain_sethandle" +-val domain_sethandle : handle -> domid -> 'a Uuid.t -> unit ++val domain_create : handle -> int32 -> domain_create_flag list -> string -> domid ++val domain_sethandle : handle -> domid -> string -> unit + external domain_max_vcpus : handle -> domid -> int -> unit + = "stub_xc_domain_max_vcpus" + external domain_pause : handle -> domid -> unit = "stub_xc_domain_pause" +--- a/tools/ocaml/xenstored/Makefile ++++ b/tools/ocaml/xenstored/Makefile +@@ -5,7 +5,6 @@ + OCAMLINCLUDE += \ + -I $(OCAML_TOPLEVEL)/libs/log \ + -I $(OCAML_TOPLEVEL)/libs/xb \ +- -I $(OCAML_TOPLEVEL)/libs/uuid \ + -I $(OCAML_TOPLEVEL)/libs/mmap \ + -I $(OCAML_TOPLEVEL)/libs/xc \ + -I $(OCAML_TOPLEVEL)/libs/eventchn +@@ -34,7 +33,6 @@ + INTF = symbol.cmi trie.cmi + XENSTOREDLIBS = \ + unix.cmxa \ +- $(OCAML_TOPLEVEL)/libs/uuid/uuid.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/mmap $(OCAML_TOPLEVEL)/libs/mmap/xenmmap.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/log $(OCAML_TOPLEVEL)/libs/log/log.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \ +--- a/tools/ocaml/libs/uuid/Makefile ++++ /dev/null +@@ -1,29 +0,0 @@ +-TOPLEVEL=../.. +-XEN_ROOT=$(TOPLEVEL)/../.. +-include $(TOPLEVEL)/common.make +- +-OBJS = uuid +-INTF = $(foreach obj, $(OBJS),$(obj).cmi) +-LIBS = uuid.cma uuid.cmxa +- +-all: $(INTF) $(LIBS) $(PROGRAMS) +- +-bins: $(PROGRAMS) +- +-libs: $(LIBS) +- +-uuid_OBJS = $(OBJS) +-OCAML_NOC_LIBRARY = uuid +- +-.PHONY: install +-install: $(LIBS) META +- mkdir -p $(OCAMLDESTDIR) +- ocamlfind remove -destdir $(OCAMLDESTDIR) uuid +- ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore uuid META $(INTF) $(LIBS) *.a *.cmx +- +-.PHONY: uninstall +-uninstall: +- ocamlfind remove -destdir $(OCAMLDESTDIR) uuid +- +-include $(TOPLEVEL)/Makefile.rules +- -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 5/9] Import patch 23940:187d59e32a58 from xen-unstable.hg
--- xen/debian/patches/tools-ocaml-fix-xc.diff | 45 ++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff diff --git a/xen/debian/patches/tools-ocaml-fix-xc.diff b/xen/debian/patches/tools-ocaml-fix-xc.diff new file mode 100644 index 0000000..2c7521a --- /dev/null +++ b/xen/debian/patches/tools-ocaml-fix-xc.diff @@ -0,0 +1,45 @@ +# HG changeset patch +# User Jon Ludlam <jonathan.ludlam at eu.citrix.com> +# Date 1318261276 -3600 +# Node ID 187d59e32a586d65697ed46bef106b52e3fb5ab9 +# Parent 51288f69523fcbbefa12cea5a761a6e957410151 +tools/ocaml: Fix 2 bit-twiddling bugs and an off-by-one + +The bit bugs are in ocaml vcpu affinity calls, and the off-by-one +error is in the ocaml console ring code + +Signed-off-by: Zheng Li <zheng.li at eu.citrix.com> +Acked-by: Ian Campbell <ian.campbell.com> +Committed-by: Ian Jackson <ian.jackson.citrix.com> +Acked-by: Jon Ludlam <jonathan.ludlam at eu.citrix.com> + +diff -r 51288f69523f -r 187d59e32a58 tools/ocaml/libs/xc/xenctrl_stubs.c +--- a/tools/ocaml/libs/xc/xenctrl_stubs.c Mon Oct 10 16:41:16 2011 +0100 ++++ b/tools/ocaml/libs/xc/xenctrl_stubs.c Mon Oct 10 16:41:16 2011 +0100 +@@ -430,7 +430,7 @@ + + for (i=0; i<len; i++) { + if (Bool_val(Field(cpumap, i))) +- c_cpumap[i/8] |= i << (i&7); ++ c_cpumap[i/8] |= 1 << (i&7); + } + retval = xc_vcpu_setaffinity(_H(xch), _D(domid), + Int_val(vcpu), c_cpumap); +@@ -466,7 +466,7 @@ + ret = caml_alloc(len, 0); + + for (i=0; i<len; i++) { +- if (c_cpumap[i%8] & 1 << (i&7)) ++ if (c_cpumap[i/8] & 1 << (i&7)) + Store_field(ret, i, Val_true); + else + Store_field(ret, i, Val_false); +@@ -523,7 +523,7 @@ + + CAMLprim value stub_xc_readconsolering(value xch) + { +- unsigned int size = RING_SIZE; ++ unsigned int size = RING_SIZE - 1; + char *ring_ptr = ring; + + CAMLparam1(xch); -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 6/9] Fix the ocaml libraries to install correctly under /usr/lib/xen-4.1/lib/ocaml
--- xen/debian/patches/series | 1 + xen/debian/patches/tools-ocaml-fix-rpath.diff | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff diff --git a/xen/debian/patches/series b/xen/debian/patches/series index c72ea3c..564dd62 100644 --- a/xen/debian/patches/series +++ b/xen/debian/patches/series @@ -59,3 +59,4 @@ tools-ocaml-fix-xc-dependencies.diff tools-ocaml-remove-uuid.diff tools-ocaml-remove-log.diff tools-ocaml-fix-xc.diff +tools-ocaml-fix-rpath.diff diff --git a/xen/debian/patches/tools-ocaml-fix-rpath.diff b/xen/debian/patches/tools-ocaml-fix-rpath.diff new file mode 100644 index 0000000..760476a --- /dev/null +++ b/xen/debian/patches/tools-ocaml-fix-rpath.diff @@ -0,0 +1,20 @@ +--- a/tools/ocaml/Makefile.rules ++++ b/tools/ocaml/Makefile.rules +@@ -58,14 +58,9 @@ + + # define a library target <name>.cmxa and <name>.cma + define OCAML_LIBRARY_template +- $(1).cmxa: lib$(1)_stubs.a $(foreach obj,$($(1)_OBJS),$(obj).cmx) +- $(call mk-caml-lib-native,$$@, -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $(foreach obj,$($(1)_OBJS),$(obj).cmx)) +- $(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmo) +- $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs, $$+) +- $(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o) +- $(call mk-caml-stubs,$$@, $$+) +- lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o) +- $(call mk-caml-lib-stubs,$$@, $$+, $(LIBS_$(1))) ++ $(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) $(foreach obj,$($(1)_C_OBJS),$(obj).o) ++ $(OCAMLMKLIB) -o $1 -oc $(1)_stubs $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) -L/usr/lib/xen-4.1/lib -ccopt -Wl,-R/usr/lib/xen-4.1/lib/ocaml/stublibs -ccopt -Wl,-R/usr/lib/xen-4.1/lib $(foreach obj,$($(1)_C_OBJS),$(obj).o) $(LIBS_$(1)) ++ gcc -shared -o ./dll$(1)_stubs.so $(foreach obj,$($(1)_C_OBJS),$(obj).o) -L/usr/lib/xen-4.1/lib -L../../../../tools/libxc $(LIBS_$(1)) -Wl,-R/usr/lib/xen-4.1/lib + endef + + define OCAML_NOC_LIBRARY_template -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 7/9] Put an annotation at the top of the tools-ocaml-fix-rpath patch
--- xen/debian/patches/tools-ocaml-fix-rpath.diff | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/xen/debian/patches/tools-ocaml-fix-rpath.diff b/xen/debian/patches/tools-ocaml-fix-rpath.diff index 760476a..7d370e6 100644 --- a/xen/debian/patches/tools-ocaml-fix-rpath.diff +++ b/xen/debian/patches/tools-ocaml-fix-rpath.diff @@ -1,3 +1,7 @@ +Fix the ocaml libraries such that they can be installed under /usr/lib/xen-4.1/lib/ocaml + +Signed-off-by: Jon Ludlam <jonathan.ludlam at eu.citrix.com> + --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -58,14 +58,9 @@ -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 8/9] Bump XS-Python-Version to 2.7
--- xen/debian/templates/control.source.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen/debian/templates/control.source.in b/xen/debian/templates/control.source.in index 9511b86..a7db0ff 100644 --- a/xen/debian/templates/control.source.in +++ b/xen/debian/templates/control.source.in @@ -23,5 +23,5 @@ Build-Depends-Indep: texlive-font-utils, texlive-latex-recommended Standards-Version: 3.8.4 -XS-Python-Version: 2.6 +XS-Python-Version: 2.7 -- 1.7.7
Jon Ludlam
2011-Oct-25 12:37 UTC
[Pkg-xen-devel] [PATCH 9/9] Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev.
--- xen/debian/libxen-dev.install | 2 + xen/debian/libxen-ocaml-dev.install | 2 + xen/debian/libxen-ocaml.install | 3 ++ xen/debian/rules | 2 +- xen/debian/rules.real | 36 ++++++++++++++++++++++++++++++++ xen/debian/templates/control.main.in | 18 ++++++++++++++++ xen/debian/templates/control.source.in | 5 +++- 7 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 xen/debian/libxen-ocaml-dev.install create mode 100644 xen/debian/libxen-ocaml.install diff --git a/xen/debian/libxen-dev.install b/xen/debian/libxen-dev.install index 9d00a07..5e05540 100644 --- a/xen/debian/libxen-dev.install +++ b/xen/debian/libxen-dev.install @@ -2,4 +2,6 @@ usr/lib/{libxenctrl.a,libxenguest.a} usr/lib/libxenstore.{a,so} usr/include/{xenctrl.h,xenguest.h} usr/include/{xs.h,xs_lib.h} +usr/include/xentoollog.h +usr/include/xenctrlosdep.h usr/include/xen diff --git a/xen/debian/libxen-ocaml-dev.install b/xen/debian/libxen-ocaml-dev.install new file mode 100644 index 0000000..a9f22f6 --- /dev/null +++ b/xen/debian/libxen-ocaml-dev.install @@ -0,0 +1,2 @@ +/usr/lib/xen-4.1/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/*.cm{i,x,xa} +/usr/lib/xen-4.1/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/*.a diff --git a/xen/debian/libxen-ocaml.install b/xen/debian/libxen-ocaml.install new file mode 100644 index 0000000..d7ec220 --- /dev/null +++ b/xen/debian/libxen-ocaml.install @@ -0,0 +1,3 @@ +/usr/lib/xen-*/lib/ocaml/stublibs/dll*_stubs.so* +/usr/lib/xen-*/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/META +/usr/lib/xen-*/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/*.cma diff --git a/xen/debian/rules b/xen/debian/rules index aade4fb..19d1f50 100755 --- a/xen/debian/rules +++ b/xen/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) diff --git a/xen/debian/rules.real b/xen/debian/rules.real index 1252ec2..0711dad 100644 --- a/xen/debian/rules.real +++ b/xen/debian/rules.real @@ -1,7 +1,11 @@ +include /usr/share/ocaml/ocamlvars.mk + DEB_HOST_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_ARCH) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_GNU_TYPE) DEB_BUILD_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH) +GENCONTROL_ARGS := -VF:OCamlABI="$(OCAML_ABI)" + export DH_OPTIONS setup_env := env -u ARCH -u FLAVOUR -u VERSION -u MAKEFLAGS @@ -17,6 +21,8 @@ binary-arch-arch: install-lib-dev_$(ARCH) binary-arch-arch: install-libxenstore_$(ARCH) binary-arch-arch: install-utils_$(ARCH) binary-arch-arch: install-xenstore-utils_$(ARCH) +binary-arch-arch: install-lib-ocaml-dev_$(ARCH) +binary-arch-arch: install-lib-ocaml_$(ARCH) binary-arch-flavour: install-hypervisor_$(ARCH)_$(FLAVOUR) binary-indep: install-docs @@ -70,6 +76,7 @@ $(STAMPS_DIR)/install-utils_$(ARCH): CONFIG = \ XEN_COMPILE_ARCH=$(XEN_ARCH) \ XEN_TARGET_ARCH=$(XEN_ARCH) \ XEN_VERSION=$(VERSION) \ + OCAMLDESTDIR=$(CURDIR)/$(BUILD_DIR)/install-utils_$(ARCH)/usr/lib/xen-$(VERSION)/lib/ocaml \ PYTHON=$(shell pyversions -r) $(STAMPS_DIR)/build-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH) @@ -81,6 +88,7 @@ $(STAMPS_DIR)/install-utils_$(ARCH): DIR = $(BUILD_DIR)/build-utils_$(ARCH) $(STAMPS_DIR)/install-utils_$(ARCH): INSTALL_DIR = $(BUILD_DIR)/install-utils_$(ARCH) $(STAMPS_DIR)/install-utils_$(ARCH): $(STAMPS_DIR)/build-utils_$(ARCH) @rm -rf $(INSTALL_DIR) + mkdir -p $(INSTALL_DIR)/usr/lib/xen-$(VERSION)/lib/ocaml/stublibs +$(MAKE_CLEAN) -C $(DIR)/tools install DESTDIR=$(CURDIR)/$(INSTALL_DIR) $(CONFIG) # hvmloader #strip --remove-section=.comment --remove-section=.note $(INSTALL_DIR)/usr/lib/xen*/boot/* @@ -92,6 +100,7 @@ install-base: dh_compress dh_fixperms dh_installdeb + dh_ocaml dh_gencontrol -- $(GENCONTROL_ARGS) dh_md5sums dh_builddeb @@ -131,6 +140,32 @@ install-lib-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) dh_shlibdeps +$(MAKE_SELF) install-base +install-lib-ocaml_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) +install-lib-ocaml_$(ARCH): PACKAGE_NAME = libxen-ocaml-4.1 +install-lib-ocaml_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) +install-lib-ocaml_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) + dh_testdir + dh_testroot + dh_prep + ln -sf libxen-ocaml.install debian/libxen-ocaml-$(VERSION).install + dh_install --sourcedir=$(DIR) + rm debian/libxen-ocaml-$(VERSION).install + dh_strip + dh_shlibdeps + +$(MAKE_SELF) install-base + +install-lib-ocaml-dev_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) +install-lib-ocaml-dev_$(ARCH): PACKAGE_NAME = libxen-ocaml-dev +install-lib-ocaml-dev_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) +install-lib-ocaml-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) + dh_testdir + dh_testroot + dh_prep + dh_install --sourcedir=$(DIR) + dh_strip + dh_shlibdeps + +$(MAKE_SELF) install-base + install-libxenstore_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) install-libxenstore_$(ARCH): PACKAGE_NAME = libxenstore3.0 install-libxenstore_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) @@ -157,6 +192,7 @@ install-utils_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) install-libxenstore_$ install -D -m644 debian/xen-utils.README.Debian $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)/README.Debian install -D -m644 debian/xen-utils-$(VERSION).lintian-overrides $(PACKAGE_DIR)/usr/share/lintian/overrides/$(PACKAGE_NAME) dh_install --sourcedir=$(DIR) usr/lib/xen-$(VERSION) + rm -rf $(PACKAGE_DIR)/usr/lib/xen-4.1/lib/ocaml dh_python2 -V$(shell pyversions -rv) /usr/lib/xen-$(VERSION) dh_strip dh_makeshlibs -V diff --git a/xen/debian/templates/control.main.in b/xen/debian/templates/control.main.in index 2dff1dd..423009d 100644 --- a/xen/debian/templates/control.main.in +++ b/xen/debian/templates/control.main.in @@ -30,3 +30,21 @@ Replaces: xen-utils-common (<= 3.1.0-1) Description: Xenstore utilities for Xen This package contains the Xenstore utilities. +Package: libxen-ocaml- at version@ +Architecture: any +Section: libs +Depends: ocaml-base-nox-${F:OCamlABI}, ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends} +Provides: ${ocaml:Provides} +Description: OCaml libraries for controlling Xen + This package contains the runtime libraries required for the ocaml bindings + to the Xen control libraries. + +Package: libxen-ocaml-dev +Architecture: any +Section: libdevel +Depends: ocaml-nox-${F:OCamlABI}, libxen-ocaml- at version@ (= ${binary:Version}), ${shlibs:Depends}, ocaml-findlib (>= 1.1), ${misc:Depends}, ${ocaml:Depends} +Provides: ${ocaml:Provides} +Description: OCaml libraries for controlling Xen (devel package) + This package contains the ocaml findlib packages for compiling applications + that are designed to control the Xen hypervisor. + diff --git a/xen/debian/templates/control.source.in b/xen/debian/templates/control.source.in index a7db0ff..481d41a 100644 --- a/xen/debian/templates/control.source.in +++ b/xen/debian/templates/control.source.in @@ -15,7 +15,10 @@ Build-Depends: libncurses5-dev, libpci-dev, uuid-dev, - zlib1g-dev + zlib1g-dev, + ocaml-nox (>= 3.11.1-3~), + dh-ocaml (>= 0.9~), + ocaml-findlib Build-Depends-Indep: graphviz, ghostscript, -- 1.7.7
Jonathan Ludlam
2011-Oct-25 13:18 UTC
[Pkg-xen-devel] [PATCH 0/9] Package the ocaml libraries
Looks like 1 and 4 got zapped. They can be downloaded here: 1: https://github.com/jonludlam/pkg-xen/commit/7e4d4616f984880d0dde765c63f528473a024c6c.patch 4: https://github.com/jonludlam/pkg-xen/commit/ad12a311297f5ecf5b7cfda84e887ee26c7aca63.patch Jon On 25 Oct 2011, at 13:37, Jon Ludlam wrote:> The following set of patches package up the ocaml libraries that are > part of the standard xen build. The patches are also currently available > at: https://github.com/jonludlam/pkg-xen/commits/for-debian > > There are some things to note: > > 1. The 5 patches imported from xen-unstable are not, and will not go > into the xen-4.1-stable series. However, the patches were created > at the request of the Debian Ocaml Task Force as the ocaml libraries > were polluting the global namespace of packages with their too-short > names. > > 2. The libraries have been installed under /usr/lib/xen-4.1/lib/ocaml, > which is not the standard place to install ocaml findlib packages. > It is in keeping with the current packaging of xen in debian though. > To use the libraries, set an environment variable: > > OCAMLPATH=/usr/lib/xen-4.1/lib/ocaml > > and then findlib should locate the packages. > > 3. Compilation and running of non-custom bytecode executables requires > the setting of an additional environment variable: > > CAML_LD_LIBRARY_PATH=/usr/lib/xen-4.1/lib/ocaml/stublibs:/usr/lib/\ > xen-4.1/lib > > Bytecode executables compiled with the -custom flag work without this > setting. > > 4. Only the last 2 patches actually change the packaging at all. The first > of these two simply bumps the XS-Python-Version to 2.7. It's the last > patch that needs the most eyes on it to check for bugs. > > These patches were created with the help and assistance of Ian Campbell, > Thomas Goirand, and the Ocaml Debian Task Force. > > Jon Ludlam (9): > Import patch 23936:cdb34816a40a from xen-unstable.hg - renaming the > ocamlfind packages > Import patch 23937:5173834e8476 from xen-unstable.hg > Import patch 23938:fa04fbd56521 from xen-unstable.hg > Import patch 23939:51288f69523f from xen-unstable.hg > Import patch 23940:187d59e32a58 from xen-unstable.hg > Fix the ocaml libraries to install correctly under > /usr/lib/xen-4.1/lib/ocaml > Put an annotation at the top of the tools-ocaml-fix-rpath patch > Bump XS-Python-Version to 2.7 > Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev. > > xen/debian/libxen-dev.install | 2 + > xen/debian/libxen-ocaml-dev.install | 2 + > xen/debian/libxen-ocaml.install | 3 + > xen/debian/patches/series | 6 + > xen/debian/patches/tools-ocaml-fix-rpath.diff | 24 + > .../patches/tools-ocaml-fix-xc-dependencies.diff | 21 + > xen/debian/patches/tools-ocaml-fix-xc.diff | 45 + > xen/debian/patches/tools-ocaml-remove-log.diff | 1509 ++++ > xen/debian/patches/tools-ocaml-remove-uuid.diff | 321 + > .../tools-ocaml-rename-ocamlfind-packages.diff | 7924 ++++++++++++++++++++ > xen/debian/rules | 2 +- > xen/debian/rules.real | 36 + > xen/debian/templates/control.main.in | 18 + > xen/debian/templates/control.source.in | 7 +- > 14 files changed, 9917 insertions(+), 3 deletions(-) > create mode 100644 xen/debian/libxen-ocaml-dev.install > create mode 100644 xen/debian/libxen-ocaml.install > create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-log.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-uuid.diff > create mode 100644 xen/debian/patches/tools-ocaml-rename-ocamlfind-packages.diff > > -- > 1.7.7 > > > _______________________________________________ > Pkg-xen-devel mailing list > Pkg-xen-devel at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-xen-devel
Ian Campbell
2011-Oct-25 14:53 UTC
[Pkg-xen-devel] [PATCH 0/9] Package the ocaml libraries
On Tue, 2011-10-25 at 13:37 +0100, Jon Ludlam wrote:> The following set of patches package up the ocaml libraries that are > part of the standard xen build. The patches are also currently available > at: https://github.com/jonludlam/pkg-xen/commits/for-debian > > There are some things to note: > > 1. The 5 patches imported from xen-unstable are not, and will not go > into the xen-4.1-stable series. However, the patches were created > at the request of the Debian Ocaml Task Force as the ocaml libraries > were polluting the global namespace of packages with their too-short > names.I didn't review these 5 in detail since I saw them upstream but FWIW I agree that pulling them into the package even though they aren't in 4.1 is the right thing to do. It's in line with what the ocaml team want and with what future Xen releases will use. Also they trivially disappear once 4.2 is packaged as well. One thing I note is that the package tends to use the changeset ID in the patch name (e.g. upstream-23104:1976adbf2b80). I'll take a look at the other patches now.> 2. The libraries have been installed under /usr/lib/xen-4.1/lib/ocaml, > which is not the standard place to install ocaml findlib packages. > It is in keeping with the current packaging of xen in debian though. > To use the libraries, set an environment variable: > > OCAMLPATH=/usr/lib/xen-4.1/lib/ocaml > > and then findlib should locate the packages. > > 3. Compilation and running of non-custom bytecode executables requires > the setting of an additional environment variable: > > CAML_LD_LIBRARY_PATH=/usr/lib/xen-4.1/lib/ocaml/stublibs:/usr/lib/\ > xen-4.1/lib > > Bytecode executables compiled with the -custom flag work without this > setting. > > 4. Only the last 2 patches actually change the packaging at all. The first > of these two simply bumps the XS-Python-Version to 2.7. It's the last > patch that needs the most eyes on it to check for bugs. > > These patches were created with the help and assistance of Ian Campbell, > Thomas Goirand, and the Ocaml Debian Task Force. > > Jon Ludlam (9): > Import patch 23936:cdb34816a40a from xen-unstable.hg - renaming the > ocamlfind packages > Import patch 23937:5173834e8476 from xen-unstable.hg > Import patch 23938:fa04fbd56521 from xen-unstable.hg > Import patch 23939:51288f69523f from xen-unstable.hg > Import patch 23940:187d59e32a58 from xen-unstable.hg > Fix the ocaml libraries to install correctly under > /usr/lib/xen-4.1/lib/ocaml > Put an annotation at the top of the tools-ocaml-fix-rpath patch > Bump XS-Python-Version to 2.7 > Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev. > > xen/debian/libxen-dev.install | 2 + > xen/debian/libxen-ocaml-dev.install | 2 + > xen/debian/libxen-ocaml.install | 3 + > xen/debian/patches/series | 6 + > xen/debian/patches/tools-ocaml-fix-rpath.diff | 24 + > .../patches/tools-ocaml-fix-xc-dependencies.diff | 21 + > xen/debian/patches/tools-ocaml-fix-xc.diff | 45 + > xen/debian/patches/tools-ocaml-remove-log.diff | 1509 ++++ > xen/debian/patches/tools-ocaml-remove-uuid.diff | 321 + > .../tools-ocaml-rename-ocamlfind-packages.diff | 7924 ++++++++++++++++++++ > xen/debian/rules | 2 +- > xen/debian/rules.real | 36 + > xen/debian/templates/control.main.in | 18 + > xen/debian/templates/control.source.in | 7 +- > 14 files changed, 9917 insertions(+), 3 deletions(-) > create mode 100644 xen/debian/libxen-ocaml-dev.install > create mode 100644 xen/debian/libxen-ocaml.install > create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-log.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-uuid.diff > create mode 100644 xen/debian/patches/tools-ocaml-rename-ocamlfind-packages.diff >-- Ian Campbell If you think the system is working, ask someone who's waiting for a prompt.
Ian Campbell
2011-Oct-25 14:58 UTC
[Pkg-xen-devel] [PATCH 8/9] Bump XS-Python-Version to 2.7
This is just a consequence of the transition to python 2.7 in Sid and nothing in particular to do with the ocaml stuff. On Tue, 2011-10-25 at 13:37 +0100, Jon Ludlam wrote:> --- > xen/debian/templates/control.source.in | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/xen/debian/templates/control.source.in b/xen/debian/templates/control.source.in > index 9511b86..a7db0ff 100644 > --- a/xen/debian/templates/control.source.in > +++ b/xen/debian/templates/control.source.in > @@ -23,5 +23,5 @@ Build-Depends-Indep: > texlive-font-utils, > texlive-latex-recommended > Standards-Version: 3.8.4 > -XS-Python-Version: 2.6 > +XS-Python-Version: 2.7 >-- Ian Campbell Those who cannot remember the past are condemned to repeat it. -- George Santayana
Ian Campbell
2011-Oct-25 15:25 UTC
[Pkg-xen-devel] [PATCH 0/9] Package the ocaml libraries
Overall I think this series is in pretty good shape. Bastian, what do you think? Jon and others are working on getting XAPI (an alternative toolstack for Xen) into Debian as part of the XCP project but since XAPI is written in ocaml they are completely blocked on this. Ian. On Tue, 2011-10-25 at 13:37 +0100, Jon Ludlam wrote:> The following set of patches package up the ocaml libraries that are > part of the standard xen build. The patches are also currently available > at: https://github.com/jonludlam/pkg-xen/commits/for-debian > > There are some things to note: > > 1. The 5 patches imported from xen-unstable are not, and will not go > into the xen-4.1-stable series. However, the patches were created > at the request of the Debian Ocaml Task Force as the ocaml libraries > were polluting the global namespace of packages with their too-short > names. > > 2. The libraries have been installed under /usr/lib/xen-4.1/lib/ocaml, > which is not the standard place to install ocaml findlib packages. > It is in keeping with the current packaging of xen in debian though. > To use the libraries, set an environment variable: > > OCAMLPATH=/usr/lib/xen-4.1/lib/ocaml > > and then findlib should locate the packages. > > 3. Compilation and running of non-custom bytecode executables requires > the setting of an additional environment variable: > > CAML_LD_LIBRARY_PATH=/usr/lib/xen-4.1/lib/ocaml/stublibs:/usr/lib/\ > xen-4.1/lib > > Bytecode executables compiled with the -custom flag work without this > setting. > > 4. Only the last 2 patches actually change the packaging at all. The first > of these two simply bumps the XS-Python-Version to 2.7. It's the last > patch that needs the most eyes on it to check for bugs. > > These patches were created with the help and assistance of Ian Campbell, > Thomas Goirand, and the Ocaml Debian Task Force. > > Jon Ludlam (9): > Import patch 23936:cdb34816a40a from xen-unstable.hg - renaming the > ocamlfind packages > Import patch 23937:5173834e8476 from xen-unstable.hg > Import patch 23938:fa04fbd56521 from xen-unstable.hg > Import patch 23939:51288f69523f from xen-unstable.hg > Import patch 23940:187d59e32a58 from xen-unstable.hg > Fix the ocaml libraries to install correctly under > /usr/lib/xen-4.1/lib/ocaml > Put an annotation at the top of the tools-ocaml-fix-rpath patch > Bump XS-Python-Version to 2.7 > Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev. > > xen/debian/libxen-dev.install | 2 + > xen/debian/libxen-ocaml-dev.install | 2 + > xen/debian/libxen-ocaml.install | 3 + > xen/debian/patches/series | 6 + > xen/debian/patches/tools-ocaml-fix-rpath.diff | 24 + > .../patches/tools-ocaml-fix-xc-dependencies.diff | 21 + > xen/debian/patches/tools-ocaml-fix-xc.diff | 45 + > xen/debian/patches/tools-ocaml-remove-log.diff | 1509 ++++ > xen/debian/patches/tools-ocaml-remove-uuid.diff | 321 + > .../tools-ocaml-rename-ocamlfind-packages.diff | 7924 ++++++++++++++++++++ > xen/debian/rules | 2 +- > xen/debian/rules.real | 36 + > xen/debian/templates/control.main.in | 18 + > xen/debian/templates/control.source.in | 7 +- > 14 files changed, 9917 insertions(+), 3 deletions(-) > create mode 100644 xen/debian/libxen-ocaml-dev.install > create mode 100644 xen/debian/libxen-ocaml.install > create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc-dependencies.diff > create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-log.diff > create mode 100644 xen/debian/patches/tools-ocaml-remove-uuid.diff > create mode 100644 xen/debian/patches/tools-ocaml-rename-ocamlfind-packages.diff >-- Ian Campbell Remember the good old days, when CPU was singular?
Bastian Blank
2011-Oct-26 08:34 UTC
[Pkg-xen-devel] [PATCH 8/9] Bump XS-Python-Version to 2.7
On Tue, Oct 25, 2011 at 01:37:28PM +0100, Jon Ludlam wrote:> -XS-Python-Version: 2.6 > +XS-Python-Version: 2.7There needs to be a backport first. I had the same conversation before the Squeeze release. Bastian -- The face of war has never changed. Surely it is more logical to heal than to kill. -- Surak of Vulcan, "The Savage Curtain", stardate 5906.5
Ian Campbell
2011-Oct-26 08:45 UTC
[Pkg-xen-devel] [PATCH 8/9] Bump XS-Python-Version to 2.7
On Wed, 2011-10-26 at 10:34 +0200, Bastian Blank wrote:> On Tue, Oct 25, 2011 at 01:37:28PM +0100, Jon Ludlam wrote: > > -XS-Python-Version: 2.6 > > +XS-Python-Version: 2.7 > > There needs to be a backport first. I had the same conversation before > the Squeeze release.A backport of what? This is fixing a FTBFS bug in Sid, see #646660. -- Ian Campbell Current Noise: AC/DC - For Those About To Rock (We Salute You) Killing turkeys causes winter.
Bastian Blank
2011-Oct-26 08:59 UTC
[Pkg-xen-devel] [PATCH 0/9] Package the ocaml libraries
On Tue, Oct 25, 2011 at 01:37:20PM +0100, Jon Ludlam wrote:> 1. The 5 patches imported from xen-unstable are not, and will not go > into the xen-4.1-stable series. However, the patches were created > at the request of the Debian Ocaml Task Force as the ocaml libraries > were polluting the global namespace of packages with their too-short > names.Okay.> Jon Ludlam (9): > Import patch 23936:cdb34816a40a from xen-unstable.hg - renaming the > ocamlfind packages > Import patch 23937:5173834e8476 from xen-unstable.hg > Import patch 23938:fa04fbd56521 from xen-unstable.hg > Import patch 23939:51288f69523f from xen-unstable.hg > Import patch 23940:187d59e32a58 from xen-unstable.hgThis patches are not enough. I pulled them from xen-unstable and got: | The next patch would delete the file tools/ocaml/libs/xl/xl.mli.in, | which does not exist! Applying it anyway. | patching file tools/ocaml/libs/xl/xl.mli.in | Hunk #1 FAILED at 1. | 1 out of 1 hunk FAILED -- rejects in file tools/ocaml/libs/xl/xl.mli.in Bastian -- Power is danger. -- The Centurion, "Balance of Terror", stardate 1709.2
Reasonably Related Threads
- [OCAML 0/7] Xen ocaml library packaging
- [OCAML 0/7] V4 or so of the xen ocaml packaging patches
- [PATCH 6/7] Create 2 ocaml packages, libxen-4.1-ocaml and libxen-4.1-ocaml-dev.
- Xen 4.1.1 packaging enhancement
- Bug#695176: libxen-ocaml-dev ocaml libraries contain build path to .so libraries rather than installed path