From owner-freebsd-ports@FreeBSD.ORG Mon Dec 14 18:26:04 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29EC51065694 for ; Mon, 14 Dec 2009 18:26:04 +0000 (UTC) (envelope-from kimelto@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id A83808FC08 for ; Mon, 14 Dec 2009 18:26:03 +0000 (UTC) Received: by ewy26 with SMTP id 26so3954141ewy.3 for ; Mon, 14 Dec 2009 10:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1/6LS4U2k0iyqMgKMw4n9kgSCRx2nNMkTwph9Atvr8Q=; b=WMqlThnxgMpb8GTF18KXXD28B/JniG7hwfi2CMftVkydAYGK8NkkA+uBT1E0KchT6f VLD+vdll7Q8IllI8td7lW0y8z3aHU93Ko+AimhYNGm7TdGSwu5UvOyMCjBB6paPPVkWE 2DBmODpMt1DxNi5RR0cIjs5cBnT6hVQd26Q0k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bm4hgyCMapOMSxETFv1Y7BMliw7iih0IgNO0a+vNaXKJXBkTeNl4foJMqrTF6lct4r 3VI251zcJfJ2Rq/d3damTIlMJYzwdqetSR1rVUuzzkaKt7ZkvNQK9jHYjed6ahNd9/w8 vi2/dQCzFh94EMeqEGFw/Rlf5FAW34gt/YJAI= MIME-Version: 1.0 Received: by 10.216.89.193 with SMTP id c43mr2075242wef.221.1260813597362; Mon, 14 Dec 2009 09:59:57 -0800 (PST) In-Reply-To: <20091214151318.GC1016@wicklow.lan> References: <20091214151318.GC1016@wicklow.lan> Date: Mon, 14 Dec 2009 09:59:57 -0800 Message-ID: From: Julien Laffaye To: Baptiste Daroussin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: New version of the fakeroot patch X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2009 18:26:04 -0000 Hi porters, 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 create it. 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. Regards, Julien On Mon, Dec 14, 2009 at 7:13 AM, Baptiste Daroussin 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 > > - 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= . > > 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 > > 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 > > Regards, > Bapt