7396 Commits

Author SHA1 Message Date
Richard W.M. Jones
5862a4391d Version 1.29.2. 1.29.2 2014-10-25 17:56:45 +01:00
Richard W.M. Jones
09584a8bc6 sparsify: Add Utils module and use common error/warning/info functions.
This program needs quite a lot more work, in particular to make the
regular messages use 'make_message_function' instead of 'printf'.
2014-10-25 15:35:49 +01:00
Richard W.M. Jones
b01582623d resize: Tidy up messages.
Add common error/warning/info functions.

Examine every existing call to printf/eprintf and change where
necessary so that:

 - error is used instead of eprintf + exit 1

 - warning no longer needs ~prog argument (it is added by Utils module)

 - any verbose output should go to stdout, not stderr

 - info is used to print general informational messages

Also, don't indent summary of changes.
2014-10-25 15:28:58 +01:00
Richard W.M. Jones
6049fbdddb sysprep: Use common error/warning/info functions. 2014-10-25 15:13:27 +01:00
Richard W.M. Jones
7c9293fff0 v2v: Add Utils.warning and Utils.info that don't require ~prog parameter. 2014-10-25 15:06:08 +01:00
Richard W.M. Jones
f7664b7f76 customize: Add Customize_utils module and use common error/warning/info functions.
Add a Customize_utils module.  This contains common error/warning/info
functions, and also quote = Filename.quote.

Examine every existing call to printf/eprintf and change where
necessary so that:

 - error is used instead of eprintf + exit 1

 - warning no longer needs ~prog argument (it is added by Utils module)

 - any verbose output should go to stdout, not stderr

 - info is used to print general informational messages

Also, don't pass ~prog parameter around.  Instead we just get it from
the executable name.
2014-10-25 15:00:21 +01:00
Richard W.M. Jones
b99983480a builder: Add Utils module and use common error/warning/info functions.
Add a Utils module.  This contains common error/warning/info functions,
and also quote = Filename.quote.

Examine every existing call to printf/eprintf and change where
necessary so that:

 - error is used instead of eprintf + exit 1

 - warning no longer needs ~prog argument (it is added by Utils module)

 - any verbose output should go to stdout, not stderr

 - info is used to print general informational messages
2014-10-25 14:57:51 +01:00
Richard W.M. Jones
4ff6ba3550 test-tool: Handle mapping other architectures to qemu-system-* binaries. 2014-10-24 16:55:36 +01:00
Menanteau Guy
5018e00129 ppc64le: test-tool: Use correct qemu-system-ppc64 binary when creating qemu wrapper. 2014-10-24 16:51:02 +01:00
Richard W.M. Jones
a61d190ed3 ppc64le: configure: Look for qemu-system-ppc64 binary (RHBZ#1156449). 2014-10-24 14:40:57 +01:00
Richard W.M. Jones
62c84c6a55 inspector: Document that -a option can take a URI for remote storage (RHBZ#1156301). 2014-10-24 10:32:25 +01:00
Richard W.M. Jones
a5a0c2f3b0 bash-completion: Install symbolic links instead of copies of files (RHBZ#1156298). 2014-10-24 10:32:25 +01:00
Richard W.M. Jones
68ac0afc8d bash-completion: Replace 'ln -sf' commands with rm; $(LN_S). 2014-10-24 10:32:25 +01:00
Pino Toscano
46f9dd5290 configure: map also amd64 as host_cpu to x86_64 qemu 2014-10-23 19:03:12 +02:00
Pino Toscano
7fcac5f59f tests: switch from get_current_dir_name to getcwd(0, NULL)
get_current_dir_name exists on GNU libc only, so not portable.
On the other hand, while POSIX leaves a null buffer argument for getcwd
as unspecified behaviour, basically the most used/important Unix
implementations (GNU libc, FreeBSD's libc, etc) allow such value,
returning a new allocated buffer with the current directory.

In any case, the change just affects two tests, so even if it hits a
libc not implementing this behaviour for getcwd, only tests are
affected.
2014-10-23 19:03:12 +02:00
Pino Toscano
3784a42d03 customize, mllib: use the libvirt CFLAGS
uri-c.c and perl_edit-c.c end up (directly or indirectly) including
guestfs-internal-frontend.h, which in turns includes libvirt/libvirt.h;
hence, make sure to use the libvirt CFLAGS.
2014-10-23 19:03:12 +02:00
Pino Toscano
0a2534c4f1 actions: mark as IfNotCrossAppliance tests of command and command_lines
All these tests copy to the appliance a tool built on the host, and run
it.
2014-10-23 19:03:12 +02:00
Pino Toscano
349536bf70 tests/c-api: add a way to skip test when host and appliance differ
Add a IfNotCrossAppliance prereq for tests, so a test using it can only
be run when the appliance is a copy of the running host system; this can
help marking tests which run stuff (usually built in the host) inside
the appliance.
2014-10-23 19:03:12 +02:00
Pino Toscano
3de9fa7ba9 build: use $(SED) instead of sed when possible
Make use of the sed executable set at configure time.
2014-10-23 19:03:12 +02:00
Pino Toscano
ea9b225480 Include stdint.h where needed
Required for using int64_t, etc. Apparently implicitly pulled so far.
2014-10-23 19:03:12 +02:00
Pino Toscano
abd93812ca tests: isolate iso_system_id baseline string
Move the reference iso_system_id for the isoinfo_device test to an own
define for Linux, with an error for unknown OSes.
2014-10-23 19:03:12 +02:00
Pino Toscano
d2c853f414 builder: rename "program_name" into "progname"
"program_name" is already used as shorthand define for
program_invocation_short_name.
2014-10-23 19:03:12 +02:00
Pino Toscano
57512e7785 normalize iconv handling
Since the signature of iconv() changes between implementations (the
constness of the second parameter, in particular), make use of the iconv
module of gnulib to handle these potential differences, including an
external (out of libc) iconv implementation.
2014-10-23 19:03:12 +02:00
Pino Toscano
b44bf21702 p2v: remove unused variable 2014-10-23 19:03:12 +02:00
Pino Toscano
471ed473cf fuse: test-fuse: enclose acl vars within HAVE_ACL
Enclose the acl-related variables within a #ifdef HAVE_ACL block, so
when building without acl support and -Werror it can build.
2014-10-23 19:03:12 +02:00
Pino Toscano
c1ad89170d build: look for and use sys/endian.h
Some OSes have sys/endian.h instead of glibc's endian.h.
2014-10-23 19:03:11 +02:00
Pino Toscano
b7d2226926 Include sys/wait.h where needed
Required for using WIFEXITED, WEXITSTATUS, etc. Apparently implicitly
pulled so far.
2014-10-23 19:03:11 +02:00
Pino Toscano
78b27cc0b6 Include string.h where needed
Required for using strlen, memcpy, etc. Apparently implicitly pulled so
far.
2014-10-23 19:03:11 +02:00
Pino Toscano
65f830b84c build: use the ptsname_r gnulib module
virt-p2v uses ptsname_r, which is not portable but implemented by
gnulib.
2014-10-23 19:03:11 +02:00
Richard W.M. Jones
fd70cdc3c5 ocaml: Pass -annot flag to compiler.
This generates .annot files that contain type information.
In emacs + tuareg mode, using C-c C-t displays the type of the
underlying expression.
2014-10-23 15:43:25 +01:00
Richard W.M. Jones
90dc8942bf ocaml: Factor out flags into configure script.
No change, just refactoring.
2014-10-23 15:41:49 +01:00
Richard W.M. Jones
fdaaa00513 Version 1.29.1. 1.29.1 2014-10-22 14:40:02 +01:00
Richard W.M. Jones
ad78d1492b v2v: -i libvirtxml: Fix handling of nbd sources (RHBZ#1153589).
Previously I modified the parse_libvirt_xml function to get rid of the
awkward 'map_source*' functions, and have the callers map over and
modify the source disks afterwards.  However this broke the case where
an "nbd:..." URL was returned by parse_libvirt_xml, since the callers
might try to map this URL (eg. turning it into an absolute path).
This broke virt-p2v specifically.

This commit changes parse_libvirt_xml to return a list of tuples
containing disk information, giving the callers more information with
which to do the mapping.

This fixes commit 3596165282.
2014-10-22 12:46:08 +01:00
Richard W.M. Jones
dbe35729a3 v2v: Add some assertions to check the source was created correctly. 2014-10-22 12:45:14 +01:00
Richard W.M. Jones
e1eccae2da v2v: -i ova: Don't fail when given a relative path to an OVA directory (RHBZ#1155121). 2014-10-21 13:36:55 +01:00
Richard W.M. Jones
496d0c45bc v2v: vcenter: Hoist readahead configurables to top of file.
No change, just code motion.
2014-10-20 22:23:23 +01:00
Richard W.M. Jones
b8f826b7ac v2v: Inline and simplify Xen and vCenter input methods.
Take the opportunity presented by the refactoring in the previous
commit to inline and simplify functions in these input subclasses.

This finally removes the map_source* functions.
2014-10-20 21:12:57 +01:00
Richard W.M. Jones
a468fde016 v2v: Refactor Xen and vCenter code.
This refactors the code into more logical units, based on the previous
commits.  So Xen + the input_libvirt Xen code is grouped and moved
into a new module called Input_libvirt_xen_ssh.  Similarly VCenter +
input_libvirt vCenter code is moved to Input_libvirt_vcenter_https.

There is no change here, purely code motion.
2014-10-20 20:36:06 +01:00
Richard W.M. Jones
9281dc7d44 v2v: vCenter: Adjust readahead parameter between conversion and copying phases (RHBZ#1151033) (RHBZ#1153589).
Previously we fixed RHBZ#1151033 by increasing the cURL readahead
parameter to a large value.  Unfortunately this is too large -- and
hence slow -- for the conversion phase, which broke on slow vCenter
servers (RHBZ#1153589).

What we do now is to perform the conversion phase with the default
readahead (2MB) to ensure stability, since performance of the
conversion phase is not critical.  Then before copying we change the
readahead to the larger value (64MB) to ensure efficient copying.
2014-10-20 18:34:48 +01:00
Richard W.M. Jones
0084736f5f v2v: Add input#adjust_overlay_parameters method.
This is called before the copying phase to allow the input method to
adjust overlay/backing parameters.

The default implementation does nothing, so this commit has no effect.
2014-10-20 18:21:38 +01:00
Richard W.M. Jones
63387fd8d0 v2v: Add a unique number to source disks.
Note that it doesn't matter what the number is, as long as it's
different for each disk.

The unique number lets us store extra data in input objects which is
associated with each disk.
2014-10-20 18:18:54 +01:00
Richard W.M. Jones
3596165282 v2v: -i libvirt: Refactor map_source* functions.
Get rid of the awkward map_source* functions, and replace it with
equivalent code which modifies the source disks objects coming back
from Input_libvirtxml.parse_libvirt_xml.

This is just code refactoring.  Apart from the order in which certain
tests are done, this should be equivalent to the previous code.
2014-10-20 18:02:57 +01:00
Richard W.M. Jones
9596fc44ff v2v: -i libvirt: Create three specialized subclasses for handling vCenter/Xen/other.
Previously we had one class ('input_libvirt') which handled all three
cases.  Now we have one superclass ('input_libvirt') and three
subclasses of that ('input_libvirt_vcenter_https',
'input_libvirt_xen_ssh', 'input_libvirt_other') which handle the three
cases separately.

This is just code motion, and should be functionally equivalent to
what was here before.
2014-10-20 17:37:04 +01:00
Richard W.M. Jones
9ddfbad814 v2v: Increase vCenter https timeout to 10 minutes. 2014-10-20 14:05:10 +01:00
Richard W.M. Jones
0b49defc2b appliance: Set udev.event-timeout to override default too low udev setting.
Unfortunately udev removed the udevtimeout setting on the kernel
command line.  This means the default timeout was being set back to 30
seconds, which is way too low for remote disks.

However it was re-added (2014-07-29) as udev.event-timeout.  Set both
to be sure.

Note this requires systemd >= 216.
2014-10-20 14:05:00 +01:00
Pino Toscano
3276845df1 diff: do not pad uid/gid in CSV mode 2014-10-20 10:06:25 +01:00
Pino Toscano
87941d183f cat, diff: avoid double slashes in paths (RHBZ#1151910).
In full_path, skip the trailing slash in the base directory when
different than "/", as the slash will eventually be added when building
the resulting path.
2014-10-20 10:05:45 +01:00
Pino Toscano
e5befcacc5 ls: in CSV mode, always have a checksum field (RHBZ#1151900).
Make sure to output the field for checksum even for non-regular files,
as empty, in CSV output mode. This ensures each line has the same number
of fields, regardless of the file type.
2014-10-20 10:01:52 +01:00
Richard W.M. Jones
9019c4eb06 v2v: -i ova: Add a test for *.vmdk.gz compressed files (RHBZ#1152998). 2014-10-18 21:57:54 +01:00
Richard W.M. Jones
f27a582b6d v2v: -i ova: Add a test for ZIP as a container (RHBZ#1152998). 2014-10-18 21:57:53 +01:00