[Libguestfs] Further nbdkit patches for Haiku

Richard W.M. Jones rjones at redhat.com
Fri Nov 9 08:48:57 UTC 2018

On Fri, Nov 09, 2018 at 01:44:38AM +0100, François Revol wrote:
> Le 06/11/2018 à 10:02, Richard W.M. Jones a écrit :
> I made a patch here:
> https://github.com/mmuman/nbdkit/commits/tmpfix
> Also added one for the loader lib search path environment, which is
> different for us.

For the tmpdir patch, I changed plugins/example3/example3.c to a
simpler patch which doesn't require the variable stack allocation
(but also doesn't use TMPDIR -- it's only an example program so
I chose to keep the code simple).

I pushed the LIBRARY_PATH patch unchanged.

> > This error:
> > 
> >   ./test-shebang-perl.sh: PID file was not created
> >   rect ELF header
> >   FAIL test-shebang-perl.sh (exit status: 1)
> > 
> > (I think the error message is "incorrect ELF header") could be
> > something to do with the way we use shebangs (#!).  IIRC this also
> > fails on FreeBSD so probably nbdkit is doing something which is not
> > correct POSIX.
> Yes I believe it gets rejected because the path is relative.
> I think FreeBSD also probably rejects non-absolute interpreter paths for
> security reasons.

Interesting - I guess this wouldn't affect normal uses of shebangs,
only the tests.  This is probably fixable with a bit of effort but my
FreeBSD VM died recently so I have to get that working first.



Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

More information about the Libguestfs mailing list