search for: csum_actual

Displaying 17 results from an estimated 17 matches for "csum_actual".

2017 Feb 07
1
Re: [PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
...gt; "sha512sum" > in > - > let cmd = > match tar with > | None -> > @@ -66,9 +65,17 @@ let verify_checksum csum ?tar filename = > | [] -> > error (f_"%s did not return any output") prog > | line :: _ -> > - let csum_actual = fst (String.split " " line) in > - if csum_ref <> csum_actual then > - raise (Mismatched_checksum (csum, csum_actual)) > + fst (String.split " " line) > + > +let compute_checksum csum_type ?tar filename = > + do_compute_checksum (of_string c...
2018 Apr 23
3
[PATCH 0/3] v2v: Miscellaneous refactoring and fixes.
Originally an attempt to fix: https://bugzilla.redhat.com/show_bug.cgi?id=1570407 However this isn't a complete fix. The OVA supplied doesn't even conform to VMware's own "specification" (I use the word loosely). The OVF inside the OVA references the disk.vmdk file, but the OVA doesn't contain that disk.vmdk file, only a snapshot called disk.vmdk.000000000. Therefore
2015 Jul 28
0
[PATCH 02/10] builder: create and use a new Checksums module
...m", c + in + + let cmd = sprintf "%s %s" prog (quote filename) in + if verbose () then printf "%s\n%!" cmd; + let lines = external_command cmd in + match lines with + | [] -> + error (f_"%s did not return any output") prog + | line :: _ -> + let csum_actual = fst (string_split " " line) in + if csum_ref <> csum_actual then + error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Dele...
2017 Jan 03
0
[PATCH 2/5] mllib: factorize code to add Checksum.get_checksum function
...e = + let prog = (string_of_csum_t csum) ^ "sum" in let cmd = sprintf "%s %s" prog (Filename.quote filename) in let lines = external_command cmd in match lines with | [] -> error (f_"%s did not return any output") prog | line :: _ -> - let csum_actual = fst (String.split " " line) in - if csum_ref <> csum_actual then - raise (Mismatched_checksum (csum, csum_actual)) + fst (String.split " " line) + +let verify_checksum csum filename = + let csum_ref = string_of_csum csum in + let csum_actual = get_checksum c...
2017 Feb 07
0
[PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
...6 _ -> "sha256sum" + | SHA512 _ -> "sha512sum" in - let cmd = match tar with | None -> @@ -66,9 +65,17 @@ let verify_checksum csum ?tar filename = | [] -> error (f_"%s did not return any output") prog | line :: _ -> - let csum_actual = fst (String.split " " line) in - if csum_ref <> csum_actual then - raise (Mismatched_checksum (csum, csum_actual)) + fst (String.split " " line) + +let compute_checksum csum_type ?tar filename = + do_compute_checksum (of_string csum_type "") ?tar fi...
2017 Feb 10
0
[PATCH v3 01/10] mllib: factorize code to add Checksum.get_checksum function
...-> error (f_"unhandled checksum type '%s'") csum_type in - let cmd = match tar with | None -> @@ -66,9 +66,14 @@ let verify_checksum csum ?tar filename = | [] -> error (f_"%s did not return any output") prog | line :: _ -> - let csum_actual = fst (String.split " " line) in - if csum_ref <> csum_actual then - raise (Mismatched_checksum (csum, csum_actual)) + let csum_str = fst (String.split " " line) in + of_string csum_type csum_str + +let verify_checksum csum ?tar filename = + let csum_type =...
2016 Sep 30
0
[PATCH 1/4] mllib: move Checksums from builder
...r.ml @@ -307,7 +307,11 @@ let main () = match entry with (* New-style: Using a checksum. *) | { Index.checksums = Some csums } -> - Checksums.verify_checksums csums template + (try Checksums.verify_checksums csums template + with Checksums.Mismatched_checksum (csum, csum_actual) -> + error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with...
2016 Sep 30
6
[PATCH 0/4] Consolidate Checksums as common code
Hi, this small series moves the OCaml Checksums module from virt-builder to mllib, adding more features to use it also for v2v. Thanks, Pino Toscano (4): mllib: move Checksums from builder mllib, builder: add and use Checksums.of_string mllib: add SHA1 support in Checksums v2v: -i ova: use Checksums builder/Makefile.am | 2 -- builder/builder.ml | 6 +++-
2015 Jul 28
19
[PATCH 00/10] RFC: builder: first support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. TODO items: - a bit more testing: listing and creating images works, so the current metadata is correct - handle revisions, so newer
2015 Jul 28
0
[PATCH 04/10] builder: internally use a list of checksums for indexes
...d-style: detached signature. *) let sigfile = match entry with diff --git a/builder/checksums.ml b/builder/checksums.ml index 25b3328..5663832 100644 --- a/builder/checksums.ml +++ b/builder/checksums.ml @@ -53,3 +53,6 @@ let verify_checksum csum filename = if csum_ref <> csum_actual then error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the...
2018 Apr 25
9
[PATCH v2 0/9] v2v: -i ova: Handle OVAs containing snapshots.
https://bugzilla.redhat.com/show_bug.cgi?id=1570407 This turned into quite an in-depth refactoring of how we handle OVAs. It also fixes a potential security issue. Rich.
2017 Feb 07
11
[PATCH v2 0/7] Introducing virt-builder-repository
Hi all, Here is a new version of the virt-builder-repository series taking care of Pino's comments. It has also been rebased on recent master. Cédric Bosdonnat (7): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: expose libosinfo DB reading functions in mllib builder: rename docs test script builder: add
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,
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...diff --git a/builder/checksums.ml b/builder/checksums.ml index 5663832..31d3cb3 100644 --- a/builder/checksums.ml +++ b/builder/checksums.ml @@ -49,7 +49,7 @@ let verify_checksum csum filename = | [] -> error (f_"%s did not return any output") prog | line :: _ -> - let csum_actual = fst (string_split " " line) in + let csum_actual = fst (String.split " " line) in if csum_ref <> csum_actual then error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the &...
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2017 Feb 10
15
[PATCH v3 00/10] Introducing virt-builder-repository
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...%s’ with architecture ‘%s’.\nUse --list to list available guest types.") arg cmdline.arch in item @@ -318,7 +318,7 @@ let main () = | { Index.checksums = Some csums } -> (try Checksums.verify_checksums csums template with Checksums.Mismatched_checksum (csum, csum_actual) -> - error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the '-v' option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with...