Date: Tue, 1 Sep 2009 11:02:24 +0300 From: Peter Pentchev <roam@ringlet.net> To: Baptiste Daroussin <baptiste.daroussin@gmail.com> Cc: freebsd-ports@freebsd.org Subject: Re: Open discution for a fakeroot support for the ports infrastructure Message-ID: <20090901080224.GA1017@straylight.m.ringlet.net> In-Reply-To: <ed7b1c610908311426x55e1df55va24a641183ca1a6c@mail.gmail.com> References: <ed7b1c610908311426x55e1df55va24a641183ca1a6c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 31, 2009 at 11:26:43PM +0200, Baptiste Daroussin wrote: > Hi, >=20 > I've written some patches for the ports infrastructure importing the > fakeroot implementation from midnightbsd ports. That's actually a good idea. I'm quite used to fakeroot already from some work I've been doing in Debian. > 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) >=20 > Now the patches are quite old (they won't apply cleanly) so I'm on updati= ng > it again. >=20 > Before rewriting it, I think it is a better idea to first discuss about i= t, > to improve it, see if there are interests, etc. >=20 > 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) >=20 > 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) >=20 > then do-package create a package using pkg-plist (or the generated one) > using the binary in fakeroot. >=20 > do-install (ie make install) now only does a pkg_add of the created pkg. 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 |=20 xargs -0 fgrep do-install =2E..from /usr/ports gives just about 6000 results here, and most of them a= re, 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 :) > What is the interest of that : > the installed files will now always respects the pkg-plist which simplify > the QA work. > the developpers will have to focus on the pkg-plist to choose which file > will be installed according to the desired KNOBS/OPTIONS : no more ugly h= ack > to respect NOPORTDOCS and NOPORTDATA for example. > certainly a lot more that i don't see now. >=20 > what could be seen in the future is an equivalent of the update-plist tar= get > of openbsd ports infrastructure. > it will easier implementation of multipackage ports (if ever wanted :)), = one > port with multiple pkg-plist. >=20 > the discussion is open :) >=20 > here is the PR concerned : > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/133815 G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@space.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc 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. --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqc1RAACgkQ7Ri2jRYZRVN72ACfWZ/2SaCjCwFmLKdGfAjeo7gk KZoAni57t0OZAdukE3kvO7BPzHsT7HjF =Bk5+ -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090901080224.GA1017>