Subject: Re: alternate pkg tree
To: None <tech-pkg@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 11/08/2002 23:46:30
On Fri, 8 Nov 2002 09:52:28 +0100, Julio Merino <jmmv@menta.net> wrote:
> On Thu, 7 Nov 2002 21:26:05 -0500
> "James K. Lowden" <jklowden@schemamania.org> wrote:
> 
> > I've left out some things, not least of which is X11 and /etc.  Maybe
> > chroot(8) is an answer here, but as I'm a friend of the environment
> > and have no experience as warden, I'm hoping some combination of
> > pkgsrc magic can accomplish what I'm trying to do.  
> 
> Take a look to pkgtools/pkg_comp too. You can set it up to build a set
> of packages in a chroot tree and then use pkg_add to add them to your
> real tree.

Julio, 

Thanks for the pointer.   I installed pkg_comp.  I think you and I have
different notions of "easy", but that's not the point.  It might do what I
want; I'm still trying to understand it.  

I found a few flies in the man page ointment, which I've set to cleaning
up and will send-pr.  But I came across this and really don't know how to
interpret it.  Could you clarify?  
 
     These file systems are mounted before entering the chroot and
unmounted
     after exiting.  In order to know if file systems are mounted or not,
the
     program uses a temporary file, called
$DESTDIR/pkg_comp/tmp/mount.stat,
     which controls the number of pkg_comp processes using the chroot
environ-
     ment.  

with you so far, then:

             If some of them crashes unexpectedly and you notice it does
not
     try to unmount the file systems, this status file may get out of
sync.

Would it be accurate to say, "If a build process crashes, this status file
may get out of sync, leaving some filesystems mounted."?   

I do not understand:

     Be sure to check if NO file systems are mounted when issuing a
     removeroot.

Does that mean that no filesystems should remain mounted after a
"removeroot"?  Because 
the removeroot target says it "will take care to umount needed mount
points".

Regards, 

--jkl