Various fixes from building libguestfs for Debian
Here are some of the patches that I have maintained in the patch queue of my packages that I maintain within the Debian distribution (http://packages.qa.debian.org/libg/libguestfs.html). All of them address FTBFS (fail to build from source) errors that happened with the particular configuration that is used for building the Debian package. Cheers, -Hilko
The error message generated by perror() is not particularly useful to the user. Many other command line programs that can keep history around cope silently if they can't create or write to their history file. --- fish/fish.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index e388832..3bb9501 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1431,10 +1431,8 @@ cleanup_readline (void) if (histfile[0] != '\0') { fd = open (histfile, O_WRONLY|O_CREAT, 0644); - if (fd == -1) { - perror (histfile); + if (fd == -1) return; - } close (fd); #ifdef HAVE_APPEND_HISTORY -- 1.7.8.3
Hilko Bengen wrote:
The error message generated by perror() is not particularly useful to the user. Many other command line programs that can keep history around cope silently if they can't create or write to their history file. --- fish/fish.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fish/fish.c b/fish/fish.c index e388832..3bb9501 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1431,10 +1431,8 @@ cleanup_readline (void)
if (histfile[0] != '\0') { fd = open (histfile, O_WRONLY|O_CREAT, 0644); - if (fd == -1) { - perror (histfile); + if (fd == -1) return; - } close (fd);
What is the motivation for this change? Wouldn't you want to be alerted if this were due to EACCES, EPERM or EIO? IMHO, removing a diagnostic like that requires more justification.
* Jim Meyering:
What is the motivation for this change?
I noticed this error message because sbuild built the package with HOME set to a non-existing directory which caused a test script to fail.
Wouldn't you want to be alerted if this were due to EACCES, EPERM or EIO?
Not being able to save history isn't really a critical error, as far as I'm concerned. I have tried some other programs how they handle this situation (bash, sqlite3). None of them complained when they couldn't save their command history. -Hilko
On Fri, Jan 20, 2012 at 01:06:53PM +0100, Hilko Bengen wrote:
* Jim Meyering:
What is the motivation for this change?
I noticed this error message because sbuild built the package with HOME set to a non-existing directory which caused a test script to fail.
It causes the test script to fail because the test script is checking stderr? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
* Richard W.M. Jones:
On Fri, Jan 20, 2012 at 01:06:53PM +0100, Hilko Bengen wrote:
* Jim Meyering:
What is the motivation for this change?
I noticed this error message because sbuild built the package with HOME set to a non-existing directory which caused a test script to fail.
It causes the test script to fail because the test script is checking stderr?
Yes. (test-guestfish-escapes.sh). -Hilko
--- fish/test-guestfish-escapes.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fish/test-guestfish-escapes.sh b/fish/test-guestfish-escapes.sh index 73f41d5..c6b8577 100755 --- a/fish/test-guestfish-escapes.sh +++ b/fish/test-guestfish-escapes.sh @@ -50,7 +50,7 @@ EOF # Since trace and debug output also goes to stderr, we must # remove it before testing. mv test.error test.error.old -grep -v '^libguestfs: ' < test.error.old > test.error +< test.error.old grep -v '^libguestfs: ' | grep -vF "$HOME/.guestfish:" > test.error if [ "$(cat test.error)" != "\ guestfish: invalid escape sequence in string (starting at offset 0) -- 1.7.8.3
--- fish/test-guestfish-events.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fish/test-guestfish-events.sh b/fish/test-guestfish-events.sh index 4d301b0..d910c67 100755 --- a/fish/test-guestfish-events.sh +++ b/fish/test-guestfish-events.sh @@ -58,7 +58,7 @@ trace get_autosync trace get_autosync = 1 enter get_path trace get_path -trace get_path = "../appliance" +trace get_path = "'$LIBGUESTFS_PATH'" enter get_pgroup trace get_pgroup trace get_pgroup = 0 -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:42AM +0100, Hilko Bengen wrote:
--- fish/test-guestfish-events.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fish/test-guestfish-events.sh b/fish/test-guestfish-events.sh index 4d301b0..d910c67 100755 --- a/fish/test-guestfish-events.sh +++ b/fish/test-guestfish-events.sh @@ -58,7 +58,7 @@ trace get_autosync trace get_autosync = 1 enter get_path trace get_path -trace get_path = "../appliance" +trace get_path = "'$LIBGUESTFS_PATH'" enter get_pgroup trace get_pgroup trace get_pgroup = 0
ACK. 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
--- align/Makefile.am | 4 +--- cat/Makefile.am | 4 +--- clone/Makefile.am | 4 +--- df/Makefile.am | 4 +--- edit/Makefile.am | 4 +--- fish/Makefile.am | 4 +--- haskell/Makefile.am | 6 ++---- ocaml/Makefile.am | 6 ++---- perl/Makefile.am | 4 +--- resize/Makefile.am | 4 +--- ruby/Makefile.am | 6 ++---- sparsify/Makefile.am | 4 +--- tests/luks/Makefile.am | 4 +--- tests/lvm/Makefile.am | 5 +---- tests/md/Makefile.am | 4 +--- tests/protocol/Makefile.am | 5 +---- tests/qemu/Makefile.am | 4 +--- tests/regressions/Makefile.am | 5 +---- tools/Makefile.am | 5 +---- 19 files changed, 22 insertions(+), 64 deletions(-) diff --git a/align/Makefile.am b/align/Makefile.am index 1dc9221..d1d1325 100644 --- a/align/Makefile.am +++ b/align/Makefile.am @@ -72,8 +72,6 @@ stamp-virt-alignment-scan.pod: virt-alignment-scan.pod # TESTS_ENVIRONMENT = \ # MALLOC_PERTURB_=$(random_val) \ -# LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ -# LIBGUESTFS_PATH=$(top_builddir)/appliance \ -# TMPDIR=$(top_builddir) +# $(top_builddir)/run # TESTS = test-virt-alignment-scan.sh diff --git a/cat/Makefile.am b/cat/Makefile.am index 22433e3..c9889ca 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -132,8 +132,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh diff --git a/clone/Makefile.am b/clone/Makefile.am index 11a2e9b..3c54843 100644 --- a/clone/Makefile.am +++ b/clone/Makefile.am @@ -44,8 +44,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-sysprep.sh diff --git a/df/Makefile.am b/df/Makefile.am index 0f87d6e..455f45d 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -78,8 +78,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-df.sh diff --git a/edit/Makefile.am b/edit/Makefile.am index 67ae713..c359c28 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -70,8 +70,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-edit.sh diff --git a/fish/Makefile.am b/fish/Makefile.am index 658f1e0..ffe3ede 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -234,9 +234,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = \ test-add-domain.sh \ diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 5c1ff98..2321bbc 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -28,10 +28,8 @@ EXTRA_DIST = $(generator_built) *.hs run-bindtests if HAVE_HASKELL TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - $(VG) + $(VG) \ + $(top_builddir)/run TESTS = run-bindtests Guestfs005Load Guestfs010Basic diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 35cba46..9cd77e8 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -74,10 +74,8 @@ html/index.html: $(srcdir)/guestfs*.mli $(srcdir)/guestfs*.ml endif TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - $(VG) + $(VG) \ + $(top_builddir)/run TESTS = run-bindtests \ t/guestfs_005_load \ diff --git a/perl/Makefile.am b/perl/Makefile.am index 5ee6c49..7fc0eb6 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -51,9 +51,7 @@ TESTS = run-bindtests run-perl-tests $(TESTS): src_deps all appliance test_images TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run INSTALLDIRS = site diff --git a/resize/Makefile.am b/resize/Makefile.am index 5227c23..31de9e7 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -103,9 +103,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-resize.sh utils_tests diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 8139140..361277e 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -47,10 +47,8 @@ if HAVE_RUBY TESTS = run-bindtests run-ruby-tests TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - RUBY=$(RUBY) + RUBY=$(RUBY) \ + $(top_builddir)/run all: $(generator_built) $(RAKE) build diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 4f735c8..aebaebc 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -96,9 +96,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-sparsify.sh diff --git a/tests/luks/Makefile.am b/tests/luks/Makefile.am index 30ec83b..fdbbb1b 100644 --- a/tests/luks/Makefile.am +++ b/tests/luks/Makefile.am @@ -25,9 +25,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/lvm/Makefile.am b/tests/lvm/Makefile.am index 19c4ea3..7e89bab 100644 --- a/tests/lvm/Makefile.am +++ b/tests/lvm/Makefile.am @@ -25,10 +25,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/md/Makefile.am b/tests/md/Makefile.am index 189f4ca..06352da 100644 --- a/tests/md/Makefile.am +++ b/tests/md/Makefile.am @@ -28,9 +28,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) \ No newline at end of file diff --git a/tests/protocol/Makefile.am b/tests/protocol/Makefile.am index b7a446e..6e0f03f 100644 --- a/tests/protocol/Makefile.am +++ b/tests/protocol/Makefile.am @@ -30,10 +30,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/qemu/Makefile.am b/tests/qemu/Makefile.am index f2bdeb2..128296d 100644 --- a/tests/qemu/Makefile.am +++ b/tests/qemu/Makefile.am @@ -29,9 +29,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am index f71572a..2d2f595 100644 --- a/tests/regressions/Makefile.am +++ b/tests/regressions/Makefile.am @@ -32,11 +32,8 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch \ NOEXEC_CHECK="$(top_builddir)/src/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" + $(top_builddir)/run check_PROGRAMS = \ rhbz501893 diff --git a/tools/Makefile.am b/tools/Makefile.am index c025606..82b5852 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -59,10 +59,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run TESTS = test-virt-list-filesystems.sh \ test-virt-make-fs.sh \ -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:43AM +0100, Hilko Bengen wrote:
--- align/Makefile.am | 4 +--- cat/Makefile.am | 4 +--- clone/Makefile.am | 4 +--- df/Makefile.am | 4 +--- edit/Makefile.am | 4 +--- fish/Makefile.am | 4 +--- haskell/Makefile.am | 6 ++---- ocaml/Makefile.am | 6 ++---- perl/Makefile.am | 4 +--- resize/Makefile.am | 4 +--- ruby/Makefile.am | 6 ++---- sparsify/Makefile.am | 4 +--- tests/luks/Makefile.am | 4 +--- tests/lvm/Makefile.am | 5 +---- tests/md/Makefile.am | 4 +--- tests/protocol/Makefile.am | 5 +---- tests/qemu/Makefile.am | 4 +--- tests/regressions/Makefile.am | 5 +---- tools/Makefile.am | 5 +---- 19 files changed, 22 insertions(+), 64 deletions(-)
In principle yes, but there's a problem with this patch:
TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - $(VG) + $(VG) \ + $(top_builddir)/run
This will cause valgrind to check bash. It need to be the other way around:
- $(VG) + $(top_builddir)/run \ + $(VG)
Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
--- align/Makefile.am | 4 +--- cat/Makefile.am | 4 +--- clone/Makefile.am | 4 +--- df/Makefile.am | 4 +--- edit/Makefile.am | 4 +--- fish/Makefile.am | 4 +--- haskell/Makefile.am | 4 +--- ocaml/Makefile.am | 4 +--- perl/Makefile.am | 4 +--- resize/Makefile.am | 4 +--- ruby/Makefile.am | 6 ++---- sparsify/Makefile.am | 4 +--- tests/luks/Makefile.am | 4 +--- tests/lvm/Makefile.am | 5 +---- tests/md/Makefile.am | 4 +--- tests/protocol/Makefile.am | 5 +---- tests/qemu/Makefile.am | 4 +--- tests/regressions/Makefile.am | 5 +---- tools/Makefile.am | 5 +---- 19 files changed, 20 insertions(+), 62 deletions(-) diff --git a/align/Makefile.am b/align/Makefile.am index 1dc9221..d1d1325 100644 --- a/align/Makefile.am +++ b/align/Makefile.am @@ -72,8 +72,6 @@ stamp-virt-alignment-scan.pod: virt-alignment-scan.pod # TESTS_ENVIRONMENT = \ # MALLOC_PERTURB_=$(random_val) \ -# LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ -# LIBGUESTFS_PATH=$(top_builddir)/appliance \ -# TMPDIR=$(top_builddir) +# $(top_builddir)/run # TESTS = test-virt-alignment-scan.sh diff --git a/cat/Makefile.am b/cat/Makefile.am index 22433e3..c9889ca 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -132,8 +132,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh diff --git a/clone/Makefile.am b/clone/Makefile.am index 11a2e9b..3c54843 100644 --- a/clone/Makefile.am +++ b/clone/Makefile.am @@ -44,8 +44,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-sysprep.sh diff --git a/df/Makefile.am b/df/Makefile.am index 0f87d6e..455f45d 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -78,8 +78,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-df.sh diff --git a/edit/Makefile.am b/edit/Makefile.am index 67ae713..c359c28 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -70,8 +70,6 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-edit.sh diff --git a/fish/Makefile.am b/fish/Makefile.am index 658f1e0..ffe3ede 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -234,9 +234,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = \ test-add-domain.sh \ diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 3781f07..4ce05d4 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -28,9 +28,7 @@ EXTRA_DIST = $(generator_built) *.hs run-bindtests if HAVE_HASKELL TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ + $(top_builddir)/run \ $(VG) # Don't run the bindtests: they don't build since the addition of optargs. diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index fbeefc9..1dcf9f3 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -74,9 +74,7 @@ html/index.html: $(srcdir)/guestfs*.mli $(srcdir)/guestfs*.ml endif TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ + $(top_builddir)/run \ $(VG) TESTS = run-bindtests \ diff --git a/perl/Makefile.am b/perl/Makefile.am index 5ee6c49..7fc0eb6 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -51,9 +51,7 @@ TESTS = run-bindtests run-perl-tests $(TESTS): src_deps all appliance test_images TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run INSTALLDIRS = site diff --git a/resize/Makefile.am b/resize/Makefile.am index 639c46b..81e8f16 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -103,9 +103,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-resize.sh utils_tests diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 8139140..361277e 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -47,10 +47,8 @@ if HAVE_RUBY TESTS = run-bindtests run-ruby-tests TESTS_ENVIRONMENT = \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - RUBY=$(RUBY) + RUBY=$(RUBY) \ + $(top_builddir)/run all: $(generator_built) $(RAKE) build diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 603fd07..e048d3f 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -96,9 +96,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run TESTS = test-virt-sparsify.sh diff --git a/tests/luks/Makefile.am b/tests/luks/Makefile.am index 30ec83b..fdbbb1b 100644 --- a/tests/luks/Makefile.am +++ b/tests/luks/Makefile.am @@ -25,9 +25,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/lvm/Makefile.am b/tests/lvm/Makefile.am index 19c4ea3..7e89bab 100644 --- a/tests/lvm/Makefile.am +++ b/tests/lvm/Makefile.am @@ -25,10 +25,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/md/Makefile.am b/tests/md/Makefile.am index 189f4ca..06352da 100644 --- a/tests/md/Makefile.am +++ b/tests/md/Makefile.am @@ -28,9 +28,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) \ No newline at end of file diff --git a/tests/protocol/Makefile.am b/tests/protocol/Makefile.am index b7a446e..6e0f03f 100644 --- a/tests/protocol/Makefile.am +++ b/tests/protocol/Makefile.am @@ -30,10 +30,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/qemu/Makefile.am b/tests/qemu/Makefile.am index f2bdeb2..128296d 100644 --- a/tests/qemu/Makefile.am +++ b/tests/qemu/Makefile.am @@ -29,9 +29,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) + $(top_builddir)/run EXTRA_DIST = \ $(TESTS) diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am index f71572a..2d2f595 100644 --- a/tests/regressions/Makefile.am +++ b/tests/regressions/Makefile.am @@ -32,11 +32,8 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch \ NOEXEC_CHECK="$(top_builddir)/src/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" + $(top_builddir)/run check_PROGRAMS = \ rhbz501893 diff --git a/tools/Makefile.am b/tools/Makefile.am index c025606..82b5852 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -59,10 +59,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - TMPDIR=$(top_builddir) \ - PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch + $(top_builddir)/run TESTS = test-virt-list-filesystems.sh \ test-virt-make-fs.sh \ -- 1.7.8.3
--- ocaml/Makefile.am | 9 +++++---- resize/Makefile.am | 5 +++-- sparsify/Makefile.am | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 9cd77e8..c7eb2cc 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -137,12 +137,13 @@ t/%.cmx: t/%.ml mlguestfs.cmxa depend: .depend -.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep $^ | \ - $(SED) -e 's/ *$$//' | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ + $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ - LANG=C sort > $@-t + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ + sort > $@-t mv $@-t $@ -include .depend diff --git a/resize/Makefile.am b/resize/Makefile.am index 31de9e7..0d64028 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -110,11 +110,12 @@ TESTS = test-virt-resize.sh utils_tests # Dependencies. depend: .depend -.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep -I ../ocaml $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@ diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index aebaebc..76d9022 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -103,11 +103,12 @@ TESTS = test-virt-sparsify.sh # Dependencies. depend: .depend -.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep -I ../ocaml $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@ -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:44AM +0100, Hilko Bengen wrote:
--- ocaml/Makefile.am | 9 +++++---- resize/Makefile.am | 5 +++-- sparsify/Makefile.am | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 9cd77e8..c7eb2cc 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -137,12 +137,13 @@ t/%.cmx: t/%.ml mlguestfs.cmxa
depend: .depend
-.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep $^ | \ - $(SED) -e 's/ *$$//' | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ + $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ - LANG=C sort > $@-t + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ + sort > $@-t mv $@-t $@
-include .depend diff --git a/resize/Makefile.am b/resize/Makefile.am index 31de9e7..0d64028 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -110,11 +110,12 @@ TESTS = test-virt-resize.sh utils_tests # Dependencies. depend: .depend
-.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep -I ../ocaml $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index aebaebc..76d9022 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -103,11 +103,12 @@ TESTS = test-virt-sparsify.sh # Dependencies. depend: .depend
-.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep -I ../ocaml $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@
If it doesn't break the ordinary build, then ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
--- Makefile.am | 2 ++ cat/Makefile.am | 2 ++ clone/Makefile.am | 2 ++ df/Makefile.am | 2 ++ edit/Makefile.am | 2 ++ fish/Makefile.am | 10 +++++++--- fuse/Makefile.am | 4 +++- haskell/Makefile.am | 5 ++++- java/Makefile.am | 6 +++++- ocaml/Makefile.am | 10 +++++++--- perl/Makefile.am | 10 ++++++++-- python/Makefile.am | 8 ++++++-- resize/Makefile.am | 5 ++++- sparsify/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ 15 files changed, 58 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index f925529..7cd4a7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,7 @@ SUBDIRS += appliance endif # Tests - order is important. +if ENABLE_APPLIANCE SUBDIRS += tests/qemu SUBDIRS += tests/guests SUBDIRS += tests/c-api @@ -41,6 +42,7 @@ SUBDIRS += tests/lvm SUBDIRS += tests/luks SUBDIRS += tests/md SUBDIRS += tests/regressions +endif # Extra tests don't run by default. You have to do 'make extra-tests'. SUBDIRS += tests/extra diff --git a/cat/Makefile.am b/cat/Makefile.am index c9889ca..f883d10 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -134,4 +134,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh +endif ENABLE_APPLIANCE diff --git a/clone/Makefile.am b/clone/Makefile.am index 3c54843..4d586c6 100644 --- a/clone/Makefile.am +++ b/clone/Makefile.am @@ -46,4 +46,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-sysprep.sh +endif ENABLE_APPLIANCE diff --git a/df/Makefile.am b/df/Makefile.am index 455f45d..83409da 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -80,4 +80,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-df.sh +endif ENABLE_APPLIANCE diff --git a/edit/Makefile.am b/edit/Makefile.am index c359c28..e89136a 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -72,4 +72,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-edit.sh +endif ENABLE_APPLIANCE diff --git a/fish/Makefile.am b/fish/Makefile.am index ffe3ede..8a6f88b 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -238,15 +238,19 @@ TESTS_ENVIRONMENT = \ TESTS = \ test-add-domain.sh \ - test-copy.sh \ - test-find0.sh \ test-guestfish-a.sh \ test-guestfish-d.sh \ test-guestfish-escapes.sh \ test-guestfish-events.sh \ - test-guestfish-tilde.sh \ + test-guestfish-tilde.sh + +if ENABLE_APPLIANCE +TESTS += \ + test-copy.sh \ + test-find0.sh \ test-read_file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ test-upload-to-dir.sh +endif diff --git a/fuse/Makefile.am b/fuse/Makefile.am index d6db45c..19c498b 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -74,8 +74,10 @@ stamp-guestmount.pod: guestmount.pod # Tests. +if ENABLE_APPLIANCE TESTS = test-fuse.sh +endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = \ top_builddir=.. -endif +endif HAVE_FUSE diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 2321bbc..8dd2244 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -31,7 +31,10 @@ TESTS_ENVIRONMENT = \ $(VG) \ $(top_builddir)/run -TESTS = run-bindtests Guestfs005Load Guestfs010Basic +TESTS = run-bindtests +if ENABLE_APPLIANCE +TESTS += Guestfs005Load Guestfs010Basic +endif ENABLE_APPLIANCE check_DATA = Bindtests diff --git a/java/Makefile.am b/java/Makefile.am index a96d304..ef78773 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -102,7 +102,11 @@ install-data-hook: # Tests (not comprehensive). -TESTS = run-bindtests run-java-tests +TESTS = run-bindtests +if ENABLE_APPLIANCE +TESTS += run-java-tests +endif ENABLE_APPLIANCE + TESTS_ENVIRONMENT = \ JAVA=$(JAVA) \ CLASSPATH=.:t:libguestfs-$(VERSION).jar \ diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index c7eb2cc..76b0374 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -79,11 +79,15 @@ TESTS_ENVIRONMENT = \ TESTS = run-bindtests \ t/guestfs_005_load \ - t/guestfs_010_basic \ - t/guestfs_070_threads \ t/guestfs_080_optargs \ - t/guestfs_400_events \ + t/guestfs_400_events + +if ENABLE_APPLIANCE +TESTS += t/guestfs_010_basic \ + t/guestfs_070_threads \ t/guestfs_400_progress +endif + noinst_DATA += bindtests \ t/guestfs_005_load \ t/guestfs_010_basic \ diff --git a/perl/Makefile.am b/perl/Makefile.am index 7fc0eb6..404a4e9 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -46,9 +46,15 @@ src_deps: $(top_builddir)/src/libguestfs.la $(generator_built) test_images: $(MAKE) -C $(top_builddir)/tests/data -TESTS = run-bindtests run-perl-tests +TESTS = run-bindtests +test_prereq = src_deps all test_images -$(TESTS): src_deps all appliance test_images +if ENABLE_APPLIANCE +test_prereq += appliance +TESTS += run-perl-tests +endif + +$(TESTS): $(test_prereq) TESTS_ENVIRONMENT = \ $(top_builddir)/run diff --git a/python/Makefile.am b/python/Makefile.am index b2c69e6..2731a43 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -51,6 +51,10 @@ TESTS_ENVIRONMENT = \ TMPDIR=$(top_builddir) \ PYTHON=$(PYTHON) -TESTS = run-bindtests run-python-tests +TESTS = run-bindtests -endif +if ENABLE_APPLIANCE +TESTS += run-python-tests +endif ENABLE_APPLIANCE + +endif HAVE_PYTHON diff --git a/resize/Makefile.am b/resize/Makefile.am index 0d64028..bbae32f 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -105,7 +105,10 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run -TESTS = test-virt-resize.sh utils_tests +TESTS = utils_tests +if ENABLE_APPLIANCE +TESTS += test-virt-resize.sh +endif # Dependencies. depend: .depend diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 76d9022..17ee638 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -98,7 +98,9 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-sparsify.sh +endif ENABLE_APPLIANCE # Dependencies. depend: .depend diff --git a/tools/Makefile.am b/tools/Makefile.am index 82b5852..0a7cfaa 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,9 +61,11 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-list-filesystems.sh \ test-virt-make-fs.sh \ test-virt-tar.sh +endif ENABLE_APPLIANCE endif -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:45AM +0100, Hilko Bengen wrote:
--- Makefile.am | 2 ++ cat/Makefile.am | 2 ++ clone/Makefile.am | 2 ++ df/Makefile.am | 2 ++ edit/Makefile.am | 2 ++ fish/Makefile.am | 10 +++++++--- fuse/Makefile.am | 4 +++- haskell/Makefile.am | 5 ++++- java/Makefile.am | 6 +++++- ocaml/Makefile.am | 10 +++++++--- perl/Makefile.am | 10 ++++++++-- python/Makefile.am | 8 ++++++-- resize/Makefile.am | 5 ++++- sparsify/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ 15 files changed, 58 insertions(+), 14 deletions(-)
diff --git a/Makefile.am b/Makefile.am index f925529..7cd4a7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,7 @@ SUBDIRS += appliance endif
# Tests - order is important. +if ENABLE_APPLIANCE SUBDIRS += tests/qemu SUBDIRS += tests/guests SUBDIRS += tests/c-api @@ -41,6 +42,7 @@ SUBDIRS += tests/lvm SUBDIRS += tests/luks SUBDIRS += tests/md SUBDIRS += tests/regressions +endif
# Extra tests don't run by default. You have to do 'make extra-tests'. SUBDIRS += tests/extra diff --git a/cat/Makefile.am b/cat/Makefile.am index c9889ca..f883d10 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -134,4 +134,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh +endif ENABLE_APPLIANCE diff --git a/clone/Makefile.am b/clone/Makefile.am index 3c54843..4d586c6 100644 --- a/clone/Makefile.am +++ b/clone/Makefile.am @@ -46,4 +46,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-sysprep.sh +endif ENABLE_APPLIANCE diff --git a/df/Makefile.am b/df/Makefile.am index 455f45d..83409da 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -80,4 +80,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-df.sh +endif ENABLE_APPLIANCE diff --git a/edit/Makefile.am b/edit/Makefile.am index c359c28..e89136a 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -72,4 +72,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-edit.sh +endif ENABLE_APPLIANCE diff --git a/fish/Makefile.am b/fish/Makefile.am index ffe3ede..8a6f88b 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -238,15 +238,19 @@ TESTS_ENVIRONMENT = \
TESTS = \ test-add-domain.sh \ - test-copy.sh \ - test-find0.sh \ test-guestfish-a.sh \ test-guestfish-d.sh \ test-guestfish-escapes.sh \ test-guestfish-events.sh \ - test-guestfish-tilde.sh \ + test-guestfish-tilde.sh + +if ENABLE_APPLIANCE +TESTS += \ + test-copy.sh \ + test-find0.sh \ test-read_file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ test-upload-to-dir.sh +endif diff --git a/fuse/Makefile.am b/fuse/Makefile.am index d6db45c..19c498b 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -74,8 +74,10 @@ stamp-guestmount.pod: guestmount.pod
# Tests.
+if ENABLE_APPLIANCE TESTS = test-fuse.sh +endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = \ top_builddir=..
-endif +endif HAVE_FUSE diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 2321bbc..8dd2244 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -31,7 +31,10 @@ TESTS_ENVIRONMENT = \ $(VG) \ $(top_builddir)/run
-TESTS = run-bindtests Guestfs005Load Guestfs010Basic +TESTS = run-bindtests +if ENABLE_APPLIANCE +TESTS += Guestfs005Load Guestfs010Basic +endif ENABLE_APPLIANCE
check_DATA = Bindtests
diff --git a/java/Makefile.am b/java/Makefile.am index a96d304..ef78773 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -102,7 +102,11 @@ install-data-hook:
# Tests (not comprehensive).
-TESTS = run-bindtests run-java-tests +TESTS = run-bindtests +if ENABLE_APPLIANCE +TESTS += run-java-tests +endif ENABLE_APPLIANCE + TESTS_ENVIRONMENT = \ JAVA=$(JAVA) \ CLASSPATH=.:t:libguestfs-$(VERSION).jar \ diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index c7eb2cc..76b0374 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -79,11 +79,15 @@ TESTS_ENVIRONMENT = \
TESTS = run-bindtests \ t/guestfs_005_load \ - t/guestfs_010_basic \ - t/guestfs_070_threads \ t/guestfs_080_optargs \ - t/guestfs_400_events \ + t/guestfs_400_events + +if ENABLE_APPLIANCE +TESTS += t/guestfs_010_basic \ + t/guestfs_070_threads \ t/guestfs_400_progress +endif + noinst_DATA += bindtests \ t/guestfs_005_load \ t/guestfs_010_basic \ diff --git a/perl/Makefile.am b/perl/Makefile.am index 7fc0eb6..404a4e9 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -46,9 +46,15 @@ src_deps: $(top_builddir)/src/libguestfs.la $(generator_built) test_images: $(MAKE) -C $(top_builddir)/tests/data
-TESTS = run-bindtests run-perl-tests +TESTS = run-bindtests +test_prereq = src_deps all test_images
-$(TESTS): src_deps all appliance test_images +if ENABLE_APPLIANCE +test_prereq += appliance +TESTS += run-perl-tests +endif + +$(TESTS): $(test_prereq)
TESTS_ENVIRONMENT = \ $(top_builddir)/run diff --git a/python/Makefile.am b/python/Makefile.am index b2c69e6..2731a43 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -51,6 +51,10 @@ TESTS_ENVIRONMENT = \ TMPDIR=$(top_builddir) \ PYTHON=$(PYTHON)
-TESTS = run-bindtests run-python-tests +TESTS = run-bindtests
-endif +if ENABLE_APPLIANCE +TESTS += run-python-tests +endif ENABLE_APPLIANCE + +endif HAVE_PYTHON diff --git a/resize/Makefile.am b/resize/Makefile.am index 0d64028..bbae32f 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -105,7 +105,10 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
-TESTS = test-virt-resize.sh utils_tests +TESTS = utils_tests +if ENABLE_APPLIANCE +TESTS += test-virt-resize.sh +endif
# Dependencies. depend: .depend diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 76d9022..17ee638 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -98,7 +98,9 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-sparsify.sh +endif ENABLE_APPLIANCE
# Dependencies. depend: .depend diff --git a/tools/Makefile.am b/tools/Makefile.am index 82b5852..0a7cfaa 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,9 +61,11 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run
+if ENABLE_APPLIANCE TESTS = test-virt-list-filesystems.sh \ test-virt-make-fs.sh \ test-virt-tar.sh +endif ENABLE_APPLIANCE
endif
-- 1.7.8.3
ACK. Be careful when you apply this because it conflicts with Matt's GObject series. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
--- Makefile.am | 2 ++ cat/Makefile.am | 2 ++ clone/Makefile.am | 2 ++ df/Makefile.am | 2 ++ edit/Makefile.am | 2 ++ fish/Makefile.am | 10 +++++++--- fuse/Makefile.am | 4 +++- haskell/Makefile.am | 2 ++ java/Makefile.am | 6 +++++- ocaml/Makefile.am | 10 +++++++--- perl/Makefile.am | 10 ++++++++-- python/Makefile.am | 8 ++++++-- resize/Makefile.am | 5 ++++- sparsify/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ 15 files changed, 56 insertions(+), 13 deletions(-) diff --git a/Makefile.am b/Makefile.am index 839379a..9456531 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,7 @@ SUBDIRS += appliance endif # Tests - order is important. +if ENABLE_APPLIANCE SUBDIRS += tests/qemu SUBDIRS += tests/guests SUBDIRS += tests/c-api @@ -41,6 +42,7 @@ SUBDIRS += tests/lvm SUBDIRS += tests/luks SUBDIRS += tests/md SUBDIRS += tests/regressions +endif # Extra tests don't run by default. You have to do 'make extra-tests'. SUBDIRS += tests/extra diff --git a/cat/Makefile.am b/cat/Makefile.am index c9889ca..f883d10 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -134,4 +134,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh +endif ENABLE_APPLIANCE diff --git a/clone/Makefile.am b/clone/Makefile.am index 3c54843..4d586c6 100644 --- a/clone/Makefile.am +++ b/clone/Makefile.am @@ -46,4 +46,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-sysprep.sh +endif ENABLE_APPLIANCE diff --git a/df/Makefile.am b/df/Makefile.am index 455f45d..83409da 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -80,4 +80,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-df.sh +endif ENABLE_APPLIANCE diff --git a/edit/Makefile.am b/edit/Makefile.am index c359c28..e89136a 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -72,4 +72,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-edit.sh +endif ENABLE_APPLIANCE diff --git a/fish/Makefile.am b/fish/Makefile.am index ffe3ede..8a6f88b 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -238,15 +238,19 @@ TESTS_ENVIRONMENT = \ TESTS = \ test-add-domain.sh \ - test-copy.sh \ - test-find0.sh \ test-guestfish-a.sh \ test-guestfish-d.sh \ test-guestfish-escapes.sh \ test-guestfish-events.sh \ - test-guestfish-tilde.sh \ + test-guestfish-tilde.sh + +if ENABLE_APPLIANCE +TESTS += \ + test-copy.sh \ + test-find0.sh \ test-read_file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ test-upload-to-dir.sh +endif diff --git a/fuse/Makefile.am b/fuse/Makefile.am index d6db45c..19c498b 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -74,8 +74,10 @@ stamp-guestmount.pod: guestmount.pod # Tests. +if ENABLE_APPLIANCE TESTS = test-fuse.sh +endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = \ top_builddir=.. -endif +endif HAVE_FUSE diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 4ce05d4..6cc75bd 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -33,7 +33,9 @@ TESTS_ENVIRONMENT = \ # Don't run the bindtests: they don't build since the addition of optargs. # Haskell bindings are incomplete. +if ENABLE_APPLIANCE TESTS = Guestfs005Load Guestfs010Basic +endif ENABLE_APPLIANCE #check_DATA = Bindtests diff --git a/java/Makefile.am b/java/Makefile.am index a96d304..ef78773 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -102,7 +102,11 @@ install-data-hook: # Tests (not comprehensive). -TESTS = run-bindtests run-java-tests +TESTS = run-bindtests +if ENABLE_APPLIANCE +TESTS += run-java-tests +endif ENABLE_APPLIANCE + TESTS_ENVIRONMENT = \ JAVA=$(JAVA) \ CLASSPATH=.:t:libguestfs-$(VERSION).jar \ diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 1dcf9f3..ce564c5 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -79,11 +79,15 @@ TESTS_ENVIRONMENT = \ TESTS = run-bindtests \ t/guestfs_005_load \ - t/guestfs_010_basic \ - t/guestfs_070_threads \ t/guestfs_080_optargs \ - t/guestfs_400_events \ + t/guestfs_400_events + +if ENABLE_APPLIANCE +TESTS += t/guestfs_010_basic \ + t/guestfs_070_threads \ t/guestfs_400_progress +endif + noinst_DATA += bindtests \ t/guestfs_005_load \ t/guestfs_010_basic \ diff --git a/perl/Makefile.am b/perl/Makefile.am index 7fc0eb6..404a4e9 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -46,9 +46,15 @@ src_deps: $(top_builddir)/src/libguestfs.la $(generator_built) test_images: $(MAKE) -C $(top_builddir)/tests/data -TESTS = run-bindtests run-perl-tests +TESTS = run-bindtests +test_prereq = src_deps all test_images -$(TESTS): src_deps all appliance test_images +if ENABLE_APPLIANCE +test_prereq += appliance +TESTS += run-perl-tests +endif + +$(TESTS): $(test_prereq) TESTS_ENVIRONMENT = \ $(top_builddir)/run diff --git a/python/Makefile.am b/python/Makefile.am index b2c69e6..2731a43 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -51,6 +51,10 @@ TESTS_ENVIRONMENT = \ TMPDIR=$(top_builddir) \ PYTHON=$(PYTHON) -TESTS = run-bindtests run-python-tests +TESTS = run-bindtests -endif +if ENABLE_APPLIANCE +TESTS += run-python-tests +endif ENABLE_APPLIANCE + +endif HAVE_PYTHON diff --git a/resize/Makefile.am b/resize/Makefile.am index 81e8f16..48240d1 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -105,7 +105,10 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run -TESTS = test-virt-resize.sh utils_tests +TESTS = utils_tests +if ENABLE_APPLIANCE +TESTS += test-virt-resize.sh +endif # Dependencies. depend: .depend diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index e048d3f..8d1ddc4 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -98,7 +98,9 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-sparsify.sh +endif ENABLE_APPLIANCE # Dependencies. depend: .depend diff --git a/tools/Makefile.am b/tools/Makefile.am index 82b5852..0a7cfaa 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,9 +61,11 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-list-filesystems.sh \ test-virt-make-fs.sh \ test-virt-tar.sh +endif ENABLE_APPLIANCE endif -- 1.7.8.3
--- configure.ac | 63 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 32 insertions(+), 31 deletions(-) diff --git a/configure.ac b/configure.ac index ce0f6e8..fab11e1 100644 --- a/configure.ac +++ b/configure.ac @@ -277,46 +277,47 @@ AC_ARG_ENABLE([appliance], AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$enable_appliance" = "xyes"]) AC_MSG_RESULT([$enable_appliance]) +dnl Check for febootstrap >= 3.0 +AC_CHECK_PROG([FEBOOTSTRAP], + [febootstrap],[febootstrap],[no]) + +dnl Pass a febootstrap --yum-config option. +AC_MSG_CHECKING([if user requested febootstrap --yum-config option]) +AC_ARG_WITH([febootstrap-yum-config], + [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], + [pass febootstrap --yum-config option @<:@default=no@:>@])], + [FEBOOTSTRAP_YUM_CONFIG="$withval"], + [FEBOOTSTRAP_YUM_CONFIG=no]) +AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG]) +AC_SUBST([FEBOOTSTRAP_YUM_CONFIG]) + if test "x$enable_appliance" = "xyes"; then - dnl Check for febootstrap >= 3.0 - AC_CHECK_PROG([FEBOOTSTRAP], - [febootstrap],[febootstrap],[no]) test "x$FEBOOTSTRAP" = "xno" && AC_MSG_ERROR([febootstrap must be installed]) dnl febootstrap 2.x did not support the --version parameter $FEBOOTSTRAP --version >&AS_MESSAGE_LOG_FD 2>&1 || AC_MSG_ERROR([febootstrap >= 3.0 must be installed, your version is too old]) +fi - dnl Pass a febootstrap --yum-config option. - AC_MSG_CHECKING([if user requested febootstrap --yum-config option]) - AC_ARG_WITH([febootstrap-yum-config], - [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], - [pass febootstrap --yum-config option @<:@default=no@:>@])], - [FEBOOTSTRAP_YUM_CONFIG="$withval"], - [FEBOOTSTRAP_YUM_CONFIG=no]) - AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG]) - AC_SUBST([FEBOOTSTRAP_YUM_CONFIG]) - - dnl Which distro? - dnl - dnl This used to be Very Important but is now just used to select - dnl which packages to install in the appliance, since the package - dnl names vary slightly across distros. (See - dnl appliance/packagelist.in and appliance/excludelist.in) - AC_MSG_CHECKING([which Linux distro for package names]) - DISTRO=REDHAT - if test -f /etc/debian_version; then - DISTRO=DEBIAN - if grep -q 'DISTRIB_ID=Ubuntu' /etc/lsb-release 2>&AS_MESSAGE_LOG_FD; then - DISTRO=UBUNTU - fi - fi - if test -f /etc/arch-release; then - DISTRO=ARCHLINUX +dnl Which distro? +dnl +dnl This used to be Very Important but is now just used to select +dnl which packages to install in the appliance, since the package +dnl names vary slightly across distros. (See +dnl appliance/packagelist.in and appliance/excludelist.in) +AC_MSG_CHECKING([which Linux distro for package names]) +DISTRO=REDHAT +if test -f /etc/debian_version; then + DISTRO=DEBIAN + if grep -q 'DISTRIB_ID=Ubuntu' /etc/lsb-release 2>&AS_MESSAGE_LOG_FD; then + DISTRO=UBUNTU fi - AC_MSG_RESULT([$DISTRO]) - AC_SUBST([DISTRO]) fi +if test -f /etc/arch-release; then + DISTRO=ARCHLINUX +fi +AC_MSG_RESULT([$DISTRO]) +AC_SUBST([DISTRO]) dnl Check for rpcgen and XDR library. rpcgen is optional. AC_CHECK_PROG([RPCGEN],[rpcgen],[rpcgen],[no]) -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:46AM +0100, Hilko Bengen wrote:
--- configure.ac | 63 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/configure.ac b/configure.ac index ce0f6e8..fab11e1 100644 --- a/configure.ac +++ b/configure.ac @@ -277,46 +277,47 @@ AC_ARG_ENABLE([appliance], AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$enable_appliance" = "xyes"]) AC_MSG_RESULT([$enable_appliance])
+dnl Check for febootstrap >= 3.0 +AC_CHECK_PROG([FEBOOTSTRAP], + [febootstrap],[febootstrap],[no]) + +dnl Pass a febootstrap --yum-config option. +AC_MSG_CHECKING([if user requested febootstrap --yum-config option]) +AC_ARG_WITH([febootstrap-yum-config], + [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], + [pass febootstrap --yum-config option @<:@default=no@:>@])], + [FEBOOTSTRAP_YUM_CONFIG="$withval"], + [FEBOOTSTRAP_YUM_CONFIG=no]) +AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG]) +AC_SUBST([FEBOOTSTRAP_YUM_CONFIG]) + if test "x$enable_appliance" = "xyes"; then - dnl Check for febootstrap >= 3.0 - AC_CHECK_PROG([FEBOOTSTRAP], - [febootstrap],[febootstrap],[no]) test "x$FEBOOTSTRAP" = "xno" && AC_MSG_ERROR([febootstrap must be installed]) dnl febootstrap 2.x did not support the --version parameter $FEBOOTSTRAP --version >&AS_MESSAGE_LOG_FD 2>&1 || AC_MSG_ERROR([febootstrap >= 3.0 must be installed, your version is too old]) +fi
- dnl Pass a febootstrap --yum-config option. - AC_MSG_CHECKING([if user requested febootstrap --yum-config option]) - AC_ARG_WITH([febootstrap-yum-config], - [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], - [pass febootstrap --yum-config option @<:@default=no@:>@])], - [FEBOOTSTRAP_YUM_CONFIG="$withval"], - [FEBOOTSTRAP_YUM_CONFIG=no]) - AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG]) - AC_SUBST([FEBOOTSTRAP_YUM_CONFIG]) - - dnl Which distro? - dnl - dnl This used to be Very Important but is now just used to select - dnl which packages to install in the appliance, since the package - dnl names vary slightly across distros. (See - dnl appliance/packagelist.in and appliance/excludelist.in) - AC_MSG_CHECKING([which Linux distro for package names]) - DISTRO=REDHAT - if test -f /etc/debian_version; then - DISTRO=DEBIAN - if grep -q 'DISTRIB_ID=Ubuntu' /etc/lsb-release 2>&AS_MESSAGE_LOG_FD; then - DISTRO=UBUNTU - fi - fi - if test -f /etc/arch-release; then - DISTRO=ARCHLINUX +dnl Which distro? +dnl +dnl This used to be Very Important but is now just used to select +dnl which packages to install in the appliance, since the package +dnl names vary slightly across distros. (See +dnl appliance/packagelist.in and appliance/excludelist.in) +AC_MSG_CHECKING([which Linux distro for package names]) +DISTRO=REDHAT +if test -f /etc/debian_version; then + DISTRO=DEBIAN + if grep -q 'DISTRIB_ID=Ubuntu' /etc/lsb-release 2>&AS_MESSAGE_LOG_FD; then + DISTRO=UBUNTU fi - AC_MSG_RESULT([$DISTRO]) - AC_SUBST([DISTRO]) fi +if test -f /etc/arch-release; then + DISTRO=ARCHLINUX +fi +AC_MSG_RESULT([$DISTRO]) +AC_SUBST([DISTRO])
dnl Check for rpcgen and XDR library. rpcgen is optional. AC_CHECK_PROG([RPCGEN],[rpcgen],[rpcgen],[no])
ACK, although why do you need to move the DISTRO code? It should only be used when building the appliance AFAICT. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
* Richard W.M. Jones:
ACK, although why do you need to move the DISTRO code? It should only be used when building the appliance AFAICT.
If I recall correctly, this had something to do with warnings or error messages I got from autoconf because AC_SUBST([DISTRO]) wouldn't be run. And DISTRO is still useful when building the Debian packages: I do build libguestfs with "--disable-appliance", but appliance/packagelist, appliance/excludelist, and appliance/make.sh are still used: They end up as part of the libguestfs0 package and are used to set up the supermin appliance at install time (or later). -Hilko
--- resize/Makefile.am | 2 +- sparsify/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resize/Makefile.am b/resize/Makefile.am index bbae32f..48240d1 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -69,7 +69,7 @@ virt-resize: $(OBJECTS) # automake will decide we don't need C support in this file. Really # we do, so we have to provide it ourselves. -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish +DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I$(top_srcdir)/fish .c.o: $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@ diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 17ee638..8d1ddc4 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -68,7 +68,7 @@ virt-sparsify: $(OBJECTS) # automake will decide we don't need C support in this file. Really # we do, so we have to provide it ourselves. -DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish +DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I$(top_srcdir)/fish .c.o: $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@ -- 1.7.8.3
On Fri, Jan 20, 2012 at 08:44:47AM +0100, Hilko Bengen wrote:
--- resize/Makefile.am | 2 +- sparsify/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/resize/Makefile.am b/resize/Makefile.am index bbae32f..48240d1 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -69,7 +69,7 @@ virt-resize: $(OBJECTS) # automake will decide we don't need C support in this file. Really # we do, so we have to provide it ourselves.
-DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish +DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I$(top_srcdir)/fish
.c.o: $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@ diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am index 17ee638..8d1ddc4 100644 --- a/sparsify/Makefile.am +++ b/sparsify/Makefile.am @@ -68,7 +68,7 @@ virt-sparsify: $(OBJECTS) # automake will decide we don't need C support in this file. Really # we do, so we have to provide it ourselves.
-DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish +DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I$(top_srcdir)/fish
.c.o: $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@ -- 1.7.8.3
ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Fri, Jan 20, 2012 at 08:44:40AM +0100, Hilko Bengen wrote:
Here are some of the patches that I have maintained in the patch queue of my packages that I maintain within the Debian distribution (http://packages.qa.debian.org/libg/libguestfs.html). All of them address FTBFS (fail to build from source) errors that happened with the particular configuration that is used for building the Debian package.
Note that I am testing, and if all goes well, will push 3 of these patches upstream. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
participants (3)
-
Hilko Bengen -
Jim Meyering -
Richard W.M. Jones