Subject: Re: strange permissions difference between /var/db/pkg and the package archive
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <woods@most.weird.com>
List: tech-pkg
Date: 04/21/1999 14:56:12
[ On Wednesday, April 21, 1999 at 13:24:02 (-0400), Greg A. Woods wrote: ]
> Subject: Re: strange permissions difference between /var/db/pkg and the package archive
>
> Hmmm....  That's wrong, isn't it?  There is an +INSTALL file already in
> /var/db/pkg on the build machine, though of course keeping +INSTALL on
> the binary machine will kind of round out this feature.
> 
> I'll try sorting this out and send-pr'ing a patch that'll fix this -- it
> should be trivial to make it do the right thing, which will also fix the
> problem of not having the +INSTALL script on the binary machines.  I'm
> getting quite a bit behind on tracking pkgsrc though, so perhaps I
> should put this off until I get a chance to update to the latest again...

Hmmm....  Looks like these are totally separate issues, but both have
solutions in pkg_add(), not bsd.pkg.mk as I thought earlier.

The best solution I can see for the ownership problem is to have pkg_add
simply do the equivalent of "chmod -R root.wheel /var/db/pkg/${PKGNAME}"
just before it finishes.

As for fixing pkg_add so that it keeps all the right files, i.e.
+INSTALL and +MTREE, in /var/db/pkg/, that looks simple -- just don't
unlink() them and then if they exist: move_file(".", *_FNAME, LogDir);

In fact they probably shouldn't be unlinked if they fail either.

I could send-pr this, but without a patch -- it'll be after 1.4 before I
get a chance to update my source tree to -current again and can easily
make and *test* such patches.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>