Commit Graph

3263 Commits

Author SHA1 Message Date
Richard W.M. Jones
f766c19a67 filesystems: Fix memory leak found by valgrind.
(cherry picked from commit cd3d28491d)
2011-11-24 21:07:16 +00:00
Richard W.M. Jones
7042c94a54 part-disk: Change default alignment of this to 64K (128 sectors).
This is the minimum alignment.  1MB would be better.

Note that the exact behaviour is not defined in the API.
(cherry picked from commit c4381dba73)
2011-11-24 21:07:06 +00:00
Richard W.M. Jones
ed628d30b0 virt-alignment-scan: Add checks for when API calls return NULL.
In particular, virt-alignment-scan -a /dev/null would segfault
because of an error returned by parted.
(cherry picked from commit 7b192f5a67)
2011-11-24 21:06:55 +00:00
Matthew Booth
fd0dfead30 NFC: Allow multiple config files in inspect_with_augeas in inspect_fs_unix.c
This change is in support of the addition of MD support to fstab inspection.
(cherry picked from commit 373dca7d12)
2011-11-24 21:06:46 +00:00
Matthew Booth
b04a30131e NFC: Consolidate the error path in check_fstab in inspect_fs_unix.c
(cherry picked from commit 011a248381)
2011-11-24 21:06:41 +00:00
Matthew Booth
187583299c NFC: Declare and use variables on the same line in inspect.c
(cherry picked from commit c8cb3d27b6)
2011-11-24 21:06:33 +00:00
Matthew Booth
0bdb3e0ad3 build: Nothing under images/ should be translated
(cherry picked from commit 34c0542189)
2011-11-24 21:06:27 +00:00
Matthew Booth
58567cd170 run script: Don't overwrite LD_LIBRARY_PATH and PERL5LIB
This change allows the run scripts of virt-v2v and libguestfs to be chained.
(cherry picked from commit 252ad4aa41)
2011-11-24 21:06:17 +00:00
Richard W.M. Jones
046c8b36b5 gnulib: Rebase to latest.
(cherry picked from commit 065b6b5798)
2011-11-24 21:06:06 +00:00
Richard W.M. Jones
af77e1d8e1 Don't rely on implicit promotion of float to double in printf args.
(cherry picked from commit 9b102aae65)
2011-11-24 21:05:53 +00:00
Richard W.M. Jones
9e14ca6911 fish: In generated code, put function names on a new line.
eg:

static void
run_foo ()
{
}
(cherry picked from commit 99ec97dcdf)
2011-11-24 21:05:44 +00:00
Richard W.M. Jones
f9e1fefcb5 Version 1.14.3. 1.14.3 2011-11-22 15:05:18 +00:00
Richard W.M. Jones
de952fa9e8 df, testing: Add notes on virt-df numbers (thanks Kashyap Chamarthy).
(cherry picked from commit 7b3137e664)
2011-11-22 14:44:54 +00:00
Richard W.M. Jones
7e1b479f7e sparsify: Add auto-detection of .vdi files.
Note that for this to work properly, it requires a patch to
the 'file' command.  See:
https://www.redhat.com/archives/libguestfs/2011-November/msg00120.html
(cherry picked from commit 342b4a55d0)
2011-11-22 14:44:54 +00:00
Richard W.M. Jones
0b5f081378 guestfs-testing: Link to libguestfs-test-tool.
(cherry picked from commit 6f39cfaeac)
2011-11-22 14:44:53 +00:00
Hilko Bengen
22ecb8c6ee out-of-tree build: ruby
(cherry picked from commit 8bc6e9d6a8)
2011-11-22 14:44:53 +00:00
Richard W.M. Jones
14b895629d Add guestfs-testing(1) man page.
This contains suggested manual tests that users can run.
(cherry picked from commit a3b2429681)
2011-11-22 14:44:53 +00:00
Hilko Bengen
d722875817 out of tree build: haskell
(cherry picked from commit 730fb50780)
2011-11-22 14:44:53 +00:00
Hilko Bengen
c7337ead3e java: out-of-tree build, don't build static library
(cherry picked from commit a0509ff071)
2011-11-22 14:44:53 +00:00
Hilko Bengen
beadb1fee4 out of tree build: erlang
(cherry picked from commit ddb3fac1bf)
2011-11-22 14:44:53 +00:00
Richard Jones
190ccbd501 32 bit: Fix printf off_t.
(cherry picked from commit 47963bc9cc)
2011-11-22 14:44:53 +00:00
Richard W.M. Jones
1a561be63c 32 bit: Use %td for ptrdiff_t (difference between two pointers).
(cherry picked from commit 5d48250224)
2011-11-22 14:44:53 +00:00
Richard W.M. Jones
849bcd25e6 df: Disable part of virt-df test.
See:
https://www.redhat.com/archives/libguestfs/2011-November/msg00051.html
(cherry picked from commit 6e6b3ff35f)
2011-11-22 14:44:53 +00:00
Richard W.M. Jones
20359767c6 generator: Support testing the output of RHashtable functions.
You can use TestOutputHashtable to test the output of RHashtable
functions.
(cherry picked from commit 5f0b75f040)
2011-11-22 14:44:48 +00:00
Richard W.M. Jones
328f866c38 daemon: Define safe ADD_ARG macro for constructing arg lists on the stack.
(cherry picked from commit edd502543a)
2011-11-22 14:18:12 +00:00
Richard W.M. Jones
7985347113 Version 1.14.2. 1.14.2 2011-11-10 10:40:31 +00:00
Richard W.M. Jones
615f504a5f ocaml: Fix bindings when a function takes more than 10 parameters.
If any function had more than 10 required + optional parameters, OCaml
bindings could not be generated.  Currently there are no such
functions.
(cherry picked from commit 29172e7c48)
2011-11-09 22:08:49 +00:00
Richard W.M. Jones
3398888ba9 tests: Fix bitmask parameter when testing optional arguments.
The bitmask was being constructed backwards(!)

As a result, any test which tested optional arguments didn't work.
There are very few such tests and they happened not to be affected by
this.
(cherry picked from commit af2b0378bb)
2011-11-09 22:08:40 +00:00
Richard W.M. Jones
6ffc7e4b82 fish: More informative documentation of optargs.
(cherry picked from commit 271f8e4b70)
2011-11-09 22:08:34 +00:00
Richard W.M. Jones
2a5615372e ocaml: Compile OCaml bindings and tests with -warn-error.
(cherry picked from commit 145ed04e41)
2011-11-09 22:08:24 +00:00
Richard W.M. Jones
b718bb9491 ocaml: Catch EVENT_ENTER case in test.
For some reason we are not compiling the tests with -warn-error so
this problem was not noticed before.

This fixes commit 9420eaf44e.
(cherry picked from commit 22c72b911e)
2011-11-09 22:08:20 +00:00
Matthew Booth
3bde9fdffd Update FSF address.
(cherry picked from commit 04ea1375c5)
2011-11-09 22:08:13 +00:00
Richard W.M. Jones
400b2cb03d daemon: Use a private copy of /etc/lvm so we don't modify the real config.
In the libguestfs live case we need to be careful not to modify the
real /etc/lvm/lvm.conf file (when setting the filter rule).

When the daemon starts, make a complete copy of /etc/lvm in a
temporary directory, and adjust LVM_SYSTEM_DIR to point to the copy.
All changes are made in the temporary copy.
(cherry picked from commit 9c299b64bb)
2011-11-09 22:08:06 +00:00
Richard W.M. Jones
95ee3c98cf daemon: Don't use files with fixed names in /tmp (thanks Steve Kemp).
Although this doesn't matter for the ordinary (appliance) case, it
matters for the libguestfs live case.  In that case it could cause the
guest to be exploited by a tmp/symlink attack.
(cherry picked from commit 6011b1f803)
2011-11-09 22:06:58 +00:00
Richard W.M. Jones
267ddc5754 virt-sysprep: Don't use xmlstarlet.
Use virt-inspector --xpath option instead.
(cherry picked from commit 22998927f9)
2011-11-09 22:06:50 +00:00
Richard W.M. Jones
73364364b6 Add virt-inspector --xpath to run XPath queries directly.
xmlstarlet is good, but not available in Red Hat Enterprise Linux.

Build a simple but sane XPath query parser into virt-inspector
directly so that we don't need any external tools.
(cherry picked from commit d1ee71782a)
2011-11-09 22:06:46 +00:00
Richard W.M. Jones
a0a575767e resize: Remove requirement for ocaml Pcre library.
This library is not available in RHEL 6, and in any case removing the
dependency is a simple change.
(cherry picked from commit ffbafadcb8)
2011-11-09 22:06:32 +00:00
Richard W.M. Jones
57ec81a9f3 resize: Add tests for some Utils functions.
(cherry picked from commit 6389826810)
2011-11-09 22:06:16 +00:00
Richard W.M. Jones
70a98f99db python: Use sys.version_info[0] instead of sys.version_info.major.
The major/minor fields only exist in Python >= 2.7.  This works for at
least Python 2.5 and 2.6.

Thanks to Hilko Bengen.

This updates commit 646142f513.
(cherry picked from commit 31e5539a14)
2011-11-09 22:05:56 +00:00
Richard W.M. Jones
a31bebe46f python: Fixes for Python 3 (RHBZ#750889).
These fixes allow libguestfs bindings to work with Python 3 (tested
with Python 3.2)

You can select which Python you compile against by doing:

  PYTHON=python ./configure && make && make check

or:

  PYTHON=python3 ./configure && make && make check
(cherry picked from commit 2116f79cbc)
2011-11-09 22:05:51 +00:00
Richard W.M. Jones
a936a9e1ed python: Pass $PYTHON environment variable to tests.
If the user set PYTHON when configuring, this variable is not passed
through to the tests, so it is possible the tests will fail because
they are testing the wrong version of python.  By passing $PYTHON
through to the tests we ensure that we test against the same version
of python that we configured with.
(cherry picked from commit e2249b7ce1)
2011-11-09 22:05:38 +00:00
Richard W.M. Jones
f3dfc7a0de python: Include <config.h>.
Ooops ...
(cherry picked from commit 25454b8308)
2011-11-09 22:05:25 +00:00
Richard W.M. Jones
8ad0974099 python: Correctly check for Python major/minor.
The manual for sys.version warns that you should not parse the string,
which we were doing.  It would have failed on python "2.10" or
similar.

Do it correctly using the sys.version_info struct instead.
(cherry picked from commit 646142f513)
2011-11-09 22:05:20 +00:00
Richard W.M. Jones
7194dae8bc fish: Use size_t instead of int when counting strings.
(cherry picked from commit b4da051d54)
2011-11-09 22:04:48 +00:00
Matthew Booth
57dea61ccc Fix debug help error message.
When given an invalid debug command, libguestfs responds with the
error message:

  libguestfs: error: debug: use 'debug help' to list the supported commands

However this command does not work, as debug requires two
arguments. This change updates the message to prompt the user to use
'debug help 0'.
(cherry picked from commit 4e3a1205eb)
2011-11-09 22:04:41 +00:00
Richard W.M. Jones
d807f0c65c appliance: Add 'mdadm' package.
(cherry picked from commit 6f84ef6768)
2011-11-09 22:04:34 +00:00
Richard W.M. Jones
1d3df304ad Version 1.14.1. 1.14.1 2011-10-31 11:22:18 +00:00
Richard W.M. Jones
e8ab4fef30 perl: Add %guestfs_introspection hash with introspection information.
Because this is a useful introspection API, it is a candidate for
being backported into older stable branches.
(cherry picked from commit 365885dab2)
2011-10-31 08:42:00 +00:00
Richard W.M. Jones
34082356cc Version 1.14.0. 1.14.0 2011-10-27 16:05:49 +01:00
Richard W.M. Jones
908fd031d3 Pull latest translations from Transifex. 2011-10-27 14:26:46 +01:00