Displaying 20 results from an estimated 28 matches for "process_image".
2018 Feb 21
0
[PATCH] make-repository: use inspect_get_osinfo
..." distro major minor
- | "ubuntu" ->
- sprintf "%s%d.%02d" distro major minor
- | _ (* Any other combination. *) ->
- sprintf "%s%d.%d" distro major minor
-
let cmp a b =
Index.string_of_arch a = Index.string_of_arch b
@@ -260,14 +243,10 @@ let process_image acc_entries filename repo tmprepo index interactive
let root = Array.get roots 0 in
let inspected_arch = g#inspect_get_arch root in
let product = g#inspect_get_product_name root in
- let distro = g#inspect_get_distro root in
- let version_major = g#inspect_get_major_version roo...
2017 Jan 03
0
[PATCH 5/5] Add a virt-builder-repository tool
..."; "--best";
+ "--block-size=16777216"; outimg ] in
+ if run_command cmd <> 0 then
+ exit 1;
+ outimg ^ ".xz"
+ ) in
+
+ let outindex_path = tmprepo // "index" in
+ let index_channel = open_out outindex_path in
+
+ let process_image filename repo index interactive = (
+ printf "Preparing %s...\n" filename;
+
+ let filepath = repo // filename in
+ let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in
+ let lines = external_command qemuimg_cmd in
+ let line = String.concat &quo...
2017 Mar 07
0
[PATCH v4 9/9] Add a virt-builder-repository tool
...ot; ^ (quote filepath) in
+ let lines = external_command qemuimg_cmd in
+ let line = String.concat "\n" lines in
+ let infos = yajl_tree_parse line in
+ {
+ format = object_get_string "format" infos;
+ size = object_get_number "virtual-size" infos
+ }
+
+let process_image filename repo tmprepo index interactive sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let xz_path = compress_to filepath tmprepo in
+ let checksum = Checksums.compu...
2017 Mar 23
0
[PATCH v5 10/10] Add a virt-builder-repository tool
...ot; ^ (quote filepath) in
+ let lines = external_command qemuimg_cmd in
+ let line = String.concat "\n" lines in
+ let infos = yajl_tree_parse line in
+ {
+ format = object_get_string "format" infos;
+ size = object_get_number "virtual-size" infos
+ }
+
+let process_image filename repo tmprepo index interactive sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let xz_path = compress_to filepath tmprepo in
+ let checksum = Checksums.compu...
2017 Feb 10
0
[PATCH v3 10/10] Add a virt-builder-repository tool
...json " ^ (quote filepath) in
+ let lines = external_command qemuimg_cmd in
+ let line = String.concat "\n" lines in
+ let infos = yajl_tree_parse line in
+ { format = object_get_string "format" infos;
+ size = object_get_number "virtual-size" infos }
+
+let process_image filename repo tmprepo index interactive sigchecker =
+ info "Preparing %s..." filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_infos filepath in
+ let xz_path = compress_to filepath tmprepo in
+ let checksum = Checksums.compute_...
2018 Feb 21
3
[PATCH] New API: inspect_get_osinfo
Try to guess the possible osinfo-db short ID for the specified OS.
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1544842
---
generator/actions_inspection.ml | 14 ++++++++
lib/Makefile.am | 1 +
lib/inspect-osinfo.c | 75 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 90 insertions(+)
create mode 100644 lib/inspect-osinfo.c
diff --git
2017 Apr 12
0
[PATCH v6 10/10] Add a virt-builder-repository tool
...or
+ | "fedora" -> sprintf "%s%d" distro major
+ | _ -> sprintf "%s%d.%d" distro major minor
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && item_arch = arch
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ no_compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path = if no_compression...
2017 Jun 19
0
[PATCH v7 9/9] Add a virt-builder-repository tool
...t;%s%d.%02d" distro major minor
+ | _ (* Any other combination. *) ->
+ sprintf "%s%d.%d" distro major minor
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && item_arch = arch
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ no_compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path =
+ if no_compres...
2017 Sep 18
0
[PATCH v9 7/7] New tool: virt-builder-repository
...t;%s%d.%02d" distro major minor
+ | _ (* Any other combination. *) ->
+ sprintf "%s%d.%d" distro major minor
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && item_arch = arch
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ no_compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path =
+ if no_compres...
2017 Oct 05
0
[PATCH v11 6/6] New tool: virt-builder-repository
...t;%s%d.%02d" distro major minor
+ | _ (* Any other combination. *) ->
+ sprintf "%s%d.%d" distro major minor
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && item_arch = arch
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ no_compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path =
+ if no_compres...
2017 Sep 12
0
[PATCH v8 7/7] Add a virt-builder-repository tool
...t;%s%d.%02d" distro major minor
+ | _ (* Any other combination. *) ->
+ sprintf "%s%d.%d" distro major minor
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && item_arch = arch
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ no_compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path =
+ if no_compres...
2017 Nov 14
1
Re: [PATCH v12 3/3] New tool: virt-builder-repository
...h in the earlier then you can remove
the definition of string_of_arch here as well.
> +
> +let has_entry id arch index =
> + List.exists (
> + fun (item_id, { Index.arch = item_arch }) ->
> + item_id = id && (cmp item_arch arch)
Don't need parens.
> +let process_image acc_entries filename repo tmprepo index interactive
> + compression sigchecker =
> + message (f_"Preparing %s") filename;
> +
> + let filepath = repo // filename in
> + let { format = format; size = size } = get_disk_image_info filepath in
Since commit...
2017 Jan 03
13
[PATCH 0/5] Introducing virt-builder-repository
Hi all,
I wanted to provide an easy way to create or update a virt-builder
repository out of a folder of template disk image files. This is what
virt-builder-repository aims at. Some of the data are computed from
the image file, others are asked the user or extracted from an existing
index file.
So far, virt-builder-repository doesn't run libguestfs on each image
to extract the architecture,
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there,
Diffs to v8:
* Remove the regex to increment the revision: Index_parser.get_entry()
only handles integers
* Fix Pino's comments
Cédric Bosdonnat (6):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
builder: remove useless fish dependency
New tool:
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
...let string_of_arch = function Index.Arch s -> s | Index.GuessedArch s -> s in
+ (string_of_arch a) = (string_of_arch b)
+
+let has_entry id arch index =
+ List.exists (
+ fun (item_id, { Index.arch = item_arch }) ->
+ item_id = id && (cmp item_arch arch)
+ ) index
+
+let process_image acc_entries filename repo tmprepo index interactive
+ compression sigchecker =
+ message (f_"Preparing %s") filename;
+
+ let filepath = repo // filename in
+ let { format = format; size = size } = get_disk_image_info filepath in
+ let out_path =
+ if not compressi...
2017 Nov 13
6
[PATCH v12 0/3] virt-builder-repository tool
Hi there!
Here is the latest version of the series including Richard's comments.
I also reworked the repository_main.ml code to avoid setting an
empty entry if not found.
Cédric Bosdonnat (3):
builder: change arch type to distinguish guesses
builder: add a template parameter to get_index
New tool: virt-builder-repository
.gitignore | 4 +
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
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all,
Diff to v9 includes the changes requested by Pino.
Cédric Bosdonnat (5):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
New tool: virt-builder-repository
Pino Toscano (1):
builder: add simple OCaml osinfo-db reader
.gitignore
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there,
Here is an update of the series. The changes:
* Incorporate Richard's comments. Left out the with_openfile one
since that leads to a double close.
* Change the ask option return type to string (removing the option)
since if the use doesn't input anything we're using the default,
and the default is now a mandatory parameter.
* Make sure there are items in the