summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--README28
-rw-r--r--cat/Makefile.am3
-rwxr-xr-xcat/run-cat-locally53
-rwxr-xr-xcat/run-filesystems-locally52
-rwxr-xr-xcat/run-ls-locally52
-rw-r--r--df/Makefile.am1
-rwxr-xr-xdf/run-df-locally52
-rw-r--r--inspector/Makefile.am10
-rwxr-xr-xinspector/run-inspector-locally51
-rw-r--r--rescue/Makefile.am1
-rwxr-xr-xrescue/run-rescue-locally52
-rw-r--r--resize/Makefile.am1
-rwxr-xr-xresize/run-resize-locally53
-rwxr-xr-xrun42
-rw-r--r--test-tool/Makefile.am2
-rwxr-xr-xtest-tool/run-test-tool-locally54
-rw-r--r--tools/Makefile.am1
-rwxr-xr-xtools/run-locally56
19 files changed, 79 insertions, 490 deletions
diff --git a/Makefile.am b/Makefile.am
index 3d629e9c..fcd190a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,7 +105,8 @@ EXTRA_DIST = \
autogen.sh \
bugs-in-changelog.sh \
update-bugs.sh \
- logo/fish.svg logo/fish.png
+ logo/fish.svg logo/fish.png \
+ run
# Recipes web page.
html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
@@ -205,7 +206,7 @@ CLEANFILES = \
# is NOT a substitute for proper testing!
quickcheck:
- test-tool/run-test-tool-locally
+ ./run test-tool/libguestfs-test-tool
# Make binary distribution.
diff --git a/README b/README
index 4abc0453..3960b613 100644
--- a/README
+++ b/README
@@ -113,6 +113,34 @@ 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:
+
+ ./run ./inspector/virt-inspector [usual virt-inspector args ...]
+
+If you are already in the inspector/ subdirectory, then the following
+command will also work:
+
+ ../run ./virt-inspector [...]
+
+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
+
qemu
----------------------------------------------------------------------
diff --git a/cat/Makefile.am b/cat/Makefile.am
index d7bc7e82..a049a619 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -18,13 +18,10 @@
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
- run-cat-locally \
test-virt-cat.sh \
virt-cat.pod \
- run-filesystems-locally \
test-virt-filesystems.sh \
virt-filesystems.pod \
- run-ls-locally \
test-virt-ls.sh \
virt-ls.pod
diff --git a/cat/run-cat-locally b/cat/run-cat-locally
deleted file mode 100755
index 9467ad6a..00000000
--- a/cat/run-cat-locally
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-cat-locally [usual virt-cat args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-my $tool = "cat";
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/$tool/virt-$tool", @ARGV), "\n");
-exec("$path/$tool/virt-$tool", @ARGV);
diff --git a/cat/run-filesystems-locally b/cat/run-filesystems-locally
deleted file mode 100755
index 316cc6dd..00000000
--- a/cat/run-filesystems-locally
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-filesystems-locally [usual virt-filesystems args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/cat/virt-filesystems", @ARGV), "\n");
-exec("$path/cat/virt-filesystems", @ARGV);
diff --git a/cat/run-ls-locally b/cat/run-ls-locally
deleted file mode 100755
index adc2cb6c..00000000
--- a/cat/run-ls-locally
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-ls-locally [usual virt-ls args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/cat/virt-ls", @ARGV), "\n");
-exec("$path/cat/virt-ls", @ARGV);
diff --git a/df/Makefile.am b/df/Makefile.am
index 81c190ff..69c61401 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -19,7 +19,6 @@ include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
README \
- run-df-locally \
test-virt-df.sh \
virt-df.pod
diff --git a/df/run-df-locally b/df/run-df-locally
deleted file mode 100755
index 2456ab52..00000000
--- a/df/run-df-locally
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-df-locally [usual virt-df args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/df/virt-df", @ARGV), "\n");
-exec("$path/df/virt-df", @ARGV);
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index 435ba872..8024f98a 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -33,7 +33,6 @@ EXAMPLE_XML = \
example-windows-xp-cd.xml
EXTRA_DIST = \
- run-inspector-locally \
virt-inspector.pod
CLEANFILES = stamp-virt-inspector.pod
@@ -101,17 +100,18 @@ endif
example-debian.xml:
rm -f $@ $@-t
- ./run-inspector-locally ../images/debian.img > $@-t
+ ../run $(builddir)/virt-inspector ../images/debian.img > $@-t
mv $@-t $@
example-fedora.xml:
rm -f $@ $@-t
- ./run-inspector-locally ../images/fedora.img > $@-t
+ ../run $(builddir)/virt-inspector ../images/fedora.img > $@-t
mv $@-t $@
example-ubuntu.xml:
rm -f $@ $@-t
- ./run-inspector-locally ../images/ubuntu.img > $@-t
+ ../run $(builddir)/virt-inspector ../images/ubuntu.img > $@-t
mv $@-t $@
example-windows.xml:
rm -f $@ $@-t
- ./run-inspector-locally ../images/windows.img | fgrep -v '<uuid>' > $@-t
+ ../run $(builddir)/virt-inspector ../images/windows.img | \
+ fgrep -v '<uuid>' > $@-t
mv $@-t $@
diff --git a/inspector/run-inspector-locally b/inspector/run-inspector-locally
deleted file mode 100755
index e5c9f4a3..00000000
--- a/inspector/run-inspector-locally
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl
-# libguestfs inspector
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-inspector in place
-# without needing to do 'make install' first. You can also run virt-inspector
-# by creating a symlink to this script and putting it in your path.
-#
-# Use it like this:
-# ./run-inspector-locally [usual virt-inspector args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-exec($path.'/inspector/virt-inspector', @ARGV);
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index a4903416..0032a232 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -18,7 +18,6 @@
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
- run-rescue-locally \
virt-rescue.pod
CLEANFILES = stamp-virt-rescue.pod
diff --git a/rescue/run-rescue-locally b/rescue/run-rescue-locally
deleted file mode 100755
index 95f3cc4a..00000000
--- a/rescue/run-rescue-locally
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-rescue-locally [usual virt-rescue args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/rescue/virt-rescue", @ARGV), "\n");
-exec("$path/rescue/virt-rescue", @ARGV);
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 838c78d1..f3e6aff6 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -19,7 +19,6 @@ include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
$(SOURCES) \
- run-resize-locally \
virt-resize.pod \
test-virt-resize.sh
diff --git a/resize/run-resize-locally b/resize/run-resize-locally
deleted file mode 100755
index 0d840dd8..00000000
--- a/resize/run-resize-locally
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009-2011 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-resize-locally [usual virt-resize args ...]
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-my $tool = "resize";
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-#print (join " ", ("$path/$tool/virt-$tool", @ARGV), "\n");
-exec("$path/$tool/virt-$tool", @ARGV);
diff --git a/run b/run
new file mode 100755
index 00000000..04152b1b
--- /dev/null
+++ b/run
@@ -0,0 +1,42 @@
+#!/bin/bash -
+# libguestfs 'run' programs locally script
+# Copyright (C) 2011 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+#----------------------------------------------------------------------
+
+# With this script you can run all the virt tools without needing to
+# install them first. You just have to do for example:
+#
+# ./run ./inspector/virt-inspector [args ...]
+#
+# This works for any C, OCaml or Perl virt tools in the libguestfs
+# distribution. Also you can make a symbolic link to this 'run'
+# script from anywhere (eg. $HOME/bin/run) if you wish.
+
+#----------------------------------------------------------------------
+
+# Find this script.
+run=$(readlink -f "$0")
+b=$(dirname "$run")
+
+# Set local environment relative to this script.
+export LD_LIBRARY_PATH="$b/src/.libs"
+export LIBGUESTFS_PATH="$b/appliance"
+export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
+
+# Run the program.
+libtool --mode=execute "$@"
diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
index 5ce21642..1ed08208 100644
--- a/test-tool/Makefile.am
+++ b/test-tool/Makefile.am
@@ -17,7 +17,7 @@
include $(top_srcdir)/subdir-rules.mk
-EXTRA_DIST = libguestfs-test-tool.pod run-test-tool-locally
+EXTRA_DIST = libguestfs-test-tool.pod
CLEANFILES =
diff --git a/test-tool/run-test-tool-locally b/test-tool/run-test-tool-locally
deleted file mode 100755
index 21df4c57..00000000
--- a/test-tool/run-test-tool-locally
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2010-2011 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run
-# libguestfs-test-tool in place without needing to do 'make install'
-# first. You can also run the test tool by creating a symlink to this
-# script and putting it in your path.
-#
-# Normal use is like this:
-# ./run-test-tool-locally
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-my $tool = shift @ARGV;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-
-exec("$path/test-tool/libguestfs-test-tool",
- "$path/test-tool/libguestfs-test-tool",
- @ARGV);
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 806f2444..6441333d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -26,7 +26,6 @@ tools = \
win-reg
EXTRA_DIST = \
- run-locally \
$(tools:%=virt-%) \
test-virt-*.sh
diff --git a/tools/run-locally b/tools/run-locally
deleted file mode 100755
index cb3dca86..00000000
--- a/tools/run-locally
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# This script sets up the environment so you can run virt-* tools in
-# place without needing to do 'make install' first. You can also run
-# the tools by creating a symlink to this script and putting it in
-# your path.
-#
-# Use it like this:
-# ./run-locally tool [usual virt-tool args ...]
-# eg:
-# ./run-locally cat domname /etc/passwd
-
-use strict;
-use warnings;
-
-use File::Basename qw(dirname);
-use File::Spec;
-use Cwd qw(abs_path);
-
-my $path = $0;
-my $tool = shift @ARGV;
-
-# Follow symlinks until we get to the real file
-while(-l $path) {
- my $link = readlink($path) or die "readlink: $path: $!";
- if(File::Spec->file_name_is_absolute($link)) {
- $path = $link;
- } else {
- $path = File::Spec->catfile(dirname($path), $link);
- }
-}
-
-# Get the absolute path of the parent directory
-$path = abs_path(dirname($path).'/..');
-
-$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
-$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
-$ENV{PERL5LIB} = $path.'/perl/blib/lib:'.$path.'/perl/blib/arch';
-
-#print (join " ", ("$path/tools/virt-$tool", @ARGV), "\n");
-exec('perl', "$path/tools/virt-$tool", @ARGV);