From owner-svn-doc-head@freebsd.org Mon Jul 6 09:39:47 2015 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BB5FA680; Mon, 6 Jul 2015 09:39:47 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4027619B9; Mon, 6 Jul 2015 09:39:47 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t669dlSF041065; Mon, 6 Jul 2015 09:39:47 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t669dk72041062; Mon, 6 Jul 2015 09:39:46 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201507060939.t669dk72041062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Mon, 6 Jul 2015 09:39:46 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46929 - in head/en_US.ISO8859-1/books/porters-handbook: makefiles special uses X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 09:39:47 -0000 Author: mat Date: Mon Jul 6 09:39:45 2015 New Revision: 46929 URL: https://svnweb.freebsd.org/changeset/doc/46929 Log: Various small fixes. - Mention WRKSRC_SUBDIR. - Note that NO_WRKSUBDIR should not be used. - Mention USES=metaport. - NEED_ROOT is gone, mention USES=fakeroot. Approved by: wblock (mentor) Differential Revision: https://reviews.freebsd.org/D2941 Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Mon Jul 6 09:26:34 2015 (r46928) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Mon Jul 6 09:39:45 2015 (r46929) @@ -4692,6 +4692,16 @@ PORTVERSION= 1.0 WRKSRC= ${WRKDIR}/${PORTNAME} + + <varname>WRKSRC_SUBDIR</varname> + + If the source files needed for the port are in a + subdirectory of the extracted distribution file, set + WRKSRC_SUBDIR to that directory. + + WRKSRC_SUBDIR= src + + <varname>NO_WRKSUBDIR</varname> @@ -4700,6 +4710,14 @@ PORTVERSION= 1.0 indicate that. NO_WRKSUBDIR= yes + + + Because WRKDIR is the only directory + that is supposed to be writable during the build, and is + used to store many files recording the status of the build, + it is always better to force extraction into a subdirectory + anyway. + Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Mon Jul 6 09:26:34 2015 (r46928) +++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml Mon Jul 6 09:39:45 2015 (r46929) @@ -31,21 +31,16 @@ in &os;, DESTDIR has a different meaning (see ). - When a port still requires system-wide privileges in order - to run the stage and - package targets, this line must be - added to the - Makefile: - - NEED_ROOT= yes - - The vast majority of ports do not really - need to be root. It can mostly be avoided by - using USES=uidfix, - and from time to time by slightly patching the port's - Makefiles. + No port really needs to be root. It + can mostly be avoided by using USES=uidfix. + If the port still runs commands like &man.chown.8;, + &man.chgrp.1;, or forces owner or group with &man.install.1; + then use USES=fakeroot + to fake those calls. Sligh patching of the port's + Makefiles will be needed. Meta ports, or ports that do not install files themselves @@ -57,6 +52,13 @@ NO_MTREE= yes + + Metaports should use USES=metaport. + It sets up defaults for ports that do not fetch, build, or + install anything. + + Staging is enabled by prepending STAGEDIR to paths used in the pre-install, Modified: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Mon Jul 6 09:26:34 2015 (r46928) +++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml Mon Jul 6 09:39:45 2015 (r46929) @@ -407,7 +407,9 @@ (none) Changes some default behaviour of build systems to - allow installing as a user. + allow installing as a user. See for + more information on fakeroot.