94 Commits

Author SHA1 Message Date
Richard W.M. Jones
4ad5652c99 Update release notes.
Also remove "draft" logo since these are close to being finalized
for the 1.34 release.
2016-08-08 12:31:15 +01:00
Pino Toscano
5077c02046 mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module.

Just code motion, adapting v2v in the process.
2016-08-03 15:01:59 +02:00
Richard W.M. Jones
108509ec19 docs: hacking: Add a section describing the build system. 2016-07-27 19:02:49 +01:00
Richard W.M. Jones
7561d1bcae docs: hacking: Improve documentation on how OCaml programs are built. 2016-07-27 19:02:27 +01:00
Richard W.M. Jones
74b13550db Update release notes. 2016-07-21 21:17:14 +01:00
Richard W.M. Jones
4920ff57c9 Version 1.33.43. 2016-07-14 15:44:03 +01:00
Richard W.M. Jones
95448111d2 Version 1.33.39. 2016-06-23 23:10:07 +01:00
Richard W.M. Jones
24130d7872 sparsify: Move statvfs wrapper function to mllib.
We wish to use this function in virt-v2v too, so move it to the common
directory.

No functional change.
2016-06-23 13:28:48 +01:00
Matteo Cafasso
3de8abac4a New API: internal_filesystem_walk
- generator: Added tsk_dirent struct

The tsk_dirent struct contains the information gathered via TSK APIs.

The struct contains the following fields:
 * tsk_inode: inode of a file
 * tsk_type: type of file such as for dirwalk command
 * tsk_size: file size in bytes
 * tsk_name: path relative to its disk partition
 * tsk_flags: bitfield containing extra information
 * tsk_spare[1-5]: extra space for future usage

 - configure: Added libtsk compile-time check

Ensure libtsk is available at compile time.
If not, daemon routines depending on it won't be available.

 - API: internal_filesystem_walk

The internal_filesystem_walk command walks through the FS structures
of a disk partition and returns all the files or directories
which could be found.

The command is able to retrieve information regarding deleted
or unaccessible files where other commands such as stat or find
would fail.

The gathered list of tsk_dirent structs is serialised into XDR format
and written to a file by the appliance.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
2016-06-22 18:43:51 +01:00
Richard W.M. Jones
b5725ef856 docs: internals: Fix cross-references to guestfs(3) man page. 2016-06-20 15:11:46 +01:00
Richard W.M. Jones
bb053d067d p2v: Fix 'run-virt-p2v-in-a-vm' so it boots the USB disk automatically.
Thanks: Stefan Hajnoczi for working out the right qemu incantation.
2016-06-17 13:24:22 +01:00
Richard W.M. Jones
896e1e191a p2v: Add run-virt-p2v-non-gui-conversion target.
This simulates doing a non-GUI conversion with virt-p2v being
downloaded over PXE.  Conveniently we already had a test that was
doing this, and this rule just runs the same test.
2016-06-17 12:15:20 +01:00
Richard W.M. Jones
3719d75098 docs: hacking: Small updates to virt-p2v code documentation.
Use Unicode box-drawing characters instead of ASCII art.

Reference virt-p2v manual for how virt-p2v works.
2016-06-12 18:24:45 +01:00
Richard W.M. Jones
09eeb04578 docs: hacking: Document how OCaml programs are compiled and linked. 2016-06-12 18:24:45 +01:00
Richard W.M. Jones
a3ca5182d4 docs: hacking: Describe which order to look at directories.
When browsing the source code.
2016-06-06 15:50:27 +01:00
Richard W.M. Jones
5bc56f4c6b docs: performance: Mention optimizations added in libguestfs 1.33, qemu 2.7 2016-06-04 14:41:45 +01:00
Richard W.M. Jones
2e5542a65e docs: hacking: It's the 'docs' subdirectory, not 'doc'. 2016-06-04 14:34:34 +01:00
Richard W.M. Jones
5f118f1dd2 docs: hacking: Move subdirectories list higher up in the file.
It's better to have this overview of how the code is arranged before
any details about modifying the code, since most people will be
reading code before writing.
2016-06-04 14:34:29 +01:00
Richard W.M. Jones
5d9db47033 docs: building: Document ./configure options. 2016-06-04 14:34:25 +01:00
Richard W.M. Jones
fe84ce8521 docs: building: Add a warning about running tests as root.
It's a really bad idea, don't do it.
2016-06-04 14:34:21 +01:00
Richard W.M. Jones
0e469badff docs: building: Fix link to RHEL sources.
These are now stored at centos.org, not at ftp.redhat.com.
2016-06-04 14:34:12 +01:00
Richard W.M. Jones
2eb1d849f2 docs: Remove imaginary '--enable-gcc-warnings' flag.
It doesn't actually exist.  Not sure if it did in some earlier
version, but it doesn't exist now.
2016-06-04 14:24:16 +01:00
Richard W.M. Jones
57dbad4bba p2v: Rename internal Makefile rule 'run-virt-p2v' -> 'run-virt-p2v-in-a-vm'.
Now there are two rules for running virt-p2v:

  make -C p2v run-virt-p2v-directly

  make -C p2v run-virt-p2v-in-a-vm

Updates commit f8cfdf274f.
2016-06-03 13:05:07 +01:00
Richard W.M. Jones
1507913168 p2v: Fix docs for new hot key to use when testing virt-p2v in a VM.
The QEMU hot key for choosing the boot disk has changed in qemu 2.6.0
so update the documentation to reflect this.
2016-06-03 13:05:07 +01:00
Richard W.M. Jones
b2bd2beeb6 p2v: Allow virt-p2v to be built with Gtk 2 or 3.
Currently virt-p2v requires Gtk 2.  This commit changes virt-p2v so it
can be built with either Gtk 2 or 3.

By careful use of macros, this code should compile on both recent
Gtk 2 and Gtk 3.

With no other options, ./configure will now prefer Gtk 3 if it finds
it, or fall back to Gtk 2.  But you can control this by setting
'./configure --with-gtk=2|3|check|no' where the options mean:

  * --with-gtk=2 - Only test for Gtk 2
  * --with-gtk=3 - Only test for Gtk 3
  * --with-gtk=check - Check for Gtk 3 then Gtk 2 (default)
  * --with-gtk=no - Don't build virt-p2v

In the ./configure output you will see something like this:

  checking for --with-gtk option... 2
  checking for GTK... yes
  checking if we can build virt-p2v... yes, with Gtk 2
2016-06-03 13:05:07 +01:00
Richard W.M. Jones
53ec66c7e2 p2v: Add --test-disk option for testing conversions.
Use, for example:

  ./run virt-p2v --test-disk=$(pwd)/test-data/phony-guests/windows.img

to test conversions using a file of test data instead of the real host
/dev/sda.
2016-06-03 13:05:07 +01:00
Richard W.M. Jones
dd2ce98d24 mllib: Add bindings for makedev(3), major(3) and minor(3). 2016-06-03 13:05:07 +01:00
Richard W.M. Jones
4bbdb85822 p2v: Update 'make run-virt-p2v' rule.
Use KVM, fallback to TCG.

Add more network devices so we can test the layout of that
dialog box.

Move the documentation into guestfs-hacking(1).

Updates commit f8cfdf274f.
2016-05-27 13:05:32 +01:00
Richard W.M. Jones
1d79964bf7 utils: Move UEFI firmware lists to src/uefi.c.
Just code motion, no functional change.
2016-05-23 10:12:04 +01:00
Richard W.M. Jones
a11dd820c7 src/version.c: Move internal documentation before includes.
The internal documentation generator only works if the file
description comment appears before the first #include line.

Fixes commit f277087d2a.
2016-05-20 21:03:49 +01:00
Richard W.M. Jones
4e36f2fa9e lib: Move qemu testing code to a new module called 'qemu.c'.
This is code motion, but I have cleaned up and formalized the
interface between this module and other parts of the library.

Also this adds documentation to the interface.
2016-05-18 18:10:10 +01:00
Richard W.M. Jones
13017c852e lib: Rename test-utils -> unit-tests. 2016-05-07 12:46:49 +01:00
Richard W.M. Jones
839a17ff04 docs: Document CVE-2015-8869 OCaml code gen bug. 2016-05-04 17:48:44 +01:00
Richard W.M. Jones
a2ac6b4897 docs: Fix cross-references in guestfs-security(1).
Fixes commit 15b8b6453d.
2016-05-04 14:09:50 +01:00
Richard W.M. Jones
28634ecc2c docs: Link to correct building instructions from guestfs-hacking(1).
No longer in the README file.
2016-05-03 22:54:14 +01:00
Richard W.M. Jones
d899a53f2e docs: Improve the internal documentation in guestfs-hacking.
Several mostly cosmetic changes.
2016-05-03 22:50:15 +01:00
Richard W.M. Jones
a8114449fa docs: Move internal documentation to guestfs-hacking(1).
All developer documentation should go in guestfs-hacking(1) and the
"internal documentation" (ie. documentation about internal functions
and interfaces) belongs here, not in the coincidentally synonymous
guestfs-internals(1).
2016-05-03 22:50:15 +01:00
Richard W.M. Jones
5bbf8f655d Version 1.33.25. 2016-05-03 14:13:01 +01:00
Richard W.M. Jones
98b28b15c6 utils/boot-analysis, utils/boot-benchmark: Add manual pages. 2016-05-03 13:21:34 +01:00
Richard W.M. Jones
3b581a727c utils: Move tests/qemu/ boot-analysis etc tools to new utils top level directory.
Create a new top level directory called 'utils' and move the
following programs there:

  tests/qemu/boot-analysis -> utils/boot-analysis/
  tests/qemu/boot-benchmark -> utils/boot-benchmark/
  tests/qemu/qemu-boot -> utils/qemu-boot/
  tests/qemu/qemu-speed-test -> utils/qemu-speed-test/

Also we only build the boot-analysis program on x86-64 and aarch64,
since it requires custom porting to each architecture.
2016-05-03 13:21:34 +01:00
Richard W.M. Jones
8299d7087a tests: Add boot-benchmark-range script.
Add a script we can use to benchmark performance across a range of
commits in another project.
2016-04-22 17:10:43 +01:00
Richard W.M. Jones
874ef2a04f docs: Fix use of getopt and pod2usage in make-internal-documentation.pl.
Fixes commit 04229c68d6.
2016-04-22 16:39:49 +01:00
Richard W.M. Jones
0108240364 tests: Fix 'make check-slow'.
Since we started to use the parallel tests framework in automake,
'make check-slow' has been broken.  This is because parallel tests
doesn't allow you to run 'make check TESTS=...' with a set of test
scripts which do not also appear in the static list of tests in the
Makefile.am.  We would like to list and run only "fast" tests in the
Makefile.am, and have other scripts for slow tests.

The solution is to add the slow tests to Makefile.am, but condition
those tests on an environment variable SLOW=1 being set.

This commit fixes all the existing slow tests in this way, and updates
the documentation (guestfs-hacking(1)) to document how slow tests
should be written in future.
2016-04-16 20:40:49 +01:00
Richard W.M. Jones
1b4d8ed72e docs: Add docs/C_SOURCE_FILES to EXTRA_DIST.
Fixes commit 04229c68d6.
2016-04-14 20:30:20 +01:00
Richard W.M. Jones
d2921ef270 Add safe wrapper around waitpid which deals with EINTR correctly.
Thanks: Eric Blake.
2016-04-14 19:42:28 +01:00
Richard W.M. Jones
eeacb4ef60 launch: Implement a safer getumask.
The current implementation of getumask involves writing a file with
mode 0777 and then testing what mode was created by the kernel.  This
doesn't work properly if the user set a per-mount umask (or fmask/
dmask).

This alternative method was suggested by Josh Stone.  By forking, we
can use the thread-unsafe method (calling umask) and pass the result
back over a pipe.

This change also fixes another problem: mode_t is unsigned, so cannot
be used to return an error indication (ie. -1).  Return a plain int
instead.

Thanks: Josh Stone, Jiri Jaburek, Eric Blake.
2016-04-14 15:10:25 +01:00
Pino Toscano
3cc039bf17 docs: exclude more generated sources from C_SOURCE_FILES
Exclude more files from the documented sources in C_SOURCE_FILES:
- sources generated by XDR definitions
- sources generated by gperf
- errnostring.c (generated by the generator, and copied around from src
  to daemon during build)

Also update C_SOURCE_FILES as well, so libguestfs builds again from
scratch.
2016-04-14 13:12:31 +02:00
Richard W.M. Jones
dd85d4f06d docs: Add list of C source files instead of calculating it using 'find'.
Add the real list of C source files to the Makefile, instead of trying
to calculate it.  This (will, in the next commit) fix a problem with
the build on Koji where we created a subdirectory (for python3/) but
the find command picked up files from that directory for the
documentation (and then failed).

This fixes commit 04229c68d6.
2016-04-12 20:19:58 +01:00
Richard W.M. Jones
d13f438850 docs: Ignore gnulib files when producing internal documentation.
This fixes commit 04229c68d6.
2016-04-12 15:20:18 +01:00
Richard W.M. Jones
557b6ce35c Version 1.33.19. 2016-04-12 13:52:55 +01:00