Commit Graph

70 Commits

Author SHA1 Message Date
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
Richard W.M. Jones
97cbb84236 fuse: Fix segfault in guestmount --verbose.
If hash_delete returns NULL and --verbose option was given then
this would cause a segfault.
2010-12-07 13:29:40 +00:00
Richard W.M. Jones
9bc15f5d98 Remove ability to build static distribution.
We are now going to build binaries for each distribution so
there is no need to build the quasi-distro-independent static
binaries any more.
2010-12-06 18:17:30 +00:00
Richard W.M. Jones
e1aca6323e build: Centralize all POD manipulation in 'podwrapper.sh' script. 2010-11-24 20:12:08 +00:00
Richard W.M. Jones
d20b9cd6b8 fuse: Add note in test about how to debug guestmount. 2010-11-24 11:29:13 +00:00
Richard W.M. Jones
fbc2555903 New tool: virt-filesystems
This tool replaces virt-list-filesystems and virt-list-partitions with
a new tool written in C with a more uniform command line structure
and output.

This existing Perl tools are deprecated but remain indefinitely.
2010-11-23 10:22:08 +00:00
Richard W.M. Jones
92444940f3 static: Use correct libraries for static binaries.
Also add virt-cat.static target.
2010-11-13 08:13:22 +00:00
Richard Jones
7509c91a71 fish: Use core add-domain API to implement '-d' option.
This also makes libxml2 and libvirt into optional dependencies.
If they are missing then the core API will print an error, as
will the '-d' option to guestfish.
2010-11-11 11:24:13 +00:00
Richard W.M. Jones
2c4a7ef92a fish: Add --rw option (does nothing yet).
This adds the guestfish --rw option, intended in future
to be required for writing to disk images.

At the moment this does not change the default and so does
nothing.  This patch is intended for backporting to the
stable branches so that we can start to introduce scripts
which use 'guestfish --rw'.
2010-11-08 10:21:48 +00:00
Richard W.M. Jones
a232e62dcf fish: '-i' option automatically handles whole-disk encryption.
This feature is also available in guestmount because of the
shared option parsing code.

You don't need to do anything to enable it, just using -i
will attempt decryption of encrypted partitions.

Only works for simple Fedora whole-disk encryption.  It's a
work-in-progress to make it work for other types of encryption.
2010-11-05 11:39:24 +00:00
Richard W.M. Jones
39052d270f fuse: Use guestfs_last_errno instead of errno-reversal-hack. 2010-11-03 18:49:00 +00:00
Richard W.M. Jones
47d1585961 binary: Link guestmount static binary with -lm.
This is indirectly required via the new shared guestfish
C inspection code by libxml2.
2010-11-02 17:05:58 +00:00
Richard W.M. Jones
c66d6f215e Unify guestfish and guestmount options processing (RHBZ#642932).
In guestfish, factor out the processing of the options -a, -c,
-d, -i, -m, -n, -r, -v, -V, -x into a separate set of files:
options.c, options.h, inspect.c, virt.c.

Change guestmount so that it uses these same files (from the
../fish directory) to process the same options.

This unifies the handling of these options between the two programs.
It also adds the useful inspection feature to guestmount, so you
can now do:

  guestmount -d Guest -i --ro mnt/
2010-10-27 12:04:16 +01:00
Richard W.M. Jones
f48cd1f262 Enable autosync by default. 2010-10-27 10:59:45 +01:00
Richard W.M. Jones
6ecaa6371a fuse: Add --format option to docs (RHBZ#642934,CVE-2010-3851).
This updates commit 44c5ee1163.

Document the --format option in the guestmount manual page.
2010-10-23 10:23:45 +01:00
Richard W.M. Jones
44c5ee1163 fuse: Specify format of disks (RHBZ#642934,CVE-2010-3851).
For command line disk images, specify the format using --format option
in the same way as for guestfish.
2010-10-22 17:45:06 +01:00
Richard Jones
4932fdca3c build: Don't add version extra string to the version number.
If this string was non-empty, then it broke a lot of things because
autoconf and other parts of the build system were expecting this
string to contain a simple MAJOR.MINOR.RELEASE version number.

This requires changes to guestfish and guestmount so they use the
guestfs_version API to fetch the version from the library.  (The
Perl tools were already doing it this way).  In a way this is more
accurate, because it's no longer hard-coded in the binary, but
fetched from the dynamically linked libguestfs.so.
2010-08-27 13:38:49 +01:00
Richard Jones
a0d514f13d Include statically linked binaries in the binary distribution. 2010-08-25 17:22:54 +01:00
Richard Jones
9735484c35 fuse: Implement write syscall (RHBZ#592883). 2010-05-20 10:30:12 +01:00
Richard Jones
3920ad95f6 New API: write for creating files with fixed content (RHBZ#501889).
The guestfs_write call can be used to create small files with
arbitrary 8 bit content, including \0 bytes.

This replaces and deprecates write-file, which cannot be modified
to use BufferIn because of an unfortunate choice in the ABI: the
size parameter to write-file, if zero, means that the daemon tries
to calculate the length of the buffer using strlen.  However this
fails if we pass a zero-length buffer using BufferIn because then
the daemon tries to do strlen on a (really) zero length buffer, not
even containing a terminating \0 character, thus segfaulting.
2010-05-20 10:30:12 +01:00
Matthew Booth
c0d73e0e60 Fix build error in fuse/guestmount.c.
guestmount.c: In function 'main':
guestmount.c:899: error: implicit declaration of function 'setlocale'
[-Wimplicit-function-declaration]

guestmount.c wasn't including locale.h.
2010-04-14 11:13:04 +01:00
Richard Jones
d9e2285837 fuse: Fix typo in test. 2010-03-01 14:17:31 +00:00
Richard Jones
1f0f0df9b1 Remove some unused variables.
Since we have to compile with -Wno-unused-variables, we don't
spot unused variables in code.  I found these by compiling the
code in Ubuntu.
2010-02-15 15:55:38 +00:00
Richard Jones
f93cbe5756 Use mount-options instead of mount to avoid implicit -o sync.
guestfs_mount adds -o sync implicitly.  This causes a very large
performance problem for write-intensive programs (eg. virt-v2v).

Document this as a "gotcha".

Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use
mount-options instead.

(Note that this gotcha does not affect mount-ro).

The source of the performance problem was first identified by
Matthew Booth.
2010-02-10 10:46:23 +00:00
Richard Jones
a6025c11d9 Set locale in C programs so l10n works (RHBZ#559962).
This commit adds the calls to setlocale &c to all of the current
C programs.

It also adds l10n support to hivexget and hivexml which lacked them
previously.

To test this, try:

LANG=pa_IN.UTF-8 guestfish --cmd-help

(You can only do this test after installing the package, or at
least the 'pa.mo' mo-file in the correct place).
2010-01-29 15:11:59 +00:00
Richard Jones
299d5b9dd2 New tool: virt-list-filesystems
Use this program as a convenient way to list the filesystems
available in a disk image or libvirt guest.

Example:

  $ virt-list-filesystems /dev/vg_trick/Debian5x64
  /dev/debian5x64/home
  /dev/debian5x64/root
  /dev/debian5x64/tmp
  /dev/debian5x64/usr
  /dev/debian5x64/var
  /dev/sda1

This is designed to make it easier for novices to use guestfish
and guestmount.  In particular with guestmount this acts as a way
to get a list of filesystems to use with the '-m' option.  ie:

  $ virt-list-filesystems unknowndisk.img
  /dev/sda1
  /dev/sda2
  $ guestmount -a unknowndisk.img -m /dev/sda1 /mnt
2009-11-24 16:01:11 +00:00
Jim Meyering
4d45c45f09 maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 in "usage", too
Convert by running these commands:
perl -pi -e 's/\b(usage ?)\(1\)/$1(EXIT_FAILURE)/' \
  fish/fish.c fuse/guestmount.c
perl -pi -e 's/\b(usage ?)\(0\)/$1(EXIT_SUCCESS)/' \
  fish/fish.c fuse/guestmount.c
* fish/fish.c (main): Replace 0/1 with EXIT_SUCCESS/EXIT_FAILURE.
* fuse/guestmount.c (main): Likewise.
2009-11-20 12:14:32 +00:00