Subject: Re: Details of most directories are missing from obj/METALOG
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 01/11/2002 15:18:08
Paul Goyette wrote:
>
> I think all the directories are created by mtree...
Now I have it....
./etc/Makefile:
${MTREE} -def mtree/NetBSD.dist -p ${DESTDIR}/ -U ${UNPRIVED:D-W}
usr.sbin/mtree/verify.c
...
if (mkdir(path, S_IRWXU))
...
else
create = 1;
...
if (!create || Wflag)
continue;
if (chown(path, p->st_uid, p->st_gid)) {
...
continue;
}
if (chmod(path, p->st_mode))
...
So the directories are initailly created 700, and the -W stops them
being
set to their sensible permissions.
Clearly the chown will fail if we aren't root.
So it doesn't really matter that they aren't in METALOG - since they are
in etc/mtree/NetBSD.dist. So can be created from there.
That leaves to alternate issues!
usr/include/fs is missing from NETBSD.dist
+ the others (below) which get into METALOG anyway...
(I now know the format of METALOG......)
David
> On Fri, 11 Jan 2002, David Laight wrote:
>
> > (Maybe I should post this to tech-toolchain instead...)
> >
> > Comparing the contents of obj/METALOG and $(DESTDIR) shows that
> > there are no entries in METALOG for almost all the directories.
> > (nothing else is missing).
> >
> > I don't know what is creating the directories, all but one
> > (drwxr-xr-x 3 dsl wheel 512 Jan 10 18:01
> > ./usr/bsd-current/dest/usr/include/fs)
> > have rxw------ permissions - which are not the default.
> >
> > The only directories in METALOG are:
> >
> > ./usr/bsd-current/dest type=dir mode=0755 uname=root gname=wheel
> > ./usr/bsd-current/dest/usr/include/fs/smbfs type=dir mode=0755
> > uname=root gname=wheel
> > ./usr/bsd-current/dest/usr/include/i386 type=dir mode=0755 uname=root
> > gname=wheel
> > ./usr/bsd-current/dest/usr/share/zoneinfo type=dir mode=0755 uname=root
> > gname=wheel
> > ./usr/bsd-current/dest/usr/share/zoneinfo/* type=dir mode=0755
> > uname=root gname=wheel
> >
> > I have a vague plan to use METALOG to set the permissions when I copy
> > stuff from destdir into the target root fs.
> >
> > David