Richard W.M. Jones [Fri, 21 Oct 2011 11:28:45 +0000 (12:28 +0100)]
Allow compilation without hivex (RHBZ#723474).
(cherry picked from commit
f5172902bc9d92451c83dc3c1a85b5aeb975b43a)
Richard W.M. Jones [Fri, 21 Oct 2011 11:15:36 +0000 (12:15 +0100)]
po-docs: Force make update-po on first build from git.
(cherry picked from commit
9a6e5369b2134a3bd2a6decda48bbf5ac9d7cd41)
Richard W.M. Jones [Thu, 20 Oct 2011 22:04:41 +0000 (23:04 +0100)]
appliance: udev-174 moves udevd to /lib/udev/udevd (instead of /sbin/udevd)
(cherry picked from commit
fef0ff3d869d2ebdb48eea0c538270fc98f5952d)
Richard W.M. Jones [Thu, 20 Oct 2011 13:53:13 +0000 (14:53 +0100)]
resize: Remove p_size field from partitions structure.
This field simply contained a duplicate copy of p_part.part_size.
There is no functional change in this commit.
(cherry picked from commit
9f198956047583e506713a4472117922f8b27b2e)
Richard W.M. Jones [Wed, 19 Oct 2011 18:11:54 +0000 (19:11 +0100)]
Version 1.12.8.
Richard W.M. Jones [Wed, 19 Oct 2011 14:43:37 +0000 (15:43 +0100)]
inspection: Return root devices sorted.
(cherry picked from commit
c46bedf925cd9c6c9a9cbaee115358fd1dffcbfe)
Matthew Booth [Tue, 18 Oct 2011 12:30:40 +0000 (13:30 +0100)]
inspect: Don't assume number of captures in match functions
It is possible for the pcre library to return a variable number of captures for
a single regular expression. e.g.:
^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$
This will return either 1 or 2 captures depending on whether the device has a
partition suffix. The current match wrappers don't allow for this, and require
that a predictable number of matches are returned.
This change updates match, match1, match2, and match3 to ignore the specific
number of matches returned. Instead, any returned captures are assigned to the
given arguments, and any remaining arguments are set to NULL.
(cherry picked from commit
f5c9f0e9ee1729b1260cef3e51ca91936e1868c4)
Matthew Booth [Mon, 17 Oct 2011 15:07:31 +0000 (16:07 +0100)]
NFC: Remove unnecessary goto
Cherry picked from commit
1f615fddaffd33afc75a582021769583c8f4db4e and
backported to libguestfs-1.12 branch.
Richard W.M. Jones [Wed, 19 Oct 2011 14:20:19 +0000 (15:20 +0100)]
launch: Ensure g->cmdline is allocated before assigning g->cmdline[0].
(cherry picked from commit
138e118d62046b197b715462072256082ecfc0f7)
Richard W.M. Jones [Wed, 19 Oct 2011 12:42:59 +0000 (13:42 +0100)]
valgrind: guestfish -i: free strings before exit.
This isn't really necessary, but it keeps valgrind happy.
(cherry picked from commit
2f6ec8b4da27c550e2c7187fd17df28f1bdd51a7)
Richard W.M. Jones [Tue, 18 Oct 2011 14:22:01 +0000 (15:22 +0100)]
Ubuntu 11.10: Create /run and /run/lock if not already.
In real machines these directories are a ramdisk.
(cherry picked from commit
6d7d645cdd4a9c94c4d95fc52de53c37b88847e4)
Richard W.M. Jones [Mon, 17 Oct 2011 08:59:43 +0000 (09:59 +0100)]
Skip guestmount tests if no /dev/fuse.
Cherry picked from commit
cf4cc1143393d607a7fb4cdbee1434544237d5d4 and
modified for libguestfs-1.12 branch which only has guestmount.
Richard W.M. Jones [Fri, 14 Oct 2011 21:08:20 +0000 (22:08 +0100)]
appliance: Fedora cryptsetup-luks renamed to cryptsetup.
Therefore we need both names to be listed in the file.
(cherry picked from commit
af0c123be8cc62acf9e1368b1d00acccdd6d91e9)
Richard W.M. Jones [Fri, 14 Oct 2011 21:08:14 +0000 (22:08 +0100)]
roadmap: Fix Bugzilla URL.
(cherry picked from commit
db499d98e7a290ccbfc4fb333f85021b23155e9d)
Richard W.M. Jones [Thu, 13 Oct 2011 10:56:52 +0000 (11:56 +0100)]
fish: docs: note how to clean up the remote process properly.
Killing it is always a bad idea, because the qemu subprocess will be
left hanging around. The best thing is to send the exit command.
Cherry picked from commit
11be7d8eee16e6249ed2868b5bd552f29508ec02
and modified.
Richard W.M. Jones [Thu, 13 Oct 2011 10:54:18 +0000 (11:54 +0100)]
fish: Close guestfs handle explicitly before exiting.
NOTE this is just a cleanup. It is NOT necessary for correctness,
since libguestfs itself is correctly closing the handle in the exit
handler.
(cherry picked from commit
baa1618e0f917017c1934b7da41250029c1791ef)
Richard W.M. Jones [Thu, 13 Oct 2011 10:13:05 +0000 (11:13 +0100)]
guestmount: Add note to man page about 'fuse' group for Debian.
(cherry picked from commit
e57c3c37a8648966e19ef33832f353d0f9487a77)
Richard W.M. Jones [Fri, 7 Oct 2011 18:20:36 +0000 (19:20 +0100)]
fish: Add man page section on calling guestfish remote robustly from bash.
(cherry picked from commit
3a546663655abfcd6399d4fdb7febc6b0d83b822)
Richard W.M. Jones [Fri, 7 Oct 2011 12:42:27 +0000 (13:42 +0100)]
Makefile.am: Fix comment.
(cherry picked from commit
c6be95453d66ea714a9813a21cfb224d8e346d9e)
Richard W.M. Jones [Wed, 5 Oct 2011 13:38:07 +0000 (14:38 +0100)]
docs: Add directory section for resize/
Based on commit
f3341222b37f91d7f7fcdafe30b107ea9da9ad02, but modified
since only resize exists in this branch of libguestfs.
Richard W.M. Jones [Tue, 4 Oct 2011 09:58:25 +0000 (10:58 +0100)]
docs: Add virt-resize to list of links in guestfs(3).
(cherry picked from commit
293772bf7511dee41a1f3e842424678c1a6bf9e4)
Richard W.M. Jones [Tue, 4 Oct 2011 09:58:02 +0000 (10:58 +0100)]
docs: virt-win-reg is written in Perl, not virt-resize.
(cherry picked from commit
b39b3c5c74f1dfb88a6074aac476df877f1bfc4d)
Richard W.M. Jones [Thu, 29 Sep 2011 15:08:20 +0000 (16:08 +0100)]
daemon: mkswap --help output changed, breaking linuxfsuuid group detection.
(cherry picked from commit
4e9ed018475ff4bd5171ed50a47ffae7abbdda4b)
Richard W.M. Jones [Wed, 28 Sep 2011 13:17:53 +0000 (14:17 +0100)]
daemon: Move useful is_zero function to header file.
Code motion.
(cherry picked from commit
ffc01285ee4289da90983a3320873f27b3d31c4d)
Richard W.M. Jones [Mon, 26 Sep 2011 12:34:12 +0000 (13:34 +0100)]
Add no_timer_check to disable faulty test during boot (RHBZ#502058).
See:
https://bugzilla.redhat.com/show_bug.cgi?id=502058#c15
https://bugzilla.redhat.com/show_bug.cgi?id=698842#c8
This updates commit
79e66f89e2f6c27486476d7857da58feb491bf5c.
(cherry picked from commit
322106521f546d7c70c5a38255db7d243a456a6b)
Richard W.M. Jones [Mon, 26 Sep 2011 08:58:46 +0000 (09:58 +0100)]
docs: Show how to use a qemu wrapper to edit the qemu command line.
(cherry picked from commit
3c7b3634b2c86a4c41fec044ccb59a1fe3224e66)
Richard W.M. Jones [Fri, 16 Sep 2011 15:33:27 +0000 (16:33 +0100)]
Version 1.12.7.
Richard W.M. Jones [Fri, 16 Sep 2011 14:26:20 +0000 (15:26 +0100)]
inspection: Handle /dev/root in /etc/fstab.
This means "the device that holds /etc/fstab", so map it correctly.
This fixes support for ttylinux and also some other guests that use
/dev/root instead of a real device name.
(cherry picked from commit
917f947590c92318fee2545ba88245d0de012e31)
Richard W.M. Jones [Thu, 15 Sep 2011 21:02:43 +0000 (22:02 +0100)]
Add an optional group ("grub") for the guestfs_grub_install API.
This also improves the documentation for this call, pointing out
several pitfalls in using it.
This unfortunately breaks existing callers that might use
guestfs_grub_install without checking for this new group.
(cherry picked from commit
99624d29226ece1abbbdd921183b360f5f80de91)
Richard Jones [Wed, 14 Sep 2011 12:52:39 +0000 (13:52 +0100)]
test-tool: Display TMPDIR.
(cherry picked from commit
bddde7799b80b8292879634548c3c92a3cc1c044)
Richard Jones [Wed, 14 Sep 2011 12:19:11 +0000 (13:19 +0100)]
test-tool: Refresh libguestfs-test-tool man page.
(cherry picked from commit
cda7fa973cbdd5fc4ad3974dcc6b5ea02ec6bb44)
Richard Jones [Wed, 14 Sep 2011 12:00:34 +0000 (13:00 +0100)]
test-tool: Make the default timeout be 600 seconds (10 minutes).
We could sometimes hit the 120 second timeout, eg. if the appliance
needed to be rebuilt and the machine was very slow and/or under heavy
I/O load. 10 minutes should be enough for any reasonable situation.
(cherry picked from commit
912284b02e28bd63bdf3397ef841b9782adfd2cd)
Richard Jones [Wed, 14 Sep 2011 11:58:43 +0000 (12:58 +0100)]
test-tool: Document the -t command line option.
(cherry picked from commit
95136b149212b92e87d0c9badb7d6849a084ed4d)
Richard Jones [Wed, 14 Sep 2011 11:58:30 +0000 (12:58 +0100)]
test-tool: Use B<...> for command line options in man page.
(cherry picked from commit
c7b88da039725ecd0d1d826b112bc69b518d4c78)
Richard Jones [Mon, 12 Sep 2011 10:36:00 +0000 (11:36 +0100)]
po-docs: Make podfiles sort stable.
(cherry picked from commit
7c521c7211d61a1bac46c155de1f4d3e8b60b3d7)
Richard Jones [Mon, 12 Sep 2011 10:33:19 +0000 (11:33 +0100)]
Stable OCaml dependencies.
(cherry picked from commit
cbef2ffb0432756822cd2b02a305384f814e9b50)
Richard W.M. Jones [Wed, 7 Sep 2011 14:21:37 +0000 (15:21 +0100)]
docs: Add a section explaining the appliance boot process.
(cherry picked from commit
b3f1457fddd19b1e540866fa01c665aeb371cb44)
Richard W.M. Jones [Thu, 1 Sep 2011 17:57:10 +0000 (18:57 +0100)]
Version 1.12.6.
Richard W.M. Jones [Thu, 1 Sep 2011 12:37:20 +0000 (13:37 +0100)]
Remove old regression test that mainly tested a buggy API.
The guestfs_ll command currently lists files in the appliance if you
prefix filenames with "/..". However this is a bug, not a feature,
and we should not be testing it.
(cherry picked from commit
8ab2b85b2a67270b8cc5a91bb62a70c84cd6a02c)
Richard W.M. Jones [Thu, 1 Sep 2011 12:15:13 +0000 (13:15 +0100)]
debian: Missing build dependency on db4.8-util.
(cherry picked from commit
8928de32d391e3ad4dd98bb27472c27bb8bc38ac)
Richard W.M. Jones [Sun, 31 Jul 2011 19:48:00 +0000 (20:48 +0100)]
debian: Build libguestfs-ocaml and libguestfs-ocaml-dev subpackages.
(cherry picked from commit
1d134301fc4d05338d09517abc978d0a90d82e09)
Richard W.M. Jones [Thu, 1 Sep 2011 11:59:15 +0000 (12:59 +0100)]
daemon: Factor out name of virtio serial channel.
This is just code motion.
(cherry picked from commit
73be6db9bf1c0ae96262a5f4fa9328bb4e648637)
Richard W.M. Jones [Thu, 1 Sep 2011 11:58:30 +0000 (12:58 +0100)]
Create /sys directory if it doesn't exist already.
Ubuntu 10.04 LTS packages don't create /sys.
(cherry picked from commit
5b012024c49672cc69635ff01f9b9e4f87de1c65)
Richard W.M. Jones [Sun, 28 Aug 2011 16:35:34 +0000 (17:35 +0100)]
cat: Small documentation correction.
(cherry picked from commit
085a56690611980f438e8af2eb47ebb411465775)
Richard W.M. Jones [Sun, 28 Aug 2011 09:18:42 +0000 (10:18 +0100)]
Version 1.12.5.
Richard W.M. Jones [Sat, 27 Aug 2011 16:53:03 +0000 (17:53 +0100)]
inspector: Use xmlstarlet instead of xpath in examples.
(cherry picked from commit
baefb8225c8cbde56a1637c17af5c0965a81060e)
Richard W.M. Jones [Sat, 27 Aug 2011 16:47:10 +0000 (17:47 +0100)]
man pages: Add a standard EXIT STATUS section to most pages.
(cherry picked from commit
f0f3e1621180724e0a907a30ff5dea9695ddead0)
Richard W.M. Jones [Fri, 26 Aug 2011 21:40:27 +0000 (22:40 +0100)]
progress: Make default UTF-8 progress bar less black.
(cherry picked from commit
ceb3a57f67f33b33c1f6cafdd0ef81808273f0c0)
Richard W.M. Jones [Sun, 28 Aug 2011 08:25:52 +0000 (09:25 +0100)]
resize: Add --machine-readable option for machine friendly output.
Use virt-resize --machine-readable to print a list of facts about what
this version of virt-resize supports.
This includes parts of commit
09a7545649e6cac0de2c4421cb64b659164174ee
from the development branch, but doesn't include the machine-readable
progress bar.
Richard W.M. Jones [Fri, 26 Aug 2011 17:17:39 +0000 (18:17 +0100)]
fish: Make progress bars into a mini library.
This library could now be called from other virt tools.
(cherry picked from commit
6146412f06c2f6f33c3ea7d571f16d4fe71dddb2)
Richard W.M. Jones [Fri, 26 Aug 2011 16:39:06 +0000 (17:39 +0100)]
fish: clarify comment: shared source files are used by virt tools too.
(cherry picked from commit
0bd055316f8581f4da33b039e33d5f61cc00294c)
Richard W.M. Jones [Thu, 25 Aug 2011 12:56:09 +0000 (13:56 +0100)]
ruby: Check Ruby callback exists before we call it (RHBZ#733297).
(cherry picked from commit
1a4f1df77eecee053eaae35d5544f151d37342e2)
Richard W.M. Jones [Thu, 25 Aug 2011 12:25:07 +0000 (13:25 +0100)]
ruby: Use a regular C array to pass the arguments through rb_rescue.
(cherry picked from commit
675f336319058fdbaf11ee004968b4543a5a9815)
Richard W.M. Jones [Thu, 25 Aug 2011 12:11:28 +0000 (13:11 +0100)]
ruby: Append newline character after printing exception in callback.
(cherry picked from commit
0cd5b9ac15c62eb570ec74d19b4aebde4990fd82)
Hilko Bengen [Mon, 22 Aug 2011 18:42:09 +0000 (20:42 +0200)]
python: Newer versions want parentheses around arguments of "print"
(cherry picked from commit
54911bdd325393d1f7f2861f298463c364b45469)
Richard W.M. Jones [Tue, 23 Aug 2011 19:21:29 +0000 (20:21 +0100)]
php: Fix bug in PHP tests.
We partitioned the disk, and then tried to create a PV on the whole
disk. LVM gave the error:
Device /dev/vda not found (or ignored by filtering).
It is unclear how this bug persisted for so long. It might be due to
a change in LVM.
(cherry picked from commit
4fb3b23fb69e4274f434f9258e38f185426298f7)
Richard W.M. Jones [Tue, 23 Aug 2011 18:50:11 +0000 (19:50 +0100)]
Coverity: fix memory leak along error path.
(cherry picked from commit
ce18be33cd5279a8d4120eedd037400c275585c0)
Richard W.M. Jones [Tue, 23 Aug 2011 18:29:46 +0000 (19:29 +0100)]
Coverity: Initialize msg buffer.
msg_flags was not being initialized and would have been passed to
sendmsg with a random value.
(cherry picked from commit
a31ac8fc32297cc9185fd20a5578d2bc81cc1bce)
Richard W.M. Jones [Tue, 23 Aug 2011 18:26:35 +0000 (19:26 +0100)]
Coverity: fix memory leak in guestfish.
(cherry picked from commit
c38cb92ec478c4dca83e4d38963720f463d52314)
Richard W.M. Jones [Tue, 23 Aug 2011 18:19:13 +0000 (19:19 +0100)]
Coverity: in daemon, free struct in RStruct, RStructList functions.
(cherry picked from commit
b2edcbe1b9c9d161e96cb56d0efd944e84d84526)
Richard W.M. Jones [Tue, 23 Aug 2011 17:56:12 +0000 (18:56 +0100)]
pclose: Fix other places where we only tested pclose == -1.
pclose can return > 0 when the status of the command was non-zero.
(cherry picked from commit
631faad97171d7c1238b2e413c663cf61476f440)
Richard W.M. Jones [Tue, 23 Aug 2011 17:53:38 +0000 (18:53 +0100)]
test_qemu: Improve the error message.
Note that errno is probably not set to a useful value here, so there
is not much point recording it.
(cherry picked from commit
f15961911316460f7d45342d63c2d784a483f0d1)
Richard W.M. Jones [Tue, 23 Aug 2011 17:53:00 +0000 (18:53 +0100)]
test_qemu: pclose may return any != 0 on error.
In particular pclose returns a status > 0 if the command fails.
(cherry picked from commit
a24652c7b27e8494268ccb6c9a5a2e5541ba5efd)
Richard W.M. Jones [Tue, 23 Aug 2011 17:43:24 +0000 (18:43 +0100)]
qemu detection: Free up previous qemu help/version strings if they exist.
(cherry picked from commit
2ace9be4cd69e84cd88e5b0fd74de861a4973c91)
Richard W.M. Jones [Tue, 23 Aug 2011 17:02:24 +0000 (18:02 +0100)]
Coverity: test_qemu: Ensure FILE * is not leaked along error paths.
This refactors the code in test_qemu slightly to ensure that
FILE *fp is not leaked on error paths.
(cherry picked from commit
08e77ad8cb4e8ac70d4217ebd5d236eba81645b5)
Richard W.M. Jones [Tue, 23 Aug 2011 15:47:18 +0000 (16:47 +0100)]
Coverity: Check guestfs_inspect_get_product_name() != NULL before using.
(cherry picked from commit
fa44536b0ff12102c72ae0337e51d272f0fc2353)
Richard W.M. Jones [Tue, 23 Aug 2011 15:41:07 +0000 (16:41 +0100)]
rescue: Ignore errno after guestfs_launch.
errno is pretty much random on the error path back from guestfs_launch
so there is nothing useful to be gained by checking it.
We could do with a better way to detect if appliance launch failed.
(cherry picked from commit
00fef9eed6a53e10a975814beef775483ff0b3dd)
Richard W.M. Jones [Tue, 23 Aug 2011 15:34:06 +0000 (16:34 +0100)]
Coverity: Ignore return value from guestfs_launch in virt-rescue.
We expect guestfs_launch to fail in this program.
(cherry picked from commit
9bab154d48e367702b65852c3c822341b474ffd2)
Richard W.M. Jones [Tue, 23 Aug 2011 15:12:27 +0000 (16:12 +0100)]
Coverity: Check return value from sscanf in bindtests calls.
(cherry picked from commit
4c76aaa391d591c5917a06b0277fb9eb7d6d790f)
Richard W.M. Jones [Sat, 20 Aug 2011 10:41:10 +0000 (11:41 +0100)]
autobuild: Only add last 100 lines of the log file.
(cherry picked from commit
ca727deac186981f4d9784696324c8f3af79f9e5)
Richard W.M. Jones [Sat, 20 Aug 2011 09:49:35 +0000 (10:49 +0100)]
New autobuild script.
Remove the old top-level autobuild.sh that confused a lot
of people.
Add an autobuild.sh script that builds from the latest tarball.
(cherry picked from commit
6375aede61d57422ad82f4941693493c07b78aa2)
Richard W.M. Jones [Fri, 19 Aug 2011 20:48:44 +0000 (21:48 +0100)]
configure: Add --with-extra flag to allow setting the extra version string.
Intended use in Fedora and RHEL is to encode the release
string, eg.
./configure [...] --with-extra="-%{release}"
Richard W.M. Jones [Thu, 18 Aug 2011 18:13:32 +0000 (19:13 +0100)]
protocol: Fix case where download can fail for small files.
There is another case where downloads of small files could fail if the
library side (writer) fails. In this case the library would send back
a cancellation, but it would be received after the daemon had finished
sending the whole file (because the file is small enough). The daemon
would reenter the main loop and immediately get an unexpected cancel
message, causing the daemon to die.
This commit also makes test-cancellation-download-librarycancels.sh
more robust. We use Monte-Carlo testing with a range of file sizes.
Small file sizes should trigger the error case.
(cherry picked from commit
e4cba8f2b1a68e7361ce342ff659cccb0490446e)
Richard W.M. Jones [Thu, 18 Aug 2011 16:46:50 +0000 (17:46 +0100)]
Escape special/non-printing characters in debug output (RHBZ#731744).
The default event handler in libguestfs was simply writing all debug
output directly to stderr. However if the output contains
non-printable characters such as terminal control codes then these
would also be sent directly.
With newer SeaBIOS there is a lame attempt to implement a splash
screen using terminal control codes, thus when libguestfs tries to
display debugging output it would cause the screen to clear and debug
output to be lost.
This commit causes all non-printing characters to be escaped.
(\n and \r characters from the appliance are treated somewhat
specially).
Furthermore, instead of using write(2), use buffered stderr calls.
(cherry picked from commit
06019bc82e107f7715ebc59e491610e06dad1e39)
Richard W.M. Jones [Thu, 18 Aug 2011 16:41:09 +0000 (17:41 +0100)]
Remove guestfs___print_timestamped_argv.
This function was used to print the qemu and
febootstrap-supermin-helper command lines.
Unfortunately in the qemu case it was used incorrectly: it called the
internal debug function (ie. event API callback) from the forked qemu
subprocess, which meant that higher level event callbacks might have
been invoked from the child process.
To fix this, convert the qemu case into a new function called
print_qemu_command line which just prints the command line directly to
stderr. This is called after stderr has been redirected into the pipe
to the main process. Thus the qemu command line will be marshalled
into the event API along with other qemu and appliance output.
After fixing this, only one use of guestfs___print_timestamped_argv
remained, for printing the febootstrap-supermin-helper command line.
This is converted to a local function print_febootstrap_command_line.
Also print_febootstrap_command_line is now called before we fork
febootstrap-supermin-helper, so that messages no longer overlap.
(cherry picked from commit
635af5be04265f845186b40e9a9fe7b102ad6909)
Hilko Bengen [Wed, 17 Aug 2011 22:14:46 +0000 (00:14 +0200)]
out-of-tree build: generate ./run from template, fix image checks
./run can now be run in a separate build directory. Since some files
needed in the image checks are found in the source tree (but not the
build tree), the source tree location is passed to make-*-img.sh via
an environment variable.
(cherry picked from commit
70c033998e0e721dc4f9eb2a20348098b259752c)
Richard W.M. Jones [Wed, 17 Aug 2011 11:41:41 +0000 (12:41 +0100)]
fish: Add fish-cmds.h to generator_built.
This updates commit
3064277680ad11f887691646d0fa17bb35f38c19.
(cherry picked from commit
85efbc6aa70d522af066a38fd1aae05b790c46d3)
Hilko Bengen [Tue, 16 Aug 2011 22:42:00 +0000 (00:42 +0200)]
out-of-tree build: fix make and make install
$(srcdir) is not needed for guestfs_c.c.
*.mli only exists in $(srcdir) and isn't found on "make install" otherwise
(cherry picked from commit
0938e43a60f9d729d9795cf45498e60217fece0e)
Hilko Bengen [Tue, 16 Aug 2011 22:41:59 +0000 (00:41 +0200)]
out-of-tree build: fix documentation generation II
(cherry picked from commit
8876b2d3764b42ebae3c5fdf61b1899095508169)
Hilko Bengen [Tue, 16 Aug 2011 22:41:58 +0000 (00:41 +0200)]
out-of-tree build: remove unneeded explicit paths
(cherry picked from commit
4baec012b1b09a888e570fc89dbaa9fbf9944f34)
Richard W.M. Jones [Tue, 16 Aug 2011 11:39:28 +0000 (12:39 +0100)]
Improve zeroing and detection of zeroes.
This code modifies zero, zero-device, is-zero, is-zero-device.
zero and zero-device are modified so that if the blocks of the device
already contain zeroes, then we don't write zeroes. The reason for
this is to avoid unnecessarily making the underlying storage
non-sparse or (in the qcow2 case) growing it.
is-zero and is-zero-device are modified so that zero detection is
faster. This is a nice side effect of making the first change.
Since avoiding unnecessary zeroing involves reading the blocks before
writing them, whereas before we just blindly wrote, this can be
slower. As you can see from the tests below, in the case where the
disk is sparse, it actually turns out to be faster, because we avoid
allocating the underlying blocks.
However in the case where the disk is non-sparse and full of existing
data, it is much slower. There might be a case for an API flag to
adjust whether or not we perform the zero check. I did not add this
flag because it is unlikely that the caller would have enough
information to be able to set the flag correctly.
(Elapsed time in seconds)
Format Test case Before After
Raw Sparse 16.4 5.3
Preallocated zero 17.0 18.8
Preallocated random 16.0 41.3
Qcow2 preallocation=off 18.7 5.6
preallocation=metadata 17.4 5.8
The current code uses a fixed block size of 4K for reading and
writing. I also tried the same tests with a block size of 64K but it
didn't make any significant difference.
(Thanks to Federico Simoncelli for suggesting this change)
(cherry picked from commit
5a50c04906828f6e99db6a9be420c84114476d39)
Richard W.M. Jones [Mon, 15 Aug 2011 13:55:10 +0000 (14:55 +0100)]
recipes: Remove two C file dependencies which are not actually used in the POD.
(cherry picked from commit
1fdd0193fd63af71359748915a0326d623a3d6ad)
Hilko Bengen [Sun, 14 Aug 2011 08:58:13 +0000 (10:58 +0200)]
out-of-tree build: fix building library
(cherry picked from commit
0241c753937e577d51a070f7db471260bf931f9c)
Hilko Bengen [Sun, 14 Aug 2011 08:58:12 +0000 (10:58 +0200)]
out-of-tree build: Fix up OCaml bindings and generator
(cherry picked from commit
900c9626b9d4f567b21aae433493b4b3b1d09f6d)
Hilko Bengen [Sun, 14 Aug 2011 08:58:11 +0000 (10:58 +0200)]
out-of-tree build: fix appliance
(cherry picked from commit
36e0f35a5828458ebeaf72999b3461ab66a230d8)
Hilko Bengen [Sun, 14 Aug 2011 08:58:08 +0000 (10:58 +0200)]
out-of-tree build: fix documentation generation
(cherry picked from commit
ff101adf7ead7bcdb46bccdb227ef18d844b965f)
Richard W.M. Jones [Wed, 17 Aug 2011 12:04:01 +0000 (13:04 +0100)]
Version 1.12.4.
Richard W.M. Jones [Sun, 14 Aug 2011 21:07:54 +0000 (22:07 +0100)]
ruby: Fix typo in Ruby bindings file.
(cherry picked from commit
44c3a300265ef7bfa5d49d2b9a2a8faccd9db2de)
Richard W.M. Jones [Fri, 12 Aug 2011 10:17:16 +0000 (11:17 +0100)]
Note that additional memory may be required to typecheck Augeas lenses (RHBZ#729887).
(cherry picked from commit
7739d7f471f9575828bd32489695d92dde005a9c)
Richard W.M. Jones [Fri, 12 Aug 2011 10:08:57 +0000 (11:08 +0100)]
fish: Document that remote run in cmd substitution context hangs.
This documents bug 592910.
(cherry picked from commit
6cabc1cd02e181063596b48df55c3f6db51a6bb9)
Richard W.M. Jones [Thu, 11 Aug 2011 10:45:25 +0000 (11:45 +0100)]
Fix 'unknown filesystem' warnings in old inspection code (RHBZ#678231 RHBZ#666578).
This is a comprehensive fix for the warnings from the old (and
obsolete) Perl inspection code. For a full description and
reproducer, see:
https://bugzilla.redhat.com/show_bug.cgi?id=678231#c5
(cherry picked from commit
b9838001015a06a69a08b69d9f013d82f0ea3139)
Richard W.M. Jones [Mon, 8 Aug 2011 17:52:23 +0000 (18:52 +0100)]
inspection: Better checking for Windows root disks (RHBZ#729075).
Previously any disk that had /autoexec.bat or /boot.ini or /ntldr
would be picked up as a candidate for a Windows root disk. If further
checking could not find any systemroot (eg. /windows) then this would
result in complete failure of inspection.
In particular, this got confused by Hp_recovery partitions which have
/autoexec.bat, but don't have a systemroot in one of the usual places
(they have /MiniNT instead).
What we do now is to properly investigate all possible systemroot
places before deciding this is a Windows systemroot, so the subsequent
failure cannot occur.
(Thanks to lorimar for reporting this bug).
(cherry picked from commit
2c57305f72cd6181d1849ae6e1b892aa01c7f844)
Richard W.M. Jones [Mon, 8 Aug 2011 11:41:54 +0000 (12:41 +0100)]
build: Set TMPDIR for local testing.
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
(cherry picked from commit
f7d18c84dde596699ffc5100fec2cf7b0d582450)
Richard W.M. Jones [Wed, 17 Aug 2011 11:41:41 +0000 (12:41 +0100)]
fish: Add fish-cmds.h to generator_built.
This updates commit
3064277680ad11f887691646d0fa17bb35f38c19.
(cherry picked from commit
85efbc6aa70d522af066a38fd1aae05b790c46d3)
Richard W.M. Jones [Sun, 7 Aug 2011 20:04:00 +0000 (21:04 +0100)]
fish: Declare run_* functions in a generated header file.
Calls to these functions are generated, so there is no need to declare
the functions by hand.
(cherry picked from commit
3064277680ad11f887691646d0fa17bb35f38c19)
Richard W.M. Jones [Sun, 7 Aug 2011 22:19:50 +0000 (23:19 +0100)]
Version 1.12.3.
Richard W.M. Jones [Sat, 6 Aug 2011 14:57:21 +0000 (15:57 +0100)]
docs: Fix function names in deprecation notices.
(cherry picked from commit
60adf092a8900323c048c94f3f0934be416a3eb6)
Richard W.M. Jones [Sat, 6 Aug 2011 14:53:15 +0000 (15:53 +0100)]
docs: guestfs_set_out_of_memory_handler returns void, not int.
It always has done. The documentation was wrong.
(cherry picked from commit
70f44cc0ea0bcdd025ed657461e07f6778be44ba)
Richard W.M. Jones [Fri, 5 Aug 2011 09:49:45 +0000 (10:49 +0100)]
debian: bash is required to run libtool replacement script.
This was failing on Debian where $(SHELL) is the minimal dash shell.
(cherry picked from commit
6a98ed953b1e3b0d3251385f0ca2dd1dee80b63d)
Richard W.M. Jones [Fri, 5 Aug 2011 09:31:03 +0000 (10:31 +0100)]
configure: Fix info about virt-resize when OCaml bindings are disabled.
(cherry picked from commit
e1c6d1738a2b9123dd08fb4ecff8176daf558f35)