Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.10.0 (14-Aug-2015):
* Preliminary support for FCoE
* Support xapi `originator`
* Prevent "xenapi" prefixed bridge monitoring

0.9.5 (27-Sep-2014):
* Add man page and standard command-line options
* Use libnl to read stats from interfaces
Expand Down
2 changes: 1 addition & 1 deletion _oasis
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OASISFormat: 0.3
Name: xcp-networkd
Version: 0.9.5
Version: 0.10.0
Synopsis: XCP Network Daemon
Authors: Rob Hoes
License: LGPL-2.1 with OCaml linking exception
Expand Down
87 changes: 44 additions & 43 deletions _tags
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# OASIS_START
# DO NOT EDIT (digest: 69abe13a880191e9d4ddc9d091092ce0)
# DO NOT EDIT (digest: 24d382d63f193063ab9b3c2a825d1463)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
true: annot, bin_annot
<**/.svn>: -traverse
<**/.svn>: not_hygienic
".bzr": -traverse
Expand All @@ -15,15 +16,15 @@
"_darcs": not_hygienic
# Library networklibs
"lib/networklibs.cmxs": use_networklibs
<lib/*.ml{,i}>: oasis_library_networklibs_ccopt
<lib/*.ml{,i,y}>: oasis_library_networklibs_ccopt
"lib/link_stubs.c": oasis_library_networklibs_ccopt
<lib/networklibs.{cma,cmxa}>: use_libnetworklibs_stubs
<lib/*.ml{,i}>: pkg_forkexec
<lib/*.ml{,i}>: pkg_rpclib
<lib/*.ml{,i}>: pkg_stdext
<lib/*.ml{,i}>: pkg_threads
<lib/*.ml{,i}>: pkg_xcp-inventory
<lib/*.ml{,i}>: pkg_xcp.network
<lib/*.ml{,i,y}>: pkg_forkexec
<lib/*.ml{,i,y}>: pkg_rpclib
<lib/*.ml{,i,y}>: pkg_stdext
<lib/*.ml{,i,y}>: pkg_threads
<lib/*.ml{,i,y}>: pkg_xcp-inventory
<lib/*.ml{,i,y}>: pkg_xcp.network
"lib/link_stubs.c": pkg_forkexec
"lib/link_stubs.c": pkg_rpclib
"lib/link_stubs.c": pkg_stdext
Expand All @@ -42,17 +43,17 @@
<networkd/networkd.{native,byte}>: pkg_xcp.network
<networkd/networkd.{native,byte}>: pkg_xen-api-client
<networkd/networkd.{native,byte}>: use_networklibs
<networkd/*.ml{,i}>: pkg_forkexec
<networkd/*.ml{,i}>: pkg_netlink
<networkd/*.ml{,i}>: pkg_rpclib
<networkd/*.ml{,i}>: pkg_rpclib.unix
<networkd/*.ml{,i}>: pkg_stdext
<networkd/*.ml{,i}>: pkg_threads
<networkd/*.ml{,i}>: pkg_xcp
<networkd/*.ml{,i}>: pkg_xcp-inventory
<networkd/*.ml{,i}>: pkg_xcp.network
<networkd/*.ml{,i}>: pkg_xen-api-client
<networkd/*.ml{,i}>: use_networklibs
<networkd/*.ml{,i,y}>: pkg_forkexec
<networkd/*.ml{,i,y}>: pkg_netlink
<networkd/*.ml{,i,y}>: pkg_rpclib
<networkd/*.ml{,i,y}>: pkg_rpclib.unix
<networkd/*.ml{,i,y}>: pkg_stdext
<networkd/*.ml{,i,y}>: pkg_threads
<networkd/*.ml{,i,y}>: pkg_xcp
<networkd/*.ml{,i,y}>: pkg_xcp-inventory
<networkd/*.ml{,i,y}>: pkg_xcp.network
<networkd/*.ml{,i,y}>: pkg_xen-api-client
<networkd/*.ml{,i,y}>: use_networklibs
<networkd/networkd.{native,byte}>: custom
# Executable networkd_db
<networkd_db/networkd_db.{native,byte}>: pkg_forkexec
Expand All @@ -62,13 +63,13 @@
<networkd_db/networkd_db.{native,byte}>: pkg_xcp-inventory
<networkd_db/networkd_db.{native,byte}>: pkg_xcp.network
<networkd_db/networkd_db.{native,byte}>: use_networklibs
<networkd_db/*.ml{,i}>: pkg_forkexec
<networkd_db/*.ml{,i}>: pkg_rpclib
<networkd_db/*.ml{,i}>: pkg_stdext
<networkd_db/*.ml{,i}>: pkg_threads
<networkd_db/*.ml{,i}>: pkg_xcp-inventory
<networkd_db/*.ml{,i}>: pkg_xcp.network
<networkd_db/*.ml{,i}>: use_networklibs
<networkd_db/*.ml{,i,y}>: pkg_forkexec
<networkd_db/*.ml{,i,y}>: pkg_rpclib
<networkd_db/*.ml{,i,y}>: pkg_stdext
<networkd_db/*.ml{,i,y}>: pkg_threads
<networkd_db/*.ml{,i,y}>: pkg_xcp-inventory
<networkd_db/*.ml{,i,y}>: pkg_xcp.network
<networkd_db/*.ml{,i,y}>: use_networklibs
<networkd_db/networkd_db.{native,byte}>: custom
# Executable network_test
<test/network_test.{native,byte}>: pkg_forkexec
Expand All @@ -79,14 +80,14 @@
<test/network_test.{native,byte}>: pkg_xcp-inventory
<test/network_test.{native,byte}>: pkg_xcp.network
<test/network_test.{native,byte}>: use_networklibs
<test/*.ml{,i}>: pkg_forkexec
<test/*.ml{,i}>: pkg_oUnit
<test/*.ml{,i}>: pkg_rpclib
<test/*.ml{,i}>: pkg_stdext
<test/*.ml{,i}>: pkg_threads
<test/*.ml{,i}>: pkg_xcp-inventory
<test/*.ml{,i}>: pkg_xcp.network
<test/*.ml{,i}>: use_networklibs
<test/*.ml{,i,y}>: pkg_forkexec
<test/*.ml{,i,y}>: pkg_oUnit
<test/*.ml{,i,y}>: pkg_rpclib
<test/*.ml{,i,y}>: pkg_stdext
<test/*.ml{,i,y}>: pkg_threads
<test/*.ml{,i,y}>: pkg_xcp-inventory
<test/*.ml{,i,y}>: pkg_xcp.network
<test/*.ml{,i,y}>: use_networklibs
# Executable cli
<cli/network_cli.{native,byte}>: pkg_cmdliner
<cli/network_cli.{native,byte}>: pkg_forkexec
Expand All @@ -97,14 +98,14 @@
<cli/network_cli.{native,byte}>: pkg_xcp-inventory
<cli/network_cli.{native,byte}>: pkg_xcp.network
<cli/network_cli.{native,byte}>: use_networklibs
<cli/*.ml{,i}>: pkg_cmdliner
<cli/*.ml{,i}>: pkg_forkexec
<cli/*.ml{,i}>: pkg_rpclib
<cli/*.ml{,i}>: pkg_stdext
<cli/*.ml{,i}>: pkg_threads
<cli/*.ml{,i}>: pkg_xcp
<cli/*.ml{,i}>: pkg_xcp-inventory
<cli/*.ml{,i}>: pkg_xcp.network
<cli/*.ml{,i}>: use_networklibs
<cli/*.ml{,i,y}>: pkg_cmdliner
<cli/*.ml{,i,y}>: pkg_forkexec
<cli/*.ml{,i,y}>: pkg_rpclib
<cli/*.ml{,i,y}>: pkg_stdext
<cli/*.ml{,i,y}>: pkg_threads
<cli/*.ml{,i,y}>: pkg_xcp
<cli/*.ml{,i,y}>: pkg_xcp-inventory
<cli/*.ml{,i,y}>: pkg_xcp.network
<cli/*.ml{,i,y}>: use_networklibs
# OASIS_STOP

4 changes: 2 additions & 2 deletions lib/META
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OASIS_START
# DO NOT EDIT (digest: 1c79811cc8dd9ea01a505ead32a71432)
version = "0.9.5"
# DO NOT EDIT (digest: de99a9d89799ce8282274091a7a1fc5b)
version = "0.10.0"
description = "XCP Network Daemon"
requires = "forkexec stdext threads rpclib stdext xcp-inventory xcp.network"
archive(byte) = "networklibs.cma"
Expand Down
106 changes: 60 additions & 46 deletions myocamlbuild.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: 2f48de2146b614fb40f18d31701b8707) *)
(* DO NOT EDIT (digest: 4ff56aec2dfea165b1692e299cedba7e) *)
module OASISGettext = struct
(* # 22 "src/oasis/OASISGettext.ml" *)

Expand Down Expand Up @@ -39,10 +39,10 @@ module OASISExpr = struct
open OASISGettext


type test = string
type test = string


type flag = string
type flag = string


type t =
Expand All @@ -52,10 +52,10 @@ module OASISExpr = struct
| EOr of t * t
| EFlag of flag
| ETest of test * string



type 'a choices = (t * 'a) list

type 'a choices = (t * 'a) list


let eval var_get t =
Expand Down Expand Up @@ -249,6 +249,9 @@ module MyOCamlbuildFindlib = struct
*)
open Ocamlbuild_plugin

type conf =
{ no_automatic_syntax: bool;
}

(* these functions are not really officially exported *)
let run_and_read =
Expand Down Expand Up @@ -315,7 +318,7 @@ module MyOCamlbuildFindlib = struct

(* This lists all supported packages. *)
let find_packages () =
List.map before_space (split_nl & run_and_read "ocamlfind list")
List.map before_space (split_nl & run_and_read (exec_from_conf "ocamlfind" ^ " list"))


(* Mock to list available syntaxes. *)
Expand All @@ -338,7 +341,7 @@ module MyOCamlbuildFindlib = struct
]


let dispatch =
let dispatch conf =
function
| After_options ->
(* By using Before_options one let command line options have an higher
Expand All @@ -357,31 +360,39 @@ module MyOCamlbuildFindlib = struct
* -linkpkg *)
flag ["ocaml"; "link"; "program"] & A"-linkpkg";

(* For each ocamlfind package one inject the -package option when
* compiling, computing dependencies, generating documentation and
* linking. *)
List.iter
begin fun pkg ->
let base_args = [A"-package"; A pkg] in
(* TODO: consider how to really choose camlp4o or camlp4r. *)
let syn_args = [A"-syntax"; A "camlp4o"] in
let args =
(* Heuristic to identify syntax extensions: whether they end in
".syntax"; some might not.
*)
if Filename.check_suffix pkg "syntax" ||
List.mem pkg well_known_syntax then
syn_args @ base_args
else
base_args
in
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
flag ["ocaml"; "doc"; "pkg_"^pkg] & S args;
flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args;
flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args;
end
(find_packages ());
if not (conf.no_automatic_syntax) then begin
(* For each ocamlfind package one inject the -package option when
* compiling, computing dependencies, generating documentation and
* linking. *)
List.iter
begin fun pkg ->
let base_args = [A"-package"; A pkg] in
(* TODO: consider how to really choose camlp4o or camlp4r. *)
let syn_args = [A"-syntax"; A "camlp4o"] in
let (args, pargs) =
(* Heuristic to identify syntax extensions: whether they end in
".syntax"; some might not.
*)
if Filename.check_suffix pkg "syntax" ||
List.mem pkg well_known_syntax then
(syn_args @ base_args, syn_args)
else
(base_args, [])
in
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
flag ["ocaml"; "doc"; "pkg_"^pkg] & S args;
flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args;
flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args;

(* TODO: Check if this is allowed for OCaml < 3.12.1 *)
flag ["ocaml"; "compile"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "ocamldep"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "doc"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "infer_interface"; "package("^pkg^")"] & S pargs;
end
(find_packages ());
end;

(* Like -package but for extensions syntax. Morover -syntax is useless
* when linking. *)
Expand Down Expand Up @@ -430,10 +441,10 @@ module MyOCamlbuildBase = struct
module OC = Ocamlbuild_pack.Ocaml_compiler


type dir = string
type file = string
type name = string
type tag = string
type dir = string
type file = string
type name = string
type tag = string


(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
Expand All @@ -448,7 +459,7 @@ module MyOCamlbuildBase = struct
* directory.
*)
includes: (dir * dir list) list;
}
}


let env_filename =
Expand Down Expand Up @@ -546,12 +557,13 @@ module MyOCamlbuildBase = struct

(* When ocaml link something that use the C library, then one
need that file to be up to date.
This holds both for programs and for libraries.
*)
dep ["link"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
dep ["link"; "ocaml"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];

dep ["compile"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
dep ["compile"; "ocaml"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];

(* TODO: be more specific about what depends on headers *)
(* Depends on .h files *)
Expand Down Expand Up @@ -580,18 +592,18 @@ module MyOCamlbuildBase = struct
()


let dispatch_default t =
let dispatch_default conf t =
dispatch_combine
[
dispatch t;
MyOCamlbuildFindlib.dispatch;
MyOCamlbuildFindlib.dispatch conf;
]


end


# 594 "myocamlbuild.ml"
# 606 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
Expand Down Expand Up @@ -623,8 +635,10 @@ let package_default =
}
;;

let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
let conf = {MyOCamlbuildFindlib.no_automatic_syntax = false}

let dispatch_default = MyOCamlbuildBase.dispatch_default conf package_default;;

# 629 "myocamlbuild.ml"
# 643 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;
Loading