10 years agoIn guestfs(3), unmount "/" directory in the example.
Richard Jones [Sat, 17 Apr 2010 15:24:03 +0000 (16:24 +0100)]
In guestfs(3), unmount "/" directory in the example.

10 years agoAdd compilation/linking example to guestfs(3) man page.
Richard Jones [Sat, 17 Apr 2010 15:22:53 +0000 (16:22 +0100)]
Add compilation/linking example to guestfs(3) man page.

10 years agogenerator: Use shortname in check_state() call.
Richard Jones [Sat, 17 Apr 2010 14:59:41 +0000 (15:59 +0100)]
generator: Use shortname in check_state() call.

Saves a tiny bit of space in the library.

10 years agoBuild top-level directories in a more logical order.
Richard Jones [Sat, 17 Apr 2010 14:46:08 +0000 (15:46 +0100)]
Build top-level directories in a more logical order.

10 years agoRerun generator if images/test.iso does not exist or has been updated.
Richard Jones [Sat, 17 Apr 2010 14:41:16 +0000 (15:41 +0100)]
Rerun generator if images/test.iso does not exist or has been updated.

The MD5 hash of this file is embedded in the output of the

10 years agoFix upload losing synchronization if root not mounted (RHBZ#576879).
Richard Jones [Sat, 17 Apr 2010 13:25:55 +0000 (14:25 +0100)]
Fix upload losing synchronization if root not mounted (RHBZ#576879).

Modify the generator so that it can correctly handle early
cancellation for Pathname|Device|.. parameters.  This fixes
the upload command, but consequently we need to fix the
parameters for tar_in and t?z_in commands.  This should also
mean that 'win:' can now be used as the second argument of
tar_in and t?z_in commands in guestfish, whereas previously
this wouldn't have worked.

Adds a regression test for the original problem.

10 years agogenerator: Fix typo in a comment.
Richard Jones [Sat, 17 Apr 2010 13:14:30 +0000 (14:14 +0100)]
generator: Fix typo in a comment.

10 years agoImproved checking, documentation of modes (RHBZ#582901, RHBZ#582929).
Richard Jones [Sat, 17 Apr 2010 12:33:14 +0000 (13:33 +0100)]
Improved checking, documentation of modes (RHBZ#582901, RHBZ#582929).

chmod: Disallow negative mode, document mode affected by umask.

mkdir-mode: Disallow negative mode, document that filesystems
may interpret the mode in different ways.

mknod: Disallow negative mode, document mode affected by umask.

umask: Check the range of umask mask value carefully.

10 years agofish: Autocomplete 'sparse' command (RHBZ#582899).
Richard Jones [Sat, 17 Apr 2010 12:11:20 +0000 (13:11 +0100)]
fish: Autocomplete 'sparse' command (RHBZ#582899).

I also rechecked the list of built-in commands against
the actual commands to make sure no others were omitted.

10 years agoNew API: get-umask, returns the current umask (RHBZ#582891).
Richard Jones [Sat, 17 Apr 2010 12:07:56 +0000 (13:07 +0100)]
New API: get-umask, returns the current umask (RHBZ#582891).

10 years agoAdd a build test for the 'umask' command.
Richard Jones [Sat, 17 Apr 2010 11:38:18 +0000 (12:38 +0100)]
Add a build test for the 'umask' command.

10 years agofish: Print output from some commands in octal/hex as approp. (RHBZ#583242).
Richard Jones [Sat, 17 Apr 2010 11:33:31 +0000 (12:33 +0100)]
fish: Print output from some commands in octal/hex as approp. (RHBZ#583242).

10 years agoDocumentation: lvcreate should say 'logical volume' (RHBZ#582953)
Richard Jones [Sat, 17 Apr 2010 11:13:23 +0000 (12:13 +0100)]
Documentation: lvcreate should say 'logical volume' (RHBZ#582953)

10 years agoUpdate Spanish translations (RHBZ#582252).
Daniel Cabrera [Wed, 14 Apr 2010 13:59:30 +0000 (14:59 +0100)]
Update Spanish translations (RHBZ#582252).

10 years agoFix build error in fuse/guestmount.c.
Matthew Booth [Wed, 14 Apr 2010 10:13:04 +0000 (11:13 +0100)]
Fix build error in fuse/guestmount.c.

guestmount.c: In function 'main':
guestmount.c:899: error: implicit declaration of function 'setlocale'

guestmount.c wasn't including locale.h.

10 years agoNew API: Add aug-clear call for clearing an Augeas node.
Richard Jones [Tue, 13 Apr 2010 17:42:27 +0000 (18:42 +0100)]
New API: Add aug-clear call for clearing an Augeas node.

10 years agofish: Allow '-' prefix on command line to override exit on error (RHBZ#578407).
Richard Jones [Tue, 13 Apr 2010 21:06:43 +0000 (22:06 +0100)]
fish: Allow '-' prefix on command line to override exit on error (RHBZ#578407).

Allow -cmd on the command line to mean that normal exit on error
behaviour is overridden, ie. we will not exit.

This allows you to do:

  guestfish -- command : -command : command

with the second command allowing errors.  (Note that '--' is required
to stop getopt parsing -command as an option).

Also this fixes the remote case which is what the original
bug report was about.

10 years agofish: Update documentation: Add another pipe example.
Richard Jones [Tue, 13 Apr 2010 20:26:14 +0000 (21:26 +0100)]
fish: Update documentation: Add another pipe example.

10 years agofish: Update documentation: Using 'lcd' command to change local directory.
Richard Jones [Tue, 13 Apr 2010 20:25:50 +0000 (21:25 +0100)]
fish: Update documentation: Using 'lcd' command to change local directory.

10 years agoUpdate PO files. 1.3.3
Richard Jones [Mon, 12 Apr 2010 18:52:03 +0000 (19:52 +0100)]
Update PO files.

10 years agoPrepare for version 1.3.3.
Richard Jones [Mon, 12 Apr 2010 18:32:38 +0000 (19:32 +0100)]
Prepare for version 1.3.3.

10 years agoresize: Add --LV-expand option for expanding Linux LVs.
Richard Jones [Mon, 12 Apr 2010 15:34:36 +0000 (16:34 +0100)]
resize: Add --LV-expand option for expanding Linux LVs.

10 years agoNew API: lvresize-free to extend LVs into percentage of free space.
Richard Jones [Mon, 12 Apr 2010 15:33:46 +0000 (16:33 +0100)]
New API: lvresize-free to extend LVs into percentage of free space.

10 years agoFix time and timezone to be correct within the appliance.
Richard Jones [Mon, 12 Apr 2010 15:34:57 +0000 (16:34 +0100)]
Fix time and timezone to be correct within the appliance.

10 years agoresize: Fix missing newline from end of print.
Richard Jones [Mon, 12 Apr 2010 17:54:58 +0000 (18:54 +0100)]
resize: Fix missing newline from end of print.

10 years agoresize: Fix regular expression to exactly match ^ext[234]$
Richard Jones [Mon, 12 Apr 2010 15:32:55 +0000 (16:32 +0100)]
resize: Fix regular expression to exactly match ^ext[234]$

10 years agovirt-resize: Mention alternate tools like gparted in the documentation.
Richard Jones [Mon, 12 Apr 2010 11:17:08 +0000 (12:17 +0100)]
virt-resize: Mention alternate tools like gparted in the documentation.

10 years agoUpdated Spanish translation (RHBZ#581501).
Daniel Cabrera [Mon, 12 Apr 2010 15:31:43 +0000 (16:31 +0100)]
Updated Spanish translation (RHBZ#581501).

10 years agoDocumentation updates.
Richard Jones [Sun, 11 Apr 2010 16:02:18 +0000 (17:02 +0100)]
Documentation updates.

Fix copyright years.
Fix URLs to point to new PRC site.
Make sure guestfish(1) and guestfs(3) manpages reference the
current list of tools.

10 years agoVersion 1.3.2 1.3.2
Richard Jones [Sat, 10 Apr 2010 20:54:04 +0000 (21:54 +0100)]
Version 1.3.2

10 years agoNew API: checksum-device for checksumming devices.
Richard Jones [Sat, 10 Apr 2010 20:23:27 +0000 (21:23 +0100)]
New API: checksum-device for checksumming devices.

Analogous to the usual 'checksum' call.

10 years agovirt-resize: Enhance virt-resize so it can expand partition content.
Richard Jones [Sat, 10 Apr 2010 12:38:26 +0000 (13:38 +0100)]
virt-resize: Enhance virt-resize so it can expand partition content.

Enhance virt-resize so it can expand "first level" partition
content, including ext/2/3/4/ntfs filesystems and PVs.

Also extensively update the documentation.

This has been tested on a variety of Linux and Windows guests.

10 years agovirt-list-partitions: Add -t / --total option.
Richard Jones [Sat, 10 Apr 2010 12:21:33 +0000 (13:21 +0100)]
virt-list-partitions: Add -t / --total option.

This option lists out block devices separately:

 $ virt-list-partitions -lht /tmp/WindowsResized.img
 /dev/sda1 ntfs 100.0M
 /dev/sda2 ntfs 11.9G
 /dev/sda device 12.0G

10 years agoBugfixes for virt-resize.
Richard Jones [Sat, 10 Apr 2010 12:35:31 +0000 (13:35 +0100)]
Bugfixes for virt-resize.

 - copy more than 64 boot loader sectors across, since real boot
   loaders (eg. for Windows) can be much larger than this
 - copy bootable flag and ID byte to new partitions
 - start the first partition on the new disk at the same sector
   offset as on the old disk
 - sync the disks before existing

10 years agoNew partition APIs: part_del, part_get_bootable, part_get/set_mbr_id
Richard Jones [Sat, 10 Apr 2010 12:19:43 +0000 (13:19 +0100)]
New partition APIs: part_del, part_get_bootable, part_get/set_mbr_id

These APIs flesh out further the partitioning API.

10 years agodaemon: More reliable parsing of the output from 'parted print'.
Richard Jones [Sat, 10 Apr 2010 12:17:50 +0000 (13:17 +0100)]
daemon: More reliable parsing of the output from 'parted print'.

Previously we used strtok.  However this has the problem that
strtok considers multiple delimiter characters to be like a single
delimiter, eg. "1:::2" would be parsed the same as "1:2".  In
other words, the previous code would skip over or fail if there
are empty fields.

10 years agodaemon: Make the RUN_PARTED macro take an error statement.
Richard Jones [Sat, 10 Apr 2010 12:16:19 +0000 (13:16 +0100)]
daemon: Make the RUN_PARTED macro take an error statement.

This allows us to make the RUN_PARTED macro do something else
along the error path, other than just returning -1.

10 years agoDocumentation: Clarify documentation on the bootable flag.
Richard Jones [Sat, 10 Apr 2010 12:14:54 +0000 (13:14 +0100)]
Documentation: Clarify documentation on the bootable flag.

10 years agoNew API: vgscan
Richard Jones [Sat, 10 Apr 2010 12:14:12 +0000 (13:14 +0100)]
New API: vgscan

Implement vgscan to allow for a full rescan of all LVM
PVs, VGs and LVs.

10 years agoNew API: ntfsresize.
Richard Jones [Sat, 10 Apr 2010 12:13:07 +0000 (13:13 +0100)]
New API: ntfsresize.

This implements the ntfsresize operation, using the external
program from ntfsprogs.

10 years agovirt-make-fs: Use Sys::Guestfs::Lib::feature_available helper function.
Richard Jones [Sat, 10 Apr 2010 12:20:52 +0000 (13:20 +0100)]
virt-make-fs: Use Sys::Guestfs::Lib::feature_available helper function.

10 years agoAllow aug-ls to take Augeas variable as argument (RHBZ#580016).
Richard Jones [Fri, 9 Apr 2010 08:40:59 +0000 (09:40 +0100)]
Allow aug-ls to take Augeas variable as argument (RHBZ#580016).

10 years agoRemove warning "No grub default" (RHBZ#580650).
Richard Jones [Thu, 8 Apr 2010 18:33:57 +0000 (19:33 +0100)]
Remove warning "No grub default" (RHBZ#580650).

10 years agoIf qemu dies during launch in "null vmchannel" mode, don't hang (RHBZ#579155).
Richard Jones [Thu, 8 Apr 2010 18:07:45 +0000 (19:07 +0100)]
If qemu dies during launch in "null vmchannel" mode, don't hang (RHBZ#579155).

Detect if qemu dies during launch by wait(2)-ing for it, and
then getting EOF on the qemu pipe.  This was broken in null
vmchannel mode, causing a hang.

10 years agoDon't kill self accidentally.
Richard Jones [Thu, 8 Apr 2010 18:06:00 +0000 (19:06 +0100)]
Don't kill self accidentally.

Always check that pid > 0 before calling kill (pid, 9).  The
issue was that sometimes pid == 0, and this ends up killing

10 years agoFix for "warning: unexpected connection from UID ..."
Richard Jones [Thu, 8 Apr 2010 17:53:40 +0000 (18:53 +0100)]
Fix for "warning: unexpected connection from UID ..."

This warning is currently a fatal error.  The code attempts
to retry the accept call, but because we don't reset sock = -1
the retry doesn't happen and it dies anyway.

Set sock = -1 so the retry attempt can happen.

10 years agoNew API calls to upload/download txz files (RHBZ#580556).
Richard Jones [Thu, 8 Apr 2010 15:07:32 +0000 (16:07 +0100)]
New API calls to upload/download txz files (RHBZ#580556).

10 years agoconfigure: Default to using Fedora 12 repo (was Fedora 11).
Richard Jones [Thu, 8 Apr 2010 14:49:14 +0000 (15:49 +0100)]
configure: Default to using Fedora 12 repo (was Fedora 11).

Fedora 11 is almost EOL at this point.

10 years agoVersion 1.3.1. 1.3.1
Richard Jones [Thu, 8 Apr 2010 14:17:07 +0000 (15:17 +0100)]
Version 1.3.1.

10 years agoNew tool: virt-make-fs for creating filesystems on devices.
Richard Jones [Wed, 7 Apr 2010 19:30:46 +0000 (20:30 +0100)]
New tool: virt-make-fs for creating filesystems on devices.

10 years agoCode cleanups related to RHBZ#580246.
Richard Jones [Wed, 7 Apr 2010 20:04:01 +0000 (21:04 +0100)]
Code cleanups related to RHBZ#580246.

This includes various code cleanups:

 (a) A regression test for RHBZ#580246.

 (b) Use write instead of fwrite to write out the tar file.  This is
     just because the error handling of write seems to be better
     specified and easier to use.

 (c) Use size_t instead of int for length.

 (d) Clearer debug messages when in verbose mode.

10 years agoFix tar-in command hangs when running out of disk space (RHBZ#580246).
Richard Jones [Thu, 8 Apr 2010 07:48:38 +0000 (08:48 +0100)]
Fix tar-in command hangs when running out of disk space (RHBZ#580246).

The problem was this sequence of events:

 (1) File transfer goes through OK.

 (2) pclose returns failure (because 'tar' subprocess failed)

 (3) We try to cancel the transfer by calling cancel_receive.

Step (3) fails because the transfer (as far as the library is
concerned) has succeeded, so causing a hang.

The more fundamental reason why we see steps (1) and (2) is that
'tar' does NOT fail immediately if there is a write error.  Instead
it continues reading and discarding the input until the end of the
input before giving "Error exit delayed from previous errors".
IMHO this is a bug with tar, since an ENOSPC write error should
be fatal for tar.

10 years agofish: Print extended help when the user types an unknown command first.
Richard Jones [Tue, 6 Apr 2010 22:54:08 +0000 (23:54 +0100)]
fish: Print extended help when the user types an unknown command first.

$ guestfish /tmp/disk.img
/tmp/disk.img: unknown command
Did you mean to open a disk image?  guestfish -a disk.img
For a list of commands:             guestfish -h
For complete documentation:         man guestfish

10 years agoCheck error returns from posix_fallocate (RHBZ#579664).
Richard Jones [Tue, 6 Apr 2010 10:03:03 +0000 (11:03 +0100)]
Check error returns from posix_fallocate (RHBZ#579664).

posix_fallocate has a non-standard way to return error indications.
Thus all our calls to posix_fallocate were effectively unchecked.  For

  $ guestfish alloc test.img 1P
  $ echo $?
  $ ll test.img
  -rw-rw-r--. 1 rjones rjones 0 2010-04-06 11:02 test.img
  $ rm test.img

With this change, errors are detected and reported properly:

  $ ./fish/guestfish alloc test.img 1P
  fallocate: File too large

This is a fix for:

10 years agoSigned/unsigned warning on 64 bit.
Richard Jones [Wed, 31 Mar 2010 12:19:34 +0000 (13:19 +0100)]
Signed/unsigned warning on 64 bit.

10 years agoNew API: guestfs_zero_device to zero whole devices.
Richard Jones [Wed, 31 Mar 2010 12:19:34 +0000 (13:19 +0100)]
New API: guestfs_zero_device to zero whole devices.

10 years agoPrettier POD CSS.
Richard W.M. Jones [Tue, 30 Mar 2010 20:07:27 +0000 (21:07 +0100)]
Prettier POD CSS.

10 years agoUpdate PO files. 1.0.89 1.2.0 1.3.0
Richard Jones [Tue, 30 Mar 2010 16:49:44 +0000 (17:49 +0100)]
Update PO files.

10 years agochmod +x virt-resize binary.
Richard Jones [Tue, 30 Mar 2010 16:49:24 +0000 (17:49 +0100)]
chmod +x virt-resize binary.

10 years agoFix EXTRA_DIST rule.
Richard Jones [Tue, 30 Mar 2010 16:49:06 +0000 (17:49 +0100)]
Fix EXTRA_DIST rule.

10 years agoPrepare for 1.0.89.
Richard Jones [Tue, 30 Mar 2010 16:05:56 +0000 (17:05 +0100)]
Prepare for 1.0.89.

10 years agoImproved version of virt-win-reg, supporting exporting and merging.
Richard Jones [Fri, 26 Mar 2010 17:14:04 +0000 (17:14 +0000)]
Improved version of virt-win-reg, supporting exporting and merging.

10 years agovirt-df: Match output with native (coreutils) 'df' command (RHBZ#578123).
Richard Jones [Tue, 30 Mar 2010 15:14:09 +0000 (16:14 +0100)]
virt-df: Match output with native (coreutils) 'df' command (RHBZ#578123).

This commit fixes the 'Use%' field in the output so it matches what
coreutils' 'df' command would print.

Firstly we change the calculation to use the space available to root,
not the space available to non-root.  This means it matches what 'df'
when run as root in the guest would show.

Secondly we display this rounded up to the next whole percent (ie. using
ceil), which is also what 'df' does.

Thirdly we change the regression test so it tests this.

Note that even with these changes you are not guaranteed to get precisely
the same figures from inside and outside the guest, as it depends on
how quiescent the guest is and how recently the superblock was synced.

Thanks: Rita Wu

10 years agotools: Add basic tests for the virt-* tools.
Richard Jones [Tue, 30 Mar 2010 13:18:44 +0000 (14:18 +0100)]
tools: Add basic tests for the virt-* tools.

10 years agotools: Sectional header for manpages in
Richard Jones [Tue, 30 Mar 2010 12:45:16 +0000 (13:45 +0100)]
tools: Sectional header for manpages in

10 years agotools: Rearrange list of tools in
Richard Jones [Tue, 30 Mar 2010 12:44:29 +0000 (13:44 +0100)]
tools: Rearrange list of tools in

10 years agodaemon: Set TERM=dumb inside the daemon.
Richard Jones [Tue, 30 Mar 2010 12:34:16 +0000 (13:34 +0100)]
daemon: Set TERM=dumb inside the daemon.

Since commit 977edb3185fe8f we have been passing TERM from the
library into the appliance (for the benefit of virt-rescue).
However this changes the output of parted, which I would argue
is a bug in parted:

 TERM=xterm /sbin/parted -m -- /dev/sda unit b print 2>&1 | hexdump -C
 00000000  1b 5b 3f 31 30 33 34 68  42 59 54 3b 0a 2f 64 65  |.[?1034hBYT;./de|

Notice the escape-sequence junk before the official "BYT;"

By setting TERM=dumb we avoid this.

10 years agoFix the error message when reply body is too large (RHBZ#509597).
Richard Jones [Sat, 27 Mar 2010 11:02:03 +0000 (11:02 +0000)]
Fix the error message when reply body is too large (RHBZ#509597).

10 years agotests: Move alarm(2) calls to the correct place in the tests.
Richard Jones [Sat, 27 Mar 2010 10:49:24 +0000 (10:49 +0000)]
tests: Move alarm(2) calls to the correct place in the tests.

This is a re-fix for RHBZ#505329.

10 years agoPrepare for 1.0.88. 1.0.88
Richard Jones [Fri, 26 Mar 2010 21:08:43 +0000 (21:08 +0000)]
Prepare for 1.0.88.

10 years agorescue: Pass $TERM from library into the virt-rescue appliance.
Richard Jones [Fri, 26 Mar 2010 20:08:45 +0000 (20:08 +0000)]
rescue: Pass $TERM from library into the virt-rescue appliance.

We set it on the kernel command line, then get it out from
there when the rescue appliance boots.

10 years agorescue: Sync disk on exit, and improve messaging.
Richard Jones [Fri, 26 Mar 2010 20:02:10 +0000 (20:02 +0000)]
rescue: Sync disk on exit, and improve messaging.

10 years agoConst-correctness fix.
Jim Meyering [Fri, 26 Mar 2010 20:01:45 +0000 (20:01 +0000)]
Const-correctness fix.

10 years agoappliance: Set $PATH instead of hard-coding paths to binaries everywhere.
Richard Jones [Fri, 26 Mar 2010 10:10:16 +0000 (10:10 +0000)]
appliance: Set $PATH instead of hard-coding paths to binaries everywhere.

Change the appliance so PATH includes common directories.  Thus
we don't need to hard-code paths to binaries (eg. "/sbin/fdisk")

10 years agoperl: use newSVpvn for variable length strings.
Richard Jones [Thu, 25 Mar 2010 19:44:22 +0000 (19:44 +0000)]
perl: use newSVpvn for variable length strings.

Previously we used newSVpv (str, len), but if len == 0 then
this means Perl tries to calculate the string length using
strlen(3).  This is not desirable when we know the length, in
which case we should use newSVpvn instead.

10 years agoUpdate PO files.
Richard Jones [Thu, 25 Mar 2010 16:03:42 +0000 (16:03 +0000)]
Update PO files.

10 years agoUpdate Spanish translation of libguestfs (RHBZ#576876).
Daniel Cabrera [Thu, 25 Mar 2010 16:03:01 +0000 (16:03 +0000)]
Update Spanish translation of libguestfs (RHBZ#576876).

10 years agoFix lvresize test on RHEL 5, by fixing guestfs_e2fsck_l.
Richard Jones [Wed, 24 Mar 2010 23:28:14 +0000 (23:28 +0000)]
Fix lvresize test on RHEL 5, by fixing guestfs_e2fsck_l.

The problem is that mkfs was making an ext2 filesystem,
which later we were checking with e4fsck.  e4fsck corrects
an "error" on the filesystem:
  /dev/VG/LV: Adding dirhash hint to filesystem.
e4fsck returns 1 (errors corrected) which we were interpreting
as an error return.

10 years agoUse ext4 dev tools on RHEL 5 (RHBZ#576688).
Richard Jones [Wed, 24 Mar 2010 22:02:34 +0000 (22:02 +0000)]
Use ext4 dev tools on RHEL 5 (RHBZ#576688).

10 years agoAdd support for minix filesystem (RHBZ#576689).
Richard Jones [Wed, 24 Mar 2010 21:21:23 +0000 (21:21 +0000)]
Add support for minix filesystem (RHBZ#576689).

10 years agoVersion 1.0.87. 1.0.87
Richard Jones [Tue, 23 Mar 2010 22:10:45 +0000 (22:10 +0000)]
Version 1.0.87.

10 years agoNew tools: virt-resize and virt-list-partitions.
Richard Jones [Mon, 22 Mar 2010 18:38:31 +0000 (18:38 +0000)]
New tools: virt-resize and virt-list-partitions.

Virt-resize is the main contribution here, a program which can
be used to expand and shrink partitions in disk images.

Virt-list-partitions is used as an ancillary tool for planning
resize operations.

10 years agoNew API: guestfs_copy_size to copy a fixed number of bytes.
Richard Jones [Mon, 22 Mar 2010 18:36:16 +0000 (18:36 +0000)]
New API: guestfs_copy_size to copy a fixed number of bytes.

This is similar to 'guestfs_dd', but it copies just a fixed
number of bytes from the source to the destination.  It's an
error if the source is too short or if the destination is too

10 years agoChange some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).
Richard W.M. Jones [Fri, 19 Mar 2010 17:21:05 +0000 (17:21 +0000)]
Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).

10 years agoMac OS X: Fix configure-time tests for Ruby.
Richard Jones [Mon, 22 Mar 2010 10:30:25 +0000 (10:30 +0000)]
Mac OS X: Fix configure-time tests for Ruby.

For ARCHFLAGS change, see:

We also add a test for the <guestfs.h> header and include
that header when testing the library.

10 years agoguestfs.h: Include <stdint.h>.
Richard Jones [Mon, 22 Mar 2010 10:29:18 +0000 (10:29 +0000)]
guestfs.h: Include <stdint.h>.

This allows programs to work if they just
  #include <guestfs.h>
and no other headers.  It's not useful in the general
case, but fixes some configure-time tests, particularly
the one for Ruby on OS X.

10 years agoocaml examples: Fix linking line so it uses local library.
Richard Jones [Mon, 22 Mar 2010 10:05:49 +0000 (10:05 +0000)]
ocaml examples: Fix linking line so it uses local library.

10 years agoMac OS X: Disable null vmchannel implementation.
Richard Jones [Sun, 21 Mar 2010 21:47:39 +0000 (21:47 +0000)]
Mac OS X: Disable null vmchannel implementation.

As far as I can tell, Darwin has no way to check the peer euid
of a _loopback_ TCP socket.  This is required for the "null vmchannel"
implementation to work securely.

Therefore disable this - Darwin will use one of the other supported
vmchannel implementations instead.

10 years agoMac OS X: 'xdr_uint32_t' is 'xdr_u_int32_t'
Richard Jones [Sun, 21 Mar 2010 20:41:41 +0000 (20:41 +0000)]
Mac OS X: 'xdr_uint32_t' is 'xdr_u_int32_t'

10 years agoMac OS X: For PATH_MAX, include <limits.h>
Richard Jones [Sun, 21 Mar 2010 19:45:50 +0000 (19:45 +0000)]
Mac OS X: For PATH_MAX, include <limits.h>

10 years agoMac OS X: setlocale function requires <locale.h> header file.
Richard Jones [Sun, 21 Mar 2010 19:30:25 +0000 (19:30 +0000)]
Mac OS X: setlocale function requires <locale.h> header file.

10 years agoMac OS X: implement readline functions.
Richard Jones [Sun, 21 Mar 2010 19:15:40 +0000 (19:15 +0000)]
Mac OS X: implement readline functions.

OS X has an older version of readline with some differences
in the names of functions.

10 years agoMac OS X: provide alternate implementation of posix_fallocate.
Richard Jones [Sun, 21 Mar 2010 19:13:43 +0000 (19:13 +0000)]
Mac OS X: provide alternate implementation of posix_fallocate.

10 years agoMac OS X: include <rpc/types.h> before <rpc/xdr.h>
Richard Jones [Sun, 21 Mar 2010 17:49:49 +0000 (17:49 +0000)]
Mac OS X: include <rpc/types.h> before <rpc/xdr.h>

In PortableXDR this is not included automatically so we
have to include it explicitly to get definitions for the
XDR types.

10 years agoMac OS X: include <string.h> in guestfs-actions.c
Richard Jones [Sun, 21 Mar 2010 17:49:09 +0000 (17:49 +0000)]
Mac OS X: include <string.h> in guestfs-actions.c

This is required because guestfs-actions.c uses 'memset'.

10 years agoMac OS X: Fix HAVE_GNU_CALLOC so it works when __GLIBC__ is not defined.
Richard Jones [Sun, 21 Mar 2010 17:16:04 +0000 (17:16 +0000)]
Mac OS X: Fix HAVE_GNU_CALLOC so it works when __GLIBC__ is not defined.

10 years agoMac OS X: strerror_r on Macs is not like GNU strerror_r.
Richard Jones [Sun, 21 Mar 2010 17:15:26 +0000 (17:15 +0000)]
Mac OS X: strerror_r on Macs is not like GNU strerror_r.

Really this should be turned into a configure-time test.
Perhaps one exists already?

10 years agoMac OS X: define MAX macro if not already defined.
Richard Jones [Sun, 21 Mar 2010 17:14:37 +0000 (17:14 +0000)]
Mac OS X: define MAX macro if not already defined.

10 years agoMac OS X: kill(2) requires <signal.h>
Richard Jones [Sun, 21 Mar 2010 17:14:15 +0000 (17:14 +0000)]
Mac OS X: kill(2) requires <signal.h>

10 years agogenerator: Small fix for GODI users.
Richard Jones [Sun, 21 Mar 2010 17:13:07 +0000 (17:13 +0000)]
generator: Small fix for GODI users.

GODI has an odd package layout, so the generator was unable to
find xml-light.  Add the GODI directory to the search path.