search for: require_tool

Displaying 20 results from an estimated 23 matches for "require_tool".

2017 Mar 22
7
[PATCH 0/5] dib: initial work to support d-i-b 2.0
...ges needed to support d-i-b 2.0; normal VM distro builds seem to work correctly, ramdisk builds are still broken and require more efforts. Thanks, Pino Toscano (5): dib: implement get_image_element_array stuff dib: export IMAGE_BLOCK_DEVICE_WITHOUT_PART dib: extract get_required_tool out of require_tool dib: require a Python interpreter dib: implement IMAGE_ELEMENT_YAML dib/cmdline.ml | 21 ++++++++++++++++++++- dib/cmdline.mli | 1 + dib/dib.ml | 44 ++++++++++++++++++++++++++++++++++++++++---- dib/utils.ml | 7 +++++-- dib/virt-dib.pod | 11 +++++++++++ 5 files changed, 77 i...
2017 Feb 02
7
[PATCH 0/6] dib: various improvements
Hi, this series improves virt-dib, adding some upstream changes, and refactoring the handling of output formats. Thanks, Pino Toscano (6): dib: clear up "already provided" message dib: add --checksum dib: pass custom mkfs options after the filesystem type dib: refactor output formats handling dib: clarify "output:" lines in --machine-readable documentation dib:
2016 Sep 23
2
[PATCH 1/2] mllib: move remove_duplicates from v2v
Simple code motion. --- mllib/common_utils.ml | 9 +++++++++ mllib/common_utils.mli | 6 ++++++ v2v/utils.ml | 9 --------- v2v/utils.mli | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 81d8202..78618f5 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -297,6 +297,15 @@ let sort_uniq
2015 Nov 11
2
[PATCH 1/2] dib: Make the interface between cmdline.ml and dib.ml explicit.
...one (hopefully so, at least). *) - if not (Sys.file_exists (basepath // "die")) then + if not (Sys.file_exists (cmdline.basepath // "die")) then error (f_"the specified base path is not the diskimage-builder library"); (* Check for required tools. *) require_tool "uuidgen"; - if List.mem "qcow2" formats then + if List.mem "qcow2" cmdline.formats then require_tool "qemu-img"; - if List.mem "vhd" formats then + if List.mem "vhd" cmdline.formats then require_tool "vhd-util";...
2016 Sep 23
0
[PATCH 2/2] dib: use remove_duplicates instead of own code
...dib/utils.ml index a2046cb..3df5171 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -91,10 +91,6 @@ let digit_prefix_compare a b = let do_mkdir dir = mkdir_p dir 0o755 -let rec remove_dups = function - | [] -> [] - | x :: xs -> x :: (remove_dups (List.filter ((<>) x) xs)) - let require_tool tool = try ignore (which tool) with Executable_not_found tool -> -- 2.7.4
2017 Mar 07
0
[PATCH v4 7/9] dib: move do_cp to mllib.Commun_utils
--- dib/utils.ml | 4 ---- mllib/common_utils.ml | 5 +++++ mllib/common_utils.mli | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dib/utils.ml b/dib/utils.ml index da5e738ad..e769ebe28 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -95,10 +95,6 @@ let require_tool tool = with Executable_not_found tool -> error (f_"%s needed but not found") tool -let do_cp src destdir = - let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in - if run_command cmd <> 0 then exit 1 - let ensure_trailing_newline str = if...
2017 Mar 23
0
[PATCH v5 07/10] dib: move do_cp to mllib.Commun_utils
...| 4 ---- mllib/common_utils.ml | 5 +++++ mllib/common_utils.mli | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dib/utils.ml b/dib/utils.ml index 967754d95..92296d173 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -98,10 +98,6 @@ let get_required_tool tool = let require_tool tool = ignore (get_required_tool tool) -let do_cp src destdir = - let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in - if run_command cmd <> 0 then exit 1 - let ensure_trailing_newline str = if String.length str > 0 && str.[String.length str -...
2017 Apr 12
0
[PATCH v6 07/10] dib: move do_cp to mllib.Commun_utils
...| 4 ---- mllib/common_utils.ml | 5 +++++ mllib/common_utils.mli | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dib/utils.ml b/dib/utils.ml index afa2ec944..2fe70e7fc 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -98,10 +98,6 @@ let get_required_tool tool = let require_tool tool = ignore (get_required_tool tool) -let do_cp src destdir = - let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in - if run_command cmd <> 0 then exit 1 - let ensure_trailing_newline str = if String.length str > 0 && str.[String.length str -...
2017 Mar 22
0
[PATCH 4/5] dib: require a Python interpreter
...ay { @@ -524,6 +527,10 @@ let main () = error (f_"the specified base path is not the diskimage-builder library"); (* Check for required tools. *) + let python = + match cmdline.python with + | None -> get_required_tool "python" + | Some exe -> exe in require_tool "uuidgen"; Output_format.check_formats_prerequisites cmdline.formats; if cmdline.checksum then @@ -654,6 +661,7 @@ let main () = ~network:cmdline.network ~debug ~fs_type:cmdline.fs_type ~checksum:cmdline.checksum +...
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
....getenv "PATH") in - let paths = filter_map ( - fun p -> - let path = p // tool in - try Unix.access path [Unix.X_OK]; Some path - with Unix.Unix_error _ -> None - ) paths in - match paths with - | [] -> raise (Tool_not_found tool) - | x :: _ -> x - let require_tool tool = try ignore (which tool) - with Tool_not_found tool -> + with Executable_not_found tool -> error (f_"%s needed but not found") tool let do_cp src destdir = diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index e7ee84a..14f4935 100644 --- a/mllib/common_...
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...ot;die" script in it, so we know the directory is the + * right one (hopefully so, at least). + *) + if not (Sys.file_exists (basepath // "die")) then + error (f_"the specified base path is not the diskimage-builder library"); + + (* Check for required tools. *) + require_tool "uuidgen"; + if List.mem "qcow2" formats then + require_tool "qemu-img"; + if List.mem "vhd" formats then + require_tool "vhd-util"; + + let image_name_d = image_name ^ ".d" in + + let tmpdir = Mkdtemp.temp_dir "dib." &...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...ot;die" script in it, so we know the directory is the + * right one (hopefully so, at least). + *) + if not (Sys.file_exists (basepath // "die")) then + error (f_"the specified base path is not the diskimage-builder library"); + + (* Check for required tools. *) + require_tool "uuidgen"; + if List.mem "qcow2" formats then + require_tool "qemu-img"; + if List.mem "vhd" formats then + require_tool "vhd-util"; + + let image_name_d = image_name ^ ".d" in + + let tmpdir = Mkdtemp.temp_dir "dib." &...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...ot;die" script in it, so we know the directory is the + * right one (hopefully so, at least). + *) + if not (Sys.file_exists (basepath // "die")) then + error (f_"the specified base path is not the diskimage-builder library"); + + (* Check for required tools. *) + require_tool "uuidgen"; + if List.mem "qcow2" formats then + require_tool "qemu-img"; + if List.mem "vhd" formats then + require_tool "vhd-util"; + + let image_name_d = image_name ^ ".d" in + + let tmpdir = Mkdtemp.temp_dir "dib." &...
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
...led format: %s" fmt diff --git a/dib/utils.ml b/dib/utils.ml index a3be394..6494627 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -109,16 +109,14 @@ let which tool = | [] -> raise (Tool_not_found tool) | x :: _ -> x -let run_command cmd = - ignore (external_command cmd) - let require_tool tool = try ignore (which tool) with Tool_not_found tool -> error (f_"%s needed but not found") tool let do_cp src destdir = - run_command (sprintf "cp -t %s -a %s" (quote destdir) (quote src)) + let cmd = [| "cp"; "-t"; destdir; "-a&qu...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...diskimage-builder + * has the "die" script in it, so we know the directory is the + * right one (hopefully so, at least). + *) + if not (Sys.file_exists (basepath // "die")) then + error (f_"the specified base path is not the diskimage-builder library"); + + require_tool "uuidgen"; + + let image_name_d = image_name ^ ".d" in + + let tmpdir = Mkdtemp.temp_dir "dib." "" in + rmdir_on_exit tmpdir; + let auxtmpdir = tmpdir // "aux" in + do_mkdir auxtmpdir; + let hookstmpdir = auxtmpdir // "hooks" in + d...
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module in v2v won't print user-sensible data (like passwords). --- builder/checksums.ml | 1 - builder/downloader.ml | 1 - builder/sigchecker.ml | 1 - mllib/common_utils.ml | 4 +++- mllib/common_utils.mli | 7 +++++-- v2v/curl.ml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git
2017 Sep 20
8
[PATCH v2 0/6] Fix OCaml dependencies.
v1 -> v2: - Fixed everything mentioned in patch review. - Libdir module is removed as a separate commit. Rich.
2017 Apr 12
12
[PATCH v6 00/10] Add a virt-builder-repository tool
Hi all, Here is an updated version of that patch series. Diff to v5: * Apply Pino's comments * Fix indentation issues * Add a default value for arch in builder/index_parser.ml if template is set * Improved new images filtering: don't process image that didn't change. This has been uncovered by introduction of --no-compression Cédric Bosdonnat (10): lib/osinfo.c:
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all, Here is the v5 of my patches series applying the latest comments from Pino. Cédric Bosdonnat (10): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to
2017 Mar 07
15
[PATCH v4 0/9] Introducing virt-builder-repository
Hi all, Here is a v4 of my series. It includes the changes according to Pino and Richard's comments. However, the perrorf/debug problem is addressed differently: instead of adding an implementation for the internal function names when building for mllib, I redefine these macros. Obviously this is not perfect, but at least easier to understand. Pino's comment about the Notes regex