6 Commits

Author SHA1 Message Date
Richard W.M. Jones
b13c22668d appliance: Use supermin >= 5.
This requires the new version of supermin (5.1.0).
2014-02-26 15:21:08 +00:00
Richard W.M. Jones
ed912a54d6 libguestfs-make-fixed-appliance: All supported versions of libguestfs should work.
We're not supporting anything < 1.20 now.
2014-02-05 19:39:28 +00:00
Richard W.M. Jones
1efed122c0 lib: Rework temporary and cache directory code.
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.

The current code has evolved over time and has a number of problems:

(a) A single environment variable ($TMPDIR) controls the
location of several directories.

(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.

This commit fixes these issues.

(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:

  For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.

  For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.

The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).

(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.

This commit also:

 - reworks the internal tmpdir code

 - removes the internal (undocumented) guestfs_tmpdir call (replacing
   it with calls to the documented guestfs_get_tmpdir API instead)

 - changes the ./run script to set LIBGUESTFS_TMPDIR and
   LIBGUESTFS_CACHEDIR

 - adds a test

 - fixes a few places like libguestfs-make-fixed-appliance which
   depended on $TMPDIR
2012-11-09 13:11:53 +00:00
Richard W.M. Jones
7b2f6bd665 libguestfs-make-fixed-appliance: Don't reference obsolete development version. 2012-07-30 17:32:10 +01:00
Richard W.M. Jones
669c0bd407 Fix libguestfs-make-fixed-appliance --help option so it displays usage.
Previously it printed 'Internal error!'
2012-04-09 15:53:37 +01:00
Richard W.M. Jones
05461175c4 appliance: Add a tool to make fixed appliances. 2012-03-17 10:00:59 +00:00