[OpenAFS-devel] pinstall breaks fakeroot when compiling openafs for Nokia tablets
Marcus Watts
mdw@umich.edu
Thu, 17 Jul 2008 20:00:59 -0400
> Date: Thu, 17 Jul 2008 18:24:17 EDT
> To: Russ Allbery <rra@stanford.edu>
> cc: OpenAFS Developers <openafs-devel@openafs.org>
> From: Jason Edgecombe <jason@rampaginggeek.com>
> Subject: Re: [OpenAFS-devel] pinstall breaks fakeroot when compiling openafs fo
> ***r Nokia tablets
>
> Russ Allbery wrote:
> > Jason Edgecombe <jason@rampaginggeek.com> writes:
> >
> >> I'm trying get openafs to build for the latest OS update, diablo, on the
> >> Nokia tablets. I'm getting the error "libfakeroot: FAKEROOTKEY not
> >> defined in environment" . Marius was helpful on the maemo-developer list
> >> for tracking the problem down to pinstall. pinstall is clobbering the
> >> environment variables LD_PRELOAD and FAKEROOTKEY which are needed by
> >> fakeroot.
> >>
> >> Would someone enlighten me as to what pinstall does, why we use it, and
> >> how to fix this?
> >>
> >
> > pinstall is used to install files, similar to install-sh in other
> > projects.
> >
> > If this analysis is correct, there's something uniquely different about
> > fakeroot on Maemo. I build OpenAFS under fakeroot all the time and have
> > never had this problem.
> >
>
> I should have elaborated. I'm cross-compiling using scratchbox for the
> maemo platform (ARMEL architecture).
>
> What confuses me is that I built openafs before using this same box, but
> now I'm using a different scratchbox target (diablo).
>
> My build box is actually running ubuntu under VMware on a Centos 5 host.
>
> Jason
"pinstall" doesn't just clobber LD_PRELOAD and FAKEROOTKEY, it discards
*every* environment variable with majestic indifference whenever it does
execve to invoke /bin/cp and /bin/strip (or variations which depend on
the *target* OS being selected.)
I think in modern variants of openafs, you don't use pinstall by default,
but use a copy of "install" that's selected by gnu autoconf magic.
At least, that was my recollection - but I don't see any evidence in
this in a build I just looked at, nor do I see any obvious provisions
in the debian diff for openafs.
As I think on this, I'm not quite sure that this would break things in
any obvious way. /bin/cp and /bin/strip shouldn't be complaining if
LD_PRELOAD and FAKEROOTKEY aren't set. They'll put odd ownership on
files, but I think the rest of the packaging process reads & copies the
files over again and will ignore the odd ownership.
The real problem for cross-compilation might be getting the right version
of strip, if /bin/strip isn't good enough. Presumably you have some
variation on "binutils-multiarch" so even this might not matter to you.
So, how do you wind up with LD_PRELOAD but not FAKEROOTKEY set?
-Marcus Watts