From owner-freebsd-ports@FreeBSD.ORG Sun Apr 6 08:15:22 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F09AE37B401; Sun, 6 Apr 2003 08:15:21 -0700 (PDT) Received: from tomts9-srv.bellnexxia.net (tomts9.bellnexxia.net [209.226.175.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1BAC43F75; Sun, 6 Apr 2003 08:15:20 -0700 (PDT) (envelope-from dmagda@magda.ca) Received: from number6.magda.ca ([64.229.177.20]) by tomts9-srv.bellnexxia.netESMTP <20030406151520.NPWP17120.tomts9-srv.bellnexxia.net@number6.magda.ca>; Sun, 6 Apr 2003 11:15:20 -0400 Received: from number6.magda.ca (localhost.magda.ca [127.0.0.1]) by number6.magda.ca (8.12.9/8.12.7) with ESMTP id h36FFJH2065222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Apr 2003 11:15:19 -0400 (EDT) (envelope-from dmagda@magda.ca) Received: (from dmagda@localhost) by number6.magda.ca (8.12.9/8.12.7/Submit) id h36FFJNj065221; Sun, 6 Apr 2003 11:15:19 -0400 (EDT) (envelope-from dmagda) Date: Sun, 6 Apr 2003 11:15:19 -0400 From: David Magda To: ports@freebsd.org Message-ID: <20030406151518.GB65167@number6.magda.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i cc: doc@freebsd.org Subject: suggestion for copying files: use cpio(1) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Magda List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 15:15:22 -0000 Hello, A suggestion for general Ports policy and for the Porter's handbook. Can you suggest/encourage the use of cpio(1) to copy file from one directory to another? Many ports use tar(1) or cp(1) which can sometimes lead to unexpected results. For paranoia reasons, I tend to build all my ports as a regular, non-priviledged user, and then do a 'make install' as root. If a port uses tar(1) or cp(1) then the installed files are owned by the building user. I personally think this is Not Good. An example of what I think is good would be the www/mozilla port: [...] do-install: ${MKDIR} ${PREFIX}/lib/${MOZILLA} ${CHMOD} 755 ${PREFIX}/lib/${MOZILLA} cd ${WRKSRC}/dist/bin && ${FIND} . | \ cpio -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA} [...] The '-R' option makes sure that the proper permissions are set, but also makes them user-definable through the variables that are used. Just a suggestion. -- David Magda Because the innovator has for enemies all those who have done well under the old conditions, and lukewarm defenders in those who may do well under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI