Commit Graph

6554 Commits

Author SHA1 Message Date
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
Richard W.M. Jones
a9b62321b6 Version 1.25.49. 1.25.49 2014-03-26 10:28:36 +00:00
Richard W.M. Jones
90973755b2 customize: Use --no-network flag so test works under UML. 2014-03-26 10:21:38 +00:00
Richard W.M. Jones
63f0ee9c57 Version 1.25.48. 1.25.48 2014-03-26 00:05:45 +00:00
Richard W.M. Jones
218ac6996b Further updates to the release notes, for 1.26. 2014-03-25 23:53:11 +00:00
Richard W.M. Jones
36f4f10581 Further updates to release notes, for 1.26. 2014-03-25 23:31:39 +00:00
Richard W.M. Jones
cec31436f8 customize: Rename main.ml to customize_main.ml.
The OCaml compiler isn't happy when two modules have the same name in
different directories.  Since customize/ contains a library of modules
used in other directories, and since those directories may have
main.ml files too, we need to rename 'customize/main.ml' to
'customize/customize_main.ml'.
2014-03-25 22:41:19 +00:00
Richard W.M. Jones
1a4709147a customize: Add various options from virt-builder.
This adds the following options to virt-customize:

  --attach
  --attach-format
  -m / --memsize
  --network / --no-network
  --smp

This fixes commit 2b208d84db.
2014-03-25 22:21:40 +00:00
Richard W.M. Jones
87fcb4df03 Add customize subdirectory to ./run script.
This fixes commit 2b208d84db.
2014-03-25 22:09:14 +00:00
Richard W.M. Jones
36f179fdfa Begin working on release notes for libguestfs 1.26 release. 2014-03-25 16:06:25 +00:00
Richard W.M. Jones
a70dd85a17 aarch64: Use -M virt to specify virtual machine type.
Thanks: Paolo Bonzini
2014-03-25 14:54:40 +00:00
Richard W.M. Jones
d6072de4ff arm: Replace #ifdef with #if defined, etc.
No functional change.
2014-03-25 13:46:13 +00:00
Richard W.M. Jones
afb74f104d aarch64: Cannot emulate IDE, like all non-PC. 2014-03-25 13:46:13 +00:00
Richard W.M. Jones
219c2ddf1b aarch64: This has no working hpet emulation, like ARM 32 bit. 2014-03-25 13:46:13 +00:00
Richard W.M. Jones
f8c83e801a aarch64: This has no PCI, like ARM 32 bit. 2014-03-25 13:46:13 +00:00
Richard W.M. Jones
d396ccb470 Open release notes for 1.26 release. 2014-03-25 13:11:45 +00:00
Richard W.M. Jones
40cac10b62 Update TODO with Python bindings suggestion. 2014-03-25 13:11:45 +00:00
Richard W.M. Jones
3d79c51a28 Update API support. 2014-03-25 13:11:23 +00:00
Richard W.M. Jones
7ad1683dae Version 1.25.47. 1.25.47 2014-03-25 12:51:25 +00:00
Richard W.M. Jones
2b208d84db Add virt-customize standalone tool.
This includes some simple tests and a manual page.
2014-03-25 12:41:04 +00:00
Richard W.M. Jones
aa3bc8b65d sysprep: Remove the --autorelabel (and related) options.
The customize module includes an --selinux-label option which can run
'fixfiles restore' (on most SELinux guests) or set /.autorelabel (on
some older ones).

Commit 49014f81f3 renamed the old
--selinux-label option to --autorelabel, but note this was not
included in a stable version of libguestfs.

Note this change leaves a bunch of now redundant code for detecting if
we created a new file in the guest.
2014-03-25 12:41:04 +00:00
Richard W.M. Jones
ae6f726ecc sysprep: Use customize module for customizing the guest after sysprepping.
Note this removes the following modules (all replaced by 'customize'):

 - delete       [--delete, --scrub]
 - firstboot    [--firstboot]
 - hostname     [--hostname]
 - password     [--password, --password-crypto, --root-password]
 - random-seed
 - timezone     [--timezone]
2014-03-25 12:41:04 +00:00
Richard W.M. Jones
51834ad219 customize: Add a --password option for setting user passwords. 2014-03-25 12:41:04 +00:00
Richard W.M. Jones
4b0b3589e8 customize: Move virt-customize-related code to a separate directory.
Split virt-builder into build and customize steps, so that we can spin
off a separate tool called 'virt-customize'.  This commit does not in
fact create such a tool, but it moves all the common code into a
library, in the customize/ subdirectory of the source.

Although this is mostly refactoring, it does change the order in which
virt-builder command line arguments are processed, so they are now
processed in the order they appear, not the inflexible fixed order
used before.
2014-03-25 12:41:04 +00:00
Richard W.M. Jones
8e386fc1be sysprep: Pass debug and quiet flags to all modules.
Also use the Common_utils.make_message_function function to print
messages (same as virt-builder).
2014-03-25 12:41:04 +00:00
Richard W.M. Jones
1edfdcbd58 sysprep: Allow order of operations to be specified by modules. 2014-03-25 12:41:04 +00:00