1767 Commits

Author SHA1 Message Date
Richard Jones
14cc033ade Version 1.2.10. 1.2.10 2010-07-12 10:16:20 +01:00
Richard Jones
044a7d083f tar: Remove redundant use statement.
(cherry picked from commit 70d27f6e79)
2010-07-12 08:46:15 +01:00
Richard Jones
a0c41d127d edit: Clean up temporary files.
Note to self: The 'tempfile' function does *not* default to
removing files with the program exits!

For stable-1.2 branch:
 - Cherry picked from commit 10ea14a3f1
 - Rebase.
2010-07-12 08:45:31 +01:00
Richard Jones
1bbd84b1ff fish: Don't fail if -m and --listen flags are both given (RHBZ#612178).
Testing this against a Fedora disk image:

$ ./fish/guestfish --ro -a F13.img -m /dev/sda1 --listen
export GUESTFISH_PID=6033
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- exit

Without this fix the first remote command would fail because
qemu would have already been killed.

For stable-1.2 branch:
 - Cherry picked from commit 8161ea9bb0
 - Rebased for older guestfish code.
2010-07-12 08:41:29 +01:00
Richard Jones
ac42042573 inspector: Improve error message when YAML::Any library is not installed.
(cherry picked from commit 015b7a2ee6)
2010-07-12 08:39:46 +01:00
Richard Jones
315faff44d Explicitly depend on e2fsprogs.
See: http://lists.fedoraproject.org/pipermail/devel/2010-June/137953.html
(cherry picked from commit 9928498ad8)
2010-07-12 08:39:37 +01:00
Richard Jones
d63f5ecb95 Fix gfs2 support by adding required kernel modules.
(cherry picked from commit 61adbba900)
2010-07-12 08:39:28 +01:00
Richard Jones
011a757492 ocaml: Fix thread safety of strings in bindings (RHBZ#604691).
There's a thread safety issue with the current OCaml bindings which
is well explained in the bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=604691

This commit fixes the safety issue by copying strings temporarily
before releasing the thread lock.  Updated code looks like this:

  char *filename = guestfs_safe_strdup (g, String_val (filenamev));
  int r;

  caml_enter_blocking_section ();
  r = guestfs_add_drive_ro (g, filename);
  caml_leave_blocking_section ();
  free (filename);
  if (r == -1)
    ocaml_guestfs_raise_error (g, "add_drive_ro");

Also included is a regression test.

For stable-1.2 branch:
  - cherry picked from commit 1079f74704
  - generator code rebased
2010-07-12 08:38:21 +01:00
Richard Jones
1d28631e7c perl: Check all images are defined in first param of open_guest.
(cherry picked from commit e67e216118)
2010-07-12 08:35:56 +01:00
Richard Jones
5d2ffbe242 Fix typo in documentation of guestfs_set_launch_done_callback.
(cherry picked from commit 91b00dc092)
2010-07-12 08:35:04 +01:00
Richard Jones
2373ba34c2 virt-df: Disallow -h and --csv options together (RHBZ#600977).
Before this commit, if you used the -h and --csv options together
you would get these warnings from virt-df:

$ virt-df -h --csv Guest
Virtual Machine,Filesystem,Size,Used,Available,Use%
Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8%
Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298.
"/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0%

We could fix this so that the human-readable numbers get written
into the CSV file.  However would probably be wrong for most uses
of the CSV format (databases and spreadsheets) since they would not
be able to interpret these human-readable numbers, or worse could
misinterpret, eg. thinking that "1M" and "1G" are both 1.

Therefore this commit disallows this combination of options.
(cherry picked from commit aaf03a51a2)
2010-07-12 08:34:25 +01:00
Richard Jones
3b1f3d64de generator: Allow individual tests to depend on daemon features.
Using IfAvailable "featurename" we allow individual tests to
only run if the feature is available in the daemon.

This will allow us to extend testing to a lot more optional
features such as NTFS.
(cherry picked from commit f9d08600c5)
2010-07-12 08:32:34 +01:00
Richard Jones
bfe89cafcb tests: Factor out common code into 'is_available' function.
This commit is just code motion.
(cherry picked from commit cbe80b2bcf)
2010-07-12 08:32:07 +01:00
Richard Jones
35f6f6df60 grub-install: In docs suggest manually creating device.map (RHBZ#484986).
(cherry picked from commit dccd9b8f52)
2010-07-12 08:31:04 +01:00
Richard Jones
4580b79d9a Version 1.2.9. 1.2.9 2010-06-02 20:31:55 +01:00
Richard Jones
6977b0d983 RHEL 6: sr_mod.ko is needed for RHEL 6 to see CD-ROM devices (RHBZ#598807).
(cherry picked from commit ac37f65aaf)
2010-06-02 19:51:11 +01:00
Richard Jones
61340088b3 parted: Check partition number >= 1 in several calls.
(cherry picked from commit cbb0260368)
2010-06-02 19:50:59 +01:00
Richard Jones
235aabfacf daemon: Parse output of old parted which didn't support -m option (RHBZ#598309).
This fixes the following commands when run with RHEL 5-era parted:

  get-bootable
  get-parttype
  part-list
(cherry picked from commit 3ab2d089f3)
2010-06-02 19:50:22 +01:00
Richard Jones
45e3f231be daemon: count_strings function returns size_t
(cherry picked from commit aee7d55fcf)
2010-06-02 19:49:59 +01:00
Richard Jones
2703a919bb resize2fs: Document this command also works with ext4 (thanks Yufang Zhang).
For stable-1.2 branch:
 - cherry picked from commit 1020b212b1
 - rebased for 1.2 branch
2010-06-02 19:48:58 +01:00
Richard Jones
4b845ee849 fish: help command return error for non-existent commands (RHBZ#597145).
With this change, the exit status indicates error for non-existent
commands.

$ guestfish -h foo
foo: command not known, use -h to list all commands
$ echo $?
1
$ guestfish help foo
foo: command not known, use -h to list all commands
$ echo $?
1

For stable-1.2 branch:
 - cherry picked from commit f2b7a8e15c
 - rebased for the 1.2 branch
2010-06-02 19:47:09 +01:00
Richard Jones
fb0ba47674 daemon: write-file: Check range of size parameter (RHBZ#597135).
This also adds a regression test.

For stable-1.2 branch:
 - cherry picked from commit 9733d47469
 - modify the regression test to apply against the generator
2010-06-02 19:41:33 +01:00
Richard Jones
8e620995b5 daemon: Limit label lengths (RHBZ#597118).
(cherry picked from commit 52f9cd4882)
2010-06-02 19:39:50 +01:00
Richard Jones
858661ca96 daemon: Kill blkid cache to improve reliability of blkid commands.
By killing the cache file, we make blkid work in situations such
as a just-created filesystem.
(cherry picked from commit 21c42e9fab)
2010-06-02 19:39:37 +01:00
Richard Jones
261622b56e daemon: Generalize the implementation of vfs-type.
Note that there is no change to the semantics of the code.
(cherry picked from commit 85c71f8fff)
2010-06-02 19:39:25 +01:00
Richard Jones
beedd70a2f todo: Should generate -N option.
(cherry picked from commit fc1dc099a1)
2010-06-02 19:39:13 +01:00
Richard Jones
9edf52f81d todo: Remove implemented resize functions from TODO file.
(cherry picked from commit 0e42861ccf)
2010-06-02 19:38:31 +01:00
Matthew Booth
159b1167eb Rely on new augeas lens for modules.conf and conf.modules
Latest augeas includes a lens for /etc/modules.conf. If this new lens is
present, the code to force the Modprobe lens to try to match /etc/modules.conf
as well results in /etc/modules.conf not being parsed at all. This results in
modprobe_aliases in virt-inspector output being empty.

This change is equivalent to change cfd28d1140393667913689b7b9bcf21c8bfe592c
from virt-v2v.

An effect of this change is that the Modules_conf augeas lens is now required
for correct operation on guests which use /etc/modules.conf.

Fixes RHBZ#596776
(cherry picked from commit 245ed4b8eb)
2010-06-02 19:38:00 +01:00
Richard Jones
265e6f8f04 Fix documentation for vfs-type to reflect reality.
(cherry picked from commit 0f6c6239fe)
2010-06-02 19:36:24 +01:00
Richard Jones
4345b7c71c Clarify documentation on distro backports in version command.
(cherry picked from commit 11eeb8885c)
2010-06-02 19:36:02 +01:00
Richard Jones
6cbbecfd16 Add reference to version number documentation to version command.
(cherry picked from commit 8355d32456)
2010-06-02 19:35:51 +01:00
Richard Jones
c379757fae Clarify sparse behaviour of truncate-size command.
(cherry picked from commit d12a702fe1)
2010-06-02 19:35:40 +01:00
Richard Jones
625c47c4ef Fix typo in documentation of guestfs_readlinklist.
(cherry picked from commit 4412fd951e)
2010-06-02 19:35:11 +01:00
Richard Jones
f3e17f1708 Fix missing word in docuentation of guestfs_readdir.
(cherry picked from commit b8861242d1)
2010-06-02 19:34:57 +01:00
Richard Jones
c223b0edca Fix typo in description of echo-daemon command.
(cherry picked from commit c1e3cff523)
2010-06-02 19:34:12 +01:00
Richard Jones
e3cca343f2 fish: Don't eat words when completing case-insensitive paths (RHBZ#582993).
(cherry picked from commit 21bd2db7cf)
2010-06-02 19:31:58 +01:00
Richard Jones
d19f31fa3a fish: Sort returned paths so the list is stable across multiple calls.
(cherry picked from commit 53c3b9d2b0)
2010-06-02 19:29:27 +01:00
Richard Jones
bed2c55aff fish: Create a separate FILES section in the manpage.
(cherry picked from commit 7fd6e4bfb1)
2010-06-02 19:28:51 +01:00
Richard Jones
d156fd724d fish: Move 'EXIT CODE' section to a more logical place in the documentation.
(cherry picked from commit 34a306ab2a)
2010-06-02 19:28:19 +01:00
Richard Jones
51c6cc6081 resize: Refresh the examples in the documentation.
The documentation was previously very intimidating.  Bring some
common, simple examples up to the top of the page in a separate
section.

For stable-1.2 branch:
 - cherry picked from commit 0e28e4104d
 - modified instructions slightly to apply to older version of
   virt-list-partitions
 - replace 'truncate' with 'dd'
2010-06-02 19:25:50 +01:00
Richard Jones
4b0a04f90e fish: Make the read/write warning more prominent.
Follow the example on other manual pages by making the warning
more prominent.
(cherry picked from commit 57cc217335)
2010-06-02 19:21:11 +01:00
Richard Jones
bdcfd9c886 Version 1.2.8. 1.2.8 2010-05-24 15:03:57 +01:00
Richard Jones
fdfad2a0b7 build: For development releases, print a notice.
(cherry picked from commit 613d041c78)
2010-05-24 14:03:02 +01:00
Richard Jones
aa5bd925f1 guestfs_version: Correct documentation.
Remove reference to 'ELF weak linking tricks' and replace
with suggestion to use dl* functions.
(cherry picked from commit 94030c5ce8)
2010-05-24 14:02:50 +01:00
Richard Jones
631918ff29 TODO: Suggest including undelete utility.
(cherry picked from commit 478e1942a9)
2010-05-24 14:01:42 +01:00
Richard Jones
21cc345838 Fix name of update-bugs script in output file BUGS.
(cherry picked from commit aecdf3c117)
2010-05-24 14:01:33 +01:00
Richard Jones
a514332577 generator: Some String parameters should be OptString (RHBZ#501894).
I haven't checked the list of functions exhaustively, but
these are the obvious ones.
(cherry picked from commit e715451fae)
2010-05-24 13:59:39 +01:00
Richard Jones
00dcc4084e fish: Fix build error if built without readline.
fish.c:1447: error: 'add_history_line' defined but not used [-Wunused-function]

(Reported by Matt Booth)

(cherry picked from commit 5af010c96d)
2010-05-24 13:58:23 +01:00
Richard Jones
925c44c4c8 appliance: Ignore utempter unreadable binaries (for RHEL 6).
(cherry picked from commit 2dc7bb0033)
2010-05-24 13:56:53 +01:00
Richard Jones
50caaf988f appliance: Change comment about unreadable binaries.
For stable branch, change reference to febootstrap-supermin-helper
to libguestfs-supermin-helper.
(cherry picked from commit 155aa76e57)
2010-05-24 13:56:16 +01:00