diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-04-16 07:28:47 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-04-16 08:32:48 +0100 |
commit | 33a2c184e12c0bdbf061a9f36c87d76c28444712 (patch) | |
tree | 0069de7c4662ef6c064d48183fa7baf4350fd3c3 | |
parent | 5790f5bfafb12cc2ed9365461bf66e0fdfde7150 (diff) | |
download | libguestfs-33a2c184e12c0bdbf061a9f36c87d76c28444712.tar.gz libguestfs-33a2c184e12c0bdbf061a9f36c87d76c28444712.tar.xz libguestfs-33a2c184e12c0bdbf061a9f36c87d76c28444712.zip |
Remove local LIBGUESTFS_PATH detection from guestfish and guestmount.
Remove the hack that let you run ./fish/guestfish or
./fuse/guestmount. You now have to do:
./run ./fish/guestfish
or
./run ./fuse/guestmount
to run these programs without installing.
-rw-r--r-- | README | 12 | ||||
-rwxr-xr-x | contrib/guestfsd-in-wine.sh | 6 | ||||
-rw-r--r-- | fish/fish.c | 13 | ||||
-rw-r--r-- | fuse/guestmount.c | 13 | ||||
-rwxr-xr-x | images/guest-aux/make-debian-img.sh | 2 | ||||
-rwxr-xr-x | images/guest-aux/make-fedora-img.sh | 2 | ||||
-rwxr-xr-x | images/guest-aux/make-ubuntu-img.sh | 2 | ||||
-rwxr-xr-x | images/guest-aux/make-windows-img.sh | 4 |
8 files changed, 13 insertions, 41 deletions
@@ -113,16 +113,18 @@ this command as root: make install -You can run the virt tools without needing to install, using the "run" -script in the top directory. This script sets up some environment -variables. For example: +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 inspector/ subdirectory, then the following +If you are already in the fish/ subdirectory, then the following command will also work: - ../run ./virt-inspector [...] + ../run ./guestfish [...] You can also make a symlink (note: NOT a hard link) from your $PATH to the run script, eg: diff --git a/contrib/guestfsd-in-wine.sh b/contrib/guestfsd-in-wine.sh index 85146eb2..bc9d87b6 100755 --- a/contrib/guestfsd-in-wine.sh +++ b/contrib/guestfsd-in-wine.sh @@ -60,11 +60,7 @@ guestfsd=daemon/guestfsd.exe # # For example from the top build directory: # -# LIBGUESTFS_QEMU=contrib/guestfsd-in-wine.sh fish/guestfish -# -# You might also need to set the environment variable LIBGUESTFS_PATH -# to point to an appliance. The appliance will never be used, but -# libguestfs needs to find one. +# LIBGUESTFS_QEMU=contrib/guestfsd-in-wine.sh ./run ./fish/guestfish # # Another suggested environment variable is LIBGUESTFS_DEBUG=1 which # will give you must more detail about what is going on. Also look at diff --git a/fish/fish.c b/fish/fish.c index d6fed369..a57472f8 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -220,19 +220,6 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - /* If developing, add ./appliance to the path. Note that libtools - * interferes with this because uninstalled guestfish is a shell - * script that runs the real program with an absolute path. Detect - * that too. - * - * BUT if LIBGUESTFS_PATH environment variable is already set by - * the user, then don't override it. - */ - if (getenv ("LIBGUESTFS_PATH") == NULL && - argv[0] && - (argv[0][0] != '/' || strstr (argv[0], "/.libs/lt-") != NULL)) - guestfs_set_path (g, "appliance:" GUESTFS_DEFAULT_PATH); - /* CAUTION: we are careful to modify argv[0] here, only after * using it just above. * diff --git a/fuse/guestmount.c b/fuse/guestmount.c index 8d483b33..1e3b5dbe 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -1034,19 +1034,6 @@ main (int argc, char *argv[]) */ ADD_FUSE_ARG ("-s"); - /* If developing, add ./appliance to the path. Note that libtools - * interferes with this because uninstalled guestfish is a shell - * script that runs the real program with an absolute path. Detect - * that too. - * - * BUT if LIBGUESTFS_PATH environment variable is already set by - * the user, then don't override it. - */ - if (getenv ("LIBGUESTFS_PATH") == NULL && - argv[0] && - (argv[0][0] != '/' || strstr (argv[0], "/.libs/lt-") != NULL)) - guestfs_set_path (g, "appliance:" GUESTFS_DEFAULT_PATH); - for (;;) { c = getopt_long (argc, argv, options, long_options, &option_index); if (c == -1) break; diff --git a/images/guest-aux/make-debian-img.sh b/images/guest-aux/make-debian-img.sh index 2170cecb..9a01e938 100755 --- a/images/guest-aux/make-debian-img.sh +++ b/images/guest-aux/make-debian-img.sh @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # Create a disk image. -../fish/guestfish <<'EOF' +../run ../fish/guestfish <<'EOF' sparse debian.img.tmp 512M run diff --git a/images/guest-aux/make-fedora-img.sh b/images/guest-aux/make-fedora-img.sh index 8f198f61..0e064b45 100755 --- a/images/guest-aux/make-fedora-img.sh +++ b/images/guest-aux/make-fedora-img.sh @@ -31,7 +31,7 @@ LABEL=ROOT / ext2 default 0 0 EOF # Create a disk image. -../fish/guestfish <<'EOF' +../run ../fish/guestfish <<'EOF' sparse fedora.img.tmp 512M run diff --git a/images/guest-aux/make-ubuntu-img.sh b/images/guest-aux/make-ubuntu-img.sh index f008c76f..4ddb40ab 100755 --- a/images/guest-aux/make-ubuntu-img.sh +++ b/images/guest-aux/make-ubuntu-img.sh @@ -36,7 +36,7 @@ DISTRIB_DESCRIPTION="Ubuntu 10.10 (Phony Pharaoh)" EOF # Create a disk image. -../fish/guestfish <<'EOF' +../run ../fish/guestfish <<'EOF' sparse ubuntu.img.tmp 512M run diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh index f659f4b4..3acb2b7f 100755 --- a/images/guest-aux/make-windows-img.sh +++ b/images/guest-aux/make-windows-img.sh @@ -25,7 +25,7 @@ set -e # ntfs-3g/ntfsprogs then we cannot create a Windows phony image. # Nothing actually uses windows.img in the standard build so we can # just 'touch' it and emit a warning. -if ! ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then +if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then echo "***" echo "Warning: cannot create windows.img because there is no NTFS" echo "support in this build of libguestfs. Just touching the output" @@ -36,7 +36,7 @@ if ! ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then fi # Create a disk image. -../fish/guestfish <<'EOF' +../run ../fish/guestfish <<'EOF' sparse windows.img.tmp 512M run |