search for: get_compressed_file_cont

Displaying 8 results from an estimated 8 matches for "get_compressed_file_cont".

2018 Dec 03
3
[supermin PATCH] build: ignore empty files
...2 && buf.[0] = '/' then Hostfiles else if len >= 2 && buf.[0] = '-' then Excludefiles else if len >= 1 && isalnum buf.[0] then Packages + else if len = 0 then Empty else error "%s: unknown file type in supermin directory" file and get_compressed_file_content zcat file = -- 2.17.2
2018 Dec 03
4
[supermin PATCH v2 0/3] Better handle no config files
This is a "merge" of two previous series: https://www.redhat.com/archives/libguestfs/2018-December/msg00015.html https://www.redhat.com/archives/libguestfs/2018-December/msg00020.html The goal is to handle better situations like: - empty file in the appliance directory - no config files available in the packages to include in an appliance Compared to the two series, the changes are: -
2018 Dec 03
4
[supermin PATCH 0/2] Create a really empty base.tar.gz
See patch #2 for more explanation. Pino Toscano (2): prepare: keep config_files available for longer prepare: create a really empty base.tar.gz with no config files src/mode_prepare.ml | 87 +++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 35 deletions(-) -- 2.17.2
2018 Dec 03
0
Re: [supermin PATCH] build: ignore empty files
...#39; then Hostfiles > else if len >= 2 && buf.[0] = '-' then Excludefiles > else if len >= 1 && isalnum buf.[0] then Packages > + else if len = 0 then Empty > else error "%s: unknown file type in supermin directory" file > > and get_compressed_file_content zcat file = > -- This is fine, ACK. Is there a situation where we have empty files in the supermin directory? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cros...
2018 Dec 03
0
[supermin PATCH 2/2] prepare: create a really empty base.tar.gz with no config files
...reating an archive with no files, it will be 10K zero's, that is compressed by gzip, resulting in few bytes. The issue happens later, during the build phase: base.tar.gz is correctly detected as gz, and zcat is run to detect its content: since the empty tar was 10K of zero's, the buffer in get_compressed_file_content will be filled by zero's, and get_file_content will fail to detect anything. As solution, at least for our own base.tar.gz: in case there are no config files to copy, create a gzip file from /dev/null, which is still recognized as empty tar. --- src/mode_prepare.ml | 49 +++++++++++++++++++...
2016 Feb 18
0
[PATCH 3/3] Add and use an helper error function
...buf.[0] = '-' then Excludefiles else if len >= 1 && isalnum buf.[0] then Packages - else ( - eprintf "supermin: %s: unknown file type in supermin directory\n" file; - exit 1 - ) + else error "%s: unknown file type in supermin directory" file and get_compressed_file_content zcat file = let cmd = sprintf "%s %s" zcat (quote file) in diff --git a/src/dpkg.ml b/src/dpkg.ml index ddfb03a..70acfa2 100644 --- a/src/dpkg.ml +++ b/src/dpkg.ml @@ -39,9 +39,7 @@ let dpkg_init s = let cmd = sprintf "%s --print-architecture" Config.dpkg in let line...
2016 Feb 18
4
[PATCH 0/3] supermin: miscellaneous cleanups
Hi, few cleanups in the supermin codebase; no actual functional change. Thanks, -- Pino Toscano (3): ext2: simplify tracking of visited modules utils: remove unused run_python function Add and use an helper error function src/build.ml | 20 +++++----------- src/dpkg.ml | 4 +--- src/ext2_initrd.ml | 10 ++++---- src/kernel.ml | 27
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...String.create 512 in + let len = input chan buf 0 (String.length buf) in + close_in chan; + + if len >= 3 && buf.[0] = '\x1f' && buf.[1] = '\x8b' && buf.[2] = '\x08' + then (* gzip-compressed file *) + GZip (get_compressed_file_content "zcat" file) + else if len >= 6 && buf.[0] = '\xfd' && buf.[1] = '7' && buf.[2] = 'z' && + buf.[3] = 'X' && buf.[4] = 'Z' && buf.[5] = '\000' + then...