First, thanks for the in-depth assistance. See responses inline below.<br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 2:08 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, Aug 08, 2011 at 03:55:07PM -0700, David Konerding wrote:<br>
> Hi,<br>
><br>
> I am trying to get libguestfs-test-tool working on ubuntu. The first<br>
> problem I had was that HiveX won't compile on ubuntu to due to some missing<br>
> symbols (rpl-getopt, I see this has already been reported). Second problem<br>
> is that if HiveX is not available, guestfish doesn't link because code<br>
> refers to symbols which aren't compiled into libguestfs (I was able to work<br>
> around this by #ifdeffing references to those functions).<br>
<br>
</div>Which version of Ubuntu is this?<br>
<br>
hivex should be in Ubuntu already, thanks to Hilko Bengen:<br>
<a href="http://packages.ubuntu.com/oneiric/libhivex-dev" target="_blank">http://packages.ubuntu.com/oneiric/libhivex-dev</a><br>
<br></blockquote><div><br></div><div>It's a Lucid Lynx derivative, and we don't have that package. Maybe I can shoehorn it in.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The problem with missing hivex/pcre causing libguestfs builds to break<br>
is known:<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=723474" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=723474</a><br>
<div class="im"><br></div></blockquote><div><br></div><div>Thanks. I simply went into inspect_icon.c, and wherever you called an undefined function, I set the value to NULL, which in most cases invokes the error path. IE:</div>
<div><br></div><div><div>diff -ru libguestfs-1.12.3/src/inspect_icon.c /usr/local/home/dek/libguestfs-1.12.3/src/inspect_icon.c</div><div>--- libguestfs-1.12.3/src/inspect_icon.c 2011-07-20 10:20:58.000000000 -0700</div>
<div>+++ /usr/local/home/dek/libguestfs-1.12.3/src/inspect_icon.c 2011-08-08 14:19:31.000000000 -0700</div><div>@@ -75,7 +75,11 @@</div><div> int favicon, highquality;</div><div> size_t size;</div><div> </div><div>
+#if defined(HAVE_HIVEX)</div><div> fs = guestfs___search_for_root (g, root);</div><div>+#else</div><div>+ fs = NULL;</div><div>+#endif</div><div> if (!fs)</div><div> return NULL;</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">
> Anyway, including the diagnostic output in case it helps.<br>
</div>[...]<br>
<div><div></div><div class="h5">> execl: /init: No such file or directory<br>
> febootstrap: debug: listing directory /<br>
> 2 d . 040755 4096 88619:5000<br>
> 2 d .. 040755 4096 88619:5000<br>
> 11 d lost+found 040700 16384 0:0<br>
> 12 d bin 040750 4096 23083:5000<br>
> 13 d boot 040750 4096 23083:5000<br>
> 14 d etc 040750 4096 23083:5000<br>
> 109 d lib 040750 4096 23083:5000<br>
> 156 d sbin 040750 4096 23083:5000<br>
> 157 d usr 040750 4096 23083:5000<br>
> 534 d var 040750 4096 23083:5000<br>
> 690 - init 100750 3264 23083:5000<br>
> febootstrap: debug: listing directory /bin<br>
> 12 d . 040750 4096 23083:5000<br>
> 2 d .. 040755 4096 88619:5000<br>
> 540 l rbash 120777 4 0:0 -> bash<br>
> 541 l sh 120777 9 0:0 -> /bin/bash<br>
> febootstrap: debug: listing directory /lib<br>
> 109 d . 040750 4096 23083:5000<br>
> 2 d .. 040755 4096 88619:5000<br>
> 110 d cryptsetup 040750 4096 23083:5000<br>
> 113 d firmware 040750 4096 23083:5000<br>
> 145 d init 040750 4096 23083:5000<br>
> 146 d modules 040750 4096 23083:5000<br>
> 147 d security 040750 4096 23083:5000<br>
> 148 d udev 040750 4096 23083:5000<br>
> 551 l libaio.so.1 120777 15 0:0 -> libaio.so.1.0.1<br>
> 552 l libbsd.so.0 120777 15 0:0 -> libbsd.so.0.2.0<br>
> 553 l libdbus-1.so.3 120777 18 0:0 -> libdbus-1.so.3.4.0<br>
> 554 l libdrm_intel.so.1 120777 21 0:0 -> libdrm_intel.so.1.0.0<br>
> 555 l libdrm_nouveau.so.1 120777 23 0:0 -> libdrm_nouveau.so.1.0.0<br>
> 556 l libdrm_radeon.so.1 120777 22 0:0 -> libdrm_radeon.so.1.0.0<br>
> 557 l libfuse.so.2 120777 16 0:0 -> libfuse.so.2.8.1<br>
> 558 l libgcrypt.so.11 120777 19 0:0 -> libgcrypt.so.11.5.2<br>
> 559 l libglib-2.0.so.0 120777 23 0:0 -> libglib-2.0.so.0.2400.1<br>
> 560 l libnih-dbus.so.1 120777 20 0:0 -> libnih-dbus.so.1.0.0<br>
> 561 l libnih.so.1 120777 15 0:0 -> libnih.so.1.0.0<br>
> 562 - libntfs-3g.so.75.0.0 100644 266616 0:0<br>
> 563 l libntfs-3g.so.75 120777 20 0:0 -> libntfs-3g.so.75.0.0<br>
> 564 l libparted.so.0 120777 18 0:0 -> libparted.so.0.0.1<br>
> 565 l libpcre.so.3 120777 17 0:0 -> libpcre.so.3.12.1<br>
> 566 l libply-boot-client.so.2 120777 27 0:0 -> libply-boot-client.so.2.0.0<br>
> 567 l libply-splash-core.so.2 120777 27 0:0 -> libply-splash-core.so.2.0.0<br>
> 568 l libply-splash-graphics.so.2 120777 31 0:0 -><br>
> libply-splash-graphics.so.2.0.0<br>
> 569 l libply.so.2 120777 15 0:0 -> libply.so.2.0.0<br>
> 570 l libpng12.so.0 120777 18 0:0 -> libpng12.so.0.42.0<br>
> 571 l libpopt.so.0 120777 16 0:0 -> libpopt.so.0.0.0<br>
> 572 l libslang.so.2 120777 17 0:0 -> libslang.so.2.2.2<br>
> 573 l libss.so.2 120777 12 0:0 -> libss.so.2.0<br>
> 574 l libudev.so.0 120777 16 0:0 -> libudev.so.0.6.1<br>
> 575 l libulockmgr.so.1 120777 20 0:0 -> libulockmgr.so.1.0.1<br>
> 576 l libusb-0.1.so.4 120777 19 0:0 -> libusb-0.1.so.4.4.4<br>
> febootstrap: debug: listing directory /lib64<br>
<br>
</div></div>The problem is that both /bin/bash and libc are completely missing<br>
from the appliance.<br>
<br></blockquote><div><br></div><div>i see.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
During the build, was febootstrap able to download all the packages it<br>
needed?<br>
<br></blockquote><div><br></div><div>Looks like it (I see a bunch of package downloads, none of them failed).</div><div>However, I re-ran this, and I see this (the list is some ~thousands of files, I guess the entire unpacked root filesystem?)</div>
<div><br></div><div><div>febootstrap: warning: some host files are unreadable by non-root</div><div>febootstrap: warning: get your distro to fix these files:</div><div> /bin/bash</div><div> /bin/cat</div></div>
<div><br></div><div>I am going to try to reproduce this step with strace to see what the underlying problem is. Well, that wasn't very useful- I don't see any calls to /bin/bash in the host file system that are failing.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Which version of febootstrap are you using? (Generally speaking, you<br>
should always try to use a recent version)<br>
<br></blockquote><div><br></div><div>My distribution had 2.1-4, but I downloaded febootstrap-3.8 and used that. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Do /bin/bash and /lib/libc.so.* appear in appliance/supermin.d/hostfiles?<br>
<br></blockquote><div><br></div><div>I see /bin/sh and /bin/rbash. no /bin/bash and no libc.so at all. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Do the paths to the programs / libraries in hostfiles match up with<br>
what is available on the host filesystem?<br></blockquote><div><br></div><div>Hmm, not sure. i could check this but I'm wondering if the problem I noted above is significant enough that I don't need it.</div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Have you installed (on the host) all the packages that are listed in<br>
appliance/packagelist?<br>
<br></blockquote><div><br></div><div>I hadn't (zfs-fuse, gfs2 and a few others were missing). They are installed now. But it didn't make any difference.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is febootstrap downloading packages which match up with the packages<br>
installed on the host? You'll have problems if your apt configuration<br>
is significantly different from what is actually installed on your<br>
host, eg. if 'unstable' packages are installed on the host, but the<br>
unstable repo is disabled in sources.list.<br>
<br></blockquote><div><br></div><div>Nope, I've got no unstable packages installed.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Rich.<br>
<font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)<br>
<a href="http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora" target="_blank">http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora</a><br>
</font></blockquote></div><br>