New version of the fakeroot patch
kimelto at gmail.com
Mon Dec 14 18:26:04 UTC 2009
I do agree with the idea of a fakeroot.
As bapt said, it will make supporting NOPORTDOCS easier: no more
patches against the vendor Makefile(s) !!!
It will also ensure the quality of the _packages_. For example, if the
port create an empty folder, it's common that the package forget to
As the real installation is made with the pkg_add tool with this
implementation, the porter will directly notice the issue.
The major concern with this implementation is, IMHO, the intensive
usage of I/O. But I'm sure we can reduce its impact on performance.
To conclude, I think this patch is worth it.
It'd be interesting to have the advice of a portmgr@ to know if it
gonna break some obscure parts of the ports framework.
On Mon, Dec 14, 2009 at 7:13 AM, Baptiste Daroussin
<baptiste.daroussin at gmail.com> wrote:
> Hi all,
> I have updated the fakeroot patch, it now can apply on an uptodate version of
> the ports.
> For information the fakeroot patch is a port of the midnightbsd's mports fakeroot
> to freebsd's ports.
> What it does:
> - it is optional: you can activate it globally with USE_FAKE=yes in
> /etc/make.conf or per ports by adding USE_FAKE=yes in the ports Makefile
> - it create a fakeroot directory in the WRKDIR where all the binary are
> installed first
> - then it creates a package using the plist and finding its files only in the
> fakeroot directory
> - in the end it installs the created packages
> - it respects the DESTDIR implementation (it is not the same kind of feature nor
> the same goal)
> - it does not require any modification on actual ports (except for those which
> are already not clean) but will allow to cleanup some ports if wanted.
> Why this patch:
> - it prevents installing crufts thing on users systems (only what is found in
> the plist is really installed, so the package is always clean)
> I now that porters should take care of not breaking the plist, but it often
> happens, helping them by a system that completly use the plist file is IMHO a
> better thing, and it prevents users from being inpacted by a lazy porter.
> - it allow to create tinderbox that does not need to install a ports to get the
> package build, only build-depends ports will be installed
> - it allow easier handling of NOPORTDOCS, NOPORTEXAMPLES and so on, because it
> creates the packages first using plist to know which files should be packaged,
> the porter should only take care of one case, the case everything is
> installed, then he adapts the plists to have or not some files depending on
> the options the user have.
> This should cleanup a lot some ports, and should easier the respectness of
> some porting guidelines
> What could be done:
> because it generates packages first we could imagine some lint programs that
> analyse the package content to test that it respects some of the freebsd
> recommandation for packages (usefull for porters), it could help the validation
> of new/update ports submission and help preventting commiting buggy stuff.
> this path (currently activable on depend) add from disk usage than the way ports
> actually works:
> without the patch:
> build -> copy on the filesystem
> with the path:
> build -> copy-on-fakeroot->package_building->package-installing
> In the future it could be improved by provinding a version of pkg_create that
> fake the package creation by directly install on FS so that could become
> This patch is not yet complete, it should work with classical ports that use
> gmake or make and with python, I have only done that currenly as a proof of
> Tell me if you think that this patch could be interesting or not
More information about the freebsd-ports