6579 Commits

Author SHA1 Message Date
Richard W.M. Jones
df0d197812 Version 1.27.3. 1.27.3 2014-04-06 16:19:33 +01:00
Richard W.M. Jones
7173883154 recipes: Update the section on installing packages.
Libguestfs >= 1.26 makes this easy.
2014-04-03 20:27:43 +01:00
Richard W.M. Jones
55437e459b mllib: utils: Add mapi function.
This is List.mapi from the stdlib.  RHEL 6 did not have this function.
2014-04-03 17:59:54 +01:00
Richard W.M. Jones
82b486a908 appliance: Avoid touching appliance/supermin.d directory.
We must avoid touching appliance/supermin.d unless it is necessary, so
that we avoid unnecessary rebuilds of the full appliance.
Unfortunately since we created temporary files there, even if we
didn't decide to keep those temporary files they would still end up
touching supermin.d.  To stop this, move the temporary files out.
2014-04-03 17:59:54 +01:00
Pino Toscano
b7ad029536 appliance: exclude pkg-config, doc-base, and reportbug stuff
Exclude the arch-independent pkg-config files (no pkg-config available
in the appliance).

Exclude also the doc-base and reportbug files, typically found in Debian
systems.
2014-04-03 15:26:26 +02:00
Richard W.M. Jones
d268cfd13e builder: Add test of virt-index-validate. 2014-04-03 08:58:46 +01:00
Richard W.M. Jones
358c6571d0 builder: Rearrange EXTRA_DIST in alphabetical order.
No functional change.
2014-04-03 08:45:31 +01:00
Richard W.M. Jones
795a162cee builder: Don't use configure to generate test-index file.
The file contained no replacement patterns so generating it
with configure did nothing.
2014-04-03 08:44:24 +01:00
Pino Toscano
9cbb619db2 builder: better handle some index parsing errors
Add a new lexer token, unused in the grammar, for the unknown lines in
index files; this should allow to better handle such kind of parsing
errors, removing the need to exit() directly (and leave things in an
unclean state).
2014-04-03 08:41:06 +01:00
Richard W.M. Jones
3fa5096f48 customize: Add a "finishing" message at the end.
Useful, mainly because it tells you the total time spent running.
2014-04-02 17:33:37 +01:00
Richard W.M. Jones
8c46a644bc customize: Add customize/*.ml files for translation. 2014-04-02 14:06:38 +01:00
Pino Toscano
84f646a41a src/launch: improve the addition of the no-hpet option
Since HPET is specific to x86, we can safely add it its option only on
x86 and x86_64 when creating the libvirt XML (no more hitting the
launching failures due to that on other architectures).

Regarding the direct qemu launch, since qemu 1.1 (which is our current
minimum) "-ho-hpet" appears in the help only where actually supported,
so we could just checking for it and adding it only if present. This
should fix the architecture issues on this backend as well.
2014-04-01 18:01:19 +02:00
Richard W.M. Jones
b03b3f6f46 sparsify: Reorder external programs in SEE ALSO section. 2014-04-01 14:56:32 +01:00
Richard W.M. Jones
07dff756a7 sparsify: Remove duplicate "EXIT STATUS" sections from man page. 2014-04-01 14:55:20 +01:00
Richard W.M. Jones
c58bef5125 Version 1.27.2. 1.27.2 2014-03-31 18:07:08 +01:00
Richard W.M. Jones
7c1d95cca0 rescue: Fix the --suggest regression test so it works when using UML backend.
The boot partition name is /dev/ubda1 in this case, so use a small sed
script to canonicalize it for the test comparison.

This fixes commit f6a37740f2.
2014-03-31 18:00:07 +01:00
Lee Yarwood
cf31656923 Add the now mandatory arch=ARCH field to the index file examples.
61323fa introduced a mandatory arch field within index files to
identify the architecture of the OS installed within a given template.
This change simply documents the requirement within the relevant
section of the virt-builder man page.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
2014-03-31 17:43:27 +01:00
Richard W.M. Jones
4916806bdf Version 1.27.1. 1.27.1 2014-03-31 15:13:16 +01:00
Richard W.M. Jones
957afde13b python: Add README.txt to EXTRA_DIST. 2014-03-31 15:13:16 +01:00
Richard W.M. Jones
0d9a61a91d src: Fix test-utils.c to test the validate_guid function again.
This fixes commit 768ab2e01d.
2014-03-31 14:21:45 +01:00
Richard W.M. Jones
7e39cd4600 Remove internal libvirt_setlinux* APIs and use backend settings instead.
This removes the internal APIs internal_set_libvirt_selinux_label and
internal_set_libvirt_selinux_norelabel_disks.  The communication
between the libvirt domain and the backend now uses the backend
settings.
2014-03-31 14:21:45 +01:00
Richard W.M. Jones
5d4e4e7eca ocaml: Add ESRCH to Guestfs.Errno module. 2014-03-31 14:21:45 +01:00
Richard W.M. Jones
d137ad52c5 New APIs: set-backend-setting, get-backend-setting, clear-backend-setting.
Currently the backend settings are treated as a list of strings.  You
can set the whole list (clearing any strings there previously), but
you cannot search for an individual string or replace an individual
string.

This adds further APIs allowing you to do that.  We treat the backend
settings as a list of environment-like strings (ie.  name=value), and
add the following functions:

 - set-backend-setting (name, value)

   Set name=value.  Any previous settings of name are cleared.

 - get-backend-setting (name)

   Search for name or name=value and return the value.

 - clear-backend-setting (name)

   Remove any name or name=value settings.

This also adds a regression test.
2014-03-31 13:33:53 +01:00
Richard W.M. Jones
1893eaded0 handle: Free g->backend_settings.
This was not being freed, resulting in a memory leak if you used
LIBGUESTFS_BACKEND_SETTINGS.

Found by valgrind.
2014-03-31 13:33:53 +01:00
Richard W.M. Jones
6af2306730 python: Remove unnecessary library dependencies.
We can remove the deps on libxml2, libvirt and gnulib, by only linking
with utils.o (instead of utils.a).
2014-03-29 18:52:32 +00:00
Richard W.M. Jones
fcbfc4775f python: Add a Python setup.py script.
This is not used by libguestfs right now, but it does allow you to
build a python "distribution" of libguestfs, like this:

  make -C python sdist

The distribution tarball will be in python/dist/

You can copy the distribution tarball somewhere, unpack it, and use
regular 'python setup.py' commands such as:

  python setup.py build
  python setup.py install [--prefix=...]
  python setup.py --name

In future we hope to be able to upload the distribution tarball to
PyPi, but licensing issues prevent this at present.
2014-03-29 17:36:16 +00:00
Richard W.M. Jones
768ab2e01d utils: Move guestfs___validate_guid out of utils.c.
guestfs___validate_guid was a new function added to utils.c in
commit beef77403c.

However utils.c should not include <guestfs-internal.h> since the
other functions in this file can be used by all front-end code, not
just libguestfs.so.

This function is only needed in libguestfs.so, so move it to another
source file, and remove include of <guestfs-internal.h> from utils.c.

Also: use 'size_t' for counting, not 'int'.

This fixes commit beef77403c.
2014-03-29 17:12:47 +00:00
Richard W.M. Jones
bc1a415794 utils: Remove for-loop variable decl.
Breaks Python distutils which doesn't use C99:

utils.c: In function ‘guestfs___copy_string_list’:
utils.c:79:7: error: ‘for’ loop initial declarations are only allowed in C99 mode
       for (size_t j = 0; j < i; ++j)
       ^
utils.c:79:7: note: use option -std=c99 or -std=gnu99 to compile your code
2014-03-29 17:12:47 +00:00
Richard W.M. Jones
ebda77b647 virt-builder: Add --machine-readable option, as in virt-resize and virt-sparsify.
This makes it easier to query the virt-builder binary capabilities,
from external programs.
2014-03-29 15:09:19 +00:00
Richard W.M. Jones
30bdadf032 builder: Disable internal parallel xzcat on RHEL 6. 2014-03-29 14:55:01 +00:00
Richard W.M. Jones
eff7aed6cf builder: Remove recursive include of index-parse.h.
This breaks on Bison < 2.7, and seems unnecessary in any case since
the same file is included earlier.
2014-03-29 14:47:28 +00:00
Richard W.M. Jones
f6a37740f2 rescue: Add a regression test for virt-rescue --suggest option. 2014-03-28 14:38:06 +00:00
Richard W.M. Jones
c8657535fd rescue: Don't leak various variables when using --suggest option with multi-boot guests.
This fixes a leak which was introduced in
commit 4255db65e5.

Found by Coverity.
2014-03-28 14:37:58 +00:00
Richard W.M. Jones
15b06d6100 make-fs: Close FILE* along error path.
Found by Coverity.
2014-03-28 14:01:19 +00:00
Richard W.M. Jones
410aae4b6f make-fs: Check for error return from guestfs_statvfs.
Found by Coverity.
2014-03-28 13:59:56 +00:00
Richard W.M. Jones
4cea94a958 daemon: parted: part-get-name: Don't leak partition type string.
Found by './configure --enable-valgrind-daemon'.

This fixes commit 820b870167.
2014-03-28 12:35:25 +00:00
Richard W.M. Jones
a7a239f7ab builder: Use libgnu.la instead of -lgnu.
This updates commit effcb99f83.
2014-03-28 09:57:07 +00:00
Olaf Hering
effcb99f83 builder: Link virt-index-validate with gnulib.
[Gnulib tries to replace getopt because of the bug shown below.
However because -lgnu was not used in the Makefile, the replacement
failed. -- RWMJ]

from config.log:

             /* This code dumps core on glibc 2.14.  */
             {
               static char program[] = "program";
               static char w[] = "-W";
               static char dummy[] = "dummy";
               char *argv[] = { program, w, dummy, NULL };
               optind = opterr = 1;
               if (getopt (3, argv, "W;") != 'W')
                 result |= 64;
             }

gdb --quiet --readnow ./conftest -ex r -ex bt -ex detach -ex q
Reading symbols from /usr/src/packages/BUILD/libguestfs-1.26.0/conftest...expanding to full symbols...done.
Starting program: /usr/src/packages/BUILD/libguestfs-1.26.0/conftest
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=5d1a12e6f0e95331cc4e39df74ecbd5adb76a1f7"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=a06caa12df8f953a453befa827c3145adaf6269a"
main(323) result 0
main(344) result 0
main(357) result 0
main(370) result 0

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b2dbf8 in _getopt_internal_r () from /lib64/libc.so.6
Detaching from program: /usr/src/packages/BUILD/libguestfs-1.26.0/conftest, process 31042

This change actually fixes build for me on sles11sp3 and 11.4.
2014-03-28 09:53:39 +00:00
Richard W.M. Jones
a78cd210c3 Version 1.27.0. 1.27.0 2014-03-27 15:47:16 +00:00
Richard W.M. Jones
996eca5da7 Version 1.26.0.
New stable version.
1.26.0
2014-03-27 12:04:44 +00:00
Richard W.M. Jones
a20e368fea fish: Check return values from a couple of API calls.
Found by Coverity.
2014-03-27 11:34:40 +00:00
Richard W.M. Jones
be250948bc fish: Ignore return value from guestfs_user_cancel.
As we are in a signal handler, there's nothing else we can do.

Found by Coverity.
2014-03-27 11:34:05 +00:00
Richard W.M. Jones
4099880643 examples: Check return value from guestfs_list_filesystems.
Found by Coverity.
2014-03-26 20:25:05 +00:00
Richard W.M. Jones
7792278e05 virt-diff: Free memory along error path.
Found by Coverity.
2014-03-26 20:23:19 +00:00
Richard W.M. Jones
8da50e5a3f daemon: md: Whitespace fix. 2014-03-26 20:08:36 +00:00
Richard W.M. Jones
4caa2ea5ff daemon: ldm: Initialize glob_t struct before passing to glob.
Some implementations of glob might use fields in the struct, although
not glibc as far as I know.

Issue identified by Coverity.
2014-03-26 20:07:43 +00:00
Richard W.M. Jones
fe97d5ed9c builder: pxzcat: Ignore return value from posix_fadvise.
Quiets warning from Coverity.
2014-03-26 20:03:15 +00:00
Richard W.M. Jones
21390bc4aa Pull latest translations from Transifex. 2014-03-26 16:53:37 +00:00
Richard W.M. Jones
f566f176c6 Remove the ROADMAP file.
I don't think it provides any value now.  There is a list of bugs in
'BUGS' and a set of ideas in 'TODO'.
2014-03-26 16:48:37 +00:00
Richard W.M. Jones
0febb59afa Final updates to release notes for 1.26. 2014-03-26 13:35:05 +00:00