| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite virt-inspector:
- remove old and unsupportable features
- use the C inspection API
- don't run programs from the guest
The RNG has been updated to reflect the new XML-only output.
The new example files show the new XML output.
|
|
|
|
|
|
|
|
|
|
| |
Sys::Guestfs::Lib is changed in two ways: firstly we take the format
string from libvirt and pass it to add_drive_opts. Secondly we allow
an extra format => parameter to open_guest which allows the
format to be specified for disk images.
All the tools are changed to add an extra --format parameter allowing
the format to be specified for direct disk images.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#507810).
This commit fixes a long-standing bug which prevented guestfish -i
and virt-inspector from working on disk images which had a space
in the filename (or other unsafe characters). It works by ensuring
that the strings passed between guestfish -i and virt-inspector are
quoted correctly in both directions.
Note that this commit adds a dependency from virt-inspector to
the perl module String::ShellQuote. We have previously used this
module in virt-make-fs.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This is a free text string containing the "product name" of
the OS. It's mainly useful for Windows guests, and a forthcoming
patch will get this field from the Windows Registry.
|
|
|
|
| |
ie. on Windows.
|
| |
|
|
|
|
| |
This updates commit a59dcdbd1b0a28c960e3792165a13f2daf4f6c35.
|
|
|
|
|
|
|
| |
List applications with epoch, release and arch data.
If epoch is 0, don't store this as an empty string, but as
undefined, and don't output empty <epoch/> element in the XML.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Accidentally pushed the older version of the patch in
commit 9d25e82491ddcf495e1d30694327e4bfd3a23445.
This includes Jim Meyering's suggested changes from
https://www.redhat.com/archives/libguestfs/2009-October/msg00017.html
|
| |
|
| |
|
|
|
|
| |
This fixes commit b488436cc54288fcae8988493749f2e6c87f274c.
|
|
|
|
|
|
|
|
| |
If $os->{kernels} wasn't defined, virt-inspector would exit with
an error, leaving partial XML output.
Change the code so it doesn't die in this case, instead just
leaves out the <kernels> section.
|
|
|
|
|
|
| |
Partially revert b488436cc54288fcae8988493749f2e6c87f274c.
It turns out that automake doesn't automatically place bin_SCRIPTS
in EXTRA_DIST.
|
| |
|
| |
|
|
|
|
| |
Don't fail with a partial file if disk full, etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes guestfs_launch so that it both launches
the appliance and waits until it is ready (ie. the daemon communicates
back to us).
Since we removed the pretence that we could implement a low-level
asynchronous API, the need to call launch() followed by wait_ready()
has looked a bit silly.
Now guestfs_wait_ready() is basically a no-op. It is left in the
API for backwards compatibility. Any calls to guestfs_wait_ready()
can be removed from client code.
|
|
|
|
|
|
|
|
|
|
|
| |
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 : $_'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds grub parsing to Lib.pm. It adds the following structure to $os:
{boot}
->{configs}
->[0]
->{title} = "Fedora (2.6.29.6-213.fc11.i686.PAE)"
->{kernel} = \kernel
->{cmdline} = "ro root=/dev/mapper/vg_mbooth-lv_root rhgb"
->{initrd} = \initrd
->{default} = 0
The kernel and initrd entries are just references to their top level entries
under kernels and initrd_modules respectively.
It also changes the way Linux kernels and initrd are discovered. Instead of
searching /lib/modules and /boot for files with matching names, kernels and
initrds are scanned as they are discovered in grub.conf.
Additionally, the following attributes are added to the kernels top level entry:
* path
The path to the kernel's vmlinuz file.
* package
The name of the package which installed the kernel.
The xml output of virt-inspector is updated to reflect all of the above changes.
|
|
|
|
|
|
|
| |
This commit adds kernel and userspace architecture detection
(fully for Linux, partially for Windows). It adds an architecture
for each kernel detected, and an architecture for each root (ie.
userspace) found.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
virt-inspector --fish dom
virt-inspector --ro-fish dom
Both of the above commands give incorrect results if run on a
libvirt domain, eg:
$ virt-inspector --ro-fish RHEL54Betax64
==> --ro -a RHEL54Betax64 -m /dev/VolGroup00/LogVol00:/ -m /dev/sda1:/boot
^^^^^^^^^^^^^
This is because the current code just prints back the original @ARGV
parameters.
This patch fixes this by getting the image names instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that the distribution hierarchy is not as reliable concept as you
might think. This patch removes distrofamily again.
Instead of distrofamily, we will add feature tags. This patch adds 2 feature
tags for Linux distributions:
package_format (eg rpm/dpkg)
package_management (eg rhn/yum/apt)
This change is reflected in the output of virt-inspector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change distro in the output formally known as virt-inspector to reflect the
actual distro. Possible values are now: fedora, rhel, centos, scientific,
debian.
Add new distrofamily entry which is one of: redhat, debian. Currently all
distros except 'debian' are in the redhat family.
This allows you to, for example, select a RHEL/CentOS/Scientific Linux specific
kernel for installation rather than assuming they're all the same.
Note this also changes the behaviour of virt-inspector --query. It will now only
return rhel=yes for RHEL.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Creates new functions:
inspect_all_partitions
inspect_partition
inspect_operating_systems
mount_operating_system
inspect_in_detail
Includes far more documentation for the process.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This adds an extra Perl module called Sys::Guestfs::Lib which
adds useful functions for using libguestfs from Perl.
The intention is that common code shared between virt-inspector,
virt-df and virt-v2v will move into this library.
This patch also changes virt-inspector to use this library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows you to do:
mkdir build
cd build
../configure ...
make
This will output all generated files to the build directory. Given that
autogen automatically runs configure, you can also do:
BUILDDIR=./build ./autogen.sh
which will do the right thing.
Also:
* Fix a dependency bug which means that guestfs_protocol.h
isn't automatically rebuilt.
* Re-running autogen.sh with no arguments won't blow away your previous
configure arguments.
|
| |
|