search for: uncompress_head

Displaying 20 results from an estimated 27 matches for "uncompress_head".

2017 May 08
3
[PATCH 0/3] v2v: -i ova: Prefer pigz or pxz for uncompressing OVA
https://bugzilla.redhat.com/show_bug.cgi?id=1448739
2017 Mar 13
0
[PATCH 1/2] v2v: -i ova: Hoist utility functions to the top of the file.
...les in + let files = + List.filter (fun x -> Filename.check_suffix x ext) files in + files @ loop (rest @ dirs) + in + loop [dir] + +(* Uncompress the first few bytes of [file] and return it as + * [(bytes, len)]. [zcat] is the command to use (eg. zcat or xzcat). + *) +let uncompress_head zcat file = + let cmd = sprintf "%s %s" zcat (quote file) in + let chan_out, chan_in, chan_err = Unix.open_process_full cmd [||] in + let b = Bytes.create 512 in + let len = input chan_out b 0 (Bytes.length b) in + (* We're expecting the subprocess to fail because we close + *...
2017 Mar 13
4
[PATCH 0/2] v2v: -i ova: A couple of cleanup patches.
A couple of patches cleaning up the -i ova code. These are both just refactoring (or should be at any rate). The second patch is best viewed with 'git show -w' to exclude whitespace changes. Rich.
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...ovatmpdir, Directory | `Zip | `GZip | `XZ | `Unknown -> error (f_"%s: unsupported file format\n\nFormats which we currently understand for '-i ova' are: tar (uncompressed, compress with gzip or xz), zip") ova ) @@ -222,11 +221,10 @@ and uncompress_head format file = and uncompressed_type format file = let head, headlen = uncompress_head format file in let tmpfile, chan = - Filename.open_temp_file "ova.file." "" in + Filename.open_temp_file ~temp_dir:tmpdir "ova.file." "" in output chan head...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...else ( let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "ova." in + let t = Mkdtemp.temp_dir ~base_dir:large_tmpdir "ova." in rmdir_on_exit t; t in @@ -221,8 +220,7 @@ and uncompress_head format file = *) and uncompressed_type format file = let head, headlen = uncompress_head format file in - let tmpfile, chan = - Filename.open_temp_file "ova.file." "" in + let tmpfile, chan = Filename.open_temp_file "ova.file." "" in output chan...
2016 Nov 23
0
Re: [PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...al = > > (* The spec allows a directory to be specified as an ova. This > > * is also pretty convenient. > > *) > > - if is_directory ova then ova > > + if is_directory ova then ova, false > > else ( > > let uncompress_head zcat file = > > let cmd = sprintf "%s %s" zcat (quote file) in > > @@ -67,11 +73,53 @@ object > > > > tmpfile in > > > > + (* Untar only ovf and manifest from the archive *) > > + let untar_partial file outd...
2016 Nov 21
2
Re: [PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...ded = > + let exploded, partial = > (* The spec allows a directory to be specified as an ova. This > * is also pretty convenient. > *) > - if is_directory ova then ova > + if is_directory ova then ova, false > else ( > let uncompress_head zcat file = > let cmd = sprintf "%s %s" zcat (quote file) in > @@ -67,11 +73,53 @@ object > > tmpfile in > > + (* Untar only ovf and manifest from the archive *) > + let untar_partial file outdir = I'd rename this as "...
2016 Nov 04
0
[PATCH 4/5] v2v: ova: don't extract files from OVA if it's not needed
...(* Extract ova file. *) - let exploded = + let exploded, partial = (* The spec allows a directory to be specified as an ova. This * is also pretty convenient. *) - if is_directory ova then ova + if is_directory ova then ova, false else ( let uncompress_head zcat file = let cmd = sprintf "%s %s" zcat (quote file) in @@ -67,11 +70,19 @@ object tmpfile in + (* Untar only ovf and manifest from the archive *) + let untar_partial file outdir = + let cmd1 = [ "tar"; "-tf" ; file ]...
2020 Apr 06
4
[v2v PATCH 1/2] v2v: nbdkit: change base dir for nbdkit sockets/pidfiles
Since this new temporary directory will contain UNIX sockets for communicating with nbdkit, then its path must not be too long. Use the existing directory that libguestfs exposes for this, i.e. sockdir. --- v2v/nbdkit.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml index 65317f9b..46b20c9d 100644 --- a/v2v/nbdkit.ml +++ b/v2v/nbdkit.ml
2016 Apr 21
2
[PATCH 1/2] sparsify: Refactor handling of checks of copying mode / --in-place.
Just refactoring, no change. --- sparsify/cmdline.ml | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/sparsify/cmdline.ml b/sparsify/cmdline.ml index ce2b913..bd49e71 100644 --- a/sparsify/cmdline.ml +++ b/sparsify/cmdline.ml @@ -98,6 +98,7 @@ read the man page virt-sparsify(1). let check_tmpdir = !check_tmpdir in let
2020 Apr 06
6
[PATCH virt-v2v v2 0/2] v2v: Large temporary directory handling.
v1 was here: https://www.redhat.com/archives/libguestfs/2020-April/msg00007.html There's a BZ for this now which I forgot to add to the commit message: https://bugzilla.redhat.com/show_bug.cgi?id=1814611 For v2: - Fix incorrect reference to $TMPDIR in existing manual. - Separate handling for small temporary files and large temporary files. Small temporary files go into $TMPDIR
2016 Nov 12
0
[PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...(* Extract ova file. *) - let exploded = + let exploded, partial = (* The spec allows a directory to be specified as an ova. This * is also pretty convenient. *) - if is_directory ova then ova + if is_directory ova then ova, false else ( let uncompress_head zcat file = let cmd = sprintf "%s %s" zcat (quote file) in @@ -67,11 +73,53 @@ object tmpfile in + (* Untar only ovf and manifest from the archive *) + let untar_partial file outdir = + let files = + external_command (sprintf &qu...
2020 Apr 02
6
[PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.
...ctory else ( let tmpdir = - let base_dir = (open_guestfs ())#get_cachedir () in - let t = Mkdtemp.temp_dir ~base_dir "ova." in + let t = Mkdtemp.temp_dir ~base_dir:tmpdir "ova." in rmdir_on_exit t; t in @@ -222,7 +221,7 @@ and uncompress_head format file = and uncompressed_type format file = let head, headlen = uncompress_head format file in let tmpfile, chan = - Filename.open_temp_file "ova.file." "" in + Filename.open_temp_file ~temp_dir:tmpdir "ova.file." "" in output chan head...
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.
2016 Nov 04
10
[PATCH 0/5] Import directly from OVA tar archive if possible
This is still a draft, not ready for commit yet. But feedback is welcomed. This series is related to the problem of inefficient import of OVA files. The needed enhancements of QEMU was merged into the codebase and should be available in QEMU 2.8. From there we can use 'size' and 'offset' options in raw driver to tell QEMU to use only subset of a file as an image. The first three
2016 Jun 15
3
[PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
OCaml 4.02 introduced the 'bytes' type, a mutable string intended to replace the existing 'string' type for those cases where the byte array can be mutated. In future the 'string' type will become immutable. This is not the default now, but it can be forced using the '-safe-string' compile option. I tested this on Fedora 24 (OCaml 4.02) & RHEL 7 (OCaml 4.01).
2016 Nov 12
9
[PATCH v2 0/5] Import directly from OVA tar archive if possible
This series is related to the problem of inefficient import of OVA files. The needed enhancements of QEMU were merged into the codebase and should be available in QEMU 2.8. From there we can use 'size' and 'offset' options in raw driver to tell QEMU to use only subset of a file as an image. The patch set is more or less complete. The only outstanding issue is the missing detection
2017 Feb 04
0
[PATCH v8 4/4] v2v: ova: don't extract files from OVA if it's not needed
...(* Extract ova file. *) - let exploded = + let exploded, partial = (* The spec allows a directory to be specified as an ova. This * is also pretty convenient. *) - if is_directory ova then ova + if is_directory ova then ova, false else ( let uncompress_head zcat file = let cmd = sprintf "%s %s" zcat (quote file) in @@ -67,11 +73,35 @@ object tmpfile in + (* Untar only ovf and manifest from the archive *) + let untar_metadata ova outdir = + let files = + external_command (sprintf &qu...
2016 Dec 18
0
[PATCH v4 6/6] v2v: ova: don't extract files from OVA if it's not needed
...(* Extract ova file. *) - let exploded = + let exploded, partial = (* The spec allows a directory to be specified as an ova. This * is also pretty convenient. *) - if is_directory ova then ova + if is_directory ova then ova, false else ( let uncompress_head zcat file = let cmd = sprintf "%s %s" zcat (quote file) in @@ -67,11 +73,56 @@ object tmpfile in + (* Untar only ovf and manifest from the archive *) + let untar_metadata ova outdir = + let files = + external_command (sprintf &qu...
2017 Jan 30
0
[PATCH v6 3/3] v2v: ova: don't extract files from OVA if it's not needed
...(* Extract ova file. *) - let exploded = + let exploded, partial = (* The spec allows a directory to be specified as an ova. This * is also pretty convenient. *) - if is_directory ova then ova + if is_directory ova then ova, false else ( let uncompress_head zcat file = let cmd = sprintf "%s %s" zcat (quote file) in @@ -67,11 +73,56 @@ object tmpfile in + (* Untar only ovf and manifest from the archive *) + let untar_metadata ova outdir = + let files = + external_command (sprintf &qu...