Commit Graph

121 Commits

Author SHA1 Message Date
Richard W.M. Jones
ca236acc67 fish: Fix missing guestfish commands in HTML docs. 2010-11-04 17:23:21 +00:00
Richard W.M. Jones
c36214c682 website: Distribute BUGS and RELEASE-NOTES files to website. 2010-11-02 17:05:43 +00:00
Richard W.M. Jones
0003ea2c3d generator: Generate guestfish-only commands.
The guestfish-only commands such as 'alloc' and 'edit' are
now generated from one place in the generator instead of being
spread around ad-hoc in the C code.
2010-09-18 09:38:05 +01:00
Richard Jones
da107cf3d9 build: 'make quickcheck' rule now uses new run-test-tool-locally script. 2010-09-13 14:42:47 +01:00
Richard Jones
04d8209077 Split generator into separate source files.
'src/generator.ml' is no more.  Instead the generator is logically
split up over many different source files.

Read generator/README for help and tips.

We compile the generator down to bytecode, not native code.  This
means it will run more slowly, but is done for maximum portability.
2010-09-11 12:04:44 +01:00
Richard Jones
b3d94d6a71 syntax: Remove trailing spaces. 2010-09-10 22:57:48 +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
8ad79a7c4d Add full docs pot file. 2010-09-04 13:37:58 +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
a0d514f13d Include statically linked binaries in the binary distribution. 2010-08-25 17:22:54 +01:00
Richard Jones
10d1aa3b64 build: Add 'bindist' rule for building binary distribution. 2010-08-24 11:54:42 +01:00
Richard Jones
58667f2be0 Prepare for new development branch, starting at 1.5.0.
Add BUGS and RELEASE-NOTES to EXTRA_DIST.

Also update the RELEASE-NOTES file.
2010-07-08 13:34:40 +01:00
Richard Jones
002dc21cba Generate BUGS file from Red Hat Bugzilla database.
Add a script which generates the 'BUGS' file from Red Hat Bugzilla.
This is run whenever we do 'make dist' and deliberately stored in git.
2010-05-15 08:43:02 +01:00
Richard Jones
feb0cd0482 po: Include strings from Perl programs in the PO files (RHBZ#559963).
xgettext will only recognize '*.pl' as being a Perl file (otherwise
it treats it as a C file and does not correctly find any strings
in it).

This commit also fixes two actual bugs that xgettext found in the
strings in our Perl programs.
2010-05-12 18:13:01 +01:00
Richard Jones
09a0427448 Build top-level directories in a more logical order. 2010-04-17 15:46:08 +01:00
Richard Jones
d868221d9f New tool: virt-make-fs for creating filesystems on devices. 2010-04-08 14:07:10 +01:00
Richard Jones
def627e4da New tools: virt-resize and virt-list-partitions.
Virt-resize is the main contribution here, a program which can
be used to expand and shrink partitions in disk images.

Virt-list-partitions is used as an ancillary tool for planning
resize operations.
2010-03-23 21:56:14 +00:00
Richard Jones
35e916dbcf Remove out-of-date comment. 2010-03-22 10:41:44 +00:00
Richard Jones
ef044690c5 configure: Add --disable-daemon and --disable-appliance options.
Use these on any platforms where you don't want or need to
build the daemon/appliance combination.
2010-03-22 10:41:44 +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
30a0b5cf16 Distribute .gitignore files.
These are useful for Debian since they keep the tarball unpacked
in git.
2010-02-15 15:35:07 +00:00
Richard Jones
ed83d77025 Add 'make quickcheck' rule to run a quick check. 2010-02-15 15:33:13 +00:00
Richard Jones
0d4bc93c73 Distribute hivexsh.1.html HTML file. 2010-02-05 18:54:52 +00:00
Richard Jones
e28207d5ad Fix generation of HTML documentation for website. 2010-01-13 14:55:04 +00:00
Richard Jones
8980c01b46 Move guestfs(3) and guestfish(1) man pages into subdirectories.
These manual pages have for a very long time 'lived' in the top
source directory.

Clean up this situation by moving those manual pages (plus associated
generated files) into the src/ and fish/ subdirectories respectively.
2009-12-31 12:26:04 +00:00
Richard Jones
835c0186c8 build: Remove references to old contrib/ files which were removed. 2009-12-16 11:53:30 +00:00
Richard Jones
299d5b9dd2 New tool: virt-list-filesystems
Use this program as a convenient way to list the filesystems
available in a disk image or libvirt guest.

Example:

  $ virt-list-filesystems /dev/vg_trick/Debian5x64
  /dev/debian5x64/home
  /dev/debian5x64/root
  /dev/debian5x64/tmp
  /dev/debian5x64/usr
  /dev/debian5x64/var
  /dev/sda1

This is designed to make it easier for novices to use guestfish
and guestmount.  In particular with guestmount this acts as a way
to get a list of filesystems to use with the '-m' option.  ie:

  $ virt-list-filesystems unknowndisk.img
  /dev/sda1
  /dev/sda2
  $ guestmount -a unknowndisk.img -m /dev/sda1 /mnt
2009-11-24 16:01:11 +00:00
Richard Jones
2d9953097b availability: Add optional groups and implement guestfs_available call.
The current groups are defined very conservatively using the
following criteria:
 (a) Would be impossible to implement on Windows because of
     sheer architectural differences (eg: mknod).
 (b) Already optional (augeas, inotify).
 (c) Not currently optional but not implemented on older RHEL and
     Debian releases (ntfs-3g.probe, scrub, zerofree).

The optional groups I've defined according to these criteria are:

 . augeas
 . inotify
 . linuxfsuuid
 . linuxmodules
 . linuxxattrs
 . lvm2
 . mknod
 . ntfs3g
 . scrub
 . selinux
 . zerofree

(Note that these choices don't prevent us from adding more
optional groups in future.  On the other hand to avoid breaking
ABIs we would not wish to change the above groups).

The rest of this large commit is really just implementation:

Each optional function is classified using Optional "group"
flag in the generator.

The daemon has to implement a function

  int optgroup_<name>_available (void);

for each optional group.  Some of these functions are fixed at
compile time, and some do simple run-time tests.

The do_available implementation in the daemon looks up the correct
function in a table and runs it.

We document the optional groups in the guestfs(3) man page.

Also: I added a NOT_AVAILABLE macro in order to unify all the
existing places where we had a message equivalent to
"function __func__ is not available".
2009-11-20 18:03:36 +00:00
Matthew Booth
c477e2fb78 build: Fix inter-directory dependencies
This change adds an explicit dependency on generator.ml for every file it
generates, except java files. Java is left for another time because it's
considerably trickier.

It also adds a build rule for src/libguestfs.la so it can be rebuilt as required
from other directories.

It does this by creating a top level make file, subdir-rules.mk, which can be
included from sub-directories. sub-directories need to define 'generator_built'
to include local files which are built by generator.ml, and they will be updated
automatically.

This fixes parallel make, and will automatically re-create generated files when
make is run from any directory.

It also fixes the problem which efad4f53 was targetting. Specifically,
src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and
therefore generator.ml, despite not being directly created by it. This caused
them to be recreated every time generator.ml ran rather than only when
src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore
appliance update.

This patch also changes the contents of the distribution tarball by including
files created by rpcgen.
2009-11-19 16:40:22 +00:00
Richard Jones
644fccb4ae Debian: Ignore Debian appliance root when looking for translatable files. 2009-11-04 14:30:41 +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
6600c275b2 Add hivex* documentation to website. 2009-10-29 20:35:59 +00:00
Richard Jones
e02f42cb1d Add virt-win-reg to toplevel Makefile.am, fix POTFILES.in 2009-10-29 16:54:18 +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
c925dce4e7 Version 1.0.74. 2009-10-20 15:37:40 +01:00
Richard Jones
4dd6b77ff7 New tool: virt-ls
This tool makes available the functionality of "ls", "ll", and "find"
in a slightly simpler to use form.

Examples:

  virt-ls -l myguest /tmp
2009-10-20 10:31:54 +01:00
Richard Jones
984a35cfc0 New tool: virt-tar
This adds a new tool call virt-tar which is a general purpose
archive and uploading tool.  It doesn't add any functionality
which wasn't previously possible using guestfish, but makes it
simpler to access for some users.

Examples:

 virt-tar -zx myguest /home home.tar.gz
 virt-tar -zu myguest uploadstuff.tar.gz /tmp
2009-10-20 10:31:44 +01:00
Richard Jones
945b6e0a08 Move virt tools (virt-cat, virt-edit etc) into tools/ subdirectory.
This moves the tool programs into a single directory:
  cat/* -> tools/virt-cat
  df/* -> tools/virt-df
  edit/* -> tools/virt-edit
  rescue/* -> tools/virt-rescue

This in itself simplifies the build process because we only need
one Makefile and one copy of 'run-locally'.

'run-*-locally' has become just 'run-locally' and takes an extra
parameter which is the name of the tool, eg:
  run-locally cat [virt-cat params...]

virt-inspector stays in its own directory, because this contains
more than just a single Perl script.
2009-10-19 10:18:46 +01:00
Richard Jones
854f8e0d56 Comment: Describe the build order requirements for toplevel directories. 2009-10-19 09:10:15 +01: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
Jim Meyering
c6b8db6493 build: avoid parallel ocaml/... build failure
A parallel build could fail due to the use in ocaml/examples
of ocaml/guestfs.cmi before it was built.
* Makefile.am (SUBDIRS): Add both ocaml and ocaml/examples,
to ensure they're built in this order, and not in parallel.
* ocaml/Makefile.am (SUBDIRS): Don't define.
2009-10-05 14:16:46 +02:00
Richard Jones
4bd623f6a2 More HTMLFILES. 2009-09-23 14:24:04 +01:00
Richard Jones
b488436cc5 Rename virt-[tool].pl as virt-[tool] 2009-09-23 12:37:26 +01:00
Richard Jones
7801621dc9 New tool: virt-edit
Edit any file in a guest.  This was possibly previously
using guestfish, but having a separate command makes it
simpler.

The usage is simply:

  virt-edit mydomain /some/file

It runs $EDITOR or vi on the file, and if the user changes
it, uploads the result back to the VM.
2009-09-23 11:37:37 +01:00
Richard Jones
1b21ed4f5d Add 'virt-rescue' command.
This command runs a "rescue appliance" against a virtual machine
or disk image.  This is useful for making ad-hoc interactive
changes to virtual machines.

  $ virt-rescue --ro /dev/vg_trick/F11x64

  Welcome to virt-rescue, the libguestfs rescue shell.

  Note: The contents of / are the rescue appliance.
  You have to mount the guest's partitions under /sysroot
  before you will be able to examine them.

  bash: cannot set terminal process group (-1): Inappropriate ioctl for device
  bash: no job control in this shell
  ><rescue> mount /dev/vg_f11x64/lv_root /sysroot
  EXT4-fs (dm-0): barriers enabled
  kjournald2 starting: pid 269, dev dm-0:8, commit interval 5 seconds
  EXT4-fs (dm-0): internal journal on dm-0:8
  EXT4-fs (dm-0): delayed allocation enabled
  EXT4-fs: file extents enabled
  EXT4-fs: mballoc enabled
  EXT4-fs (dm-0): mounted filesystem with ordered data mode
  ><rescue> ls /sysroot/
  bin   dev  home  lib64       media  opt   root  selinux  sys  usr
  boot  etc  lib   lost+found  mnt    proc  sbin  srv      tmp  var
  ><rescue> exit
2009-09-23 11:18:45 +01:00
Richard Jones
b9da0fe3f7 Prepare for 1.0.71.
Update version number and update PO files.

Put latest version and release date on the website front page.
2009-09-22 14:51:14 +01:00
Richard Jones
13458c821b Don't include gnulib files in POTFILES.in. 2009-09-09 12:54:23 +01:00
Jim Meyering
0fc0e4bd73 build: use only one m4/ directory
* Makefile.am (ACLOCAL_AMFLAGS): Specify only one include dir: m4.
* bootstrap: Tell gnulib-tool to put .m4 files in m4/, not gnulib/m4.
* autogen.sh: Move autoreconf from here into...
* bootstrap: ...here, so that it is run only when gnulib-tool is.
Also, tell it to skip the usual autopoint and libtoolize runs.
* m4/.gitignore: Update.
2009-08-25 18:44:27 +02:00
Richard Jones
7faff93c3c Remove virt-v2v. New repo: http://gitorious.org/virt-v2v/ 2009-08-20 16:28:35 +01:00
Matthew Booth
12aedab609 Exclude daemon/lib and daemon/tests from being added to po/POTFILES.in 2009-08-06 13:07:51 +01:00