[PATCH x 3] Three small fixes for Debian
These small fixes are required to fix the build and tests on Debian (using the debootstrap/debirf appliance). There is currently another bug in the Debian tests which I'm looking into. hexdump always fails as follows: libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor 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
[Forgot to CC Guido on this one] On Wed, Nov 04, 2009 at 02:49:13PM +0000, Richard W.M. Jones wrote:
These small fixes are required to fix the build and tests on Debian (using the debootstrap/debirf appliance).
There is currently another bug in the Debian tests which I'm looking into. hexdump always fails as follows:
libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor
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
From 3e4bd83ce0d3f9c7af52adb1dbdf5a5718e81454 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones@debian5x64.home.annexia.org> Date: Wed, 4 Nov 2009 14:30:13 +0000 Subject: [PATCH 1/3] debian: Ignore some generated debirf files.
--- .gitignore | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore index fbe7998..c365865 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,11 @@ *.a ABOUT-NLS aclocal.m4 +appliance/debian/.bootstrap.log +appliance/debian/.fakeroot-state.debirf-libguestfs +appliance/debian/debirf-libguestfs*.cgz +appliance/debian/root/ +appliance/debian/vmlinuz-* appliance/debian/debirf.conf appliance/initramfs.*.img appliance/initramfs.*.supermin.hostfiles -- 1.6.5.2
From 644fccb4aeed3e39978d340b18821aa704adf1bd Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones@debian5x64.home.annexia.org> Date: Wed, 4 Nov 2009 14:30:41 +0000 Subject: [PATCH 2/3] Debian: Ignore Debian appliance root when looking for translatable files.
--- Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile.am b/Makefile.am index a4f4b0b..87efb2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -194,6 +194,7 @@ all-local: grep -v '^perl/examples/' | \ grep -v '/guestfs_protocol.c' | \ grep -v '/rc_protocol.c' | \ + grep -v 'appliance/debian/root' | \ LC_ALL=C sort | \ sed 's,^\./,,' > po/POTFILES.in
-- 1.6.5.2
From a3be3a3b877277c1e4b130e1676b9ad307cafa10 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones@debian5x64.home.annexia.org> Date: Wed, 4 Nov 2009 14:31:06 +0000 Subject: [PATCH 3/3] Debian: Include ISOFS driver in the kernel.
--- appliance/kmod.whitelist.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/appliance/kmod.whitelist.in b/appliance/kmod.whitelist.in index 533bda8..9a93413 100644 --- a/appliance/kmod.whitelist.in +++ b/appliance/kmod.whitelist.in @@ -43,6 +43,9 @@ nls_utf8.ko nls_cp437.ko nls_base.ko
+isofs.ko +zlib_inflate.ko + dm-*.ko
cramfs.ko -- 1.6.5.2
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
-- 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
Hi Rich, On Wed, Nov 04, 2009 at 02:51:47PM +0000, Richard W.M. Jones wrote:
[Forgot to CC Guido on this one]
On Wed, Nov 04, 2009 at 02:49:13PM +0000, Richard W.M. Jones wrote:
These small fixes are required to fix the build and tests on Debian (using the debootstrap/debirf appliance). This all looks fine. I'll try to find the time to update libguestfs with the next release. Thanks!
There is currently another bug in the Debian tests which I'm looking into. hexdump always fails as follows:
libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor I meant to look into this for quiet some time but didn't get around to, but I noticed you already fixed it! Cheers, -- Guido
On Wed, Nov 04, 2009 at 05:52:43PM +0100, Guido Günther wrote:
This all looks fine. I'll try to find the time to update libguestfs with the next release. Thanks!
Thanks for looking at these ...
There is currently another bug in the Debian tests which I'm looking into. hexdump always fails as follows:
libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor I meant to look into this for quiet some time but didn't get around to, but I noticed you already fixed it!
Yeah, it was a pretty obscure one :-) 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 Wed, Nov 04, 2009 at 02:49:13PM +0000, Richard W.M. Jones wrote:
There is currently another bug in the Debian tests which I'm looking into. hexdump always fails as follows:
libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor
Not nice ... hexdump does 'freopen (filename, "r", stdin)': http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=text... However when we run external commands, they have no stdin -- not even /dev/null, fd 0 is literally closed: http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=daemon/guestfsd.c;h=8c39... According to the freopen man page, this shouldn't be a problem. If 'stdin' is closed then freopen should just open a new stdin. And of course the same command does work fine on Fedora builds. Anyway, I'm still experimenting with this one ... It might be better just to open /dev/null for stdin, since I suppose other programs could be unpredictable if they have no stdin at all. 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 Wed, Nov 04, 2009 at 03:10:27PM +0000, Richard W.M. Jones wrote:
On Wed, Nov 04, 2009 at 02:49:13PM +0000, Richard W.M. Jones wrote:
libguestfs: error: hexdump: hexdump: /test123: hexdump: /sysroot/test123: Bad file descriptor [...] Anyway, I'm still experimenting with this one ... It might be better just to open /dev/null for stdin, since I suppose other programs could be unpredictable if they have no stdin at all.
The patch below uses this approach, and I have tested it on Debian and Fedora. 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/
Another fix revealed by testing this on Debian. 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 wrote:
Another fix revealed by testing this on Debian. ... Subject: [PATCH] Debian: Use /bin/bash as the shell for regression test scripts.
/bin/sh on Debian is a minimal shell called 'dash' which doesn't support some features we need such as the particular 'function' syntax used by regressions/test-stringlist.sh, and therefore this script was failing on Debian.
Hi Rich, Have you considered changing to POSIX syntax, e.g., -function foo +foo() If that's the only change, it may be worthwhile to accommodate dash.
Change all of these scripts to use #!/bin/bash explicitly to avoid these sorts of problems. --- regressions/rhbz503169c10.sh | 2 +- regressions/rhbz503169c13.sh | 2 +- regressions/test-bootbootboot.sh | 2 +- .../test-cancellation-download-librarycancels.sh | 2 +- .../test-cancellation-upload-daemoncancels.sh | 2 +- regressions/test-find0.sh | 2 +- regressions/test-qemudie-killsub.sh | 2 +- regressions/test-qemudie-launchfail.sh | 2 +- regressions/test-qemudie-midcommand.sh | 2 +- regressions/test-qemudie-synch.sh | 2 +- regressions/test-read_file.sh | 2 +- regressions/test-remote.sh | 2 +- regressions/test-reopen.sh | 2 +- regressions/test-stringlist.sh | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/regressions/rhbz503169c10.sh b/regressions/rhbz503169c10.sh index 8813c05..91284e0 100755 --- a/regressions/rhbz503169c10.sh +++ b/regressions/rhbz503169c10.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash -
An alternative is to change Makefile.am to do e.g., TESTS_ENVIRONMENT = \ export MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ NOEXEC_CHECK="$(top_builddir)/src/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" ; /bin/bash Or even use a configure-time test like gnulib's posix-shell module to set SHELL to /bin/bash if it exists, then use this, TESTS_ENVIRONMENT = \ export MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ NOEXEC_CHECK="$(top_builddir)/src/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" ; $(SHELL) which would might work even if /bin/bash doesn't exist.
On Thu, Nov 05, 2009 at 06:04:18PM +0100, Jim Meyering wrote:
Have you considered changing to POSIX syntax, e.g.,
-function foo +foo()
If that's the only change, it may be worthwhile to accommodate dash.
We could do but I have to say that bash is out there on every platform we care about, and it's actually useful to use the non-POSIX features. It's also going to be a problem that we'll only find these incompatibilities when we compile on Debian, and maybe there will be bugs in dash itself. I think we want bash, so let's use bash! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
participants (3)
-
Guido Günther -
Jim Meyering -
Richard W.M. Jones