From owner-freebsd-ports@FreeBSD.ORG Mon Dec 14 15:15:05 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 21D801065679 for ; Mon, 14 Dec 2009 15:15:05 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9F35D8FC14 for ; Mon, 14 Dec 2009 15:15:04 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so896926eye.9 for ; Mon, 14 Dec 2009 07:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=211s3Uc0FBFc8ck60xKszKovJ6lzbezdmexRrMiagJk=; b=hzf7oaS6S+Mw6WnA0BkI05EDsEd2JzOBNqRYFJTztao0XZ78WmscyzQa56wWVlCgj4 ttC4GR5XODXPU4q/C8uK1S/Ge8kxGWvxth1G9TAo4qbJV+UueeVA3hE3d4oADaGZfpMj QCJAc3WbZXHI5rHmZ6zmq4XVJ2rF2MlnkmiFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=Tgzo5C+8/PPCb97N+kJ6QfqPp3PPfcAcrfS5IIFwqirGDwkPjGwXr0sUASxok1tfiJ yRtY4pryJszd1iXBbfpnSdVynorwByqhM5S9/oyuLXW9DN8XVRIQZnnJflTieFxSvjM6 h1dG53RHUv723aCLvghu2yzXc2iEw2NfkfjSk= Received: by 10.213.24.24 with SMTP id t24mr22388ebb.90.1260803703679; Mon, 14 Dec 2009 07:15:03 -0800 (PST) Received: from wicklow.lan (stc92-3-82-245-249-89.fbx.proxad.net [82.245.249.89]) by mx.google.com with ESMTPS id 10sm8315166eyd.21.2009.12.14.07.15.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Dec 2009 07:15:03 -0800 (PST) Received: from bapt (uid 1001) (envelope-from baptiste.daroussin@gmail.com) id 2a88a by wicklow.lan (DragonFly Mail Agent) Mon, 14 Dec 2009 16:13:18 +0100 Date: Mon, 14 Dec 2009 16:13:18 +0100 From: Baptiste Daroussin To: freebsd-ports@freebsd.org Message-ID: <20091214151318.GC1016@wicklow.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: 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 15:15:05 -0000 Hi all, I have updated the fakeroot patch, it now can apply on an uptodate version of the ports. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/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=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. Limitation: 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 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