libguestfs.git
12 years agoVersion 1.14.8. stable-1.14 1.14.8
Richard W.M. Jones [Thu, 22 Dec 2011 19:24:05 +0000 (19:24 +0000)]
Version 1.14.8.

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>
(cherry picked from commit 9a5f784d511a8f00a8386f316eab41fe660430db)

12 years agoVersion 1.14.7. 1.14.7
Richard W.M. Jones [Fri, 9 Dec 2011 17:31:53 +0000 (17:31 +0000)]
Version 1.14.7.

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)
(cherry picked from commit ae45cee728039d7724fc73e5ffb2550c8054d268)

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)
(cherry picked from commit 54e91da925323642e67b8ce4b95899fe4b7a51c4)

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.
(cherry picked from commit 19e2f5aa4fd4ed70b505661d918b5575616ad441)

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.
(cherry picked from commit 31fba8d8033216f8a288e75fe3f575b73b9ef925)

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).
(cherry picked from commit 98edfac1ee70bcf15ee7caebc306e11cdbbb0d9a)

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).
(cherry picked from commit 7d3848ddc046f79cc1112809bd9970eea8060018)

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
(cherry picked from commit 41a7a68cf33a174ba950aa29951a07c391a16b4d)

12 years agoVersion 1.14.6. 1.14.6
Richard W.M. Jones [Tue, 6 Dec 2011 17:11:38 +0000 (17:11 +0000)]
Version 1.14.6.

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
(cherry picked from commit 43942b08cfbcf91bef29ec532f3d097a8519c982)

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).
(cherry picked from commit 2972987d0257d9c3d26b53f961e802d121b436cd)

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.
(cherry picked from commit 615924abaa968398d6529529fa2f31ae23de825b)

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.
(cherry picked from commit b7addee24d211014086c44bcef6a0c799e4fb987)

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
(cherry picked from commit 655f8037def7742a608fb272004eec51424ac31d)

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>
(cherry picked from commit 1970a14178b5c53569965d35e54efead6c4c4bdc)

12 years agoVersion 1.14.5. 1.14.5
Richard W.M. Jones [Fri, 2 Dec 2011 12:19:12 +0000 (12:19 +0000)]
Version 1.14.5.

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
(cherry picked from commit 1a35ca59088e572c11633e85524bb282cb436186)

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.
(cherry picked from commit ce331df0f1857bccebaaddfac79677bc9f527197)

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.
(cherry picked from commit e7e3a32edc29e3448b1d7efb3f6b53c5173c4e9c)

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.
(cherry picked from commit 00c9755ee3bea98968acea47bac858db94f7fbe2)

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.
(cherry picked from commit eb7ec6170eca278fb910e18ca1f7ca81c6b507c0)

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.
(cherry picked from commit efef3e3c1205e5476044f41fb88385e3ba07468d)

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.
(cherry picked from commit 27d00960c93b26c68fa1f4068502c32a6e3b5e94)

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.
(cherry picked from commit cee513112adcf4084d6be9e3b5037b7b54c9f514)

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.
(cherry picked from commit 14b1e7b963cd5446ab76a067085b91925dd5d3e3)

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.
(cherry picked from commit 7708d3e04f6ec3985fd74ee1a44a5615d43065e2)

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.
(cherry picked from commit 082a55f76cd61f3590976f6b095552ea65259ced)

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.
(cherry picked from commit 6bd0eec12f2e39360847bfe7a9f50628cc89ed8e)

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.
(cherry picked from commit e1f395defc6db5bbc82537af6e517d94216b7d4b)

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.
(cherry picked from commit d81c0829ea4a99aadb98df37be9543a973269041)

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.
(cherry picked from commit aa4eb4cd109dda0dc7dfdd66a5163a18b0be2277)

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.
(cherry picked from commit 6ccae55ddcf0c08cd1b1cdbc07afeed043ad410d)

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.
(cherry picked from commit c5dbb1e63a8e0c45c7088dd2e58f5abbcfc30620)

12 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.
(cherry picked from commit f5bfc68fdb3e25b9d75c65e3f5e88983584b25ed)

12 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.
(cherry picked from commit 450134501c37f1dd1b898dc390591a3f84ec18b4)

12 years agoVersion 1.14.4. 1.14.4
Richard W.M. Jones [Thu, 24 Nov 2011 22:10:01 +0000 (22:10 +0000)]
Version 1.14.4.

12 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.
(cherry picked from commit b5b4816ab006ce09b7a7103dbe87b3129046648d)

12 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.
(cherry picked from commit be7cb789069afc93e7c1b0e7a1a9a293dc846d45)

12 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.
(cherry picked from commit 3bbcbd5eeadabb1cc5a40b2f8ae586e6aafd39c6)

12 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.
(cherry picked from commit c55bad93fbde03a3daa6058913f02098c45e55f5)

12 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.
(cherry picked from commit dd76ce2b4c93dd10d8eca9ab7c77bc831f103d03)

12 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.
(cherry picked from commit bfc0a5f58d3cb6faad5a44bed392f33190e62246)

12 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.
(cherry picked from commit cd3d28491dd19d25a6c04a8bc6a7ec94bded413b)

12 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.
(cherry picked from commit c4381dba737d5cb8aad8e1b2e2123b0fcaff1d1a)

12 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.
(cherry picked from commit 7b192f5a672197ad67ac23501e420c674aa2f3a9)

12 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.
(cherry picked from commit 373dca7d12a8741e116205b4a3ac67a7d82cc782)

12 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
(cherry picked from commit 011a248381cacd6751deb1d1be122cc9bd6aba09)

12 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
(cherry picked from commit c8cb3d27b62da20be6b2fa06f1ce6b63a722c32b)

12 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
(cherry picked from commit 34c0542189a443e57f2b09886f31b5bdad404bbf)

12 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.
(cherry picked from commit 252ad4aa41c213948e4ee1f01e6c7ff7861f75e3)

12 years agognulib: Rebase to latest.
Richard W.M. Jones [Tue, 22 Nov 2011 16:03:37 +0000 (16:03 +0000)]
gnulib: Rebase to latest.
(cherry picked from commit 065b6b5798913c9bb40215944920199ae7d27007)

12 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.
(cherry picked from commit 9b102aae65449a8d321e8cf44a3993af558291db)

12 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 ()
{
}
(cherry picked from commit 99ec97dcdfaf242ba0683a230ba51e4a87f7458b)

12 years agoVersion 1.14.3. 1.14.3
Richard W.M. Jones [Tue, 22 Nov 2011 14:44:09 +0000 (14:44 +0000)]
Version 1.14.3.

12 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).
(cherry picked from commit 7b3137e664c3f4edf6ac7043a34c4166567e17bd)

12 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
(cherry picked from commit 342b4a55d056734a0344db8b4bcf1a90104a8a59)

12 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.
(cherry picked from commit 6f39cfaeacda146d0eaa35da6f6413fa6ab3d40a)

12 years agoout-of-tree build: ruby
Hilko Bengen [Sun, 20 Nov 2011 22:57:47 +0000 (23:57 +0100)]
out-of-tree build: ruby
(cherry picked from commit 8bc6e9d6a89672bbe1e7469774abe889354deb67)

12 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.
(cherry picked from commit a3b24296810d98e47552c6838dcd6ab6845aba03)

12 years agoout of tree build: haskell
Hilko Bengen [Tue, 15 Nov 2011 20:28:22 +0000 (21:28 +0100)]
out of tree build: haskell
(cherry picked from commit 730fb50780df860474dc1fae16c9891187e99c82)

12 years agojava: out-of-tree build, don't build static library
Hilko Bengen [Tue, 15 Nov 2011 20:28:21 +0000 (21:28 +0100)]
java: out-of-tree build, don't build static library
(cherry picked from commit a0509ff0715533e341573e24f6888fd7dcf4ba51)

12 years agoout of tree build: erlang
Hilko Bengen [Tue, 15 Nov 2011 20:28:20 +0000 (21:28 +0100)]
out of tree build: erlang
(cherry picked from commit ddb3fac1bf1b0493779c9425b518598473ef106a)

12 years ago32 bit: Fix printf off_t.
Richard Jones [Fri, 11 Nov 2011 20:26:17 +0000 (20:26 +0000)]
32 bit: Fix printf off_t.
(cherry picked from commit 47963bc9cc0b47af0541010a4fa14260405acaa5)

12 years ago32 bit: Use %td for ptrdiff_t (difference between two pointers).
Richard W.M. Jones [Fri, 11 Nov 2011 19:11:02 +0000 (19:11 +0000)]
32 bit: Use %td for ptrdiff_t (difference between two pointers).
(cherry picked from commit 5d48250224fcb140b7e6e17f36b37deab4e0659b)

12 years agodf: Disable part of virt-df test.
Richard W.M. Jones [Fri, 11 Nov 2011 13:30:09 +0000 (13:30 +0000)]
df: Disable part of virt-df test.

See:
https://www.redhat.com/archives/libguestfs/2011-November/msg00051.html
(cherry picked from commit 6e6b3ff35f9baafb22d5459ca13c112b1e00ae1b)

12 years agogenerator: Support testing the output of RHashtable functions.
Richard W.M. Jones [Thu, 10 Nov 2011 16:33:40 +0000 (16:33 +0000)]
generator: Support testing the output of RHashtable functions.

You can use TestOutputHashtable to test the output of RHashtable
functions.
(cherry picked from commit 5f0b75f040b118c4394466438adc99f38144722d)

12 years agodaemon: Define safe ADD_ARG macro for constructing arg lists on the stack.
Richard W.M. Jones [Thu, 10 Nov 2011 15:53:23 +0000 (15:53 +0000)]
daemon: Define safe ADD_ARG macro for constructing arg lists on the stack.
(cherry picked from commit edd502543adbdc2fa5dda0c015ea7c390bb39f64)

12 years agoVersion 1.14.2. 1.14.2
Richard W.M. Jones [Thu, 10 Nov 2011 10:40:31 +0000 (10:40 +0000)]
Version 1.14.2.

12 years agoocaml: Fix bindings when a function takes more than 10 parameters.
Richard W.M. Jones [Wed, 9 Nov 2011 17:48:42 +0000 (17:48 +0000)]
ocaml: Fix bindings when a function takes more than 10 parameters.

If any function had more than 10 required + optional parameters, OCaml
bindings could not be generated.  Currently there are no such
functions.
(cherry picked from commit 29172e7c4878085a680812f7f3b8ad6ea5f1193c)

12 years agotests: Fix bitmask parameter when testing optional arguments.
Richard W.M. Jones [Wed, 9 Nov 2011 17:47:23 +0000 (17:47 +0000)]
tests: Fix bitmask parameter when testing optional arguments.

The bitmask was being constructed backwards(!)

As a result, any test which tested optional arguments didn't work.
There are very few such tests and they happened not to be affected by
this.
(cherry picked from commit af2b0378bbb178a4e3db326ac3082d66170fcafc)

12 years agofish: More informative documentation of optargs.
Richard W.M. Jones [Wed, 9 Nov 2011 21:21:00 +0000 (21:21 +0000)]
fish: More informative documentation of optargs.
(cherry picked from commit 271f8e4b70e4acf2db96f6fe6317fda327fa5f2e)

12 years agoocaml: Compile OCaml bindings and tests with -warn-error.
Richard W.M. Jones [Wed, 9 Nov 2011 17:53:58 +0000 (17:53 +0000)]
ocaml: Compile OCaml bindings and tests with -warn-error.
(cherry picked from commit 145ed04e41a3fcd3be87c11cae0085f4551f1da8)

12 years agoocaml: Catch EVENT_ENTER case in test.
Richard W.M. Jones [Wed, 9 Nov 2011 17:50:37 +0000 (17:50 +0000)]
ocaml: Catch EVENT_ENTER case in test.

For some reason we are not compiling the tests with -warn-error so
this problem was not noticed before.

This fixes commit 9420eaf44ec4067c3740b91b0be0fede08a0c515.
(cherry picked from commit 22c72b911e65b93cfd049f42e6bd1b9ad7d55299)

12 years agoUpdate FSF address.
Matthew Booth [Tue, 8 Nov 2011 14:27:49 +0000 (14:27 +0000)]
Update FSF address.
(cherry picked from commit 04ea1375c55aa67df4e7fc61dbb534111767f3b6)

12 years agodaemon: Use a private copy of /etc/lvm so we don't modify the real config.
Richard W.M. Jones [Fri, 4 Nov 2011 15:55:13 +0000 (15:55 +0000)]
daemon: Use a private copy of /etc/lvm so we don't modify the real config.

In the libguestfs live case we need to be careful not to modify the
real /etc/lvm/lvm.conf file (when setting the filter rule).

When the daemon starts, make a complete copy of /etc/lvm in a
temporary directory, and adjust LVM_SYSTEM_DIR to point to the copy.
All changes are made in the temporary copy.
(cherry picked from commit 9c299b64bb24cefafa582fe425bb65b78373d205)

12 years agodaemon: Don't use files with fixed names in /tmp (thanks Steve Kemp).
Richard W.M. Jones [Fri, 4 Nov 2011 15:30:12 +0000 (15:30 +0000)]
daemon: Don't use files with fixed names in /tmp (thanks Steve Kemp).

Although this doesn't matter for the ordinary (appliance) case, it
matters for the libguestfs live case.  In that case it could cause the
guest to be exploited by a tmp/symlink attack.
(cherry picked from commit 6011b1f803ba7308c6a94b9bf6b7212cfccb9f42)

12 years agovirt-sysprep: Don't use xmlstarlet.
Richard W.M. Jones [Thu, 3 Nov 2011 13:09:54 +0000 (13:09 +0000)]
virt-sysprep: Don't use xmlstarlet.

Use virt-inspector --xpath option instead.
(cherry picked from commit 22998927f91f123e7c35d3ebf49e5744f3d7eafe)

12 years agoAdd virt-inspector --xpath to run XPath queries directly.
Richard W.M. Jones [Thu, 3 Nov 2011 13:06:25 +0000 (13:06 +0000)]
Add virt-inspector --xpath to run XPath queries directly.

xmlstarlet is good, but not available in Red Hat Enterprise Linux.

Build a simple but sane XPath query parser into virt-inspector
directly so that we don't need any external tools.
(cherry picked from commit d1ee71782ace98a11c5aabaf1f9fd5f601e08367)

12 years agoresize: Remove requirement for ocaml Pcre library.
Richard W.M. Jones [Thu, 3 Nov 2011 10:45:58 +0000 (10:45 +0000)]
resize: Remove requirement for ocaml Pcre library.

This library is not available in RHEL 6, and in any case removing the
dependency is a simple change.
(cherry picked from commit ffbafadcb8dfebcaba529cb8d7e2da52dd032d8a)

12 years agoresize: Add tests for some Utils functions.
Richard W.M. Jones [Thu, 3 Nov 2011 10:32:02 +0000 (10:32 +0000)]
resize: Add tests for some Utils functions.
(cherry picked from commit 63898268101e5ec91c8dac46651dbee5976272ce)

12 years agopython: Use sys.version_info[0] instead of sys.version_info.major.
Richard W.M. Jones [Thu, 3 Nov 2011 09:48:45 +0000 (09:48 +0000)]
python: Use sys.version_info[0] instead of sys.version_info.major.

The major/minor fields only exist in Python >= 2.7.  This works for at
least Python 2.5 and 2.6.

Thanks to Hilko Bengen.

This updates commit 646142f5136da9cfe2b908703a822c53350f70e9.
(cherry picked from commit 31e5539a14f78d8815d0d930e91023a65b5395e7)

12 years agopython: Fixes for Python 3 (RHBZ#750889).
Richard W.M. Jones [Wed, 2 Nov 2011 19:43:53 +0000 (19:43 +0000)]
python: Fixes for Python 3 (RHBZ#750889).

These fixes allow libguestfs bindings to work with Python 3 (tested
with Python 3.2)

You can select which Python you compile against by doing:

  PYTHON=python ./configure && make && make check

or:

  PYTHON=python3 ./configure && make && make check
(cherry picked from commit 2116f79cbcd4605b4997931285f14dde1f72a992)

12 years agopython: Pass $PYTHON environment variable to tests.
Richard W.M. Jones [Wed, 2 Nov 2011 19:42:29 +0000 (19:42 +0000)]
python: Pass $PYTHON environment variable to tests.

If the user set PYTHON when configuring, this variable is not passed
through to the tests, so it is possible the tests will fail because
they are testing the wrong version of python.  By passing $PYTHON
through to the tests we ensure that we test against the same version
of python that we configured with.
(cherry picked from commit e2249b7ce1dd0a2f8f110e0e47aca397185a6373)

12 years agopython: Include <config.h>.
Richard W.M. Jones [Wed, 2 Nov 2011 18:19:15 +0000 (18:19 +0000)]
python: Include <config.h>.

Ooops ...
(cherry picked from commit 25454b83082a4cfed4f1664d2f9cdfcb222ba7c2)

12 years agopython: Correctly check for Python major/minor.
Richard W.M. Jones [Wed, 2 Nov 2011 18:18:14 +0000 (18:18 +0000)]
python: Correctly check for Python major/minor.

The manual for sys.version warns that you should not parse the string,
which we were doing.  It would have failed on python "2.10" or
similar.

Do it correctly using the sys.version_info struct instead.
(cherry picked from commit 646142f5136da9cfe2b908703a822c53350f70e9)

12 years agofish: Use size_t instead of int when counting strings.
Richard W.M. Jones [Tue, 1 Nov 2011 09:47:01 +0000 (09:47 +0000)]
fish: Use size_t instead of int when counting strings.
(cherry picked from commit b4da051d54a1597c7d8db8880d21a52265a6172e)

12 years agoFix debug help error message.
Matthew Booth [Mon, 31 Oct 2011 16:47:50 +0000 (16:47 +0000)]
Fix debug help error message.

When given an invalid debug command, libguestfs responds with the
error message:

  libguestfs: error: debug: use 'debug help' to list the supported commands

However this command does not work, as debug requires two
arguments. This change updates the message to prompt the user to use
'debug help 0'.
(cherry picked from commit 4e3a1205ebfec1a5cbc3062d6f73a684090e80b5)

12 years agoappliance: Add 'mdadm' package.
Richard W.M. Jones [Mon, 31 Oct 2011 16:44:55 +0000 (16:44 +0000)]
appliance: Add 'mdadm' package.
(cherry picked from commit 6f84ef6768e9c625d67f7eb015277b0ec1b2c2af)

12 years agoVersion 1.14.1. 1.14.1
Richard W.M. Jones [Mon, 31 Oct 2011 11:22:18 +0000 (11:22 +0000)]
Version 1.14.1.

12 years agoperl: Add %guestfs_introspection hash with introspection information.
Richard W.M. Jones [Thu, 27 Oct 2011 16:40:31 +0000 (17:40 +0100)]
perl: Add %guestfs_introspection hash with introspection information.

Because this is a useful introspection API, it is a candidate for
being backported into older stable branches.
(cherry picked from commit 365885dab2ae6dcdf0b2c45d0adeb803ade03f63)

12 years agoVersion 1.14.0. 1.14.0
Richard W.M. Jones [Thu, 27 Oct 2011 15:05:49 +0000 (16:05 +0100)]
Version 1.14.0.

12 years agoPull latest translations from Transifex.
Richard W.M. Jones [Thu, 27 Oct 2011 13:26:46 +0000 (14:26 +0100)]
Pull latest translations from Transifex.

12 years agogenerator: Remove DangerWillRobinson.
Richard W.M. Jones [Thu, 27 Oct 2011 12:45:22 +0000 (13:45 +0100)]
generator: Remove DangerWillRobinson.

This warning was applied unevenly.  Potentially any command can be
dangerous or safe, so it was a needless warning.

12 years agofuse: Skip guestmount test if setfacl is not installed.
Richard W.M. Jones [Thu, 27 Oct 2011 12:44:02 +0000 (13:44 +0100)]
fuse: Skip guestmount test if setfacl is not installed.

This dependency is optional, don't fail the test if it's not
installed.

12 years agovirt-sysprep: Skip test if xmlstarlet is not installed.
Richard W.M. Jones [Thu, 27 Oct 2011 12:36:15 +0000 (13:36 +0100)]
virt-sysprep: Skip test if xmlstarlet is not installed.

This dependency is optional, so don't fail the test if it
is not installed.

12 years agovirt-alignment-scan: Add additional data for 4K sector drives
Richard W.M. Jones [Thu, 27 Oct 2011 12:30:22 +0000 (13:30 +0100)]
virt-alignment-scan: Add additional data for 4K sector drives
(thanks Matt Booth).

12 years agotest-virt-sparsify: Relax size_after constraint (for Debian).
Richard W.M. Jones [Thu, 27 Oct 2011 11:28:47 +0000 (12:28 +0100)]
test-virt-sparsify: Relax size_after constraint (for Debian).

size_after on Debian was 10136K.  The host filesystem was ext3 (vs
ext4 for Fedora where we did the original testing).  Probably indirect
blocks (vs more efficient extents on ext4) causes the difference,
although I did not look at it in detail.

12 years agoUpdate RELEASE-NOTES for 1.14 release.
Richard W.M. Jones [Thu, 27 Oct 2011 09:55:06 +0000 (10:55 +0100)]
Update RELEASE-NOTES for 1.14 release.