summaryrefslogtreecommitdiffstats
path: root/fish
Commit message (Collapse)AuthorAgeFilesLines
* fish: Make type == drv_N field private to guestfish.Richard W.M. Jones2012-11-293-1/+12
| | | | | The -N option / drv_N type only makes sense when we are compiling guestfish, and just serves to complicate non-guestfish code.
* fish: Fix test-remote-events test.Richard W.M. Jones2012-11-221-1/+1
| | | | | | | | | Because the shell script was missing a space, the final output test was failing, although for some reason this didn't cause the whole test to fail. Fixing the missing space also revealed a bug in the test output, which is also fixed.
* fish: Add test for remote events.Richard W.M. Jones2012-11-132-1/+3
| | | | | | | This test was present in git, but not included in the tarball, nor in the tests that guestfish actually runs. This fixes commit 17182af3a6de8e3e94e0a914416c54f09bb74007.
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-134-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* fish: Add simple tests of starting up, inspection, using the prepared disks.Richard W.M. Jones2012-11-134-0/+81
|
* tools: Modify existing tools to use guestfs_{push,pop}_error_handler.Richard W.M. Jones2012-11-094-30/+8
| | | | | This is a shorter and more convenient way to disable errors temporarily across calls.
* fish: Update documentation for environment variables.Richard W.M. Jones2012-11-091-8/+22
| | | | This fixes commit 1efed122c07792f4c66a4083159cfacfb1893212.
* lib: Rework temporary and cache directory code.Richard W.M. Jones2012-11-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fish: Fix documentation quit | exit -> separate exit & quit headings.Richard W.M. Jones2012-11-021-1/+3
|
* fish: Clean up prompt documentation.Richard W.M. Jones2012-11-021-2/+2
|
* fish: Use Unicode LOWER ONE QUARTER BLOCK to represent cursor.Richard W.M. Jones2012-11-021-1/+1
| | | | | | 'ls' (with no argument) is not a valid command. This fixes commit bad5c7d5a50e7f340d3a5daff59d7f3c18c0ab8f.
* fish: Add GUESTFISH_PS1 environment variable to control prompt.Richard W.M. Jones2012-10-292-9/+203
|
* fish: Make progress bars slightly lighter.Richard W.M. Jones2012-10-271-1/+1
|
* fish: Fix test-events.sh because of new debug message.Richard W.M. Jones2012-10-241-1/+1
| | | | | | Commit 2e90f4312928f332f8997b52be3fe54f20920242 added a debug message which isn't filtered out by the set of grep -v's in this test. Therefore this test would fail when run with LIBGUESTFS_DEBUG=1.
* fish: progress bar: Send interactive progress bar output to /dev/tty ↵Richard W.M. Jones2012-10-111-18/+36
| | | | (RHBZ#859875).
* fish: inspect: Canonicalize paths for printing (RHBZ#859876).Richard W.M. Jones2012-10-111-3/+11
|
* fish: inspect: Move variable decls to top of function.Richard W.M. Jones2012-10-111-3/+6
| | | | This is just code motion.
* Add support for hotplugging (adding disks) to the libvirt attach-method.Richard W.M. Jones2012-10-081-5/+0
| | | | | | | | | | | | | When libvirt is used, we can allow disks to be hotplugged. guestfs_add_drive can be called after launch to hot-add a disk. When a disk is hot-added, we first ask libvirt to add the disk to the appliance, then we make an internal call into the appliance to get it to wait for the disk to appear (ie. udev_settle ()). Hot-added disks are tracked in the g->drives array. This also adds a test.
* syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.Richard W.M. Jones2012-10-032-4/+4
| | | | | It is slightly dangerous to use @PATTERNS@, since these might be substituted by autoconf when they appear in Makefile.am files.
* Fix multiple errors where jump skips variable initialization.Richard W.M. Jones2012-09-172-8/+12
| | | | | | | <file>: error: jump skips variable initialization [-Werror=jump-misses-init] This has only just appeared, possibly related to previous gnulib update. In any case, this is just code motion / cleanup.
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-171-4/+0
| | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already.
* syntax: Remove PATH_MAX-sized buffers allocated on the stack.Richard W.M. Jones2012-09-151-8/+17
| | | | | | | | | | | | | | On Linux PATH_MAX is 4096, but on some platforms it can be much larger or even not defined (ie. unlimited). Therefore using a PATH_MAX-sized stack buffer is not a great idea for portable programs. This change removes use of PATH_MAX-sized stack-allocated buffers. This change only applies to the library and standalone programs. Inside the daemon, memory allocation is much more complicated so I have not changed those (yet). Found by 'make syntax-check'.
* syntax: Remove gnulib c-ctype.h in files that don't use it.Richard W.M. Jones2012-09-151-2/+0
| | | | Found by 'make syntax-check'.
* syntax: Remove include <assert.h> where assert is not used.Richard W.M. Jones2012-09-151-1/+0
| | | | Found by 'make syntax-check'.
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-211-0/+5
| | | | | | | | | | This adds standard LICENSE and BUGS sections to all of the man pages that are processed by podwrapper. Modify all the calls to $(PODWRAPPER) to add the right --license parameter according to the content. Note that this relaxes the license on some code example pages, making them effectively BSD-style licensed.
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-215-79/+4
| | | | | | | | | | section. Ensure each man page contains consistent COPYRIGHT and AUTHOR sections. Remove the LICENSE section. We will add that back in podwrapper in a later commit.
* Replace mount-options with mount where appropriate.Richard W.M. Jones2012-08-182-2/+2
| | | | | | Since our minimum supported version is now 1.16 and mount was fixed in 1.13.16, it is now safe to replace mount-options + empty options with mount wherever it occurs.
* fish: Add --network option.Richard W.M. Jones2012-08-112-6/+14
| | | | | This enables the libguestfs user network, and is the equivalent of the 'virt-rescue --network' option.
* fish: Fix 'copy-out /' (RHBZ#845522).Richard W.M. Jones2012-08-031-0/+16
|
* fish: Use minimal permissions when initially creating history fileMatthew Booth2012-07-251-1/+1
|
* Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x fileMasami HIRATA2012-07-241-2/+11
| | | | | | | Signed-off-by: Masami HIRATA <msmhrt@gmail.com> RWMJ: Fixed whitespace in generator_xdr.ml
* tests: Move debug-drives testing API to launch.c and change the output.Richard W.M. Jones2012-07-232-7/+7
| | | | It should work with any attach-method.
* launch: Allow default attach-method to be set in environment or configure.Richard W.M. Jones2012-07-231-0/+5
| | | | | | | | | | You can now choose the default attach method in two ways: (1) Set the LIBGUESTFS_ATTACH_METHOD environment variable. (2) ./configure --with-default-attach-method=appliance|libvirt|... Note that (1) overrides (2).
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-198-12/+12
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
* fish: Rename fish/virt.c to fish/domain.cRichard W.M. Jones2012-07-192-2/+2
| | | | | This file handles the -d option for guestfish and other C command line utilities. Renaming this file makes it less confusing.
* build: Return 77 from skipped tests.Richard W.M. Jones2012-07-193-4/+4
|
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-07-161-5/+5
| | | | | This will allow us to easily change the location of this script in future.
* generator: Rename 'add_drive_opts' API to 'add_drive'.Richard W.M. Jones2012-07-141-4/+4
| | | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers (except Haskell, PHP and GObject as discussed in earlier commit).
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-033-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* run: Set MALLOC_PERTURB_ to a random value.Richard W.M. Jones2012-06-281-5/+1
| | | | | | | | | | | | | | | | | MALLOC_PERTURB_ is a glibc feature which causes malloc to wipe memory before and after it is used, allowing both use-after-free and uninitialized reads to be detected with relatively little performance penalty: http://udrepper.livejournal.com/11429.html?nojs=1 Modify the ./run script so that it always sets this. We were already using MALLOC_PERTURB_ in most tests. Since ./run is now setting this, we can remove it from individual Makefiles. Most TESTS_ENVIRONMENT will now simply look like this: TESTS_ENVIRONMENT = $(top_builddir)/run --test
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-1/+1
| | | | | | | This option, when added via TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test allows us to run the tests and only print the full output (including debugging etc) when the test fails.
* fish: Allow mount-local test to be skipped with environment variable.Richard W.M. Jones2012-06-251-0/+5
| | | | The test uses FUSE, so we need a way to disable it on RHEL 5.
* launch: Treat /dev/null specially, for old KVM.Richard W.M. Jones2012-06-251-6/+10
| | | | | | | | | Old KVM can't add /dev/null readonly. Treat /dev/null as a special case. We also fix a few tests where /dev/null was being used with format=qcow2. This was always incorrect behaviour, but qemu appears to tolerate it.
* tests: Replace truncate command with 'guestfish sparse'.Richard W.M. Jones2012-06-182-2/+8
| | | | | | | | | | RHEL 5 didn't have the truncate command, but we can replace: truncate -s SIZE FILE with the roughly equivalent command: guestfish sparse FILE SIZE
* New API: guestfs_canonical_device_name.Richard W.M. Jones2012-06-131-15/+5
| | | | This API makes device names canonical, eg. /dev/vda1 -> /dev/sda1.
* fish: Change test-escapes so test is not endian-sensitive.Richard W.M. Jones2012-06-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The test used the external 'od' command to compare the output of guestfish with what it's supposed to be. Unfortunately by default this outputs groups of 2-byte words, with the words' endianness affected by the current hardware endianness. For example: x86-64$ echo -n ab | od 0000000 061141 0000002 ppc64$ echo -n ab | od 0000000 060542 0000002 By using 'od -b' instead we can output bytes instead of words, and there is no endianness issue, and the output is clearer: x86-64$ echo -n ab | od -b 0000000 141 142 0000002 ppc64$ echo -n ab | od -b 0000000 141 142 0000002
* fish/mount: Add better error message when -m (mount) fails (RHBZ#824043).Richard W.M. Jones2012-05-241-6/+14
|
* fish: Remove inaccurate comment from code.Richard W.M. Jones2012-05-241-4/+0
|
* fish: Add a regression test for the 'glob' command.Richard W.M. Jones2012-05-022-0/+107
|
* fish: glob command now expands /dev/ patterns (RHBZ#635971).Richard W.M. Jones2012-05-021-2/+141
| | | | | | | | | | | | | For example: ><fs> glob echo /dev/* /dev/vda /dev/vda1 /dev/vda2 /dev/vda3 ><fs> glob echo /dev/v*/* /dev/vg_f16x64/lv_root /dev/vg_f16x64/lv_swap