From owner-freebsd-ports@FreeBSD.ORG Thu Dec 24 12:22:44 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 3EF511065672 for ; Thu, 24 Dec 2009 12:22:44 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id D1A6C8FC1B for ; Thu, 24 Dec 2009 12:22:43 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAD7rMktQyRec/2dsb2JhbACBStMMhDME Received: from 156.23-201-80.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([80.201.23.156]) by relay.skynet.be with ESMTP; 24 Dec 2009 13:22:42 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.3/8.14.3) with ESMTP id nBOCMft0003340; Thu, 24 Dec 2009 13:22:41 +0100 (CET) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: Ulrich =?iso-8859-1?q?Sp=F6rlein?= Date: Thu, 24 Dec 2009 13:22:40 +0100 User-Agent: KMail/1.9.10 References: <20091214151318.GC1016@wicklow.lan> <200912151000.19393.tijl@coosemans.org> <20091224054302.GA75594@acme.spoerlein.net> In-Reply-To: <20091224054302.GA75594@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200912241322.41402.tijl@coosemans.org> 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: Thu, 24 Dec 2009 12:22:44 -0000 On Thursday 24 December 2009 06:43:02 Ulrich Sp=F6rlein wrote: > On Tue, 15.12.2009 at 10:00:18 +0100, Tijl Coosemans wrote: >> On Tuesday 15 December 2009 09:10:47 Matthew Seaman wrote: >>> Uh -- is it actually possible to create an empty directory when >>> installing from a pkg tarball? >>>=20 >>> I ran into this problem with the phpMyAdmin port, and the only good >>> way I found to solve it was to add a stub file into any empty >>> directories. You could use a post install script or an mtree file, >>> but that seems like overkill for such a trivial operation. >>=20 >> If you want to create ${PREFIX}/somedir you can add this line >> to pkg-plist: >>=20 >> @exec mkdir -p %D/somedir >=20 > ... and then you still need to chmod/chown to fix permissions. I > wonder why that doesn't work with tar. Is that a limitation of the > format, should we perhaps use cpio (with bsdtar, it would be > transparent anyway). Ownership and permissions are restored by tar. It's just that empty directories aren't added to the archive by pkg_create. Also, if you have to change ownership/permissions you should be careful not to create any race conditions where too many permissions are given to the wrong users. Removing permissions should happen before chown and adding permissions should happen after chown.