Displaying 20 results from an estimated 162 matches for "temp_dir".
2014 Jul 07
2
[PATCH] mllib: introduce Mkdtemp.temp_dir
...b/mkdtemp.ml b/mllib/mkdtemp.ml
index 2e64862..353b04b 100644
--- a/mllib/mkdtemp.ml
+++ b/mllib/mkdtemp.ml
@@ -16,4 +16,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
+open Common_utils
+
external mkdtemp : string -> string = "virt_builder_mkdtemp"
+
+let temp_dir ?(base_dir = Filename.temp_dir_name) prefix suffix =
+ mkdtemp (base_dir // (prefix ^ "XXXXXX" ^ suffix))
diff --git a/mllib/mkdtemp.mli b/mllib/mkdtemp.mli
index 674e6f2..9abb10c 100644
--- a/mllib/mkdtemp.mli
+++ b/mllib/mkdtemp.mli
@@ -18,3 +18,10 @@
val mkdtemp : string -> stri...
2020 May 31
4
Simple backup of maildir folder
On 29 May 2020, at 23:49, Admin Beckspaced <admin at beckspaced.com> wrote:
> I also have maildir as mailbox format and use the following script to do daily backups
>
> https://github.com/tachtler/dovecot-backup
A couple of notes on this quite useful script:
My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to:
DIR_TEMP=$($MKTEMP_COMMAND -d $TMP_FOLDER
2014 Jul 07
2
Re: [PATCH] Use Mkdtemp.temp_dir instead of Mkdtemp.mkdtemp
...builder/sigchecker.ml
> +++ b/builder/sigchecker.ml
> @@ -54,7 +54,7 @@ let import_keyfile ~gpg ~gpghome ~verbose keyfile =
>
> let rec create ~verbose ~gpg ~gpgkey ~check_signature =
> (* Create a temporary directory for gnupg. *)
> - let tmpdir = Mkdtemp.mkdtemp (Filename.temp_dir_name // "vb.gpghome.XXXXXX") in
> + let tmpdir = Mkdtemp.temp_dir "vb.gpghome." "" in
> rmdir_on_exit tmpdir;
> (* Make sure we have no check_signature=true with no actual key. *)
> let check_signature, gpgkey =
> diff --git a/sysprep/sysprep_o...
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...d in the wild can
* contain hrefs referencing snapshots. The href will be something
@@ -132,9 +133,7 @@ class input_ova ova = object
(* The spec allows the file to be gzip-compressed, in
* which case we must uncompress it into a temporary.
*)
- let temp_dir = (open_guestfs ())#get_cachedir () in
- let new_filename = Filename.temp_file ~temp_dir "ova" ".vmdk" in
- unlink_on_exit new_filename;
+ let new_filename = Filename.temp_file ~temp_dir:cachedir "ova" ".vmdk" in
let...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...ova.ml
index 5d3bece18..d78a5ce82 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -132,8 +132,8 @@ class input_ova ova = object
(* The spec allows the file to be gzip-compressed, in
* which case we must uncompress it into a temporary.
*)
- let temp_dir = (open_guestfs ())#get_cachedir () in
- let new_filename = Filename.temp_file ~temp_dir "ova" ".vmdk" in
+ let new_filename =
+ Filename.temp_file ~temp_dir:Utils.large_tmpdir "ova" ".vmdk" in
unlink_on_exit new_fi...
2020 Apr 06
4
[v2v PATCH 1/2] v2v: nbdkit: change base dir for nbdkit sockets/pidfiles
...* Use the libguestfs socket directory, so it is more likely the full path
+ * of the UNIX sockets will fit in the (limited) socket pathname.
+ *)
let tmpdir =
- let base_dir = (open_guestfs ())#get_cachedir () in
+ let base_dir = (open_guestfs ())#get_sockdir () in
let t = Mkdtemp.temp_dir ~base_dir "v2vnbdkit." in
(* tmpdir must be readable (but not writable) by "other" so that
* qemu can open the sockets.
--
2.25.1
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 Oct 24
0
[PATCH 2/2] builder: consolidate handling of temporary files/dirs
....ebbcad3 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -177,8 +177,15 @@ let main () =
None
in
+ (* Create a single temporary directory for all the small-or-so
+ * temporary files that Downloader, Sigchecker, etc, are going
+ * create.
+ *)
+ let tmpdir = Mkdtemp.temp_dir "virt-builder." "" in
+ rmdir_on_exit tmpdir;
+
(* Download the sources. *)
- let downloader = Downloader.create ~curl:cmdline.curl ~cache in
+ let downloader = Downloader.create ~curl:cmdline.curl ~cache ~tmpdir in
let repos = Sources.read_sources () in
let sources...
2016 Oct 25
0
[PATCH v2 2/2] builder: consolidate handling of temporary files/dirs
....ebbcad3 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -177,8 +177,15 @@ let main () =
None
in
+ (* Create a single temporary directory for all the small-or-so
+ * temporary files that Downloader, Sigchecker, etc, are going
+ * create.
+ *)
+ let tmpdir = Mkdtemp.temp_dir "virt-builder." "" in
+ rmdir_on_exit tmpdir;
+
(* Download the sources. *)
- let downloader = Downloader.create ~curl:cmdline.curl ~cache in
+ let downloader = Downloader.create ~curl:cmdline.curl ~cache ~tmpdir in
let repos = Sources.read_sources () in
let sources...
2016 Oct 25
2
[PATCH v2 1/2] mllib: curl: add optional tmpdir parameter
...s }
+ { curl = curl; args = args; tmpdir = tmpdir }
-let run { curl = curl; args = args } =
- let config_file, chan = Filename.open_temp_file "guestfscurl" ".conf" in
+let run { curl = curl; args = args; tmpdir = tmpdir } =
+ let config_file, chan = Filename.open_temp_file ?temp_dir:tmpdir
+ "guestfscurl" ".conf" in
List.iter (
function
| name, None -> fprintf chan "%s\n" name
diff --git a/mllib/curl.mli b/mllib/curl.mli
index f045572..c0c2fb0 100644
--- a/mllib/curl.mli
+++ b/mllib/curl.mli
@@ -27,7 +27,7 @@ type proxy =
| S...
2020 Apr 02
6
[PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.
...ova.ml
index 5d3bece18..86f81e1f9 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -132,8 +132,8 @@ class input_ova ova = object
(* The spec allows the file to be gzip-compressed, in
* which case we must uncompress it into a temporary.
*)
- let temp_dir = (open_guestfs ())#get_cachedir () in
- let new_filename = Filename.temp_file ~temp_dir "ova" ".vmdk" in
+ let new_filename =
+ Filename.temp_file ~temp_dir:Utils.tmpdir "ova" ".vmdk" in
unlink_on_exit new_filename...
2016 Oct 24
2
[PATCH 1/2] mllib: curl: add optional tmpdir parameter
...s }
+ { curl = curl; args = args; tmpdir = tmpdir }
-let run { curl = curl; args = args } =
- let config_file, chan = Filename.open_temp_file "guestfscurl" ".conf" in
+let run { curl = curl; args = args; tmpdir = tmpdir } =
+ let config_file, chan = Filename.open_temp_file ?temp_dir:tmpdir
+ "guestfscurl" ".conf" in
List.iter (
function
| name, None -> fprintf chan "%s\n" name
@@ -71,7 +73,11 @@ let run { curl = curl; args = args } =
let cmd = sprintf "%s -q --config %s" (quote curl) (quote config_file) in
let...
2006 Apr 10
2
HTML / PHP
Has anyone made, or have any simple PHP, or HTML interfaces where by a user
could enter their number and the number they want to call, and have asterisk
bridge the calls?
2020 May 31
1
Simple backup of maildir folder
...quite useful script:
>>
>> My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to:
>>
>
>
> In my scripts I tend to create a tempdir and then tempfiles within that. It makes the cleanup routine neater, e.g. at the top of my scripts :
>
> TEMP_DIR=$(mktemp -qd || { doLog "Failed to make temp dir !"; exit 1; })
> rmTmpFiles() { rm -rf "${TEMP_DIR}"; }
> createTempFile() { local MYTEMP=$(mktemp -qp "${TEMP_DIR}" || doLog "Failed to create temp file"; exit 1); echo $MYTEMP; }
>
I don?t think I...
2017 Jul 21
2
[PATCH] common/mlutils: Remove bogus suffix parameter from Mkdtemp.temp_dir.
...12 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index 0e02bab3b..3c1f04c77 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -181,7 +181,7 @@ let main () =
* temporary files that Downloader, Sigchecker, etc, are going
* create.
*)
- let tmpdir = Mkdtemp.temp_dir "virt-builder." "" in
+ let tmpdir = Mkdtemp.temp_dir "virt-builder." in
rmdir_on_exit tmpdir;
(* Download the sources. *)
diff --git a/builder/sigchecker.ml b/builder/sigchecker.ml
index f72c21ab0..55e743940 100644
--- a/builder/sigchecker.ml
+++ b/builder/si...
2006 Jun 21
3
png() or jpeg() in a php script
Hello,
I've got a problem with a PHP script, in which I call the system function
(to call another processes). The call is :
system("R --slave --vanilla < path/to/source/source.R");
if in this R file, I've got the lines:
pdf(file="/path/to/file/file.pdf")
commands
dev.off()
the pdf file is perfectly created
but if I change the lines to:
2007 Jun 06
2
struggling with stability
Greetings all,
Unit tests are passing, but I''m having mucho problems getting brb to
run without exceptions for more than 6 hours.
I''m seeing a mixture of the following 2 exceptions:
20070605-11:26:56 (21497) failed to find slave socket - (RuntimeError)
20070605-11:26:56 (21497) /usr/local/lib/ruby/gems/1.8/gems/
slave-1.2.1/lib/slave.rb:435:in `initialize''
2020 May 31
0
Simple backup of maildir folder
...>
> A couple of notes on this quite useful script:
>
> My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to:
>
In my scripts I tend to create a tempdir and then tempfiles within that. It makes the cleanup routine neater, e.g. at the top of my scripts :
TEMP_DIR=$(mktemp -qd || { doLog "Failed to make temp dir !"; exit 1; })
rmTmpFiles() { rm -rf "${TEMP_DIR}"; }
createTempFile() { local MYTEMP=$(mktemp -qp "${TEMP_DIR}" || doLog "Failed to create temp file"; exit 1); echo $MYTEMP; }
Also my backup scripts have lock...
2015 Oct 21
2
[PATCH] v2v: use open_guestfs everywhere
...nput_ova.ml
index cd26160..f2dc28b 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -26,7 +26,7 @@ open Utils
class input_ova ova =
let tmpdir =
- let base_dir = (new Guestfs.guestfs ())#get_cachedir () in
+ let base_dir = (open_guestfs ())#get_cachedir () in
let t = Mkdtemp.temp_dir ~base_dir "ova." "" in
rmdir_on_exit t;
t in
diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml
index e775229..ddcd771 100644
--- a/v2v/output_glance.ml
+++ b/v2v/output_glance.ml
@@ -31,7 +31,7 @@ class output_glance () =
* to write to a temporary file. XXX...
2015 Oct 21
0
Re: [PATCH] v2v: use open_guestfs everywhere
...; --- a/v2v/input_ova.ml
> +++ b/v2v/input_ova.ml
> @@ -26,7 +26,7 @@ open Utils
>
> class input_ova ova =
> let tmpdir =
> - let base_dir = (new Guestfs.guestfs ())#get_cachedir () in
> + let base_dir = (open_guestfs ())#get_cachedir () in
> let t = Mkdtemp.temp_dir ~base_dir "ova." "" in
> rmdir_on_exit t;
> t in
> diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml
> index e775229..ddcd771 100644
> --- a/v2v/output_glance.ml
> +++ b/v2v/output_glance.ml
> @@ -31,7 +31,7 @@ class output_glance () =
>...