Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 2009 09:49:19 +0000
From:      Florent Thoumie <flz@xbsd.org>
To:        Baptiste Daroussin <baptiste.daroussin@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: New version of the fakeroot patch
Message-ID:  <a01628140912160149r3eb6dd6ax7015897116076bdf@mail.gmail.com>
In-Reply-To: <20091214151318.GC1016@wicklow.lan>
References:  <20091214151318.GC1016@wicklow.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 14, 2009 at 3:13 PM, Baptiste Daroussin
<baptiste.daroussin@gmail.com> wrote:
> Hi all,
>
> I have updated the fakeroot patch, it now can apply on an uptodate versio=
n of
> the ports.
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/133815
>
> 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=3Dyes in
> =A0/etc/make.conf or per ports by adding USE_FAKE=3Dyes in the ports Make=
file

I don't know if this should be a port setting. I think this should be
a user setting. So, I think WITH_FAKE / WITH_FAKEROOT is a better
choice. Obviously ports not working with fakeroot would have to define
something like IGNORE_FAKEROOT, the same kind of variable we have for
MAKE_JOBS.

> - it create a fakeroot directory in the WRKDIR where all the binary are
> =A0installed first
>
> - then it creates a package using the plist and finding its files only in=
 the
> =A0fakeroot directory
>
> - in the end it installs the created packages
>
> - it respects the DESTDIR implementation (it is not the same kind of feat=
ure nor
> =A0the same goal)
>
> - it does not require any modification on actual ports (except for those =
which
> =A0are 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 foun=
d in
> =A0the plist is really installed, so the package is always clean)
>
> I now that porters should take care of not breaking the plist, but it oft=
en
> happens, helping them by a system that completly use the plist file is IM=
HO 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 g=
et the
> =A0package build, only build-depends ports will be installed
>
> - it allow easier handling of NOPORTDOCS, NOPORTEXAMPLES and so on, becau=
se it
> =A0creates the packages first using plist to know which files should be p=
ackaged,
> =A0the porter should only take care of one case, the case everything is
> =A0installed, then he adapts the plists to have or not some files dependi=
ng on
> =A0the options the user have.
>
> This should cleanup a lot some ports, and should easier the respectness o=
f
> some porting guidelines
>
> What could be done:
> because it generates packages first we could imagine some lint programs t=
hat
> analyse the package content to test that it respects some of the freebsd
> recommandation for packages (usefull for porters), it could help the vali=
dation
> of new/update ports submission and help preventting commiting buggy stuff=
.

I'm thinking files could be moved from the fakeroot directory instead
of copied, that way you could run 'find ${FAKEDIR} ! -type d' and find
out if you've missed anything.

> Limitation:
> this path (currently activable on depend) add from disk usage than the wa=
y 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
> build->copy-on-fakeroot->package-installing

On pointyhat, a package will be generated at the end regardless. Also,
quite a lot of tools do make a package backup before deinstalling, so
I don't see this as a major issue. If people don't like the I/O
overhead, we could use pkg_add in slave mode, it will skip the package
building phase.

> 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
> concept.
>
> Tell me if you think that this patch could be interesting or not

As I mentioned it before, I think it's a very valuable feature to have.

--=20
Florent Thoumie
flz@FreeBSD.org
FreeBSD Committer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a01628140912160149r3eb6dd6ax7015897116076bdf>