Open discution for a fakeroot support for the ports infrastructure

Baptiste Daroussin baptiste.daroussin at
Thu Sep 3 13:59:31 UTC 2009


normally all ./configure/gmake/gmake install supports DESTIR during
the gmake install

gmake install is replaced by gmake DESTFIR=$FAKE_DESTDIR} install
which does the job well.

but there could be some cases where gmake install doesn't support
DESTDIR and the porters didn't overrite the installer. I didn't find
one of them during my testing, there should have really few of them
and they won't work, but with the last patch, and that's why
activating the fake behaviour is optionnal in the last patch.


2009/9/3 Ulrich Spörlein <uqs at>
> On Mon, 31.08.2009 at 23:26:43 +0200, Baptiste Daroussin wrote:
> > Hi,
> >
> > I've written some patches for the ports infrastructure importing the
> > fakeroot implementation from midnightbsd ports.
> >
> > In my first implementation the fake directory was enabled by default, no
> > ports had to be modified to support it.
> > My second implementation added a knob to add to make.conf (USE_FAKE) to
> > enable it for people wanting it and want to tested. still no ports to be
> > modified (except perhaps some buggy one)
> >
> > Now the patches are quite old (they won't apply cleanly) so I'm on updating
> > it again.
> >
> > Before rewriting it, I think it is a better idea to first discuss about it,
> > to improve it, see if there are interests, etc.
> >
> > So basically here is what is done and how it works.
> > the changes are only in the infrastructure not in ports themselves (except
> > that some will be able to benefit some cleanup)
> >
> > do-fake (with post and pre) replaces do-install (pre/post) it creates a
> > $WRKSRC/fakeroot where the binaries are copied by the ports (during  the
> > do-install of the port)
> >
> > then do-package create a package using pkg-plist (or the generated one)
> > using the binary in fakeroot.
> >
> > do-install (ie make install) now only does a pkg_add of the created pkg.
> This is exactly what we need and kudos to you for taking on this task. I
> fail to see however, how this can "just work" for all the ports. Most of
> them are configured with --prefix=/usr/local so you cannot simply run
> 'gmake install' for them and have stuff show up in the fake root.
> How is this actually solved (the proposed patch did not enlighten me in
> that regard).
> Regards,
> Uli

More information about the freebsd-ports mailing list