Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2009 16:31:06 +0100
From:      Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@spoerlein.net>
To:        Tijl Coosemans <tijl@coosemans.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: New version of the fakeroot patch
Message-ID:  <20091224153106.GB75594@acme.spoerlein.net>
In-Reply-To: <200912241322.41402.tijl@coosemans.org>
References:  <20091214151318.GC1016@wicklow.lan> <200912151000.19393.tijl@coosemans.org> <20091224054302.GA75594@acme.spoerlein.net> <200912241322.41402.tijl@coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24.12.2009 at 13:22:40 +0100, Tijl Coosemans wrote:
> On Thursday 24 December 2009 06:43:02 Ulrich Spörlein 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?
> >>> 
> >>> 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.
> >> 
> >> If you want to create ${PREFIX}/somedir you can add this line
> >> to pkg-plist:
> >> 
> >> @exec mkdir -p %D/somedir
> > 
> > ... 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.

For me, pkg_create does not even add non-empty directories to the tar,
just the files. Case in point: games/bsdgames

1. Remove all "chmod" calls in pkg-plist (won't affect install target)
2. make package
3. find /var/games -ls > /tmp/dir.port
4. pkg_delete bsdgames-\*
5. rm -rf /var/games
6. pkg_add /usr/ports/packages/All/bsdgames-2.4_1,1.tbz
7. find /var/games -ls > /tmp/dir.pkg
8. Compare and find out that all directories have 0755, which is wrong.

Or simply run tar tvf on the package and see all files, but no
directories.

Adding the directory itself to the PLIST would work, but then everything
under /var/games would get sucked up by pkg_create, no matter if it's
relevant or not. (Cpio would have that feature ...)

Tricky, huh?

Regards,
Uli



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