[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fakeroot



On Sun, Feb 24, 2002 at 08:43:11PM +0000, Matthew Garrett wrote:
> Fakeroot on NetBSD is dying inside libfakeroot. The mess of wrap* has left
> me sufficiently confused that I'm not really sure what's going on, and
> I've certainly got no idea why it dies. Does anyone who understands these
> things better than me want to take a look at it?

Thanks to the combined efforts of reasonable quantities of alcohol and
several people who know significantly more about this sort of thing than
me, it now works. /usr/include/sys/stat.h rewrites fstat() to
__fstat13(). The fstat() in libfakeroot therefore gets rewritten to
__fstat13(). The fstat in libfakeroot calls fstat() in libc, which simply
calls __fstat13(). Sadly, since libfakeroot is LD_PRELOADed, this calls
the libfakeroot version. Which calls fstat() again. Altering libfakeroot
to call __fstat13() rather than fstat() makes things work, but this is
likely to break if the version name changes again in the future. I'm not
sure what a more long-term fix is.

Many thanks to Tony Finch and Peter Benie for working this out, because
I'd never have got there myself.

-- 
Matthew Garrett | mjg59@srcf.ucam.org



Reply to: