Subject: Re: UNPRIVED & DESTDIR
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 05/13/2002 17:26:22
On Mon, May 13, 2002 at 10:20:35AM -0400, Todd Vierling wrote:
> On Fri, 3 May 2002, Luke Mewburn wrote:
> 
> : (For what it's worth, rather than writing a script to parse the
> : METALOG, you can use mtree(8) -D with a little bit of awk magic to
> : replace the majority of what you've done.)
> 
> Wouldn't "pax -r -w -pe -M ..." do the job too?  :)

No because:

1) the files in DESTDIR for an UNPRIVED build do not have the
   permissions applied (because you wouldn't be able to overwrite them,
   and some need to be suid root, not suid build-user).
2) the filenames in METALOG are all preceeded by the absolute
   pathname of DESTDIR.

Well, when I wrote the scrite Luke hadn't made the version of mtree
that handles all the entry types genarally available....
I don't rmember seeing a cross reference to pax when reading
the man pages either :-(
(but the copy I had access to wouldn't have handles the METALOG
files from build either).

I've also got a script to merge two (sorted) metalog files...

FWIW there is still a bug in the METALOG file - the permissions
for archive libraries are incorrect [1].  pax won't find this
because it leaves the existing permissions on existing files.

[1] IIRC the files are installed with 0600 permissions, ranlib
is run, then the requested permissions applied - probably to
ensure ranlib has write access.


	David

-- 
David Laight: david@l8s.co.uk