summaryrefslogtreecommitdiffstats
path: root/.gitignore
Commit message (Collapse)AuthorAgeFilesLines
* Add more exclusions to .gitignore.Matthew Booth2010-09-211-0/+2
|
* generator: Generate guestfish-only commands.Richard W.M. Jones2010-09-181-0/+1
| | | | | | 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.
* Split generator into separate source files.Richard Jones2010-09-111-2/+3
| | | | | | | | | | '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.
* fish: Generate list of prepared disk image types.Richard Jones2010-09-081-0/+2
| | | | This commit shouldn't change the semantics of the code.
* PHP bindings.Richard Jones2010-09-041-0/+18
| | | | | | 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.
* Allow manual pages and POD files to be translated.Richard Jones2010-09-021-0/+5
| | | | | | | | | | | | | | 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.
* ocaml: Add test for progress notification callbacks.Richard Jones2010-09-011-0/+1
|
* ocaml: Remove old entry from .gitignore file.Richard Jones2010-08-311-1/+0
|
* Include statically linked binaries in the binary distribution.Richard Jones2010-08-251-1/+4
|
* Rename guestfs-{actions,bindtests}.c to {actions,bindtests}.cRichard Jones2010-07-271-2/+2
| | | | | Rename these two generated files, in preparation for splitting up the main src/guestfs.c file.
* New APIs: lvm-set-filter and lvm-clear-filter.Richard Jones2010-07-161-0/+1
| | | | | | | These APIs allow you to change the device filter, the list of block devices that LVM "sees". Either you can set it to a fixed list of devices / partitions, or you can clear it so that LVM sees everything.
* ocaml: Fix thread safety of strings in bindings (RHBZ#604691).Richard Jones2010-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | There's a thread safety issue with the current OCaml bindings which is well explained in the bug report: https://bugzilla.redhat.com/show_bug.cgi?id=604691 This commit fixes the safety issue by copying strings temporarily before releasing the thread lock. Updated code looks like this: char *filename = guestfs_safe_strdup (g, String_val (filenamev)); int r; caml_enter_blocking_section (); r = guestfs_add_drive_ro (g, filename); caml_leave_blocking_section (); free (filename); if (r == -1) ocaml_guestfs_raise_error (g, "add_drive_ro"); Also included is a regression test.
* gnulib: Ignore asm-underscore.m4 in the correct place.Richard Jones2010-06-041-1/+0
|
* Update to latest gnulib.Richard Jones2010-06-041-0/+1
|
* generator: Check parameters are not NULL (RHBZ#501893).Richard Jones2010-05-201-0/+1
| | | | | | | | | | | | | | This adds additional tests to check that several types of parameter including String are not NULL when passed to the C functions. Previously this would cause a segfault inside libguestfs. With this change, you get an error message / exception. Of the possible pointer parameters, only OptString is now permitted to be NULL. This change does not affect the Perl bindings. This is because Perl XS code was already adding similar checks if you passed undef into a parameter expecting a string.
* Unify supermin appliance building using febootstrap 2.7Richard Jones2010-05-131-6/+2
|
* po: Include strings from Perl programs in the PO files (RHBZ#559963).Richard Jones2010-05-121-0/+2
| | | | | | | | | 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.
* po: Don't generate po/Makevars file and include Perl keywords (RHBZ#559963).Richard Jones2010-05-121-1/+0
| | | | | | | | | I don't see a reason to autogenerate po/Makevars, and in the earlier commit which changed this file to being autogenerated we accidentally lost the special Perl keywords, copyright notice and bug reporting address. Fix all of that. This partially reverts commit febff9d2a35c4f40abbaf8943146476bdeac671e.
* Ignore test1.img file in directory.Richard Jones2010-05-081-0/+1
|
* daemon: Fix for commands working on absolute symbolic links (RHBZ#579608).Richard Jones2010-05-071-0/+1
| | | | | | | | | | | | | | | | The original idea (suggested by Al Viro) was to fork and chroot into the sysroot and read the file from there. Because of the separate process being chrooted, absolute links would be resolved correctly. The slightly modified idea is to open the file in the daemon process (but temporarily chrooted, so symlinks resolve correctly), fork, and have the subprocess just be responsible for copying the file. (Strictly speaking we don't need to fork, but this implementation is simpler). This commit just includes the changes needed to the command*() functions in daemon/guestfsd.c and adds an absolute symlink to the test ISO for testing it. Later commits will fix the broken daemon commands themselves.
* New APIs: base64-in and base64-out for uploading/downloading base64 content.Richard Jones2010-04-191-0/+1
|
* New tool: virt-make-fs for creating filesystems on devices.Richard Jones2010-04-081-0/+1
|
* tools: Add basic tests for the virt-* tools.Richard Jones2010-03-301-0/+1
|
* New tools: virt-resize and virt-list-partitions.Richard Jones2010-03-231-0/+2
| | | | | | | | 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.
* Mac OS X: Fix configure-time tests for Ruby.Richard Jones2010-03-221-0/+1
| | | | | | | | For ARCHFLAGS change, see: http://www.ruby-forum.com/topic/129717#579065 We also add a test for the <guestfs.h> header and include that header when testing the library.
* Rewrite libguestfs-supermin-helper in C.Richard Jones2010-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libguestfs-supermin-helper was previously a shell script. Although we had steadily optimized it, there were a number of intractable hot spots: (1) cpio still reads input files in 512 byte chunks; this is *very* pessimal behaviour, particularly when SELinux is enabled. (2) the hostfiles globbing was done very inefficiently by the shell, with the shell rereading the same directory over and over again. This is a rewrite of this shell script in C. It is approximately 3 times faster without SELinux, and has an even greater speed difference with SELinux. The main features are: (a) It never frees memory, making it simpler. The program is designed to run and exit in sub-second times, so this is acceptable. (b) It caches directory reads, making the globbing of host files much faster (measured this as ~ 4 x speed up). (c) It doesn't use external cpio, but instead contains code to write newc format cpio files, which is all that the kernel can read. Unlike cpio, this code uses large buffers for reads and writes. (d) Ignores missing or unreadable hostfiles, whereas cpio gave a warning. (e) Checks all return values from system calls. (f) With --verbose flag, it will print messages timing itself. This passes all tests. Updated with feedback from Jim Meyering.
* Spin off hivex as a separate upstream project.Richard Jones2010-02-221-9/+0
| | | | | | | | | | | | | | 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.
* Tools for analyzing and reverse engineering hive files.Richard Jones2010-02-041-0/+1
| | | | | | | | | | | | | | This commit is not of general interest. It contains the tools which I used to reverse engineer the hive format and to test changes. Keeping these with the rest of the code is useful in case in future we encounter a hive file that we fail to modify. Note that the tools are not compiled by default. You have to compile each explicitly with: make -C hivex/tools <toolname>.opt You will also need ocaml-extlib-devel and ocaml-bitstring-devel.
* hivex: Reimplement hivexget as a simple shell script.Richard Jones2010-01-291-1/+0
| | | | | | hivexget is currently a large C program. Now that we have hivexsh (the shell) we can reimplement hivexget as a simple bash script that calls out to hivexsh.
* hivex: Add 'hivexsh' program (shell for navigating registry hives).Richard Jones2010-01-291-0/+2
|
* Fix regressions/rhbz557655.sh when debugging is enabled (v2).Richard Jones2010-01-291-0/+1
| | | | | | | | The previous fix didn't cope with ordinary warnings emitted by qemu (eg. "open /dev/kvm: No such file or directory"). This is a hopefully more complete fix for the problem. See also commit 3cd7ce75f1ce5048a4d9f6aeaf66aff3194e1096.
* supermin: Prevent multilib corruption (RHBZ#558593).Richard Jones2010-01-271-1/+0
| | | | | | | | | | | | | | | | | | | On some combination of installing, upgrading and removing the base libguestfs package on x86_64, multilib can corrupt libguestfs by leaving a copy of /usr/bin/libguestfs-supermin-helper around which references the wrong architecture (usually, contains links to the i386-based appliance, when the x86_64 appliance should be constructed). This commit changes libguestfs-supermin-helper so that the script is the same on all architectures. Instead, the library passes the differences to the script (eg. $host_cpu). Because the i386 and x86_64 libraries should be at different locations (/usr/lib vs /usr/lib64) this should prevent multilib from screwing things up. Related links: https://bugzilla.redhat.com/show_bug.cgi?id=558593 http://rwmj.wordpress.com/2009/11/16/please-someone-shoot-multilib/#content https://bugzilla.redhat.com/show_bug.cgi?id=235752
* guestfish: Use xstrtol to parse integers (RHBZ#557655).Richard Jones2010-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code uses atoi to parse the generator Int type and atoll to parse the generator Int64 type. The problem with the ato* functions is that they don't cope with errors very well, and they cannot parse numbers that begin with 0.. or 0x.. for octal and hexadecimal respectively. This replaces the atoi call with a call to Gnulib xstrtol and the atoll call with a call to Gnulib xstrtoll. The generated code looks like this for all Int arguments: { strtol_error xerr; long r; xerr = xstrtol (argv[0], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "memsize", "xstrtol", xerr); return -1; } /* The Int type in the generator is a signed 31 bit int. */ if (r < (-(2LL<<30)) || r > ((2LL<<30)-1)) { fprintf (stderr, _("%s: %s: integer out of range\n"), cmd, "memsize"); return -1; } /* The check above should ensure this assignment does not overflow. */ memsize = r; } and like this for all Int64 arguments (note we don't need the range check for these): { strtol_error xerr; long long r; xerr = xstrtoll (argv[1], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "size", "xstrtoll", xerr); return -1; } size = r; } Note this also fixes an unrelated bug in guestfish handling of RBufferOut. We were using 'fwrite' without checking the return value, and this could have caused silent failures, eg. in the case where there was not enough disk space to store the resulting file, or even if the program was interrupted (but continued) during the write. Replace this with Gnulib 'full-write', and check the return value and report errors.
* Use linker script to control visibility of symbols.Richard Jones2010-01-041-0/+1
|
* C#: Add documentation about experimental nature of these bindings.Richard Jones2010-01-041-0/+1
|
* daemon/Win32: Add contributed test script to test daemon using Wine.Richard Jones2009-11-261-0/+1
| | | | | | | | | This test script allows you to test limited features of the Windows daemon by running it on a standard Fedora host using Wine. Read contrib/README and contrib/guestfsd-in-wine.sh in detail before using.
* Ignore guestfsd.exe (Windows daemon).Richard Jones2009-11-261-0/+1
|
* daemon: Link guestfs_protocol.[ch] into the daemon directory.Richard Jones2009-11-261-0/+2
| | | | | | | | | | | Instead of doing a recursive call into the src/ directory to build the object files, hard link the source files into the daemon directory and build them separately. See: http://www.redhat.com/archives/libguestfs/2009-November/msg00254.html Thanks to Jim Meyering for noticing a typo in the original version.
* New tool: virt-list-filesystemsRichard Jones2009-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* availability: Add optional groups and implement guestfs_available call.Richard Jones2009-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* Generic partition creation interface.Richard Jones2009-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a generic partition creation interface which should be future-proof and extensible, and partially replaces the old sfdisk-based interface. The implementation is based on parted but is hopefully not too dependent on the particulars of parted. The following new calls are introduced: guestfs_part_init: Initialize a disk with a partition table. Unlike the sfdisk- based interface, we also support GPT and other partition types, which is essential to scale to devices larger than 2TB. guestfs_part_add: Add a partition to an existing disk. guestfs_part_disk: Convenience function which combines part_init & part_add, creating a single partition that covers the whole disk. guestfs_part_set_bootable: guestfs_part_set_name: Set various aspects of existing partitions. guestfs_part_list: List partitions on a device. This returns a programming-friendly list of partition structs (in contrast to sfdisk-l which cannot be parsed). guestfs_part_get_parttype: Return the partition table type, eg. "msdos" or "gpt". The following calls are planned, but not added currently: guestfs_part_get_bootable guestfs_part_get_name guestfs_part_set_type guestfs_part_get_type
* debian: Ignore some generated debirf files.Richard Jones2009-11-041-0/+5
|
* FUSE filesystem support.Richard Jones2009-11-031-0/+3
| | | | | | | | | | | | | | | 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).
* Add HTML documentation to website.Richard Jones2009-10-291-0/+3
|
* Support for Windows Registry.Richard Jones2009-10-291-0/+5
| | | | | | | | | | | | | 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.
* New tool: virt-lsRichard Jones2009-10-201-0/+1
| | | | | | | | | This tool makes available the functionality of "ls", "ll", and "find" in a slightly simpler to use form. Examples: virt-ls -l myguest /tmp
* New tool: virt-tarRichard Jones2009-10-201-0/+1
| | | | | | | | | | | | 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
* Move virt tools (virt-cat, virt-edit etc) into tools/ subdirectory.Richard Jones2009-10-191-4/+1
| | | | | | | | | | | | | | | | | | 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.
* inspector: Generate language bindings for OCaml.Richard Jones2009-10-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* OCaml example: graphical disk usage viewer.Richard Jones2009-09-291-0/+2
| | | | | | | | | This is an example of how to write an app which uses libguestfs and libvirt, and has a responsive user interface (using threads). It is a Gtk-based "graphical virt-df". Read the top of the 'viewer.ml' file first for instructions on how to compile. This program is not compiled by default.