Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2009 13:22:40 +0100
From:      Tijl Coosemans <tijl@coosemans.org>
To:        Ulrich =?iso-8859-1?q?Sp=F6rlein?= <uqs@spoerlein.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: New version of the fakeroot patch
Message-ID:  <200912241322.41402.tijl@coosemans.org>
In-Reply-To: <20091224054302.GA75594@acme.spoerlein.net>
References:  <20091214151318.GC1016@wicklow.lan> <200912151000.19393.tijl@coosemans.org> <20091224054302.GA75594@acme.spoerlein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912241322.41402.tijl>