Richard W.M. Jones
2009-Nov-04 14:49 UTC
[Libguestfs] [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 -------------- next part -------------->From 3e4bd83ce0d3f9c7af52adb1dbdf5a5718e81454 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at 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 -------------- next part -------------->From 644fccb4aeed3e39978d340b18821aa704adf1bd Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at 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 -------------- next part -------------->From a3be3a3b877277c1e4b130e1676b9ad307cafa10 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at 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
Richard W.M. Jones
2009-Nov-04 14:51 UTC
[Libguestfs] [PATCH x 3] Three small fixes for Debian
[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 at 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 at 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 at 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 at 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
Richard W.M. Jones
2009-Nov-04 15:10 UTC
[Libguestfs] [PATCH x 3] Three small fixes for Debian
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 descriptorNot nice ... hexdump does 'freopen (filename, "r", stdin)': http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=text-utils/display.c;h=91857c2fa159c24fba0f54b78233471cf15f84e6;hb=HEAD#l305 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=8c39c39c66b3ae39b62b53a610220008eec2e74f;hb=HEAD#l655 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
Richard W.M. Jones
2009-Nov-04 16:38 UTC
[Libguestfs] [PATCH] Debian: Use /bin/bash as the shell for regression test scripts.
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 -------------- next part -------------->From 4f4880303693bc2e55ce431e87302098654b7f03 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at debian5x64.home.annexia.org> Date: Wed, 4 Nov 2009 16:32:50 +0000 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. 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 - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/rhbz503169c13.sh b/regressions/rhbz503169c13.sh index b6b4b94..7bace82 100755 --- a/regressions/rhbz503169c13.sh +++ b/regressions/rhbz503169c13.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-bootbootboot.sh b/regressions/test-bootbootboot.sh index 4586aff..5be15d2 100755 --- a/regressions/test-bootbootboot.sh +++ b/regressions/test-bootbootboot.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-cancellation-download-librarycancels.sh b/regressions/test-cancellation-download-librarycancels.sh index 73c5469..7b59b7e 100755 --- a/regressions/test-cancellation-download-librarycancels.sh +++ b/regressions/test-cancellation-download-librarycancels.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-cancellation-upload-daemoncancels.sh b/regressions/test-cancellation-upload-daemoncancels.sh index c56b1c2..835c3bb 100755 --- a/regressions/test-cancellation-upload-daemoncancels.sh +++ b/regressions/test-cancellation-upload-daemoncancels.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-find0.sh b/regressions/test-find0.sh index 4849b64..e2bd89e 100755 --- a/regressions/test-find0.sh +++ b/regressions/test-find0.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-qemudie-killsub.sh b/regressions/test-qemudie-killsub.sh index 9848ebf..14b4688 100755 --- a/regressions/test-qemudie-killsub.sh +++ b/regressions/test-qemudie-killsub.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-qemudie-launchfail.sh b/regressions/test-qemudie-launchfail.sh index 7da1c35..15e62fb 100755 --- a/regressions/test-qemudie-launchfail.sh +++ b/regressions/test-qemudie-launchfail.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-qemudie-midcommand.sh b/regressions/test-qemudie-midcommand.sh index 2aca922..92a4c68 100755 --- a/regressions/test-qemudie-midcommand.sh +++ b/regressions/test-qemudie-midcommand.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-qemudie-synch.sh b/regressions/test-qemudie-synch.sh index 96e879d..5932fef 100755 --- a/regressions/test-qemudie-synch.sh +++ b/regressions/test-qemudie-synch.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-read_file.sh b/regressions/test-read_file.sh index 3b9c6ef..71b8957 100755 --- a/regressions/test-read_file.sh +++ b/regressions/test-read_file.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-remote.sh b/regressions/test-remote.sh index 783dd6e..ed02ccf 100755 --- a/regressions/test-remote.sh +++ b/regressions/test-remote.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-reopen.sh b/regressions/test-reopen.sh index 7901754..90774c9 100755 --- a/regressions/test-reopen.sh +++ b/regressions/test-reopen.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # diff --git a/regressions/test-stringlist.sh b/regressions/test-stringlist.sh index 0b0c476..06b5bc2 100755 --- a/regressions/test-stringlist.sh +++ b/regressions/test-stringlist.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # -- 1.6.5.2