Richard Jones [Thu, 6 May 2010 20:36:24 +0000 (21:36 +0100)]
daemon: Fix for commands working on absolute symbolic links (RHBZ#579608).
The original idea (suggested by Al Viro) was to fork and chroot
into the sysroot and read the file from there. Because of the
separate process being chrooted, absolute links would be resolved
correctly. The slightly modified idea is to open the file in the
daemon process (but temporarily chrooted, so symlinks resolve
correctly), fork, and have the subprocess just be responsible for
copying the file. (Strictly speaking we don't need to fork, but
this implementation is simpler).
This commit just includes the changes needed to the command*()
functions in daemon/guestfsd.c and adds an absolute symlink to
the test ISO for testing it. Later commits will fix the broken
daemon commands themselves.
Richard Jones [Thu, 6 May 2010 19:32:09 +0000 (20:32 +0100)]
daemon: Change command to abort() on resource problems.
The comment in the code describes it thus:
/* Note: abort is used in a few places along the error paths early
* in this function. This is because (a) cleaning up correctly is
* very complex at these places and (b) abort is used when a
* resource problem is indicated which would be due to much more
* serious issues - eg. memory or file descriptor leaks. We
* wouldn't expect fork(2) or pipe(2) to fail in normal
* circumstances.
*/
Matthew Booth [Fri, 7 May 2010 13:58:32 +0000 (14:58 +0100)]
Warn instead of dying if grub refers to non-existent kernel
Richard Jones [Wed, 5 May 2010 15:10:37 +0000 (16:10 +0100)]
Update to latest gnulib.
Richard Jones [Tue, 4 May 2010 15:06:58 +0000 (16:06 +0100)]
Use link-local addresses between appliance and host (RHBZ#588763).
Richard Jones [Tue, 4 May 2010 14:06:09 +0000 (15:06 +0100)]
Change network configuration to use macros.
Change the network configuration so everything is set using
some macros at the top of src/guestfs.c.
Also, rename the macros used in the daemon so they are not the
same. It was a very long time since these sets of macros had to
match the ones defined in src/guestfs.c, despite what the comment
said.
Note that this commit should not change the semantics of the
program at all.
Daniel Cabrera [Tue, 4 May 2010 12:35:01 +0000 (13:35 +0100)]
Update Spanish translations (RHBZ#588733).
Richard Jones [Fri, 30 Apr 2010 22:12:34 +0000 (23:12 +0100)]
tests: In verbose mode, print dashes between each test.
Only affects tests when run with LIBGUESTFS_DEBUG=1. Lets you easily
see when each test starts and ends.
Richard Jones [Fri, 30 Apr 2010 17:27:37 +0000 (18:27 +0100)]
Version 1.3.9.
Richard Jones [Fri, 30 Apr 2010 12:56:11 +0000 (13:56 +0100)]
Document that guestfs_mount implies -o sync and performance problem (RHBZ#587582).
Richard Jones [Fri, 30 Apr 2010 11:27:00 +0000 (12:27 +0100)]
contrib: Add dependency diagram of libguestfs ecosystem.
Richard Jones [Fri, 30 Apr 2010 10:34:21 +0000 (11:34 +0100)]
contrib: Add header to README file.
Richard Jones [Fri, 30 Apr 2010 09:51:49 +0000 (10:51 +0100)]
lvresize: Use --force so it can make LVs smaller (RHBZ#587484).
This also adds a regression test for this bug.
Richard Jones [Fri, 30 Apr 2010 08:46:40 +0000 (09:46 +0100)]
tools: Fix documentation for CurrentControlSet (thanks Yuval Kashtan).
Richard Jones [Thu, 29 Apr 2010 12:55:52 +0000 (13:55 +0100)]
guestfs(3): Documentation on protocol gotchas.
Richard Jones [Tue, 27 Apr 2010 14:48:38 +0000 (15:48 +0100)]
Version 1.3.8.
Daniel Cabrera [Mon, 26 Apr 2010 14:57:45 +0000 (15:57 +0100)]
Update Spanish translation (RHBZ#585961).
Richard Jones [Sat, 24 Apr 2010 08:10:28 +0000 (09:10 +0100)]
fish: Add 'man' command which opens the manual.
Richard Jones [Sat, 24 Apr 2010 07:50:40 +0000 (08:50 +0100)]
docs: Routine refresh of the documentation for guestfs(3) and guestfish(1).
Richard Jones [Fri, 23 Apr 2010 13:43:13 +0000 (14:43 +0100)]
Version 1.3.7 - note: fixes a segfault in guestfish 1.3.6.
Richard Jones [Fri, 23 Apr 2010 13:29:56 +0000 (14:29 +0100)]
todo docs: Discuss shrinking filesystems and specifying sizes in guestfish.
Richard Jones [Fri, 23 Apr 2010 13:14:26 +0000 (14:14 +0100)]
New API: checksums-out for checksumming many files.
Useful API for verifying the integrity of virtual machines.
Richard Jones [Fri, 23 Apr 2010 12:43:05 +0000 (13:43 +0100)]
generator: Update docs for checksum to point to checksum-device.
Richard Jones [Fri, 23 Apr 2010 12:42:10 +0000 (13:42 +0100)]
daemon: Split out checksum type to program name mapping into function.
This shouldn't change the semantics of the program.
Richard Jones [Fri, 23 Apr 2010 13:13:42 +0000 (14:13 +0100)]
fish: Fix segfault in '-a' option.
This fixes a segfault in the guestfish -a option which you would
get when using guestfish 1.3.6.
Richard Jones [Fri, 23 Apr 2010 09:25:35 +0000 (10:25 +0100)]
todo docs: Integrate with host intrusion detection systems.
Richard Jones [Fri, 23 Apr 2010 09:23:45 +0000 (10:23 +0100)]
todo docs: Mapping filesystems to and from disk blocks.
Richard Jones [Thu, 22 Apr 2010 21:29:25 +0000 (22:29 +0100)]
Version 1.3.6.
Richard Jones [Thu, 22 Apr 2010 09:42:58 +0000 (10:42 +0100)]
fish: Add -N option for making prepared disk images.
Previously you might have typed:
$ guestfish
><fs> alloc test1.img 100M
><fs> run
><fs> part-disk /dev/sda mbr
><fs> mkfs ext4 /dev/sda1
now you can do the same with:
$ guestfish -N fs:ext4
Some tests have also been updated to use this new
functionality.
Richard Jones [Thu, 22 Apr 2010 09:46:34 +0000 (10:46 +0100)]
fish docs: Be consistent about using I<-..> for options.
Richard Jones [Thu, 22 Apr 2010 09:44:35 +0000 (10:44 +0100)]
fish docs: Use L</...> for internal links in the man page.
Matthew Booth [Thu, 22 Apr 2010 12:57:56 +0000 (13:57 +0100)]
Whitelist the loop kernel module
loop is sometimes a module, for example on RHEL 5.
Matthew Booth [Wed, 21 Apr 2010 14:39:49 +0000 (15:39 +0100)]
Don't die during inspection if rpm -qa or dpkg-query fails
If a problem in the package database prevented package enumeration from working,
inspection would die. This change makes it emit a warning and continue.
Matthew Booth [Wed, 21 Apr 2010 14:39:48 +0000 (15:39 +0100)]
Don't die during inspection if initrd doesn't exist
This fixes a problem where inspection would die if grub.conf referenced a
non-existent initrd. Just return an empty initrd instead.
Richard Jones [Tue, 20 Apr 2010 21:20:46 +0000 (22:20 +0100)]
Add zfs-fuse (ZFS via FUSE) support to the appliance.
Richard Jones [Tue, 20 Apr 2010 17:46:45 +0000 (18:46 +0100)]
Remove checks for Test::Pod and Test::Pod::Coverage.
Although these modules are optionally used by the Perl tests,
they aren't necessary and won't break the build if they are not
there. These modules aren't available in RHEL 5. Therefore
remove these checks.
Daniel Cabrera [Tue, 20 Apr 2010 15:30:27 +0000 (16:30 +0100)]
Updated Spanish translations (RHBZ#584038).
Richard Jones [Tue, 20 Apr 2010 12:22:09 +0000 (13:22 +0100)]
Check user doesn't run configure, make or make check as root.
(Thanks to Yufang Zhang for helping to debug this issue).
Richard Jones [Tue, 20 Apr 2010 10:04:14 +0000 (11:04 +0100)]
Replace 'dd' in tests with use of guestfish 'sparse' command.
'dd' is a very inefficient way to create files. 'truncate' is
better, but unfortunately that command is not available in RHEL 5.
So use the guestfish 'sparse' command instead (which also avoids
allocating disk space).
Richard Jones [Tue, 20 Apr 2010 09:50:50 +0000 (10:50 +0100)]
Document new version numbering policy.
See discussion on mailing list:
https://www.redhat.com/archives/libguestfs/2010-April/msg00005.html
https://www.redhat.com/archives/libguestfs/2010-April/msg00057.html
https://www.redhat.com/archives/libguestfs/2010-April/msg00058.html
Richard Jones [Mon, 19 Apr 2010 19:55:15 +0000 (20:55 +0100)]
Document umask (RHBZ#582548, RHBZ#583554).
Richard Jones [Mon, 19 Apr 2010 19:13:05 +0000 (20:13 +0100)]
docs: Clarify documentation for mknod (RHBZ#582948).
Richard Jones [Mon, 19 Apr 2010 16:25:58 +0000 (17:25 +0100)]
Update PO files.
Richard Jones [Mon, 19 Apr 2010 16:13:46 +0000 (17:13 +0100)]
Prepare for version 1.3.5.
Richard Jones [Mon, 19 Apr 2010 16:09:58 +0000 (17:09 +0100)]
New APIs: base64-in and base64-out for uploading/downloading base64 content.
Richard Jones [Mon, 19 Apr 2010 15:31:24 +0000 (16:31 +0100)]
New API: debug-upload (not a formal part of the API/ABI).
Allow arbitrary files to be uploaded into the appliance, but
only when --enable-debug-command is enabled. This lets you
run shell scripts, like this:
><fs> debug-upload -<<EOF /tmp/script.sh 0700
#!/bin/sh -
# ...
EOF
><fs> debug sh "/tmp/script.sh"
Richard Jones [Mon, 19 Apr 2010 13:41:01 +0000 (14:41 +0100)]
fish: Allow -<<END as a syntax for uploading "heredocs".
For example:
><fs> upload -<<END /foo
some data
some more data
END
><fs> cat /foo
some data
some more data
Richard Jones [Mon, 19 Apr 2010 10:49:08 +0000 (11:49 +0100)]
todo docs: Feature for base64 uploads and scripts.
Richard Jones [Mon, 19 Apr 2010 09:20:58 +0000 (10:20 +0100)]
docs: Add virt-resize(1) link to guestfish(1) manpage.
Richard Jones [Sat, 17 Apr 2010 21:19:20 +0000 (22:19 +0100)]
Version 1.3.4
Richard Jones [Sat, 17 Apr 2010 19:41:28 +0000 (20:41 +0100)]
todo documentation: Idea: List, mount filesystems by UUID and label.
Richard Jones [Sat, 17 Apr 2010 19:36:11 +0000 (20:36 +0100)]
todo documentation: remove 'virt-grow/shrink', see virt-resize
Richard Jones [Sat, 17 Apr 2010 19:35:34 +0000 (20:35 +0100)]
todo documentation: virt-rescue now uses $TERM from library, remove from todo list
Richard Jones [Sat, 17 Apr 2010 19:34:35 +0000 (20:34 +0100)]
todo documentation: Remove old section on PPC bugs.
No one cares for PPC, and if they do they should file these
as bugs in the bug tracker.
Richard Jones [Sat, 17 Apr 2010 19:34:21 +0000 (20:34 +0100)]
todo documentation: Remove old ideas for Python bindings.
Richard Jones [Sat, 17 Apr 2010 15:33:07 +0000 (16:33 +0100)]
Documentation: Use 'g' instead of 'handle' in documentation.
By convention we use 'g' for handles. Copy this convention
through to all the documentation.
Richard Jones [Sat, 17 Apr 2010 15:24:03 +0000 (16:24 +0100)]
In guestfs(3), unmount "/" directory in the example.
Richard Jones [Sat, 17 Apr 2010 15:22:53 +0000 (16:22 +0100)]
Add compilation/linking example to guestfs(3) man page.
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.
Richard Jones [Sat, 17 Apr 2010 14:46:08 +0000 (15:46 +0100)]
Build top-level directories in a more logical order.
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
generator.
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.
Richard Jones [Sat, 17 Apr 2010 13:14:30 +0000 (14:14 +0100)]
generator: Fix typo in a comment.
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.
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.
Richard Jones [Sat, 17 Apr 2010 12:07:56 +0000 (13:07 +0100)]
New API: get-umask, returns the current umask (RHBZ#582891).
Richard Jones [Sat, 17 Apr 2010 11:38:18 +0000 (12:38 +0100)]
Add a build test for the 'umask' command.
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).
Richard Jones [Sat, 17 Apr 2010 11:13:23 +0000 (12:13 +0100)]
Documentation: lvcreate should say 'logical volume' (RHBZ#582953)
Daniel Cabrera [Wed, 14 Apr 2010 13:59:30 +0000 (14:59 +0100)]
Update Spanish translations (RHBZ#582252).
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'
[-Wimplicit-function-declaration]
guestmount.c wasn't including locale.h.
Richard Jones [Tue, 13 Apr 2010 17:42:27 +0000 (18:42 +0100)]
New API: Add aug-clear call for clearing an Augeas node.
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.
Richard Jones [Tue, 13 Apr 2010 20:26:14 +0000 (21:26 +0100)]
fish: Update documentation: Add another pipe example.
Richard Jones [Tue, 13 Apr 2010 20:25:50 +0000 (21:25 +0100)]
fish: Update documentation: Using 'lcd' command to change local directory.
Richard Jones [Mon, 12 Apr 2010 18:52:03 +0000 (19:52 +0100)]
Update PO files.
Richard Jones [Mon, 12 Apr 2010 18:32:38 +0000 (19:32 +0100)]
Prepare for version 1.3.3.
Richard Jones [Mon, 12 Apr 2010 15:34:36 +0000 (16:34 +0100)]
resize: Add --LV-expand option for expanding Linux LVs.
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.
Richard Jones [Mon, 12 Apr 2010 15:34:57 +0000 (16:34 +0100)]
Fix time and timezone to be correct within the appliance.
Richard Jones [Mon, 12 Apr 2010 17:54:58 +0000 (18:54 +0100)]
resize: Fix missing newline from end of print.
Richard Jones [Mon, 12 Apr 2010 15:32:55 +0000 (16:32 +0100)]
resize: Fix regular expression to exactly match ^ext[234]$
Richard Jones [Mon, 12 Apr 2010 11:17:08 +0000 (12:17 +0100)]
virt-resize: Mention alternate tools like gparted in the documentation.
Daniel Cabrera [Mon, 12 Apr 2010 15:31:43 +0000 (16:31 +0100)]
Updated Spanish translation (RHBZ#581501).
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.
Richard Jones [Sat, 10 Apr 2010 20:54:04 +0000 (21:54 +0100)]
Version 1.3.2
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.
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.
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
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
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.
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.
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.
Richard Jones [Sat, 10 Apr 2010 12:14:54 +0000 (13:14 +0100)]
Documentation: Clarify documentation on the bootable flag.
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.
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.
Richard Jones [Sat, 10 Apr 2010 12:20:52 +0000 (13:20 +0100)]
virt-make-fs: Use Sys::Guestfs::Lib::feature_available helper function.
Richard Jones [Fri, 9 Apr 2010 08:40:59 +0000 (09:40 +0100)]
Allow aug-ls to take Augeas variable as argument (RHBZ#580016).
Richard Jones [Thu, 8 Apr 2010 18:33:57 +0000 (19:33 +0100)]
Remove warning "No grub default" (RHBZ#580650).
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.