Subject: Re: DESTDIR support
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.maer.sieben@kh-22.de>
List: tech-pkg
Date: 03/25/2007 04:40:38
Joerg Sonnenberger wrote:
> On Mon, Oct 09, 2006 at 03:04:49PM +0200, Joerg Sonnenberger wrote:
> > Developers which want to modify existing packages should also try
> > USE_DESTDIR=	full
> > This makes the build completely unprivileged and in turn detects any
> > attempt to write e.g. to ${LOCALBASE}. This is not supported for actual
> > installation yet, due to short comings of pkg_create.
> 
> For the archive, this mostly works now. The biggest problem right now is
> that when a tarball contains foo/bar and bar is owned by user joe, tar
> creates foo with owner joe and not with user root. There's no easy way
> to avoid that though.

Does the last paragraph above still apply? From what I have seen (with
USE_DESTDIR=full and PKG_DESTDIR_SUPPORT=user-destdir) the files added
by pkg_add have correct permissions but all directories from those
packages belong to the local user who built the packages, eg

  drwxr-xr-x   6 pkgsrc  pkgsrc   512 Mar 25 04:04
    lib/perl5/vendor_perl//5.8.0/CGI/FormBuilder
  drwxr-xr-x   2 pkgsrc  pkgsrc   512 Mar 25 04:04
    lib/perl5/vendor_perl//5.8.0/CGI/FormBuilder/Field
  drwxr-xr-x   2 pkgsrc  pkgsrc   512 Mar 25 04:04
    lib/perl5/vendor_perl//5.8.0/CGI/FormBuilder/Messages
  drwxr-xr-x   2 pkgsrc  pkgsrc   512 Mar 25 04:04
    lib/perl5/vendor_perl//5.8.0/CGI/FormBuilder/Source
  drwxr-xr-x   2 pkgsrc  pkgsrc   512 Mar 25 04:04
    lib/perl5/vendor_perl//5.8.0/CGI/FormBuilder/Template
 

ciao
     Klaus