libguestfs.git
12 years agoSecurity: Mitigate possible privilege escalation via SG_IO ioctl (CVE-2011-4127,...
Richard W.M. Jones [Thu, 22 Dec 2011 17:56:47 +0000 (17:56 +0000)]
Security: Mitigate possible privilege escalation via SG_IO ioctl (CVE-2011-4127, RHBZ#757071)

CVE-2011-4127 is a serious qemu & kernel privilege escalation bug
found by Paolo Bonzini.

http://seclists.org/oss-sec/2011/q4/536

An untrusted guest kernel is able to issue special SG_IO ioctls on
virtio devices which qemu passes through to the host kernel without
filtering or sanitizing.  These ioctls allow raw sectors from the
underlying host device to be read and written.  Significantly, neither
qemu nor the host kernel checks that the range of sectors is within
the partition / LV assigned to the guest.  For example, if the guest
is assigned host partition /dev/sda3, it would be able to read or
write any part of /dev/sda including other partitions and the boot
sector.  Exploits through LVs passed to the guest are also possible,
with some limitations.  File-backed virtual block devices are not
vulnerable.  Non-virtio block devices are not vulnerable.

This patch mitigates the problem by disabling the SG_IO ioctl
passthrough in qemu.  Thus if libguestfs is examining an untrusted
guest and the libguestfs appliance/daemon is compromised (eg. by
executing guest commands, or through some other compromise), then the
compromised appliance will not be able to issue the above SG_IO ioctls
and exploit the host.

Note that this is just mitigation for libguestfs.  Users will still
want to fully update their host kernel, qemu/KVM and libvirt, in order
to prevent other (non-libguestfs) routes to compromise.

The following versions of libguestfs (will/have) this patch applied.

  libguestfs >= 1.15.13
  libguestfs >= 1.14.8
  libguestfs >= 1.12.11
  libguestfs >= 1.10.12
  libguestfs >= 1.8.16

Earlier versions may be vulnerable unless a downstream packager has
applied this patch.

Cc: Hilko Bengen <bengen@hilluzination.de>
12 years agoFixed checks for libpython features
Hilko Bengen [Sat, 10 Dec 2011 21:16:55 +0000 (22:16 +0100)]
Fixed checks for libpython features

The python3.1 package shipped with Debian/squeeze does not have the
'mu' suffix that was assumed before.

12 years agoVersion 1.15.12. 1.15.12
Richard W.M. Jones [Thu, 22 Dec 2011 16:13:08 +0000 (16:13 +0000)]
Version 1.15.12.

12 years agotests: Add a simple liveness tests for qemu.
Richard W.M. Jones [Thu, 22 Dec 2011 15:09:19 +0000 (15:09 +0000)]
tests: Add a simple liveness tests for qemu.

12 years agotests: Finalize the order we run the tests.
Richard W.M. Jones [Thu, 22 Dec 2011 13:12:43 +0000 (13:12 +0000)]
tests: Finalize the order we run the tests.

12 years agotests: Put test-tool and comment into own section.
Richard W.M. Jones [Thu, 22 Dec 2011 13:05:34 +0000 (13:05 +0000)]
tests: Put test-tool and comment into own section.

12 years agotests: Split images -> tests/data + tests/guests
Richard W.M. Jones [Thu, 22 Dec 2011 12:15:06 +0000 (12:15 +0000)]
tests: Split images -> tests/data + tests/guests

12 years agotests: Rename extratests -> tests/extra.
Richard W.M. Jones [Thu, 22 Dec 2011 12:00:44 +0000 (12:00 +0000)]
tests: Rename extratests -> tests/extra.

12 years agotests: Split regressions -> various subdirectories of tests/
Richard W.M. Jones [Thu, 22 Dec 2011 11:35:43 +0000 (11:35 +0000)]
tests: Split regressions -> various subdirectories of tests/

12 years agotests: Rename capitests -> tests/c-api.
Richard W.M. Jones [Thu, 22 Dec 2011 08:40:30 +0000 (08:40 +0000)]
tests: Rename capitests -> tests/c-api.

12 years agotests: Rename caution -> tests/qemu.
Richard W.M. Jones [Thu, 22 Dec 2011 08:34:57 +0000 (08:34 +0000)]
tests: Rename caution -> tests/qemu.

12 years agotests: Document new tests/ subdirectory.
Richard W.M. Jones [Thu, 22 Dec 2011 08:34:08 +0000 (08:34 +0000)]
tests: Document new tests/ subdirectory.

12 years agodocs: Arrange directory names in alphabetical order.
Richard W.M. Jones [Thu, 22 Dec 2011 08:33:16 +0000 (08:33 +0000)]
docs: Arrange directory names in alphabetical order.

12 years agoextra-tests: Add an extra suppression for OCaml 3.11.2 in RHEL 6.
Richard W.M. Jones [Tue, 20 Dec 2011 18:26:20 +0000 (18:26 +0000)]
extra-tests: Add an extra suppression for OCaml 3.11.2 in RHEL 6.

12 years agofish: Allow events to be processed in guestfish.
Richard W.M. Jones [Wed, 14 Dec 2011 08:38:27 +0000 (08:38 +0000)]
fish: Allow events to be processed in guestfish.

Add 'event', 'list-events' and 'delete-event' commands so that event
handlers can be registered, listed and deleted in guestfish.  The
event handler is a shell script snippet or host command.

Cc: Pádraig Brady <P@draigBrady.com>
12 years agopython: Missing () in guestfs-python(1) examples.
Richard W.M. Jones [Wed, 14 Dec 2011 12:07:31 +0000 (12:07 +0000)]
python: Missing () in guestfs-python(1) examples.

12 years agoVersion 1.15.11. 1.15.11
Richard W.M. Jones [Fri, 9 Dec 2011 17:34:01 +0000 (17:34 +0000)]
Version 1.15.11.

12 years agofuse: Return EXIT_FAILURE if fuse_main fails.
Richard W.M. Jones [Fri, 9 Dec 2011 15:30:23 +0000 (15:30 +0000)]
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)

12 years agofish: -i option should fail if / is not mountable, but warn about others.
Richard W.M. Jones [Fri, 9 Dec 2011 09:49:37 +0000 (09:49 +0000)]
fish: -i option should fail if / is not mountable, but warn about others.

In particular this stops a problem with guestmount where if the -i
option half-recognizes the guest OS, it would mount the disk (and
fail, giving only warnings), leaving the mountpoint unusable.

(Thanks Pádraig Brady)

12 years agodaemon: Fix utimens so it doesn't hang on named pipes (RHBZ#761460).
Richard W.M. Jones [Thu, 8 Dec 2011 11:39:58 +0000 (11:39 +0000)]
daemon: Fix utimens so it doesn't hang on named pipes (RHBZ#761460).

This also adds comprehensive tests for utimens on regular files,
directories (RHBZ#761451), named pipes (RHBZ#761460), symbolic links,
block and char devices.

Note that there is a small change in the (previously undefined)
semantics of this call: It now sets the time on a symbolic link
itself, not on what the symbolic link points to.

12 years agodaemon: Allow utimens to work for directories (RHBZ#761451).
Richard W.M. Jones [Thu, 8 Dec 2011 11:15:18 +0000 (11:15 +0000)]
daemon: Allow utimens to work for directories (RHBZ#761451).

You don't need to open the file O_WRONLY in order to call futimens on
the file descriptor.  Opening it O_WRONLY fails for directories.
Therefore open O_RDONLY instead.

12 years agocopy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669).
Richard W.M. Jones [Wed, 7 Dec 2011 12:12:35 +0000 (12:12 +0000)]
copy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669).

12 years agofish: Improve error messages when no OS / multi-boot OS found with inspection (RHBZ...
Richard W.M. Jones [Wed, 7 Dec 2011 11:46:43 +0000 (11:46 +0000)]
fish: Improve error messages when no OS / multi-boot OS found with inspection (RHBZ#760775).

12 years agolet the user explicitly choose ruby and rake programs
Hilko Bengen [Tue, 6 Dec 2011 19:42:11 +0000 (20:42 +0100)]
let the user explicitly choose ruby and rake programs

12 years agoVersion 1.15.10. 1.15.10
Richard W.M. Jones [Tue, 6 Dec 2011 15:10:46 +0000 (15:10 +0000)]
Version 1.15.10.

12 years agoFix rpcgen post-processing for out-of-tree builds
Hilko Bengen [Mon, 5 Dec 2011 17:35:57 +0000 (18:35 +0100)]
Fix rpcgen post-processing for out-of-tree builds

12 years agoruby: Use RSTRING_PTR, RSTRING_LEN for compat with Ruby 1.9 (RHBZ#760000).
Richard W.M. Jones [Mon, 5 Dec 2011 10:36:13 +0000 (10:36 +0000)]
ruby: Use RSTRING_PTR, RSTRING_LEN for compat with Ruby 1.9 (RHBZ#760000).

12 years agoblkid: split the RHEL5 which can't support some options
Wanlong Gao [Mon, 5 Dec 2011 10:06:43 +0000 (18:06 +0800)]
blkid: split the RHEL5 which can't support some options

RHEL5 shoult not support '-p', '-i' and '-o export' options.
But we just split it according to the '-p' option.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoTODO: remove the implemented command blkid
Wanlong Gao [Mon, 5 Dec 2011 08:57:22 +0000 (16:57 +0800)]
TODO: remove the implemented command blkid

Remove the implemented command blkid from TODO lists.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoRevert "blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option."
Richard W.M. Jones [Sun, 4 Dec 2011 16:47:37 +0000 (16:47 +0000)]
Revert "blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option."

This reverts commit 6533491b178d18bfab8240cf093be4ef9b547548.

12 years agoRevert "blkid: Fix mistake in previous commit."
Richard W.M. Jones [Sun, 4 Dec 2011 16:47:29 +0000 (16:47 +0000)]
Revert "blkid: Fix mistake in previous commit."

This reverts commit c48226a5026816b115ab63b50d3601531aff59dc.

12 years agoblkid: Fix mistake in previous commit.
Richard W.M. Jones [Sat, 3 Dec 2011 23:16:00 +0000 (23:16 +0000)]
blkid: Fix mistake in previous commit.

This updates commit 6533491b178d18bfab8240cf093be4ef9b547548.

12 years agoblkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option.
Richard W.M. Jones [Sat, 3 Dec 2011 22:58:03 +0000 (22:58 +0000)]
blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option.

12 years agodaemon: Use pkg-config to locate Augeas CFLAGS / libraries.
Richard W.M. Jones [Sat, 3 Dec 2011 14:34:52 +0000 (14:34 +0000)]
daemon: Use pkg-config to locate Augeas CFLAGS / libraries.

Augeas 0.10 depends on libxml2, so this is now required in the
appliance (in fact, it was already present).

However this exposed two bugs:

(1) In libguestfs we use a home-brewed recipe for Augeas flags,
resulting in this error:
/usr/include/augeas.h:24:25: fatal error: libxml/tree.h: No such file or directory

(2) Augeas's own augeas.pc didn't include the libxml2 flags, so
it was broken.  This requires a patch to Augeas 0.10, see:
https://www.redhat.com/archives/augeas-devel/2011-December/msg00008.html

Change to using pkg-config to detect Augeas.  It is still an optional
library.

12 years agoVersion 1.15.9. 1.15.9
Richard W.M. Jones [Sat, 3 Dec 2011 12:59:27 +0000 (12:59 +0000)]
Version 1.15.9.

12 years agoNEW API: add blkid command to print the attributes of the device
Wanlong Gao [Sat, 3 Dec 2011 09:07:47 +0000 (17:07 +0800)]
NEW API: add blkid command to print the attributes of the device

A NEW API blkid.
It can print the device attributes.
Use it after list-devices, we can list ower devices and the attributes
of each device.
Use it like:
blkid <device>
It's should be a usefull function.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoextra tests: Test that valgrind and libtool are installed.
Richard W.M. Jones [Fri, 2 Dec 2011 15:03:19 +0000 (15:03 +0000)]
extra tests: Test that valgrind and libtool are installed.

12 years agoinspection: Add a test for MD device mapping in fstab
Matthew Booth [Fri, 2 Dec 2011 14:04:20 +0000 (14:04 +0000)]
inspection: Add a test for MD device mapping in fstab

Check that we properly handle fstab entries of the form /dev/md0 and
/dev/md/foo.

RWMJ: Add a skip to test if the Augeas lens is not available.

12 years agoinspection: Handle MD devices in fstab
Matthew Booth [Fri, 2 Dec 2011 14:04:19 +0000 (14:04 +0000)]
inspection: Handle MD devices in fstab

This patch fixes inspection when fstab contains devices md devices
specified as /dev/mdN. The appliance creates these devices without reference to
the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
as /dev/md127 in the appliance. With this patch, we match the uuids of detected
md devices against uuids specified in mdadm.conf, and map them appropriately
when we encounter them in fstab.

12 years agobuild: Add more suppressions for valgrind tests
Matthew Booth [Fri, 2 Dec 2011 14:04:18 +0000 (14:04 +0000)]
build: Add more suppressions for valgrind tests

12 years agomkfs: enable to make xfs filesystems when the device already has a filesystem
Wanlong Gao [Fri, 2 Dec 2011 13:47:51 +0000 (21:47 +0800)]
mkfs: enable to make xfs filesystems when the device already has a filesystem

Just add the -f option to mkfs.xfs to make sure we can
make a xfs filesystem when the device already has a
filesystem on it.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agolibguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation
Hilko Bengen [Thu, 1 Dec 2011 21:06:30 +0000 (22:06 +0100)]
libguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation

    Since some modules (`getopt', for example) may copy files
    into the build directory, `top_builddir/lib' is needed as well as
    `top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import

12 years agotodo: Suggestion for UUIDs in /etc/fstab (thanks Joshua Daniel Franklin).
Richard W.M. Jones [Wed, 30 Nov 2011 17:08:33 +0000 (17:08 +0000)]
todo: Suggestion for UUIDs in /etc/fstab (thanks Joshua Daniel Franklin).

12 years agoocaml: Fix OCaml dependencies.
Richard W.M. Jones [Wed, 30 Nov 2011 17:08:27 +0000 (17:08 +0000)]
ocaml: Fix OCaml dependencies.

12 years agoVersion 1.15.8. 1.15.8
Richard W.M. Jones [Tue, 29 Nov 2011 23:31:30 +0000 (23:31 +0000)]
Version 1.15.8.

12 years agopython: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 18:20:05 +0000 (18:20 +0000)]
python: Memory leak: Free roots array along handle close path.

12 years agoperl: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 18:19:54 +0000 (18:19 +0000)]
perl: Memory leak: Free roots array along handle close path.

12 years agoruby: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 17:47:18 +0000 (17:47 +0000)]
ruby: Memory leak: Free roots array along handle close path.

12 years agoextra tests: Add comments about what is not tested here.
Richard W.M. Jones [Tue, 29 Nov 2011 17:51:59 +0000 (17:51 +0000)]
extra tests: Add comments about what is not tested here.

12 years agoextra tests: Absolute path for 'run' command.
Richard W.M. Jones [Tue, 29 Nov 2011 17:32:19 +0000 (17:32 +0000)]
extra tests: Absolute path for 'run' command.

12 years agoextra tests: Split up and reorder tests more logically.
Richard W.M. Jones [Tue, 29 Nov 2011 17:22:56 +0000 (17:22 +0000)]
extra tests: Split up and reorder tests more logically.

12 years agoextra tests: Test virt-sparsify.
Richard W.M. Jones [Tue, 29 Nov 2011 17:20:11 +0000 (17:20 +0000)]
extra tests: Test virt-sparsify.

This adds the virt-sparsify --debug-gc option which causes
virt-sparsify to call Gc.compact before exiting, allowing
GC and memory problems to be tested.

Add an extratest which runs virt-sparsify under valgrind.

12 years agoextra tests: Test virt-resize.
Richard W.M. Jones [Tue, 29 Nov 2011 17:14:18 +0000 (17:14 +0000)]
extra tests: Test virt-resize.

This adds the virt-resize --debug-gc option which causes
virt-resize to call Gc.compact before exiting, allowing
GC and memory problems to be tested.

Add an extratest which runs virt-resize under valgrind.

12 years agoocaml: Load test should call Gc.compact to flag memory errors.
Richard W.M. Jones [Tue, 29 Nov 2011 17:13:45 +0000 (17:13 +0000)]
ocaml: Load test should call Gc.compact to flag memory errors.

12 years agoocaml: Fix memory leak in bindings for functions that return buffers.
Richard W.M. Jones [Tue, 29 Nov 2011 17:13:17 +0000 (17:13 +0000)]
ocaml: Fix memory leak in bindings for functions that return buffers.

RBufferOut binding didn't free the buffer after copying it onto
the OCaml heap.

Found by valgrind.

12 years agoVersion 1.15.7. 1.15.7
Richard W.M. Jones [Tue, 29 Nov 2011 16:11:21 +0000 (16:11 +0000)]
Version 1.15.7.

12 years agoextra tests: Run C API tests under valgrind.
Richard W.M. Jones [Tue, 29 Nov 2011 13:13:44 +0000 (13:13 +0000)]
extra tests: Run C API tests under valgrind.

12 years agoprotocol: Memory leak: Free temporary buffer along recv_discard path.
Richard W.M. Jones [Tue, 29 Nov 2011 13:13:06 +0000 (13:13 +0000)]
protocol: Memory leak: Free temporary buffer along recv_discard path.

12 years agoextra tests: Run OCaml tests under valgrind.
Richard W.M. Jones [Tue, 29 Nov 2011 12:52:15 +0000 (12:52 +0000)]
extra tests: Run OCaml tests under valgrind.

12 years agoextra tests: Split VG variable into VG / RUN_VG.
Richard W.M. Jones [Tue, 29 Nov 2011 12:51:20 +0000 (12:51 +0000)]
extra tests: Split VG variable into VG / RUN_VG.

This is just code motion.

12 years agoocaml: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 12:25:34 +0000 (12:25 +0000)]
ocaml: Memory leak: Free roots array along handle close path.

12 years agoinspection: Cleanup iteration over fstab entries in inspect_fs_unix.c
Matthew Booth [Fri, 25 Nov 2011 13:16:54 +0000 (13:16 +0000)]
inspection: Cleanup iteration over fstab entries in inspect_fs_unix.c

Select non-comment labels using an augeas path to return the correct
nodes in the first instance, rather than applying a regular expression
to all results.

There is no functional change to the code.

RWMJ:
 - Rebased to current HEAD.
 - Move variable decls to top of function.
 - Some whitespace changes.
 - Remove check for errors from snprintf since it can never happen.

13 years agoinspection: Add outline support for GNU/Hurd.
Richard W.M. Jones [Mon, 28 Nov 2011 20:40:01 +0000 (20:40 +0000)]
inspection: Add outline support for GNU/Hurd.

13 years agofish: When -m option fails, canonicalize device names that are printed.
Richard W.M. Jones [Mon, 28 Nov 2011 19:12:44 +0000 (19:12 +0000)]
fish: When -m option fails, canonicalize device names that are printed.

The error message now looks like this:

  guestfish: '/dev/vda6' could not be mounted.  Did you mean one of these?
            /dev/sda1 (ext4)
            /dev/vg_f15x32/lv_root (ext4)
            /dev/vg_f15x32/lv_swap (swap)

Note that '/dev/sda1' has been canonicalized.

13 years agofish: Rearrange code for displaying mountpoints when -m option fails.
Richard W.M. Jones [Mon, 28 Nov 2011 19:07:30 +0000 (19:07 +0000)]
fish: Rearrange code for displaying mountpoints when -m option fails.

This also frees the list returned by guestfs_list_filesystems.

13 years agodocs: Tidy up documentation for md-stop.
Richard W.M. Jones [Fri, 25 Nov 2011 08:34:59 +0000 (08:34 +0000)]
docs: Tidy up documentation for md-stop.

This cleans up commit cbd1c45d95c530c8d94103dcc2c521bf5501ef59.

13 years agoVersion 1.15.6. 1.15.6
Richard W.M. Jones [Thu, 24 Nov 2011 20:28:02 +0000 (20:28 +0000)]
Version 1.15.6.

13 years agoubuntu: Add extra suppressions for libnl.1 leaks.
Richard W.M. Jones [Thu, 24 Nov 2011 20:17:57 +0000 (20:17 +0000)]
ubuntu: Add extra suppressions for libnl.1 leaks.

13 years agoUpdate API support.
Richard W.M. Jones [Thu, 24 Nov 2011 19:36:50 +0000 (19:36 +0000)]
Update API support.

13 years agoextra-tests: Include valgrind suppressions file.
Richard W.M. Jones [Thu, 24 Nov 2011 17:47:13 +0000 (17:47 +0000)]
extra-tests: Include valgrind suppressions file.

This updates commit c55bad93fbde03a3daa6058913f02098c45e55f5.

13 years agoregressions: Allow test-launch-race.pl to be skipped.
Richard W.M. Jones [Thu, 24 Nov 2011 16:54:17 +0000 (16:54 +0000)]
regressions: Allow test-launch-race.pl to be skipped.

export SKIP_TEST_LAUNCH_RACE_PL=1
will cause this test to be skipped.

13 years agodebian: Use mdadm -D --export instead of mdadm -DY.
Richard W.M. Jones [Thu, 24 Nov 2011 16:27:36 +0000 (16:27 +0000)]
debian: Use mdadm -D --export instead of mdadm -DY.

For compatibility with mdadm on Debian Squeeze.

13 years agoAdd 'make extra-tests' rule and run extra tests.
Richard W.M. Jones [Thu, 24 Nov 2011 14:08:09 +0000 (14:08 +0000)]
Add 'make extra-tests' rule and run extra tests.

These tests are optional, and require a special environment and
tools to run.

13 years agolib: Fix memory leak when debugging enabled (found by valgrind).
Richard W.M. Jones [Thu, 24 Nov 2011 15:50:54 +0000 (15:50 +0000)]
lib: Fix memory leak when debugging enabled (found by valgrind).

If you enabled debugging (eg. LIBGUESTFS_DEBUG=1) then every
debug message printed would be leaked.

13 years agotest-tool: Fix multiple memory leaks found by valgrind.
Richard W.M. Jones [Thu, 24 Nov 2011 15:49:49 +0000 (15:49 +0000)]
test-tool: Fix multiple memory leaks found by valgrind.

13 years agofilesystems: Fix memory leak found by valgrind.
Richard W.M. Jones [Thu, 24 Nov 2011 15:49:27 +0000 (15:49 +0000)]
filesystems: Fix memory leak found by valgrind.

13 years agopart-disk: Change default alignment of this to 64K (128 sectors).
Richard W.M. Jones [Thu, 24 Nov 2011 14:39:10 +0000 (14:39 +0000)]
part-disk: Change default alignment of this to 64K (128 sectors).

This is the minimum alignment.  1MB would be better.

Note that the exact behaviour is not defined in the API.

13 years agovirt-alignment-scan: Add checks for when API calls return NULL.
Richard W.M. Jones [Thu, 24 Nov 2011 14:06:31 +0000 (14:06 +0000)]
virt-alignment-scan: Add checks for when API calls return NULL.

In particular, virt-alignment-scan -a /dev/null would segfault
because of an error returned by parted.

13 years agoNew API: md-stop for stopping MD devices
Wanlong Gao [Thu, 24 Nov 2011 13:06:07 +0000 (21:06 +0800)]
New API: md-stop for stopping MD devices

This API is used to stop a md device.
When we want to move a device to another md array, we should
stop the md device which contained this device first.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
13 years agoRename mdadm_ apis to md_
Matthew Booth [Thu, 24 Nov 2011 12:09:03 +0000 (12:09 +0000)]
Rename mdadm_ apis to md_

This change renames the following 2 apis:
* mdadm_create -> md_create
* mdadm_detail -> md_detail

This is more consistent with list_md_devices, and removes a reference to an
implementation detail from the api.

13 years agoNFC: Allow multiple config files in inspect_with_augeas in inspect_fs_unix.c
Matthew Booth [Wed, 23 Nov 2011 14:00:55 +0000 (14:00 +0000)]
NFC: Allow multiple config files in inspect_with_augeas in inspect_fs_unix.c

This change is in support of the addition of MD support to fstab inspection.

13 years agoNFC: Consolidate the error path in check_fstab in inspect_fs_unix.c
Matthew Booth [Wed, 23 Nov 2011 14:00:54 +0000 (14:00 +0000)]
NFC: Consolidate the error path in check_fstab in inspect_fs_unix.c

13 years agomd: Inspect MD devices
Matthew Booth [Wed, 23 Nov 2011 14:00:53 +0000 (14:00 +0000)]
md: Inspect MD devices

13 years agoNFC: Declare and use variables on the same line in inspect.c
Matthew Booth [Wed, 23 Nov 2011 14:00:52 +0000 (14:00 +0000)]
NFC: Declare and use variables on the same line in inspect.c

13 years agobuild: Nothing under images/ should be translated
Matthew Booth [Wed, 23 Nov 2011 14:00:51 +0000 (14:00 +0000)]
build: Nothing under images/ should be translated

13 years agobuild: Create an MD variant of the dummy Fedora image
Matthew Booth [Wed, 23 Nov 2011 14:00:50 +0000 (14:00 +0000)]
build: Create an MD variant of the dummy Fedora image

This change involves rewriting make-fedora-img.sh in perl. This allows the
flexibility to write mdadm.conf containing whichever uuids where randomly
generated when the md devices were created.

13 years agorun script: Don't overwrite LD_LIBRARY_PATH and PERL5LIB
Matthew Booth [Wed, 23 Nov 2011 16:35:10 +0000 (16:35 +0000)]
run script: Don't overwrite LD_LIBRARY_PATH and PERL5LIB

This change allows the run scripts of virt-v2v and libguestfs to be chained.

13 years agognulib: Rebase to latest.
Richard W.M. Jones [Tue, 22 Nov 2011 16:03:37 +0000 (16:03 +0000)]
gnulib: Rebase to latest.

13 years agoDon't rely on implicit promotion of float to double in printf args.
Richard W.M. Jones [Tue, 22 Nov 2011 16:40:37 +0000 (16:40 +0000)]
Don't rely on implicit promotion of float to double in printf args.

13 years agofish: In generated code, put function names on a new line.
Richard W.M. Jones [Tue, 22 Nov 2011 16:39:37 +0000 (16:39 +0000)]
fish: In generated code, put function names on a new line.

eg:

static void
run_foo ()
{
}

13 years agodf, testing: Add notes on virt-df numbers (thanks Kashyap Chamarthy).
Richard W.M. Jones [Tue, 22 Nov 2011 13:18:32 +0000 (13:18 +0000)]
df, testing: Add notes on virt-df numbers (thanks Kashyap Chamarthy).

13 years agosparsify: Add -o option for passing qemu-img output format options.
Richard W.M. Jones [Tue, 22 Nov 2011 10:11:10 +0000 (10:11 +0000)]
sparsify: Add -o option for passing qemu-img output format options.

13 years agosparsify: Add --compress option.
Richard W.M. Jones [Tue, 22 Nov 2011 09:54:52 +0000 (09:54 +0000)]
sparsify: Add --compress option.

This adds the -c option to the final qemu-img command.

13 years agosparsify: Add auto-detection of .vdi files.
Richard W.M. Jones [Tue, 22 Nov 2011 09:39:54 +0000 (09:39 +0000)]
sparsify: Add auto-detection of .vdi files.

Note that for this to work properly, it requires a patch to
the 'file' command.  See:
https://www.redhat.com/archives/libguestfs/2011-November/msg00120.html

13 years agofish: Add MD devices to guestfish device autocompletion.
Matthew Booth [Mon, 21 Nov 2011 15:23:18 +0000 (15:23 +0000)]
fish: Add MD devices to guestfish device autocompletion.

13 years agoVersion 1.15.5. 1.15.5
Richard W.M. Jones [Mon, 21 Nov 2011 13:25:36 +0000 (13:25 +0000)]
Version 1.15.5.

13 years agoguestfs-testing: Link to libguestfs-test-tool.
Richard W.M. Jones [Mon, 21 Nov 2011 13:09:59 +0000 (13:09 +0000)]
guestfs-testing: Link to libguestfs-test-tool.

13 years agocontrib: Update introduction to libguestfs.
Richard W.M. Jones [Mon, 21 Nov 2011 11:45:54 +0000 (11:45 +0000)]
contrib: Update introduction to libguestfs.

13 years agoout-of-tree build: ruby
Hilko Bengen [Sun, 20 Nov 2011 22:57:47 +0000 (23:57 +0100)]
out-of-tree build: ruby

13 years agoAdd guestfs-testing(1) man page.
Richard W.M. Jones [Sun, 20 Nov 2011 13:38:28 +0000 (13:38 +0000)]
Add guestfs-testing(1) man page.

This contains suggested manual tests that users can run.