174 Commits

Author SHA1 Message Date
Richard W.M. Jones
d82d6f0633 README: Note that getfacl, getfattr are optional dependencies. 2011-03-28 17:18:24 +01:00
Richard W.M. Jones
bc93d2ba38 README: Note that po4a is mandatory if compiling from git. 2011-01-15 14:56:25 +00:00
Richard W.M. Jones
84fbe21855 docs: Refresh README file. 2010-12-19 21:52:46 +00:00
Richard W.M. Jones
0d267d6cd5 README: Advise using febootstrap >= 3.3. 2010-12-12 23:02:30 +00:00
Richard W.M. Jones
6d75ce8e6c appliance: Change to using febootstrap 3.x supermin appliance.
This removes all support for building the ordinary / old
style appliance using febootstrap 2.x, debootstrap, debirf,
fakeroot and fakechroot.

Instead this uses febootstrap 3.x to build the supermin appliance
in a simpler cross-distro manner.
2010-12-05 11:23:23 +00:00
Richard W.M. Jones
e1aca6323e build: Centralize all POD manipulation in 'podwrapper.sh' script. 2010-11-24 20:12:08 +00:00
Richard W.M. Jones
951ea0e189 build: virt-make-fs requires String::ShellQuote, add to configure. 2010-11-24 11:29:10 +00:00
Richard W.M. Jones
22a50e4e3b inspect: Detect if db_dump and db_load programs are available.
If db_dump is not available then disable RPM application detection.

Note these utilities have odd names on Debian.
2010-11-24 09:41:41 +00:00
Richard W.M. Jones
4220b7a641 Update README to reflect Perl modules that are really still required. 2010-11-23 15:56:13 +00:00
Richard W.M. Jones
f6c4026f85 build: xml-light is no longer required (thanks Maxim Koltsov).
At some point we removed the last thing that required
xml-light, but were still testing for it at various places
in the build.  This removes all traces.
2010-11-11 18:03:12 +00:00
Richard Jones
7509c91a71 fish: Use core add-domain API to implement '-d' option.
This also makes libxml2 and libvirt into optional dependencies.
If they are missing then the core API will print an error, as
will the '-d' option to guestfish.
2010-11-11 11:24:13 +00:00
Richard Jones
a0b4caa082 lib: Make pcre, libmagic and hivex libraries optional.
This change makes these libraries optional.  If they are not
available at compile time then certain core API features will
be disabled (see below).

This also changes PCRE detection to use pkg-config instead
of the ad hoc autoconf checks.

The large inspect.c file has been split out into separate
function-specific files.

  file-architecture: requires pcre & libmagic
  inspection: requires pcre & hivex
2010-11-10 10:52:12 +00:00
Richard Jones
b52183b549 lib: Augeas (client side) is not needed by the library.
However it is used by the daemon.
2010-11-10 10:34:48 +00:00
Richard W.M. Jones
2066805a5d lib: Expose errno through new API guestfs_last_errno.
If either the daemon sends back an errno, or a system call
fails in the library, save the errno in the handle and then
make it available to callers through the guestfs_last_errno
function.
2010-11-03 18:48:56 +00:00
Matthew Booth
38af2eaceb Call febootstrap-supermin-helper using the new -u and -g options
Use febootstrap-supermin-helper's new -u and -g command line options to setuid,
rather than doing it in libguestfs.

This resolves an issue with the generation of the cached appliance checksum. The
checksum was being generated by a call to febootstrap-supermin-helper through
popen(). Unfortunately, a bash misfeature meant that euid would be reset to uid,
and the checksum was generated for uid, not euid. When virt-v2v is writing to a
RHEV target, uid == 0 and euid == 36, which resulted in a cached appliance being
created for root with permissions for uid 36.

Note this requires febootstrap 2.10.
2010-10-28 16:17:38 +01:00
Richard Jones
9f653edcdc build: hivex is required.
hivex library has been required since we moved the inspection
code to C.  Check for this in configure.ac.
2010-09-11 17:16:22 +01:00
Richard Jones
e903739935 build: require Augeas for library.
Augeas has been required since we moved the inspection code to C,
however we were not correctly enforcing this in configure.ac, nor
correctly linking to the library until now.
2010-09-11 13:42:04 +01:00
Richard Jones
3161cb58a5 README: Document virtio-serial is now the only vmchannel. 2010-09-10 12:01:03 +01:00
Richard Jones
2c61e04c45 PHP bindings.
Note that these are not complete on 32 bit architectures.  PHP doesn't
offer any convenient 64 bit type (on 32 bit).  Therefore you should
always use these PHP bindings on 64 bit.
2010-09-04 13:38:03 +01:00
Richard Jones
8c48f5ae2e Allow manual pages and POD files to be translated.
This uses the optional po4a package to split these files into
PO files for translation, and reassemble afterwards.

Note this creates an extra pot file (po-docs/libguestfs-docs.pot).
We don't (yet) combine this with the main po/libguestfs.pot file.
The 'libguestfs-docs.pot' file included in this commit is not the
real thing, just a short cut down snippet for testing.  The real
thing is created if you update one of the dependent files and
rebuild.

Note also the dummy ja.po, for testing the principles.
2010-09-02 20:37:06 +01:00
Richard Jones
d46230f94e Requires febootstrap >= 2.9. 2010-08-27 21:47:49 +01:00
Richard Jones
866ec00d1f Use virtio-serial, remove other vmchannel methods.
This adds support for virtio-serial, and removes all other
vmchannel methods.

Virtio-serial is faster than other methods, and is now widely
available.

I tested this by using the guestfs_upload API on an 83 MB file:
  before: 6.12 seconds (14.1 MB/sec)
   after: 4.20 seconds (20.6 MB/sec)
(note this is with the current 8K chunk size)
2010-08-24 11:54:37 +01:00
Richard Jones
5c31f6126b Change to using ext2-based, cached supermin appliance.
This changes the method used to build the supermin appliance
to use the new ext2-based appliance supported by latest febootstrap.
The appliance can also be cached, so we avoid rebuilding it
each time it is used.

Mailing list discussion goes into the rationale and details:
https://www.redhat.com/archives/libguestfs/2010-August/msg00028.html

Requires febootstrap >= 2.8.
2010-08-23 16:00:39 +01:00
Richard Jones
1a9aa565b3 fish: Add -c/--connect and -d/--domain options.
The -d option lets you specify libvirt domains.  The disks from
these domains are found and added, as if you'd named them with -a.

The -c option lets you specify a libvirt URI, which is needed
when we consult libvirt to implement the above.
2010-08-17 14:09:25 +01:00
Richard Jones
ad4cff2625 New API: file-architecture
This change simply converts the existing Perl-only function
file_architecture into a core API call.  The core API call is
written in C and available in all languages and from guestfish.
2010-08-17 14:09:25 +01:00
Richard Jones
8700a55d52 Unify supermin appliance building using febootstrap 2.7 2010-05-13 18:52:15 +01:00
Richard Jones
9a608a1516 Documentation updates.
Fix copyright years.
Fix URLs to point to new PRC site.
Make sure guestfish(1) and guestfs(3) manpages reference the
current list of tools.
2010-04-11 17:02:18 +01:00
Richard Jones
4b48f93ce6 Improved version of virt-win-reg, supporting exporting and merging. 2010-03-30 16:25:12 +01:00
Richard Jones
ebfcb7f23d inspector: Read information about Windows guests from the Registry.
This commit changes substantially the way that we get information
about Windows guests.  We now use the Windows Registry to get
information such as the version, product name and much else.

This uses Win::Hivex (ie. the hivex library).  'reged' is no longer
needed or used.

As an incidental change, this also tries harder to search for
%systemroot%, in the case when we cannot find boot.ini (ie.
Windows Vista and more recent).  This ensures we can get more
detail from those versions of Windows.
2010-03-08 19:35:23 +00:00
Richard Jones
a8c3723e38 Spin off hivex as a separate upstream project.
This commit makes the semi-independent hivex library into a
separate upstream project.  The git repo for hivex is now:

http://git.annexia.org/?p=hivex.git;a=summary

Downloads of hivex are available here:

http://libguestfs.org/download/

All questions, patches, bugs etc should be sent to the libguestfs
mailing list and bug tracker.
2010-02-22 13:19:21 +00:00
Richard Jones
dabe72cb8b Remove references to FTP, replace with FUSE.
We originally intended to implement an FTP server (and before
than, an NFS server).  But we didn't implement either.  We
did however implement a FUSE service (guestmount) which takes
the place of both.
2010-02-15 22:53:40 +00:00
Richard Jones
c0e4b5dc69 Experimental C# bindings.
Tested in only limited situations, with Mono on Linux.
2010-01-02 21:55:17 +00:00
Richard Jones
2e2eb15df0 Remove separate inspector_generator.ml, combine this with generator.ml.
This commit combines the previously separate "inspector_generator.ml"
program which generated bindings for virt-inspector.

Having two separate programs caused no end of troubles for developers,
so we now combine them into a single program.

NOTE: OCaml xml-light is now *required* in order to rebuild the
generated code.
2009-12-31 11:20:56 +00:00
Richard Jones
429de22541 FUSE filesystem support.
This implements FUSE filesystem support so that any libguestfs-
accessible disk image can be mounted as a local filesystem.

Note: file writes (ie. write(2) system call) is not yet implemented.

The API needs more test coverage, particularly lesser-used system
calls.

The big unresolved issue is UID/GID mapping between guest filesystem
IDs and the host.  It's not easy to automate this because you need
extra details about the guest itself in order to get to its
UID->username map (eg. /etc/passwd from the guest).
2009-11-03 15:57:26 +00:00
Richard Jones
792c528300 Support for Windows Registry.
In hivex/:  This mini-library allows us to extract Windows
Registry binary files ("hives").

There are also two tools: hivexml converts a hive to a
self-describing XML format.  hivexget can be used to extract
single subkeys from a hive.

New tool: virt-win-reg.  This is a wrapper around the library
functionality allowing you to pull out data from the registries
of Windows guests.
2009-10-29 15:58:23 +00:00
Richard Jones
d37f697953 inspector: Generate language bindings for OCaml.
This commit adds a generic mechanism for deriving language bindings
for virt-inspector, and implements one concrete binding, for OCaml.

The bindings are generated from the RELAX NG schema (virt-inspector.rng)
which is supposed to be a correct and always up to date description
of the XML that the virt-inspector program can generate.

From the RNG we generate a set of types to describe the output of
virt-inspector for the language, plus an XML parser, plus some
glue code to actually run an external instance of virt-inspector
and parse the resulting XML.

At runtime, an external 'virt-inspector --xml <name>' command runs
and the XML is parsed into language-specific structures.

This has been tested on the four example files (inspector/example?.xml)

The only particular difficulty about the OCaml binding is the use of
Obj.magic, which is naughty but works because of the isomorphism
between the representation of tuples and records in OCaml.  This
seems to cause no problems in my test program.  Apart from this, the
OCaml binding is straightforward and could be adapted easily for any
other languages that want type-safe virt-inspector bindings.

It's important to keep virt-inspector.rng up to date with changes
to virt-inspector's XML output format.
2009-10-13 17:53:20 +01:00
Richard Jones
9d25e82491 inspector: Add tests for RELAX NG schema. 2009-10-02 15:00:27 +02:00
Richard Jones
419cf4bb01 Update documentation of qemu / vmchannel. 2009-09-22 11:03:22 +01:00
Richard Jones
2f3a0e3975 tests: Use ISO instead of squashfs.
The squashfs format changes too much.  Use an ISO file for
the tests instead.
2009-08-19 15:13:51 +01:00
Richard Jones
b3595c5553 Make Perl strings translatable using perl-libintl.
All Perl strings are now marked as translatable using __"string"
or __x("string {placeholder}", placeholder => $_).  Perl strings
now get copied to the PO files.

The po/POTFILES.in file is now updated automagically whenever we
add new *.c, *.pl or *.pm files into the repository.
2009-07-15 15:30:23 +01:00
Richard Jones
92d47d7f85 Update with links to the new mailing list. 2009-07-08 17:20:52 +01:00
Richard W.M. Jones
1f6bc26fc0 Fix libvirt integration in virt-inspector. 2009-06-24 15:36:58 +01:00
Richard Jones
71322ebf4e Don't compress the supermin base initramfs. 2009-06-16 10:55:36 +01:00
Richard Jones
14ec52d3dc Documentation for the supermin appliance. 2009-06-15 16:09:12 +01:00
Richard Jones
67232e4a70 Update status of libguestfs in Debian. 2009-06-13 11:18:54 +01:00
Richard Jones
27161658c8 New website, change et.redhat.com references to libguestfs.org 2009-06-09 11:20:05 +01:00
Richard Jones
7baf58278b Add support for decoding the Windows registry. 2009-06-09 10:50:03 +01:00
Richard W.M. Jones
e02066bcb3 Use a squashfs attached as /dev/sdd during the C API tests. 2009-05-29 12:59:32 +01:00
Richard Jones
b8b89f509c Improve documentation in README file. 2009-05-27 11:31:39 +01:00
Richard Jones
8cddd6c7e7 Depend on new febootstrap 2.0, and use febootstrap-install. 2009-05-11 15:43:00 +01:00