50 Commits

Author SHA1 Message Date
Richard W.M. Jones
fc73cdc014 Fix HACKING file in top level directory. 2016-11-13 18:28:38 +00:00
Richard W.M. Jones
d2400da92e docs: Obsolete HACKING file, move content into guestfs(3) man page.
Add a new section called "EXTENDING LIBGUESTFS" to the
guestfs manual page which contains all the information
previously in "HACKING".
2010-12-19 21:53:09 +00:00
Richard W.M. Jones
f93cdf1ed3 capitests: Add 'InitScratchFS' test environment.
This should allow us to perform filesystem-based write
tests much more quickly, because we don't need to recreate
the filesystem from scratch each time.
2010-11-30 11:48:35 +00:00
Richard W.M. Jones
17233ce211 capitests: Move test documentation into HACKING file. 2010-11-30 10:42:31 +00:00
Richard W.M. Jones
a6054bf90f rescue: Rewrite virt-rescue in C. 2010-11-26 15:12:25 +00:00
Richard W.M. Jones
076a9726e6 Update HACKING description of tools/ subdirectory.
This fixes commit 18374b5b7d.
2010-11-26 11:37:50 +00:00
Richard W.M. Jones
18374b5b7d df: Rewrite virt-df in C.
I have diffed the output from the original virt-df with this
new version, and they agree very closely.  Some differences:

 - Old virt-df have a divide-by-zero error in cases where the
   number of used inodes was 0.  New virt-df fixes this.

 - New virt-df uses gnulib human_readable library which displays
   numbers to 3 significant figures for -h output (old version
   used an ad hoc function).
2010-11-25 18:58:13 +00:00
Richard W.M. Jones
fbc2555903 New tool: virt-filesystems
This tool replaces virt-list-filesystems and virt-list-partitions with
a new tool written in C with a more uniform command line structure
and output.

This existing Perl tools are deprecated but remain indefinitely.
2010-11-23 10:22:08 +00:00
Richard W.M. Jones
f6d3d56771 ls: Rewrite virt-ls in C. 2010-11-23 09:48:05 +00:00
Richard W.M. Jones
d29e9a552f Rewrite virt-cat in C.
With changes in the core API since 1.5, virt-cat was little
more than a Perl wrapper which did some command line argument
processing.  Thus it could easily be rewritten in C.

This version also shares core command line argument processing
with guestfish and guestmount, so the options have changed
slightly (old-style command line *is* supported).

 virt-cat -a disk.img file [file ...]
 virt-cat -d domname file [file ...]

Several other guestfish options are supported including encryption,
and with the new style multiple files can be downloaded.  See the
man page for details.
2010-11-11 16:56:43 +00:00
Richard W.M. Jones
9694cd59f8 HACKING: Mention PHP bindings. 2010-11-03 22:23:55 +00: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
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
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
c0e4b5dc69 Experimental C# bindings.
Tested in only limited situations, with Mono on Linux.
2010-01-02 21:55:17 +00:00
Jim Meyering
e645763007 indent with spaces, not TABs
* HACKING: Expand indentation TABs.
* configure.ac: Likewise.
* daemon/daemon.h: Likewise.
* daemon/guestfsd.c: Likewise.
* fuse/guestmount.c: Likewise.
* hivex/LICENSE: Likewise.
* src/generator.ml: Likewise.
* tools/virt-win-reg: Likewise.
2009-11-09 20:19:42 +01: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
de64183f3d Tab to space fixes, now passes 'make syntax-check' 2009-10-20 15:03:16 +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
Jim Meyering
dc0c80b388 maint: use spaces, not TABs for indentation
"make syntax-check" was failing.  This fixes it.
* HACKING: Indent with spaces, not TABs.
* configure.ac: Likewise.
* rescue/virt-rescue: Likewise.
* src/generator.ml: Likewise.
2009-09-24 10:59:53 +02: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
7faff93c3c Remove virt-v2v. New repo: http://gitorious.org/virt-v2v/ 2009-08-20 16:28:35 +01:00
Richard W.M. Jones
4d8efdd455 HACKING: Document make targets and ./configure --enable-gcc-warnings. 2009-08-17 12:23:32 +01:00
Jim Meyering
f1d23409f7 doc: improve emacs snippets
* HACKING: Make (setq indent-tabs-mode nil) apply to nearly all
files, not just C-mode ones.
2009-08-12 15:11:29 +02:00
Jim Meyering
1fc38df2df build: tweak HACKING so we pass "make syntax-check"
* HACKING: Convert leading TABs.
2009-08-04 14:47:09 +02:00
Jim Meyering
4c2c2793ba Document and enforce the new spaces-only indentation policy.
* cfg.mk (disable_temporarily): Remove sc_TAB_in_indentation,
to enable the "make syntax-check" that enforces this.
* .x-sc_TAB_in_indentation: New file.  Exceptions.
* HACKING: Document the policy, with tips on how to conform.
2009-08-03 18:05:17 +02:00
Jim Meyering
2f1a50d816 Convert all TABs-as-indentation to spaces.
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]

  git ls-files \
    | pcregrep -vf .x-sc_TAB_in_indentation \
    | xargs pcregrep -l '^ *\t' \
    | xargs perl -MText::Tabs -ni -le \
      '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
2009-08-03 17:17:57 +02:00
Richard Jones
0f2e9c84e9 Replace shell_quote function with %Q and %R printf specifiers.
%Q => simple shell quoted string
%R => path will be prefixed by /sysroot

eg. snprintf (cmd, sizeof cmd, "cat %R", path); system (cmd);
2009-07-28 10:57:57 +01:00
Richard Jones
f9de01b9b9 Add libguestfs-test-tool.
This is an end-user testing tool, designed to test basic functionality
of libguestfs/qemu/kernel combination on the end-user's final host
machine.

It does not perform a thorough test, but should be enough to find
most booting issues.

Also this is intended to be used when reporting bugs.
2009-07-22 23:00:30 +01:00
Richard Jones
bdf7a27a79 New tool virt-cat: display a file in a virtual machine.
This script is just a simpler way to cat a file from a VM.  It
is otherwise equivalent to using guestfish.

 virt-cat someguest /etc/fstab

 virt-cat someguest /var/log/messages | tail
2009-07-15 16:35:54 +01:00
Richard Jones
67a3d3e391 Added framework for 'virt-df' command. 2009-07-10 10:44:20 +01:00
Richard Jones
6e790a9d6b Added outline of the virt-v2v script. 2009-07-10 10:22:47 +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
da85ed425d Generator now runs automatically when it has changed. 2009-07-02 11:51:07 +01:00
Richard Jones
dcd8742578 Move pure regression tests to their own subdirectory. 2009-06-04 15:06:28 +01:00
Richard W.M. Jones
e2206733d1 Move C API tests out of root build dir into 'capitests' subdir. 2009-05-28 13:15:34 +01:00
Richard W.M. Jones
a1e8cdf2a2 Move the appliance and build scripts into new appliance/ subdirectory. 2009-05-28 13:00:31 +01:00
Richard Jones
d70248333e Gettextize the source, make library strings translatable. 2009-05-21 12:01:36 +01:00
Richard Jones
d43dac6948 Partial Haskell bindings. 2009-05-10 13:52:49 +01:00
Richard Jones
12baf36e87 Experimental febootstrap install script. 2009-05-08 20:16:03 +01:00
Richard Jones
5aa57fbd34 Added virt-inspector program from virt-v2v. 2009-04-28 14:22:01 +01:00
Richard Jones
7f818fa00c Java bindings compile, not tested. 2009-04-21 21:14:55 +01:00
Richard Jones
0232e72282 Added tar-in, tar-out, tgz-in, tgz-out commands. 2009-04-20 15:54:22 +01:00
Richard Jones
7bf3e1a435 Add ruby/ directory, add more warnings. 2009-04-18 21:21:44 +01:00
Richard Jones
a2e1d51acd Updated HACKING notes about debugging. 2009-04-09 13:19:12 +01:00
Richard Jones
acf9000252 Added framework for the language bindings. 2009-04-07 13:08:50 +01:00
Richard Jones
bf17bf81fe Debugging tips. 2009-04-06 11:43:14 +01:00
Richard Jones
f5d2602bf6 Added a HACKING file. 2009-04-03 22:24:32 +01:00