Commit Graph

121 Commits

Author SHA1 Message Date
Hilko Bengen
b6e0552ee5 Do not run appliance-related checks if not building appliance 2012-01-23 09:08:33 +00:00
Hilko Bengen
7004fafc69 Replace setting of environment variables with usage of local run script
(Includes fix by RWMJ)
2012-01-23 09:08:21 +00:00
Richard W.M. Jones
08840bab44 Tempus fugit.
Update all copyright dates to 2012.
2012-01-18 22:05:02 +00:00
Richard W.M. Jones
d8a1389df3 tools: Mark obsolete tools clearly in the man pages. 2012-01-18 21:15:37 +00:00
Richard W.M. Jones
6de1a1242e New tool: virt-format: erase and make blank disks.
This tool allows you to easily reformat a disk, creating a blank disk
with optional partition, LVM and empty filesystem.
2012-01-18 16:28:31 +00:00
Richard W.M. Jones
cd077b8229 tests: Split images -> tests/data + tests/guests 2011-12-22 15:48:11 +00:00
Matthew Booth
04ea1375c5 Update FSF address. 2011-11-08 14:43:07 +00:00
Richard W.M. Jones
21a4cf7ef5 virt-win-reg: Document syntax for deleting keys and values (RHBZ#737944).
NB: This requires hivex >= 1.3.2 before this syntax becomes true.
2011-10-22 15:55:48 +01:00
Richard W.M. Jones
e192035bbd virt-make-fs: Refresh man page. 2011-10-22 07:29:39 +01:00
Richard W.M. Jones
0c06d740b7 virt-make-fs: Set MBR partition type byte correctly (RHBZ#746295). 2011-10-21 16:02:34 +01:00
Hilko Bengen
ff101adf7e out-of-tree build: fix documentation generation 2011-08-15 14:50:33 +01:00
Richard W.M. Jones
f7d18c84dd build: Set TMPDIR for local testing.
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
2011-08-08 12:41:54 +01:00
Richard W.M. Jones
995b3fecb9 virt-tar test: Stable ordering of test output.
The files could be listed in any order, resulting in the test failing
for no reason.  Sort the output of tar.
2011-08-01 15:13:08 +01:00
Richard W.M. Jones
a711777bed docs: Separate out combined =item 's in man pages.
Turn:

 =item B<-a> | B<--all>

into:

 =item B<-a>

 =item B<--all>

This gives a more natural-looking manual page, as well as making it
easier to directly link to these sections.
2011-07-16 15:20:29 +01:00
Richard W.M. Jones
94d1dfde27 virt-win-reg: Win XP paths can contain %systemdrive%. 2011-05-17 22:54:20 +01:00
Richard W.M. Jones
4a6890d824 virt-win-reg: systemroot macro should be replaced case insensitive. 2011-05-17 22:53:53 +01:00
Richard W.M. Jones
2dbe26c372 virt-win-reg: Support HKEY_USERS keys.
This adds support for various Registry keys under HKEY_USERS (user
preferences).

(1) HKEY_USERS\<SID>
    where <SID> is a User SID.

For example:

  # virt-win-reg Windows 'HKEY_USERS\S-1-5-19'

lists out the LocalService user's registry.

(2) HKEY_USERS\<username>
    where <username> is a Windows local username (this is a
    libguestfs extension).

For example:

  # virt-win-reg Windows 'HKEY_USERS\rjones'

lists out the user preferences of user 'rjones'.

HKU can be used as an abbreviation for HKEY_USERS.  Merging is also
supported.
2011-05-17 17:05:11 +01:00
Richard W.M. Jones
4443cfab8b virt-win-reg: Don't use implicit $_ in map_path_to_hive function. 2011-05-17 17:05:11 +01:00
Richard W.M. Jones
3b4bb214c3 virt-win-reg: Don't hard-code the relationship between hive name and path.
The crucial change is the tuple that is returned by map_path_to_hive:

-    my ($hivename, [...]) = map_path_to_hive ($_);
+    my ($hiveshortname, $hivefile, [...]) = map_path_to_hive ($_);

Previously the $hivename was both the name of the hive (eg. "sam"),
the name of the local copy in /tmp, and the name of the hive in
%systemroot%\system32\config.

In the new code, the $hiveshortname (eg. "sam") is still used for the
local copy in /tmp, but we return $hivefile which is the full Windows
path (eg. "/windows/system32/config/sam").

The purpose of this change is to allow us in future to return hives
from other Windows directories, specifically HKEY_USERS hives from
Windows home directories.

Although this is just code motion, it requires some quite extensive
changes to virt-win-reg.
2011-05-17 17:05:11 +01:00
Richard W.M. Jones
9116f0eb01 virt-win-reg: Add --unsafe-printable-strings option.
This also requires hivex >= 1.2.7.
2011-05-17 17:05:01 +01:00
Richard W.M. Jones
2b5fbc882a Rewrite virt-edit in C. 2011-05-09 14:23:08 +01:00
Richard W.M. Jones
c49fc3831d doc: Use I<-...> for cross-references to command line options.
This is now used consistently across all the documentation.
2011-05-01 17:43:18 -04:00
Richard W.M. Jones
5790f5bfaf Remove ad-hoc run*locally scripts, replace with './run'
Remove all the run*locally scripts and replace with a single top level
./run shell script.
2011-04-16 08:32:44 +01:00
Richard W.M. Jones
ca03635a4c Rewrite virt-resize in OCaml.
This is a fairly straightforward translation of Perl virt-resize into
OCaml.  It is bug-for-bug and feature-for-feature identical to the
Perl version, except as noted below.

The motivation is to have a more solid, high-level, statically safe
compiled language to go forwards with fixing some of the harder bugs
in virt-resize.  In particular contracts between different parts of
the program are now handled by statically typed structures checked at
compile time, instead of the very ad-hoc unchecked hash tables used by
the Perl version.

OCaml and the ocaml-pcre library (Perl-Compatible Regular Expressions
bindings for OCaml) are required.

Extra features in this version:

- 32 bit hosts are now supported.

- We try hard to handle the case where the target disk is not "clean"
  (ie. all zeroes).  It usually works for this case, whereas the
  previous version would usually fail.  However it is still
  recommended that the system administrator creates a fresh blank disk
  for the target before running the program.

- User messages are a bit more verbose and helpful.  You can turn
  these off with the -q (--quiet) option.

There is one lost feature:

- Ability to specify >= T (terabytes) sizes in command line size
  expressions has been removed.  This probably didn't work in the Perl
  version.

Other differences:

- The first partition on the target is no longer aligned; instead we
  place it at the same sector as on the source.  I suspect that
  aligning it was causing the bootloader failures.

- Because it's easier, we do more sanity checking on the source disk.
  This might lead to more failures, but they'd be failures you'd want
  to know about.

- The order in which operations are performed has been changed to make
  it more logical.  The user should not notice any functional
  difference, but debug messages will be quite a bit different.

- virt-resize is a compiled binary, not a script.
2011-04-09 14:28:22 +01:00
Richard W.M. Jones
ade2f82450 edit: Allow Windows-style drive letters and paths to be used. 2011-04-05 20:01:59 +01:00
Richard W.M. Jones
60cdf44606 edit: Move 'exit 0' to end of file.
This is just code motion.
2011-04-05 18:34:35 +01:00
Richard W.M. Jones
aed8f220d2 edit: Let $root == $roots[0].
This is just code motion.
2011-04-05 18:34:35 +01:00
Richard W.M. Jones
4de124debf cat, edit: Reference guestfish equivalent commands in the manual pages. 2011-04-05 18:34:35 +01:00
Richard W.M. Jones
edb7501d60 tests: Don't fail when compiled without support for NTFS. 2011-03-29 16:03:29 +01:00
Richard W.M. Jones
bc468c87d0 New event API - Perl bindings (RHBZ#664558).
The methods $h->set_progress_callback and $h->clear_progress_callback
have been removed, and replaced with a complete mechanism for setting
and deleting general-purpose events.

This also updates virt-resize to use the new API.
2011-03-15 12:16:51 +00:00
Richard W.M. Jones
eda9826d25 virt-make-fs: Round disk size to integer, fix for qemu-img 0.14.
qemu-img used to allow you to specify a fractional image size in bytes
(or at least, it used to ignore the part after the decimal place).  In
qemu-img 0.14 it no longer does this so we round down the size to a
whole number of bytes.
2011-03-04 12:13:32 +00:00
Richard W.M. Jones
29b3ffdad5 virt-make-fs: In debug mode, print qemu-img command line. 2011-03-04 12:13:12 +00:00
Richard W.M. Jones
0089575d4b virt-make-fs: Fix typo in man page. 2011-01-30 23:53:04 +00:00
Richard W.M. Jones
7e1114445e resize: Fix typo in man page (thanks avesh@IRC). 2011-01-07 20:38:55 +00:00
Richard W.M. Jones
b8f9a20b03 New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.
Relatively trivial wrappers around the equivalent guestfish
commands.  Change also includes new man pages.
2011-01-03 18:23:45 +00:00
Richard W.M. Jones
8d8dc4c107 win-reg: Add Windows Tips to documentation. 2010-12-10 15:12:02 +00:00
Richard W.M. Jones
bc484e99c2 win-reg: Move documentation after options, combine shell quote sections. 2010-12-10 14:36:18 +00:00
Richard W.M. Jones
6f09e4774c docs: Fix small inaccuracies in virt-resize(1). 2010-11-27 18:52:51 +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
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
e1aca6323e build: Centralize all POD manipulation in 'podwrapper.sh' script. 2010-11-24 20:12:08 +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
f33d899fd0 resize: Fix canonical device function (RHBZ#655554). 2010-11-23 09:48:04 +00:00
Richard W.M. Jones
4ac3124760 rescue: Fix typo in documentation of --network option. 2010-11-16 23:34:07 +00:00
Richard W.M. Jones
6d4815d3a4 images: Make a better phony Fedora image.
This now includes a product string, major and minor version,
hostname and even some applications.
2010-11-16 18:36:29 +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
4d900cdac8 Generate a dummy 'Fedora' fedora.img in images directory for use by tests.
We were generating this dummy 'Fedora' image already in the
tools directory.  It contains just enough Fedora-like files
to fool our inspection code and thus to test the tools.

This is general enough that we can use it everywhere.
2010-11-11 16:56:11 +00:00
Richard W.M. Jones
bfeffeb1e4 virt-win-reg: Current is the control set Windows chooses at boot. 2010-11-03 23:17:51 +00:00
Richard W.M. Jones
0353688577 list-filesystems: Use core list-filesystems API (RHBZ#642933).
Change virt-list-filesystems to use the core inspection API
instead of the deprecated Sys::Guestfs::Lib::get_partitions
function.
2010-10-28 15:48:16 +01:00