Commit Graph

5263 Commits

Author SHA1 Message Date
Richard W.M. Jones
2f0a4d7c18 Require libxml2.
libxml2 is very commonly available on Linux distros and has also been
ported (and is widely available) on Mac OS X and Windows.  Therefore
simply require libxml2, and remove a lot of conditional code.
2013-04-16 16:46:01 +01:00
Richard W.M. Jones
349300af08 fish: Add -a URI (add remote storage) to options.
Add a remote drive by doing:

 guestfish -a ssh://example.com/path/to/disk.img

There are several different protocols supported, as explained in the
man page.

This affects all virt-* tools that use the common guestfish options
parsing code.
2013-04-16 15:28:31 +01:00
Richard W.M. Jones
b48e416d27 fish: options: Whitespace change. 2013-04-16 13:57:01 +01:00
Richard W.M. Jones
cfda2693c6 Add support for SSH (Secure Shell) block device. 2013-04-16 09:13:07 +01:00
Richard W.M. Jones
ca11cd104d FAQ: Add a quick summary to the debugging section of the FAQ. 2013-04-15 09:51:24 +01:00
Richard W.M. Jones
848db89b7f Version 1.21.29. 1.21.29 2013-04-13 10:48:08 +01:00
Richard W.M. Jones
288a24eebe tests: Split C API tests into regular C file + generated tests file. 2013-04-13 07:26:46 +01:00
Richard W.M. Jones
883aea9b1d tests: Replace TestOutputHashtable with TestResult and C test. 2013-04-13 07:26:02 +01:00
Richard W.M. Jones
c43f762257 tests: Replace TestOutputBuffer with TestResult and C test. 2013-04-13 07:26:02 +01:00
Richard W.M. Jones
424fe36d32 tests: Replace TestOutputFileMD5 with TestResult and C test. 2013-04-13 07:26:02 +01:00
Richard W.M. Jones
0a49838135 tests: Remove TestOutputLength (not used by any tests). 2013-04-13 07:26:02 +01:00
Richard W.M. Jones
685c5fb3b1 tests: Replace TestOutput/TestOutputDevice with TestResult{String,Device}. 2013-04-13 07:26:02 +01:00
Richard W.M. Jones
45840581d6 tests: Replace TestOutputList{,OfDevices} with TestResult.
This adds helper C functions 'is_string_list' and 'is_device_list'
allowing these tests to be carried out in generic C code instead of as
specialized tests.
2013-04-13 07:25:57 +01:00
Richard W.M. Jones
45599a8895 tests: Replace TestOutputStruct with TestResult. 2013-04-12 21:26:23 +01:00
Richard W.M. Jones
24fdf05d30 tests: Replace TestOutputInt{,Op} with TestResult. 2013-04-12 21:26:23 +01:00
Richard W.M. Jones
c9ef854f83 tests: Replace TestOutputTrue/False with TestResultTrue/False. 2013-04-12 21:26:23 +01:00
Richard W.M. Jones
008be5dbfa tests: More flexible re-implementation of C API tests.
Instead of using the various 'TestOutput', 'TestOutputList' etc
macros, it makes better sense to let the tests contain fragments of C
code to perform the checks.

Several new macros are added:

- 'TestResult': This macro takes a C expression which is evaluated to
test the result of commands.  For example to compare if a string
result has some value:

   TestResult (* command sequence *), "STREQ (ret, \"abcd\")"

The variable "ret" contains the result from the last command in the
sequence.  But also, variables "ret1", "ret2", etc contain the results
from the last but one command, the command before that, and so forth,
allowing much more flexible tests to be written.

- 'TestResultTrue', 'TestResultFalse': Wrappers that test the last
command for true/false.
2013-04-12 21:26:23 +01:00
Richard W.M. Jones
e327351304 tests: 'If' and 'Unless' conditions never used, so remove them. 2013-04-12 21:26:23 +01:00
Richard W.M. Jones
09b4cc45a3 is_lv: Does not need to depend on lvm2.
It only uses 'stat', not any lvm binaries.
2013-04-12 21:26:23 +01:00
Richard W.M. Jones
e4ef9a8281 valgrind suppressions: Suppress libmagic leaks. 2013-04-12 21:26:23 +01:00
Richard W.M. Jones
a7107854ba debian: packagelist: Add mtools. 2013-04-11 23:23:20 +01:00
Olaf Hering
3acf6768f0 add --with-supermin-extra-options configure option
Useful to pass --use-installed and other options to supermin.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2013-04-11 22:20:55 +01:00
Richard W.M. Jones
c2013308ed Update translations from Transifex. 2013-04-11 14:42:54 +01:00
Richard W.M. Jones
f4d5f3d6a2 Update gnulib to latest. 2013-04-11 14:42:54 +01:00
Richard W.M. Jones
142b874ce8 Remove use of gnulib progname module.
It's simpler to use the glibc 'program_invocation_short_name(3)'
feature, and fall back to a generic solution.  Also remove risky
assignments to argv[0].
2013-04-11 14:42:54 +01:00
Richard W.M. Jones
f2b90b374f New APIs: set-program, get-program.
These set or get the program name in the handle.  Most programs
will never need to call this, since we set this, if possible,
using the glibc 'program_invocation_short_name(3)' feature.
2013-04-11 12:52:54 +01:00
Richard W.M. Jones
1a06ac25f5 fish: Add help for prepared disk images to the man page.
Also the long description for each prepared disk image can now contain
Perl POD markup.
2013-04-10 12:28:14 +01:00
Richard W.M. Jones
b72daebaf4 inspection: Don't fail if libosinfo database is not found (RHBZ#948324). 2013-04-10 10:01:17 +01:00
Richard W.M. Jones
2cf0b5c19b fish: welcome message: guestfish can edit disk images. 2013-04-09 23:26:39 +01:00
Richard W.M. Jones
abe07ce2ca "guestfish" now means the "guest filesystem shell".
Remove the word "interactive" which implies that guestfish can only
(or often) be used interactively.
2013-04-09 23:21:42 +01:00
Richard W.M. Jones
6a7327dfa9 Version 1.21.28. 1.21.28 2013-04-09 18:45:15 +01:00
Richard W.M. Jones
c396d4cd32 examples: Update debug-logging.c example.
This updates commit e3546ad2ce.
2013-04-09 17:30:16 +01:00
Richard W.M. Jones
e3546ad2ce examples: Add example program showing enabling debugging and capturing log messages. 2013-04-08 20:10:37 +01:00
Richard W.M. Jones
6582d4ad9f Update release notes for future 1.22 release. 2013-04-05 10:33:58 +01:00
Richard W.M. Jones
a3de6eddd4 pod: Fix "wide character in print" warnings by declaring encoding correctly. 2013-04-05 10:33:25 +01:00
Richard W.M. Jones
dfa25a46e3 Fix typo in extlinux documentation.
This fixes commit dee1dd64c3.
2013-04-04 22:14:25 +01:00
Richard W.M. Jones
f9f3c7c5ac Version 1.21.27. 1.21.27 2013-04-04 21:04:32 +01:00
Richard W.M. Jones
dee1dd64c3 New APIs: Add support for syslinux and extlinux (bootloaders).
This also adds tests of SYSLINUX and EXTLINUX which create bootable
guests.
2013-04-04 18:31:41 +01:00
Richard W.M. Jones
e73cd348c8 Don't delete iconv locale data from the appliance.
- /usr/lib{,64}/gconv/*:

This is the iconv data, required for APIs like iconv_open to work.  In
particular, the mtools 'mcopy' program fails completely if it cannot
use iconv.  'mcopy' is used by SYSLINUX to copy files to the disk.

The error you would have seen is:

  Error converting to codepage 850 Invalid argument
  Cannot initialize 'S:'
  Bad target s:/ldlinux.sys

- /usr/bin/localedef and /usr/sbin/build-locale-archive:

These are not really needed, but both are simply small binaries so we
might as well not delete them.
2013-04-04 18:23:32 +01:00
Richard W.M. Jones
3cdca7616a daemon/copy: Ensure errno is preserved along error paths. 2013-04-04 14:58:32 +01:00
Richard W.M. Jones
33c087ea9c Add 'sparse' option to copy-{device,file}-to-{device,file} calls.
Setting the 'sparse' optional boolean causes writes to be omitted if
the block to be written contains all zero bytes.

This should help with sparse backing files (eg. raw, qcow2, dm-thin, etc).

Also, modify virt-resize to use this option by default when copying
devices.  The savings in virt-resize can be quite startling, eg
'du -sh' (ie. true size) of a resized disk image:

8.1G      /tmp/f15x32-resized.img    # before this change
3.2G      /tmp/f15x32-resized.img    # after this change
2013-04-04 14:58:32 +01:00
Richard W.M. Jones
289fd29f0b php: Fix segfault when function has an OStringList optional argument.
How this PHP/Zend stuff is supposed to work is not documented, but at
least with these changes it no longer segfaults.
2013-04-04 11:49:27 +01:00
Richard W.M. Jones
ba0199c487 python: Let RHashtable be returned as a Python dict.
The initial proposal was suggested by Matt Booth and discussed on the
mailing list here:

https://www.redhat.com/archives/libguestfs/2013-April/msg00007.html
2013-04-03 19:18:07 +01:00
Richard W.M. Jones
3dcb572bda Better error messages for FUSE and other things not supported.
The bare message "FUSE not supported" wasn't actionable.
2013-04-03 12:33:24 +01:00
Richard W.M. Jones
d0a8cca9a1 FAQ: In Fedora >= 19, the RPM detects if it can access the network when building. 2013-04-02 15:53:37 +01:00
Richard W.M. Jones
387b232126 Version 1.21.26. 1.21.26 2013-04-02 15:29:59 +01:00
Richard W.M. Jones
667482ca9a perl: Remove Sys::Guestfs::Lib.
See announcement on the mailing list for more details about this change:

https://www.redhat.com/archives/libguestfs/2013-April/msg00001.html
2013-04-02 15:26:05 +01:00
Richard W.M. Jones
2287b988ee perl: Remove use of Sys::Guestfs::Lib::open_guest function.
This obsolete function does all sorts of libvirt/XML things, which can
now be replaced by using ordinary API calls; especially $g->add_domain.
2013-04-02 13:30:19 +01:00
Richard W.M. Jones
ecda39bed4 tests/data: Update README and comments about initrd binary files.
These are used for testing the C, not Perl, file_architecture API.
2013-04-02 13:06:10 +01:00
Richard W.M. Jones
1cb38ab924 New API: feature-available.
This API is an easier to use version of the existing guestfs_available,
because the new API returns true/false instead of throwing an error
when a feature from the list is not available.

In truth we've had this implementation internally in the library
and several tools and in Sys::Guestfs::Lib for a long time.  This
change just turns it into a publicly consumable API.
2013-04-02 12:38:50 +01:00