search for: csum_t

Displaying 20 results from an estimated 34 matches for "csum_t".

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 +++-
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
2016 Sep 30
0
[PATCH 1/4] mllib: move Checksums from builder
...h 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 website or your network!") + (Checksums.string_of_csum_t csum) csum_actual (Checksums.string_of_csum csum) + ) | { Index.checksums = None } -> (* Old-style: detached signature. *) diff --git a/builder/checksums.ml b/builder/checksums.ml deleted file mode 100644 index c8cdc98..0000000 --- a/builder/checksums.ml +++ /dev/null @@ -1,57...
2015 Jul 28
0
[PATCH 04/10] builder: internally use a list of checksums for indexes
...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 website or your network!") (string_of_csum_t csum) csum_actual csum_ref + +let verify_checksums checksums filename = + List.iter (fun c -> verify_checksum c filename) checksums diff --git a/builder/checksums.mli b/builder/checksums.mli index 4dc9dc0..ef26634 100644 --- a/builder/checksums.mli +++ b/builder/checksums.mli @@ -23,6 +23,9 @@...
2015 Jul 28
0
[PATCH 02/10] builder: create and use a new Checksums module
...should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Common_gettext.Gettext +open Common_utils + +open Utils + +open Printf + +type csum_t = +| SHA512 of string + +let string_of_csum_t = function + | SHA512 _ -> "sha512" + +let string_of_csum = function + | SHA512 c -> c + +let verify_checksum csum filename = + let prog, csum_ref = + match csum with + | SHA512 c -> "sha512sum", c + in + + let cm...
2016 Nov 04
0
[PATCH 1/5] mllib: compute checksum of file inside tar
...edhat.com> --- mllib/checksums.ml | 10 ++++++++-- mllib/checksums.mli | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index dfa8c3a..9fcff2f 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,7 +45,7 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum filename = +let verify_checksum csum ?(tar = "") filename = let prog, csum_ref = match csum with | SHA1 c -> "sha1sum", c @@ -53,7 +53,1...
2016 Nov 12
0
[PATCH v2 1/5] mllib: compute checksum of file inside tar
...hat.com> --- mllib/checksums.ml | 11 +++++++++-- mllib/checksums.mli | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index dfa8c3a..0907499 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,7 +45,7 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum filename = +let verify_checksum csum ?(tar) filename = let prog, csum_ref = match csum with | SHA1 c -> "sha1sum", c @@ -53,7 +53,14 @@ let verify...
2016 Dec 07
0
[PATCH v3 1/6] mllib: compute checksum of file inside tar
...om> --- mllib/checksums.ml | 11 +++++++++-- mllib/checksums.mli | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index dfa8c3a..a6c995b 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,7 +45,7 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum filename = +let verify_checksum csum ?tar filename = let prog, csum_ref = match csum with | SHA1 c -> "sha1sum", c @@ -53,7 +53,14 @@ let verify_c...
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
2017 Feb 07
1
Re: [PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
...> mllib/checksums.mli | 9 +++++++++ > 2 files changed, 25 insertions(+), 9 deletions(-) > > diff --git a/mllib/checksums.ml b/mllib/checksums.ml > index 1009e131c..bee829085 100644 > --- a/mllib/checksums.ml > +++ b/mllib/checksums.ml > @@ -45,14 +45,13 @@ let of_string csum_type csum_value = > | "sha512" -> SHA512 csum_value > | _ -> invalid_arg csum_type > > -let verify_checksum csum ?tar filename = > - let prog, csum_ref = > +let do_compute_checksum csum ?tar filename = > + let prog = > match csum with > - |...
2015 Jul 28
0
[PATCH 03/10] builder: add SHA256 support in Checksums
--- builder/checksums.ml | 4 ++++ builder/checksums.mli | 1 + 2 files changed, 5 insertions(+) diff --git a/builder/checksums.ml b/builder/checksums.ml index 73d541f..25b3328 100644 --- a/builder/checksums.ml +++ b/builder/checksums.ml @@ -24,17 +24,21 @@ open Utils open Printf type csum_t = +| SHA256 of string | SHA512 of string let string_of_csum_t = function + | SHA256 _ -> "sha256" | SHA512 _ -> "sha512" let string_of_csum = function + | SHA256 c -> c | SHA512 c -> c let verify_checksum csum filename = let prog, csum_ref =...
2017 Jan 03
0
[PATCH 2/5] mllib: factorize code to add Checksum.get_checksum function
...mllib/checksums.ml | 20 +++++++++----------- mllib/checksums.mli | 3 +++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index dfa8c3ae7..3efc764b9 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,23 +45,21 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum filename = - let prog, csum_ref = - match csum with - | SHA1 c -> "sha1sum", c - | SHA256 c -> "sha256sum", c - | SHA512 c -> &quo...
2017 Feb 10
0
[PATCH v3 01/10] mllib: factorize code to add Checksum.get_checksum function
...sums.ml | 25 +++++++++++++++---------- mllib/checksums.mli | 9 +++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index 1009e131c..000214703 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,14 +45,14 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum ?tar filename = - let prog, csum_ref = - match csum with - | SHA1 c -> "sha1sum", c - | SHA256 c -> "sha256sum", c - | SHA512 c ->...
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
0
[PATCH v2 1/7] mllib: factorize code to add Checksum.get_checksum function
...ksums.ml | 25 ++++++++++++++++--------- mllib/checksums.mli | 9 +++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/mllib/checksums.ml b/mllib/checksums.ml index 1009e131c..bee829085 100644 --- a/mllib/checksums.ml +++ b/mllib/checksums.ml @@ -45,14 +45,13 @@ let of_string csum_type csum_value = | "sha512" -> SHA512 csum_value | _ -> invalid_arg csum_type -let verify_checksum csum ?tar filename = - let prog, csum_ref = +let do_compute_checksum csum ?tar filename = + let prog = match csum with - | SHA1 c -> "sha1sum", c - | S...
2015 Jul 28
0
[PATCH 06/10] builder: split Index_parser.index in an own module
...ist (* string = "os-version" *) +and entry = { + printable_name : string option; (* the name= field *) + osinfo : string option; + file_uri : string; + arch : string; + signature_uri : string option; (* deprecated, will be removed in 1.26 *) + checksums : Checksums.csum_t list option; + revision : int; + format : string option; + size : int64; + compressed_size : int64 option; + expand : string option; + lvexpand : string option; + notes : (string * string) list; + hidden : bool; + aliases : string list option; + + sigchecker : Sigchecker.t; + proxy : Dow...
2015 Aug 12
0
[PATCH 1/2] builder: add non-int revisions
...e deleted by the diff --git a/builder/index.ml b/builder/index.ml index 3e8cb85..c59d6dd 100644 --- a/builder/index.ml +++ b/builder/index.ml @@ -32,7 +32,7 @@ and entry = { arch : string; signature_uri : string option; (* deprecated, will be removed in 1.26 *) checksums : Checksums.csum_t list option; - revision : int; + revision : Utils.revision; format : string option; size : int64; compressed_size : int64 option; @@ -86,7 +86,7 @@ let print_entry chan (name, { printable_name = printable_name; (Checksums.string_of_csum_t c) (Checksums.string_of_csum c) )...
2016 Dec 07
12
[PATCH v3 0/6] Import directly from OVA tar archive if possible
v3: Addressed Pino's comments, namely: - input_ova.ml - untar takes list of paths - renamed untar_partial to untar_metadata - replaced uggly regex with nsplit - tests - test changes are part of the main commit - renamed test-data/guestfs-hashsums.sh to test-data/test-utils.sh - renamed qemu_version to qemu_is_version and moved it to test-data/test-utils.sh - normalize paths
2017 Oct 27
0
[PATCH v11 3/8] builder: change arch type to (string, string option) maybe.
...ng = "os-version" *) and entry = { printable_name : string option; (* the name= field *) osinfo : string option; file_uri : string; - arch : string; + arch : arch; signature_uri : string option; (* deprecated, will be removed in 1.26 *) checksums : Checksums.csum_t list option; revision : Utils.revision; @@ -56,7 +62,10 @@ let print_entry chan (name, { printable_name; file_uri; arch; osinfo; Option.may (fp "name=%s\n") printable_name; Option.may (fp "osinfo=%s\n") osinfo; fp "file=%s\n" file_uri; - fp "arch=%s\n...
2017 Nov 21
0
[PATCH v13 1/3] builder: change arch type to distinguish guesses
...lder/index.ml @@ -30,7 +30,7 @@ and entry = { printable_name : string option; (* the name= field *) osinfo : string option; file_uri : string; - arch : string; + arch : arch; signature_uri : string option; (* deprecated, will be removed in 1.26 *) checksums : Checksums.csum_t list option; revision : Utils.revision; @@ -46,6 +46,11 @@ and entry = { sigchecker : Sigchecker.t; proxy : Curl.proxy; } +and arch = + | Arch of string + | GuessedArch of string + +let string_of_arch = function Arch a | GuessedArch a -> a let print_entry chan (name, { printable_n...