Displaying 12 results from an estimated 12 matches for "write_script".
2017 Mar 22
7
[PATCH 0/5] dib: initial work to support d-i-b 2.0
Hi,
this series start to implement some of the changes needed to support
d-i-b 2.0; normal VM distro builds seem to work correctly, ramdisk
builds are still broken and require more efforts.
Thanks,
Pino Toscano (5):
dib: implement get_image_element_array stuff
dib: export IMAGE_BLOCK_DEVICE_WITHOUT_PART
dib: extract get_required_tool out of require_tool
dib: require a Python interpreter
2016 Aug 03
0
[PATCH] dib: rework run of extra-data.d hooks (RHBZ#1362354)
...g >= 1 then "set -x\n" else "")
(envvars_string envvars)
fakebindir
- (quote tmpdir)
network_string
out_name
root_label
@@ -134,10 +135,7 @@ $target_dir/$script
(String.concat ":" element_paths)
(quote dib_vars)
debug in
- write_script (destdir // "run-part-extra.sh") run_extra;
-
- (* Needed as TMPDIR for the extra-data hooks *)
- do_mkdir (tmpdir // "tmp")
+ write_script (destdir // "run-part-extra.sh") run_extra
let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid...
2016 May 23
0
[PATCH 4/5] mllib: move stringify_args from dib
...quot; vars
-let make_dib_args args =
- let args = Array.to_list args in
- let rec quote_args = function
- | [] -> ""
- | x :: xs -> " " ^ (quote x) ^ quote_args xs
- in
- match args with
- | [] -> ""
- | app :: xs -> app ^ quote_args xs
-
let write_script fn text =
let oc = open_out fn in
output_string oc text;
@@ -507,7 +497,7 @@ let main () =
printf " (none)\n";
printf "\n";
);
- let dib_args = make_dib_args Sys.argv in
+ let dib_args = stringify_args Sys.argv in
let dib_vars = read_dib_envvars () in...
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...quot; vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ close_out oc;
+ Unix.chmod fn 0o755
+
+let prepare_external ~dib_args ~dib_vars ~out_name ~root_label ~rootfs_uuid
+ ~image_cache ~arch ~network ~debug
+ destdir libdir hooksdir tmpdir fakebindir all_elements element_...
2016 Aug 03
3
[PATCH] mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module.
Just code motion, adapting v2v in the process.
---
docs/C_SOURCE_FILES | 2 +-
mllib/Makefile.am | 5 ++++-
mllib/exit-c.c | 33 +++++++++++++++++++++++++++++++++
mllib/exit.ml | 19 +++++++++++++++++++
mllib/exit.mli | 20 ++++++++++++++++++++
v2v/Makefile.am | 1 -
v2v/changeuid-c.c | 33
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...quot; vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ close_out oc;
+ Unix.chmod fn 0o755
+
+let prepare_external ~dib_args ~dib_vars ~out_name ~root_label ~rootfs_uuid
+ ~image_cache ~arch ~network ~debug
+ destdir libdir hooksdir tmpdir fakebindir all_elements element_...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...rs
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> sprintf " %s" (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ close_out oc;
+ chmod fn 0o755
+
+let prepare_external ~dib_args ~dib_vars ~out_name ~root_label ~rootfs_uuid ~image_cache
+ ~arch ~network ~debug
+ destdir libdir hooksdir tmpdir fakebindir all_elements element_paths...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...quot; vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ close_out oc;
+ Unix.chmod fn 0o755
+
+let prepare_external ~dib_args ~dib_vars ~out_name ~root_label ~rootfs_uuid
+ ~image_cache ~arch ~network ~debug
+ destdir libdir hooksdir tmpdir fakebindir all_elements element_...
2017 Mar 22
0
[PATCH 4/5] dib: require a Python interpreter
...port FS_TYPE=%s
export DIB_CHECKSUM=%s
+export DIB_PYTHON_EXEC=%s
elinfo_out=$(<${VIRT_DIB_OURPATH}/elinfo_out)
eval \"$elinfo_out\"
@@ -158,7 +160,8 @@ $target_dir/$script
(quote dib_vars)
debug
fs_type
- checksum_string in
+ checksum_string
+ python in
write_script (destdir // "run-part-extra.sh") run_extra;
let elinfo_out = sprintf "\
function get_image_element_array {
@@ -524,6 +527,10 @@ let main () =
error (f_"the specified base path is not the diskimage-builder library");
(* Check for required tools. *)
+ let pytho...
2017 Nov 05
3
[PATCH 1/2] common/mlstdutils: Add with_open_in and with_open_out functions.
...get 0 2 = Some "\x1f\x8b" then `GZip
+ else `Unknown
+ )
let is_partition dev =
try
diff --git a/dib/dib.ml b/dib/dib.ml
index 9a8d86bd9..94ad3003a 100644
--- a/dib/dib.ml
+++ b/dib/dib.ml
@@ -60,10 +60,11 @@ let read_dib_envvars () =
String.concat "" vars
let write_script fn text =
- let oc = open_out fn in
- output_string oc text;
- flush oc;
- close_out oc;
+ with_open_out fn (
+ fun oc ->
+ output_string oc text;
+ flush oc
+ );
Unix.chmod fn 0o755
let envvars_string l =
diff --git a/generator/bindtests.ml b/generator/bindtests.ml
inde...
2017 Feb 02
7
[PATCH 0/6] dib: various improvements
Hi,
this series improves virt-dib, adding some upstream changes, and
refactoring the handling of output formats.
Thanks,
Pino Toscano (6):
dib: clear up "already provided" message
dib: add --checksum
dib: pass custom mkfs options after the filesystem type
dib: refactor output formats handling
dib: clarify "output:" lines in --machine-readable documentation
dib:
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