search for: shell_command

Displaying 20 results from an estimated 73 matches for "shell_command".

2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module in v2v won't print user-sensible data (like passwords). --- builder/checksums.ml | 1 - builder/downloader.ml | 1 - builder/sigchecker.ml | 1 - mllib/common_utils.ml | 4 +++- mllib/common_utils.mli | 7 +++++-- v2v/curl.ml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
Add a simple helper to run a command from a sequence of arguments, without using a shell: this should help reducing the amount of quoting ineeded, since arguments are passed straight as such. Make use of it in the places currently using shell_command, and which don't assume they can run anything (so no shell redirections, `env`, etc). --- builder/builder.ml | 62 ++++++++++++++++++-------------------- builder/cache.ml | 4 +-- builder/downloader.ml | 8 ++--- builder/sigchecker.ml...
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
2019 Sep 20
1
[PATCH] v2v: Use cacheextents if possible for vddk input
...t_vddk.ml b/v2v/input_libvirt_vddk.ml index a8e4fd5ac78e..cc63f77ce825 100644 --- a/v2v/input_libvirt_vddk.ml +++ b/v2v/input_libvirt_vddk.ml @@ -284,6 +284,9 @@ object (self) add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" ); + if shell_command "nbdkit --filter cacheextents memory 1M --run true 2>/dev/null" = 0 + then add_arg "--filter=cacheextents"; + (* Name of the plugin. Everything following is a plugin parameter. *) add_arg "vddk"; -- 2.23.0
2018 Jun 12
1
Fwd: virt-v2v-copy-to-local failed if dd does not support status=progress
...hujinhe wrote: > If dd does not support status=progress, copy process will abort at the end. This is totally misguided. > We can use -q as a workaround in this circumstance, but it is frightening to newbee like me. Maybe we should improve this. > > suspicion: > ``` > if shell_command cmd <> 0 then > error (f_"ssh copy command failed, see earlier errors"); > ``` > > detail: > ``` > shell > virt-v2v-copy-to-local -v -ic xen+ssh://myxen_server guest > [ 0.0] Fetching the remote libvirt XML metadata ... > [ 1.6] Parsing the r...
2016 Dec 07
0
[PATCH v3 2/6] v2v: ova: don't detect compressed disks, read the OVF instead
...let filename = - if detect_file_type filename = `GZip then ( - let new_filename = tmpdir // String.random8 () ^ ".vmdk" in - let cmd = - sprintf "zcat %s > %s" (quote filename) (quote new_filename) in - if shell_command cmd <> 0 then - error (f_"error uncompressing %s, see earlier error messages") - filename; - new_filename - ) - else filename in + let filename = if compressed then ( + let new_filename = tmpdir /...
2016 Nov 12
0
[PATCH v2 2/5] v2v: ova: don't detect compressed disks, read the OVF instead
...in OVF: %s") s in + + let filename = if compressed then ( + let new_filename = tmpdir // String.random8 () ^ ".vmdk" in + let cmd = + sprintf "zcat %s > %s" (quote ovf_folder // filename) (quote new_filename) in + if shell_command cmd <> 0 then + error (f_"error uncompressing %s, see earlier error messages") + filename; + new_filename + ) + else + ovf_folder // filename + in + (* Does the file exist and is it readable? *)...
2017 Apr 06
1
[PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
...a48ea89 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -148,12 +148,10 @@ let main () = (* Check that gpg is installed. Optional as long as the user * disables all signature checks. *) - let cmd = sprintf "%s --help >/dev/null 2>&1" cmdline.gpg in - if shell_command cmd <> 0 then ( - if cmdline.check_signature then - error (f_"gpg is not installed (or does not work)\nYou should install gpg, or use --gpg option, or use --no-check-signature.") - else if verbose () then - warning (f_"gpg program is not available") + if c...
2016 Nov 21
2
Re: [PATCH v2 2/5] v2v: ova: don't detect compressed disks, read the OVF instead
...> + let filename = if compressed then ( > + let new_filename = tmpdir // String.random8 () ^ ".vmdk" in > + let cmd = > + sprintf "zcat %s > %s" (quote ovf_folder // filename) (quote new_filename) in > + if shell_command cmd <> 0 then > + error (f_"error uncompressing %s, see earlier error messages") > + filename; > + new_filename > + ) > + else > + ovf_folder // filename > + in IMHO this code should b...
2019 Jan 16
2
Re: [PATCH 2/5] mltools: create a new external_command_code
On Wed, Jan 16, 2019 at 03:17:32PM +0100, Pino Toscano wrote: > Split most of the code from external_command to a new > external_command_code, so it is possible to get the exit code of the > process without considering it fatal. > --- > common/mltools/tools_utils.ml | 22 ++++++++++------------ > common/mltools/tools_utils.mli | 8 ++++++++ > 2 files changed, 18
2016 Nov 04
0
[PATCH 4/5] v2v: ova: don't extract files from OVA if it's not needed
...ntar_partial file outdir = + let cmd1 = [ "tar"; "-tf" ; file ] in + let cmd2 = [ "grep"; "\\.\\(ovf\\|mf\\)$" ] in + let cmd3 = [ "xargs"; "tar"; "-xf" ; file; "-C"; outdir ] in + if shell_command ((stringify_args cmd1) ^ " | " ^ (stringify_args cmd2) ^ " | " ^ (stringify_args cmd3)) <> 0 then + error (f_"error unpacking %s, see earlier error messages") ova in + match detect_file_type ova with | `Tar -> (* Normal...
1998 Aug 05
6
Problem with TCP_wrappers
Hi, I''m running into something weird here. I''m using RH5.1 with tcp_wrappers 7.6. The syntax for hosts.allow and hosts.deny is: <service list> : <access list> [ : <shell_command> ] Everything works when I _don''t_ use the shell_command. I used the _exact_ line as in the man-pages utilising "safe_finger" (comes with tcp_wrappers), tcpdchk will break on it. And the tcp_wrappers will "ignore" the line, in my test I used a default deny and opene...
2016 Nov 12
0
[PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...in OVF: %s") s in - let filename = if compressed then ( - let new_filename = tmpdir // String.random8 () ^ ".vmdk" in - let cmd = - sprintf "zcat %s > %s" (quote ovf_folder // filename) (quote new_filename) in - if shell_command cmd <> 0 then - error (f_"error uncompressing %s, see earlier error messages") - filename; - new_filename - ) - else - ovf_folder // filename + let filename, partial = + if compressed then ( +...
2016 Oct 24
0
[PATCH 2/2] builder: consolidate handling of temporary files/dirs
.... *) let cmd = sprintf "%s --homedir %s --list-keys%s" - gpg tmpdir (if verbose () then "" else " >/dev/null 2>&1") in + gpg gpgtmpdir (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then error (f_"GPG failure: could not run GPG the first time\nUse the '-v' option and look for earlier error messages."); @@ -111,17 +110,16 @@ let rec create ~gpg ~gpgkey ~check_signature = | No_Key -> assert false...
2016 Oct 25
0
[PATCH v2 2/2] builder: consolidate handling of temporary files/dirs
.... *) let cmd = sprintf "%s --homedir %s --list-keys%s" - gpg tmpdir (if verbose () then "" else " >/dev/null 2>&1") in + gpg gpgtmpdir (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then error (f_"GPG failure: could not run GPG the first time\nUse the '-v' option and look for earlier error messages."); @@ -111,17 +110,16 @@ let rec create ~gpg ~gpgkey ~check_signature = | No_Key -> assert false...
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
2016 Oct 25
2
[PATCH v2 1/2] mllib: curl: add optional tmpdir parameter
Add a new optional parameter for the Curl ADT, so temporary files can be created in a specified directory (which is supposed to be temporary, and disposed only when the application quits). --- mllib/curl.ml | 10 ++++++---- mllib/curl.mli | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mllib/curl.ml b/mllib/curl.ml index 376406e..baa75ec 100644 --- a/mllib/curl.ml +++
2016 Aug 02
0
[PATCH] mllib: check for executable existance in run_command (RHBZ#1362357)
...(stringify_args args) i + | Unix.WSTOPPED i -> + error (f_"external command '%s' stopped by signal %d") + (stringify_args args) i + with + | Executable_not_found tool -> 127 + | Unix.Unix_error (errcode, _, _) when errcode = Unix.ENOENT -> 127 let shell_command ?(echo_cmd = true) cmd = if echo_cmd then -- 2.7.4
2018 Jun 13
0
Fwd: virt-v2v-copy-to-local failed if dd does not support status=progress
...hujinhe wrote: > If dd does not support status=progress, copy process will abort at the end. This is totally misguided. > We can use -q as a workaround in this circumstance, but it is frightening to newbee like me. Maybe we should improve this. > > suspicion: > ``` > if shell_command cmd <> 0 then > error (f_"ssh copy command failed, see earlier errors"); > ``` > > detail: > ``` > shell > virt-v2v-copy-to-local -v -ic xen+ssh://myxen_server guest > [ 0.0] Fetching the remote libvirt XML metadata ... > [ 1.6] Parsing the r...
2019 Jan 17
0
Re: [PATCH 2/5] mltools: create a new external_command_code
On Wednesday, 16 January 2019 15:31:43 CET Richard W.M. Jones wrote: > BTW we use debug + Sys.command all over the place and it might be > worth considering replacing those instances with this new function > where appropriate. Like Tools_utils.shell_command? -- Pino Toscano