Open discution for a fakeroot support for the ports infrastructure

Baptiste Daroussin baptiste.daroussin at
Tue Sep 1 13:16:00 UTC 2009

Fucking gmail, I replyed in private instead of the list so here is the
reply, sorry

> That's actually a good idea.  I'm quite used to fakeroot already from
> some work I've been doing in Debian.
Currently the fakeroot is not something like the debian fakeroot, ie it is
just a directory that is considered a the a root directory (a destdir for
example). But in future a program like debian's fakeroot could be

> Just one comment: there are some ports, and not quite so few, either,
> which override the do-install target to do some maintenance of their own.
> A trivial run of
>  find . -mindepth 3 -maxdepth 3 -name Makefile -type f -print0 |
>      xargs -0 fgrep do-install
> ...from /usr/ports gives just about 6000 results here, and most of them
> are,
> indeed, real cases of port Makefiles doing the install thing for
> themselves.
> This is done either for very, very simple programs where it would be
> unnecessary overhead to recurse into the upstream's Makefile and run
> its "install" target, or for programs where the upstream doesn't even
> *have* an "install" target, or for programs where there is, quite simply,
> no upstream - like devel/portilnt :)
> So the fakeroot implementation should take that into account, too -
> and that could be a problem, since most of the do-install targets
> actually do install their files directly into ${PREFIX}.
> This could actually be easier if DESTDIR were implemented first :)
When a ports override do-install pre-install and post-install,
bsd.fake.mkmanage it transparently (ie no modification) if the ports
or other variables like this one because during the do-install LOCALBASE is
override by ${FAKEDIR}${LOCALBASE} and it already works.

the main goal I had in mind when writting the patch is that it should works
with the current ports without any modification in them. It is currently not
perfect but all the ports I tested works as-is, there are for sure some bugs
with some ports but if they are written well should be able to
be corrected to handle them correctly.

> G'luck,
> Peter
> --
> Peter Pentchev  roam at    roam at    roam at
> PGP key:<>
> Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
> This inert sentence is my body, but my soul is alive, dancing in the sparks
> of your brain.


More information about the freebsd-ports mailing list