mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained in:
12
README
12
README
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
13
fish/fish.c
13
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.
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user