summaryrefslogtreecommitdiffstats
path: root/inspector
Commit message (Collapse)AuthorAgeFilesLines
* inspector: Improve error message when YAML::Any library is not installed.Richard Jones2010-07-021-1/+1
|
* guestfish -i and virt-inspector work on filenames containing spaces ↵Richard Jones2010-05-131-2/+7
| | | | | | | | | | | | | | (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.
* po: Include strings from Perl programs in the PO files (RHBZ#559963).Richard Jones2010-05-121-0/+9
| | | | | | | | | 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.
* Documentation updates.Richard Jones2010-04-111-2/+2
| | | | | | | 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.
* inspector: Read information about Windows guests from the Registry.Richard Jones2010-03-082-14/+11
| | | | | | | | | | | | | | 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.
* inspector: Add product_name field to output.Richard Jones2010-03-085-7144/+12140
| | | | | | 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.
* inspector: Don't crash if $os->{kernels} does not exist.Richard Jones2010-03-081-7/+9
| | | | ie. on Windows.
* RHEL5: Keep old automake happy by defining docdirRichard W.M. Jones2010-02-051-0/+1
|
* inspector: Update example XML and RNG schema.Richard Jones2010-01-063-4411/+13948
| | | | This updates commit a59dcdbd1b0a28c960e3792165a13f2daf4f6c35.
* inspector: Make RPM application data more specific (RHBZ#552718).Richard Jones2010-01-051-0/+3
| | | | | | | 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.
* Remove separate inspector_generator.ml, combine this with generator.ml.Richard Jones2009-12-312-648/+2
| | | | | | | | | | | 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.
* build: Fix inter-directory dependenciesMatthew Booth2009-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* inspector: Remove inaccurate paragraph from documentation.Richard Jones2009-10-261-4/+0
|
* Tab to space fixes, now passes 'make syntax-check'Richard Jones2009-10-203-245/+245
|
* Add some missing EXTRA_DIST files.Richard Jones2009-10-141-1/+2
|
* inspector: Generate language bindings for OCaml.Richard Jones2009-10-132-1/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* inspector: Fix inspector/Makefile.amRichard Jones2009-10-021-4/+3
| | | | | | | | 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
* inspector: Add tests for RELAX NG schema.Richard Jones2009-10-025-1/+14752
|
* inspector: Add RELAX NG schema for virt-inspector --xml output.Richard Jones2009-10-022-4/+171
|
* run-*-locally: The programs are now virt-[tool], not virt-[tool].plRichard Jones2009-10-011-1/+1
| | | | This fixes commit b488436cc54288fcae8988493749f2e6c87f274c.
* inspector: Don't bomb if no kernels detected.Richard Jones2009-10-011-16/+18
| | | | | | | | 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.
* Include virt tools in EXTRA_DIST.Richard Jones2009-09-231-1/+2
| | | | | | Partially revert b488436cc54288fcae8988493749f2e6c87f274c. It turns out that automake doesn't automatically place bin_SCRIPTS in EXTRA_DIST.
* Rename virt-[tool].pl as virt-[tool]Richard Jones2009-09-232-8/+4
|
* Check return value from readlink.Richard Jones2009-09-231-1/+1
|
* Create manpage atomically.Richard Jones2009-09-231-1/+1
| | | | Don't fail with a partial file if disk full, etc.
* Replace @...@ with $(...) in these common Makefile.am files.Richard Jones2009-09-231-4/+4
|
* Remove guestfs_wait_ready (turn it into a no-op).Richard Jones2009-09-211-1/+0
| | | | | | | | | | | | | | 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.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-123/+123
| | | | | | | | | | | 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 : $_'
* Use grub entries to find Linux kernelsMatthew Booth2009-08-031-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* inspector: Determine guest architecture.Richard Jones2009-07-291-2/+52
| | | | | | | 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.
* Split $os->{version} into $os->{major_version} and $os->{minor_version}Matthew Booth2009-07-211-2/+5
|
* virt-inspector --fish: Fix incorrect '-a' parameter (RHBZ#512709)Richard Jones2009-07-201-3/+8
| | | | | | | | | | | | | | | | | 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.
* Replace 'distrofamily' with feature tagsMatthew Booth2009-07-201-2/+2
| | | | | | | | | | | | | 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
* Differentiate 'distro' and 'distrofamily' in Sys::Guestfs::LibMatthew Booth2009-07-171-1/+4
| | | | | | | | | | | | | | | 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.
* Make Perl strings translatable using perl-libintl.Richard Jones2009-07-151-10/+11
| | | | | | | | | 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.
* virt-inspector: Ignore swap partitions marked as "none".Richard Jones2009-07-141-1/+1
|
* Documentation for virt-v2v.Richard Jones2009-07-111-0/+2
|
* Add --version options to virt-df, virt-inspector and virt-v2v.Richard Jones2009-07-101-0/+15
|
* Move 'use File::Temp' from virt-inspector program to Sys::Guestfs::Lib.Richard Jones2009-07-101-1/+0
|
* Remove virt-inspector --force option - it didn't do anything.Richard Jones2009-07-091-13/+0
|
* Move the inspection analysis code into Sys::Guestfs::Lib library.Richard Jones2009-07-091-601/+40
| | | | | | | | | | | Creates new functions: inspect_all_partitions inspect_partition inspect_operating_systems mount_operating_system inspect_in_detail Includes far more documentation for the process.
* Move 'resolve_windows_path' to Sys::Guestfs::Lib.Richard Jones2009-07-091-39/+15
|
* Move 'get_partitions' call into Sys::Guestfs::Lib.Richard Jones2009-07-091-17/+2
|
* Add Sys::Guestfs::Lib - useful functions for using libguestfs from Perl.Richard Jones2009-07-091-56/+9
| | | | | | | | | | 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.
* Make it possible to build in a separate directoryMatthew Booth2009-07-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | 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.
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* Merge commit 'et/master'Matthew Booth2009-06-291-34/+11
|\
| * Add 'initrd-list' command to list contents of initrd images.Richard W.M. Jones2009-06-291-34/+11
| | | | | | | | | | | | Add 'initrd-list' command to list the files inside (new-style) initrd images. Update virt-inspector to use this instead of the less efficient download/unpack locally method.
* | Output the config filename containing a modprobe alias in XMLMatthew Booth2009-06-291-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change affects the XML output: /operatingsystems/operatingsystem/modprobealiases/alias/text() => /operatingsystems/operatingsystem/modprobealiases/alias/modulename/text() Additionally there are two new elements: /operatingsystems/operatingsystem/modprobealiases/alias/augeas /operatingsystems/operatingsystem/modprobealiases/alias/file These contain information about the location of the alias directive. /augeas is an augeas path. /file is the path of the file containing the directive.
* | Add a comment to device naming heuristicMatthew Booth2009-06-291-0/+6
|/