Richard W.M. Jones
2011-Apr-16 17:50 UTC
[Libguestfs] NOTE: running ./fish/guestfish etc from build dir without installing
In 1.11.1 / git, I have made some changes to the way that you run guestfish, guestmount and the virt tools from the build directory without installing. Firstly you can't just run ./fish/guestfish or ./fuse/guestmount any more and have those programs magically set LIBGUESTFS_PATH. The automagic code was always error-prone and I have removed it. Secondly, all of the run-*-local scripts have gone. This is all replaced by a single 'run' script in the top level source directory. Best explained by this quote from the README file: --<quote>----------------------------------------------------------- You can run guestfish, guestmount and the virt tools without needing to install, using the "run" script in the top directory. This script sets up some environment variables. For example: ./run ./fish/guestfish [usual guestfish args ...] ./run ./inspector/virt-inspector [usual virt-inspector args ...] If you are already in the fish/ subdirectory, then the following command will also work: ../run ./guestfish [...] You can also make a symlink (note: NOT a hard link) from your $PATH to the run script, eg: cd ~/bin ln -s ~/libguestfs/run libguestfs-run cd ~/libguestfs libguestfs-run ./inspector/virt-inspector [...] You can also run the C programs under valgrind like this: ./run valgrind [valgrind opts...] ./cat/virt-cat [virt-cat opts...] This also works with sudo (eg. if you need root access for libvirt or to access a block device): sudo ./run ./cat/virt-cat -d LinuxGuest /etc/passwd --</quote>---------------------------------------------------------- http://libguestfs.org/README.txt Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Richard W.M. Jones
2011-Apr-16 18:00 UTC
[Libguestfs] NOTE: running ./fish/guestfish etc from build dir without installing
I should add that if you forget to use 'run' than one of two things could happen: (a) [the Good Thing] You'll see an error message like this: $ ./fish/guestfish -a /dev/null run libguestfs: error: cannot find any suitable libguestfs supermin or ordinary appliance on LIBGUESTFS_PATH (search path: /usr/local/lib/guestfs) (b) [the Bad Thing] If you ./configure'd libguestfs with a path that happens to be where an appliance is already installed (eg. if you've installed another version of libguestfs), then it'll silently use the other appliance. Case (b) is probably not what you want. It can mean, for example, that a change you make to the daemon is not actually tested. So better remember to use 'run' :-) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Possibly Parallel Threads
- [PATCH 3/3] tools: build common fish sources in a static library
- [ANNOUNCE] libguestfs 1.10.0 - tools for accessing and modifying VM disk images
- [ANNOUNCE] libguestfs 1.12 released
- guestmount issues with --live, but guestfish works just fine
- [PATCH 11/13] syntax-check: fix prohibit_undesirable_word_seq check