Commit Graph

96 Commits

Author SHA1 Message Date
Richard W.M. Jones
87602b09ea fuse: guestmount doesn't let you pass '-- [FUSE options]'.
I don't think it ever did, so the --help text was always
wrong, and definitely didn't match the real behaviour of
the program.
2012-08-03 22:38:41 +01:00
Richard W.M. Jones
6054051a9d fish: Rename fish/virt.c to fish/domain.c
This file handles the -d option for guestfish and other C command line
utilities.  Renaming this file makes it less confusing.
2012-07-19 16:11:26 +01:00
Richard W.M. Jones
fc86db3b3b build: Return 77 from skipped tests. 2012-07-19 11:22:40 +01:00
Richard W.M. Jones
f2ea617e22 build: Change calls to podwrapper.sh to use $(PODWRAPPER).
This will allow us to easily change the location of this
script in future.
2012-07-16 18:56:57 +01:00
Richard W.M. Jones
ec0c7e0a1a fuse: Cleaner code and documentation for safe cleanups. 2012-07-10 19:03:19 +01:00
Richard W.M. Jones
8df259496a fuse: Add regression test for RHBZ#838592. 2012-07-09 17:44:50 +01:00
Richard W.M. Jones
5546ea6d68 fuse: Add guestmount --pid-file option (RHBZ#838592). 2012-07-09 16:10:24 +01:00
Richard W.M. Jones
bfbfe6dd78 fuse: Link to mount-local documentation in guestmount man page. 2012-07-09 15:24:26 +01:00
Richard W.M. Jones
1cde66165a fuse: Document race condition possible with fusermount.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9
2012-07-09 15:23:52 +01:00
Richard W.M. Jones
b749dc7074 fuse: Document Device or resource busy errors from fusermount. 2012-07-09 15:23:09 +01:00
Richard W.M. Jones
ffbf1475f7 New API: guestfs_shutdown: Cleanly shutdown the backend.
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
2012-07-03 21:27:29 +01:00
Richard W.M. Jones
2eacd4a191 fuse: Use the ./run --test script to run tests. 2012-06-26 23:43:06 +01:00
Richard W.M. Jones
145f35badf tests: Add SKIP_TEST_* variables to allow these tests to be skipped.
By setting these variables, we can skip tests that fail on
RHEL 5.
2012-06-22 10:57:47 +01:00
Richard W.M. Jones
d7c9c6a0d9 fuse: Skip 'truncate' tests if this command is missing. 2012-06-18 15:33:10 +01:00
Richard W.M. Jones
4846b84476 fuse: Add replacement for fuse_opt_add_opt_escaped.
RHEL 5-era FUSE didn't have this function.

I copied the function out of upstream FUSE, since the license is
compatible.
2012-06-18 15:32:52 +01:00
Richard W.M. Jones
6aa95e87c1 Remove "convenience header" "gettext.h" and use <libintl.h> instead.
gettextize provides a local file called "gettext.h".  Remove this and
use <libintl.h> from glibc headers instead.

Most of this change is mechanical: #include <libintl.h> in every C
file which uses any gettext function.  But also we remove the
gettext.h file, and adjust the "_" macros.

Note that this effectively removes the ./configure --disable-nls
option, although we don't know if that ever worked.
2012-05-01 08:57:55 +01:00
Matthew Booth
d9f77f214b fuse: Add missing #include to guestmount.c
Fix compilation failure on F17
2012-04-04 14:26:51 +01:00
Richard W.M. Jones
c6f09fac06 New APIs: mount-local, mount-local-run, umount-local (FUSE support in the API).
Add FUSE support directly to the API.  Instead of needing to use the
external 'guestmount' command, you can mount the libguestfs filesystem
space on a local mountpoint using an API call from any language.

Note that although mount-local-run is marked as Cancellable, the
current implementation does not support it, but it would be relatively
simple to add it.
2012-03-29 16:45:01 +01:00
Richard W.M. Jones
f5c31db5ed fuse: Fix documentation for call to virt-filesystems.
virt-filesystems requires -a/-d option.
2012-03-26 18:28:24 +01:00
Richard W.M. Jones
f76a88011a Replace 'int' with 'size_t' passim.
Analyze all uses of 'int' in the code, and replace with 'size_t' where
appropriate.
2012-03-13 08:23:56 +00:00
Wanlong Gao
d60d5c091f guestmount: use O_ACCMODE instead of hard coding
Change hard code 3 to O_ACCMODE.
it'll be more sensible.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-01-30 10:56:59 +00:00
Wanlong Gao
0042898880 guestmount: remove tailing spaces
just do a cleanup.
remove the tailing spaces.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-01-30 10:56:11 +00:00
Hilko Bengen
b6e0552ee5 Do not run appliance-related checks if not building appliance 2012-01-23 09:08:33 +00:00
Richard W.M. Jones
08840bab44 Tempus fugit.
Update all copyright dates to 2012.
2012-01-18 22:05:02 +00:00
Richard W.M. Jones
ae45cee728 fuse: Return EXIT_FAILURE if fuse_main fails.
fuse_main can return any non-zero value on error.  In particular on
certain sorts of error such as unsupported -o options it returns 1
(not -1).

Therefore make sure any non-zero return is turned into EXIT_FAILURE.

(Thanks Pádraig Brady)
2011-12-09 15:30:23 +00:00
Richard Jones
47963bc9cc 32 bit: Fix printf off_t. 2011-11-11 20:26:49 +00:00
Matthew Booth
04ea1375c5 Update FSF address. 2011-11-08 14:43:07 +00:00
Richard W.M. Jones
7b44f7b3df fuse: Skip guestmount test if setfacl is not installed.
This dependency is optional, don't fail the test if it's not
installed.
2011-10-27 13:44:02 +01:00
Richard W.M. Jones
b0eabcca60 guestmount: Fix --live option (RHBZ#744795). 2011-10-26 20:53:30 +01:00
Richard W.M. Jones
cf4cc11433 Skip guestmount and virt-sysprep tests if no /dev/fuse. 2011-10-17 09:59:43 +01:00
Richard W.M. Jones
e57c3c37a8 guestmount: Add note to man page about 'fuse' group for Debian. 2011-10-13 15:25:13 +01:00
Richard W.M. Jones
f0f3e16211 man pages: Add a standard EXIT STATUS section to most pages. 2011-08-27 17:47:10 +01:00
Hilko Bengen
ff101adf7e out-of-tree build: fix documentation generation 2011-08-15 14:50:33 +01:00
Richard W.M. Jones
f7d18c84dd build: Set TMPDIR for local testing.
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
2011-08-08 12:41:54 +01:00
Richard W.M. Jones
a711777bed docs: Separate out combined =item 's in man pages.
Turn:

 =item B<-a> | B<--all>

into:

 =item B<-a>

 =item B<--all>

This gives a more natural-looking manual page, as well as making it
easier to directly link to these sections.
2011-07-16 15:20:29 +01:00
Richard W.M. Jones
b777a5a649 fuse: Add note about allowing other users to see filesystem (RHBZ#705200). 2011-05-17 19:51:37 +01:00
Richard W.M. Jones
34acb80a28 Enable deprecation warnings on all C programs. 2011-05-17 17:05:12 +01:00
Richard W.M. Jones
8c0aca8d92 fish: fuse: Remove redundant -DGUESTFS_DEFAULT_PATH.
This was left over from earlier code.  It is used in the base library,
but not in guestfish or guestmount.
2011-05-17 17:05:12 +01:00
Richard W.M. Jones
87fb6d852d fish: Allow -d UUID (specify libvirt domains by UUID).
This applies in all the commands which use the common C option parsing
code, ie:

* guestfish
* guestmount
* virt-cat
* virt-df
* virt-filesystems
* virt-inspector
* virt-ls
* virt-rescue
2011-05-06 13:04:19 -04:00
Richard W.M. Jones
33a2c184e1 Remove local LIBGUESTFS_PATH detection from guestfish and guestmount.
Remove the hack that let you run ./fish/guestfish or
./fuse/guestmount.  You now have to do:

  ./run ./fish/guestfish
or
  ./run ./fuse/guestmount

to run these programs without installing.
2011-04-16 08:32:48 +01:00
Jim Meyering
6740028b33 Include string.h and libintl.h, as needed.
* df/df.c: As above.
* df/main.c: As above.
* df/output.c: As above.
* fuse/guestmount.c: As above.
* inspector/virt-inspector.c: As above.
* rescue/virt-rescue.c: As above.
2011-04-13 14:26:06 +01:00
Richard W.M. Jones
b8e1dee73a Add /etc/libguestfs-tools.conf configuration file.
This allows the default for --ro or --rw to be controlled for the
three tools guestfish, guestmount and virt-rescue.
2011-03-31 15:42:13 +01:00
Richard W.M. Jones
3824935411 fuse: Document -w flag in --help output. 2011-03-30 16:32:33 +01:00
Richard W.M. Jones
0d6fd9e1d2 fuse: Fix getxattr, listxattr calls and add a regression test (RHBZ#691389).
The documentation for the getxattr and listxattr calls is not very
clear and as a result we were always returning something different
from that which the Linux kernel would usually return.

This fixes these calls, at least far enough that both the 'getfattr'
and 'getfacl' programs now work fine on FUSE-mounted filesystems.

Note that SELinux attrs are *not* passed through.  This appears to be
a known bug between SELinux and FUSE.  For more information see:

http://www.spinics.net/lists/selinux/msg09460.html
2011-03-28 14:49:48 +01:00
Richard W.M. Jones
4e529e06a4 fish: fuse: Add -m dev:mnt:opts to allow mount options to be specified.
This lets you turn on ACLs and xattrs by doing:

  -m /dev/sda1:/:acl,user_xattr

The extra parameter is passed through to mount_options:

  libguestfs: trace: mount_options "acl,user_xattr" "/dev/sda1" "/"
2011-03-28 14:21:55 +01:00
Richard W.M. Jones
a20e5c00c3 fish: Add guestfish --live, guestmount --live options.
The other programs have the variable, but the flag is not enabled
either because it doesn't make sense or because the implications are
not well understood.
2011-02-03 18:50:45 +00:00
Richard W.M. Jones
85c0bf5308 fuse: Add more tracing for calls into guestmount functions. 2010-12-19 12:04:43 +00:00
Richard W.M. Jones
37a2422868 fuse: Set UID and GID when performing FUSE tests.
This avoids breakage on Ubuntu.
2010-12-07 17:16:52 +00:00
Richard W.M. Jones
4df67f26ae fuse: Disable test which doesn't run reliably on Debian.
See discussion in RHBZ#660687.
2010-12-07 15:29:55 +00:00
Richard W.M. Jones
de419e4bac fuse: Fix emulation of open call.
We were being over-complex in this call.  All the FUSE API requires
this call to do is to check permissions.
2010-12-07 14:49:34 +00:00