Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 1/7] fish: Do not emit error message if history file cannot be open for writing.
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
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 2/7] fish: Remove hard-coded path from test script
--- 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 3/7] Replace setting of environment variables with usage of local run script
--- 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 4/7] Fixed out-of-tree compilation of OCaml code after .depend files removal
--- 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 5/7] Do not run appliance-related checks if not building appliance
--- 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 6/7] check for febootstrap etc. even if not building appliance
--- 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
Hilko Bengen
2012-Jan-20 07:44 UTC
[Libguestfs] [PATCH 7/7] resize, sparsify: find progress mini-library in out-of-tree builds
--- 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
Richard W.M. Jones
2012-Jan-20 16:11 UTC
[Libguestfs] Various fixes from building libguestfs for Debian
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
Maybe Matching Threads
- [PATCH libguestfs] tests: increase likelihood that heap abuse triggers failure
- [PATCH] Prepend local library path to LD_LIBRARY_PATH for tests, instead of replacing it
- [PATCH] Do not run test-virt-format.sh if appliance has not been built
- [PATCH 0/2] Don't fail if 'type' (disk format) attribute is missing from libvirt XML (RHBZ#701814).
- [PATCH (incomplete)] Rewrite virt-sysprep in OCaml.