264 Commits

Author SHA1 Message Date
Richard W.M. Jones
c0eceb1bd1 EPEL 5: Remove PHP bindings. 2013-10-17 22:45:13 +01:00
Richard W.M. Jones
9a427b97c0 EPEL 5: Remove GObject / GObject Introspection / GJS bindings. 2013-10-17 22:45:13 +01:00
Richard W.M. Jones
68b094e0b0 EPEL 5: Remove Erlang bindings. 2013-10-17 22:45:13 +01:00
Richard W.M. Jones
be94e86f89 Remove contrib file from EXTRA_DIST.
This fixes commit 36d29700dc.

(cherry picked from commit b1a8733511)
(cherry picked from commit fc42ba845e)
2013-08-24 11:40:32 +01:00
Richard W.M. Jones
e89ec1d1f9 Remove more temporary ($builddir/tmp) files when doing 'make clean'.
(cherry picked from commit 7e134f865f)
(cherry picked from commit 91a3304a79)
2013-07-26 14:34:40 +01:00
Richard W.M. Jones
efb83c4ab3 build: Add common-rules.mk, common rules for all Makefiles.
This file is mainly a central place to:

 - include localenv if it exists, and

 - define the RHEL 5 backwards compatibility macros, instead of
   spreading them over every other file.

(cherry picked from commit 49bdaabc7d)
(cherry picked from commit 7bc67024f0)
2013-06-14 13:14:25 +01:00
Richard W.M. Jones
9e92c1938b tests: Add 'make check-release' rule.
This is a subset of tests which will be required to pass before a
tarball can be released by the maintainer.
(cherry picked from commit 809a7012de)
(cherry picked from commit 2400c6ff08)
2013-06-03 14:27:44 +01:00
Richard W.M. Jones
239f66c561 tests: Add new 'make check-all' rule.
This runs all of the check* rules.  Since this includes 'make check',
'make check-all' is not quite equivalent to 'make extra-tests'.

Cherry picked from commit 0a60332e1b
and modified because make extra-tests has not been removed from
this stable branch.
(cherry picked from commit 5e2dec4022)
2013-06-03 14:27:43 +01:00
Richard W.M. Jones
5853467b5e make help: Suggest using -j1 -k options with make syntax-check.
This lets you see all the output, not interleaved.
(cherry picked from commit 42e268a2b4)
(cherry picked from commit 9559af3dbb)
2013-05-28 18:48:54 +01:00
Richard W.M. Jones
dc95ed3f42 build: Set 'stable' or 'development' in commit tag automatically.
This sets two macros: BRANCH_NUMBER and BRANCH_TYPE.
(cherry picked from commit 9d1c95281e)
2013-05-28 18:48:54 +01:00
Richard W.M. Jones
ff1989987c build: Add 'make maintainer-tag' rule for tagging HEAD with current version.
(cherry picked from commit 0a1111391b)
2013-05-28 18:48:53 +01:00
Richard W.M. Jones
f0f207617f build: Change various check rules so they implicitly act like 'make -k'.
Rules such as 'make check-valgrind' are implemented using a for-loop.
They would always exit after the first error, even if 'make -k' was
used at the top-level.  Since 'make -k'-style behaviour is generally
more useful, change these for-loops so they run all the tests, and
report errors at the end.
(cherry picked from commit ce49e1fdc0)
2013-04-11 15:22:49 +01:00
Richard W.M. Jones
7bd87967cb make clean: Remove *~ (editor backup) files.
(cherry picked from commit 599f5d7ddc)
2013-04-11 15:22:43 +01:00
Richard W.M. Jones
adef078b30 make clean: Clean contents of tmp directory.
(cherry picked from commit 5f5ce4f59f)
2013-04-11 15:22:39 +01:00
Richard W.M. Jones
480cf0d659 build: Clarify output of 'make help'.
(cherry picked from commit f2b1a01e76)
2013-04-11 15:21:57 +01:00
Richard W.M. Jones
4e3c7d7336 build: Add 'make check-valgrind-with-appliance'.
(cherry picked from commit 97be29893e)
2013-03-31 10:12:25 +01:00
Richard W.M. Jones
d10ec6cb63 build: Small rearrangement of Makefile.am check-slow rule.
(cherry picked from commit 62d940d2dd)
2013-03-31 10:12:25 +01:00
Richard W.M. Jones
3b752541ba build: Fix 'make extra-tests' to call 'check-valgrind' instead of rule that doesn't exist.
(cherry picked from commit 55ce68784f)
2013-03-31 10:12:25 +01:00
Richard W.M. Jones
d4dcb75467 Ignore case when generating AUTHORS file.
(cherry picked from commit 368b4c6480)
2013-03-30 23:20:53 +00:00
Hilko Bengen
fc3f61a541 Still build the libguestfs-specific parts when --disable-appliance is passed to configure
(cherry picked from commit a568dec4cf)
2013-03-12 23:25:05 +00:00
Richard W.M. Jones
290bc85041 Update copyright dates for 2013.
(cherry picked from commit 0d18a8b407)
2013-02-14 16:13:29 +00:00
Cole Robinson
efc94b2b8b tests: Handle changing QEMUDIR
qemu-wrapper isn't regenerated if QEMUDIR is changed, so just
delete it and force regeneration.

Additionally we can drop the silent binary check, since
check-with-upstream-qemu-1 already does a similar test with --version
that will actually report an error to the user.
(cherry picked from commit 63c324e6c4)
2013-02-14 16:12:17 +00:00
Richard W.M. Jones
a8fa61b745 podwrapper: Refresh podwrapper man page.
This also adds a rule so you can do:

 make podwrapper.1

if you want to read the documentation as a man page.
(cherry picked from commit ce828c6afc)
2013-02-14 15:03:53 +00:00
Richard W.M. Jones
61b8840fa1 build: Add 'make print-subdirs' rule, useful for selectively running tests.
If you want to selectively run tests, or if the test suite fails half
way through, use:

  make print-subdirs

to print the subdirectories, select the ones you want to run / the
remaining ones, and do:

  make check SUBDIRS="..."
(cherry picked from commit a34072e25b)
2012-12-20 15:44:23 +00:00
Richard W.M. Jones
fef6d093fa build: Improve 'make help' output description of 'make extra-tests'.
(cherry picked from commit 22fe98ad9f)
2012-12-20 15:41:06 +00:00
Richard W.M. Jones
4e3b7eb049 build: Better formatting for 'make help' output.
This is just whitespace changes.
(cherry picked from commit eca2dd2e8c)
2012-12-20 15:41:01 +00:00
Richard W.M. Jones
d1526306c2 build: Show 'make -k check' as a possibility in 'make help' output.
Thanks to Cole Robinson for this suggestion.
(cherry picked from commit 486efb002a)
2012-12-20 15:40:55 +00:00
Richard W.M. Jones
29cec9e235 build: Fix 'make help' output.
check-valgrind-local-tests -> check-valgrind-local-guests
2012-12-11 21:55:58 +00:00
Cole Robinson
cac8c56423 tests: Fix qemu-wrapper.sh generation 2012-12-09 12:12:04 +00:00
Richard W.M. Jones
6255cc8343 Add .mailmap to EXTRA_DIST. 2012-11-27 08:48:39 +00:00
Wanlong Gao
36232b0bbe Add the .mailmap and change the method to generate AUTHORS
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-11-27 08:45:23 +00:00
Richard W.M. Jones
ff8bfd3e92 Add Lua bindings.
These are relatively complete, although only lightly tested.  Missing:

 - events
 - last_errno
 - user_cancel
2012-11-17 20:02:42 +00:00
Richard W.M. Jones
e8ad3efbc4 dist: Add miscellaneous files to the tarball.
Lots of these had been omitted over time.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
5c44c691f2 tests: Add a parallel launch test.
This is designed to reveal libvirt race conditions such as
bug 875741.

This is a "slow test" so it only runs if you do 'make check-slow'.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
ee5f18293b tests: Add 'make check-slow' rule to recursively run slow/long-running tests. 2012-11-13 15:26:29 +00:00
Richard W.M. Jones
cb4284b9e3 Add 'make help' rule.
This gives a short overview of the make targets.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
3636c5fcff tests: Replace 'make extra-tests' with individual tests.
'make extra-tests' was a monolithic set of tests that did all sorts of
things: valgrind, tests over local guests, tests with upstream qemu,
tests with upstream libvirt, tests with the appliance attach method.

This made it hard to perform individual tests, eg. just valgrind
testing.  It was also hard to maintain because the tests were not
located in the same directories as the programs and sometimes
duplicated tests that were run elsewhere.

This commit splits up 'make extra-tests' into 5 separate targets:

 make check-valgrind              # run a subset of tests under valgrind
 make check-valgrind-local-guests # test under valgrind with local guests
 make check-with-appliance        # test with attach-method == appliance
 make check-with-upstream-qemu    # test with an alternate/upstream qemu
 make check-with-upstream-libvirt # test with an alternate/upstream libvirt

(You can also still run 'make extra-tests' which is now simply
a rule that runs the above 5 targets in order).

This replaces everything that was in the tests/extra directory,
so that has now gone.
2012-11-13 15:26:29 +00:00
Richard W.M. Jones
e884abfd06 extra-tests: Move valgrind suppressions file to top source directory.
This is just code motion.
2012-11-12 15:49:08 +00:00
Richard W.M. Jones
1efed122c0 lib: Rework temporary and cache directory code.
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.

The current code has evolved over time and has a number of problems:

(a) A single environment variable ($TMPDIR) controls the
location of several directories.

(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.

This commit fixes these issues.

(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:

  For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.

  For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.

The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).

(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.

This commit also:

 - reworks the internal tmpdir code

 - removes the internal (undocumented) guestfs_tmpdir call (replacing
   it with calls to the documented guestfs_get_tmpdir API instead)

 - changes the ./run script to set LIBGUESTFS_TMPDIR and
   LIBGUESTFS_CACHEDIR

 - adds a test

 - fixes a few places like libguestfs-make-fixed-appliance which
   depended on $TMPDIR
2012-11-09 13:11:53 +00:00
Richard W.M. Jones
de129a1363 build: Source 'localenv' in top-level Makefile.
Also document 'local*' files.
2012-10-30 13:19:53 +00:00
Richard W.M. Jones
269460770d build: Remove 'make bindist' rule.
We've not distributed binaries for quite a long time, and possibly
this is not advisable.
2012-10-29 15:40:33 +00:00
Richard W.M. Jones
18b7f09f36 Add support for hotplugging (adding disks) to the libvirt attach-method.
When libvirt is used, we can allow disks to be hotplugged.
guestfs_add_drive can be called after launch to hot-add a disk.

When a disk is hot-added, we first ask libvirt to add the disk to the
appliance, then we make an internal call into the appliance to get it
to wait for the disk to appear (ie. udev_settle ()).

Hot-added disks are tracked in the g->drives array.

This also adds a test.
2012-10-08 20:04:53 +01:00
Richard W.M. Jones
7786d56db8 launch: Add add_drive 'label' option.
New API: list-disk-labels

Allow the user to pass an optional disk label when adding a drive.

This is passed through to qemu / libvirt using the disk serial field,
and from there to the appliance which exposes it through udev,
creating a special alias of the device /dev/disk/guestfs/<label>.
Partitions are named /dev/disk/guestfs/<label><partnum>.

virtio-blk and virtio-scsi limit the serial field to 20 bytes.  We
further limit the name to maximum 20 ASCII characters in [a-zA-Z].

list-devices and list-partitions are not changed: these calls still
return raw block device names.  However a new call, list-disk-labels,
returns a hash table allowing callers to map between disk labels, and
block device and partition names.

This commit also includes a test.
2012-10-08 20:04:47 +01:00
Richard W.M. Jones
df2469a48f docs: Add guestfsd(8) man page. 2012-10-03 08:55:24 +01:00
Richard W.M. Jones
834747a85d build: Create new 'tmp' directory for tests.
Having a separate directory means:

(1) It's easy to clean up orphaned temporary files, the appliance,
    etc.

(2) You can put an SELinux label on this directory so that qemu can
    write to it when you're using sVirt and SELinux is enforcing:

    chcon --reference=/tmp tmp
2012-09-14 15:53:53 +01:00
Richard W.M. Jones
97a1439d90 release-notes: Add 'draft' background image. 2012-09-06 12:46:57 +01:00
Richard W.M. Jones
bcbad66b18 docs: Add guestfs-release-notes.txt to Makefile deps. 2012-08-30 10:47:26 +01:00
Richard W.M. Jones
2f97bf873b podwrapper: Add --license parameter, which is required.
This adds standard LICENSE and BUGS sections to all of the man pages
that are processed by podwrapper.

Modify all the calls to $(PODWRAPPER) to add the right --license
parameter according to the content.  Note that this relaxes the
license on some code example pages, making them effectively BSD-style
licensed.
2012-08-21 20:33:21 +01:00
Richard W.M. Jones
92a0ac5037 tests: Add a test for large directories.
This also tests the reimplemented APIs:
 - ls
 - lstatlist
 - lxattrlist
 - readlinklist
2012-08-17 16:08:14 +01:00
Richard W.M. Jones
f3b21b4da5 Include guestfs-release-notes.txt in the tarball.
This fixes commit 589db4e42a.
2012-08-11 19:08:33 +01:00