bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fakeroot status


From: Marcus Brinkmann
Subject: Re: fakeroot status
Date: Sun, 12 May 2002 22:06:15 +0200
User-agent: Mutt/1.3.28i

On Sun, May 12, 2002 at 03:51:09PM -0400, Roland McGrath wrote:
> Definitely not.  I don't think you should use it for the debian version
> either.  That code is too young.  What we can do is make fakeauth use the
> underlying hurdish stuff directly instead of either fork or spawn.

Well, ok.  I will use my locally compiled glibc for a while, but it is
difficult to get it tested with hardly anything using posix_spawn.  So this
is an incentive for me to compile bash, make and gcc using posix_spawn and
give this code some testing.
 
> The way mig demuxing works, you have to choose at the subsystem granularity

Ok.

> I added a netfs_demuxer function in fakeroot.c that does the basic
> forwarding of unrecognized messages.  Modulo simple bugs, I think that will
> work for the socket servers.

Cool, I started implementing it when I noticed that it isn't too easy to
construct the mach_msg call from the inp.

I think I found a bug already, you use inp->msgh_local_port, but I think
inp->msgh_remote_port is the port local to the server (which I also used in
libpager/demuxer.c).  From mach/message.h:

 *  The msgh_remote_port field specifies the destination of the message.
 *  It must specify a valid send or send-once right for a port.
 *
 *  The msgh_local_port field specifies a "reply port".  Normally,
 *  This field carries a send-once right that the receiver will use
 *  to reply to the message.  It may carry the values MACH_PORT_NULL,
 *  MACH_PORT_DEAD, a send-once right, or a send right.

Likewise, I think that the msgh_local_port should be unchanged, so the
other server sends the reply directly to the user.

I have to think more about the problems that this doesn't solve.

> > The difference is that with fakeroot, you end up in the directory /,
> > whereas the fakeroot utility in GNU/Linux does not change your current
> > directory.
> 
> I made the --chroot option work like the chroot command does, which is to
> say chdir ("/") after the chroot.  I think the thing to do is just handle
> it in the subprocess.  i.e., run sh -c "cd `pwd`; ...".

This needs to be in utils/fakeroot.sh, then, so it always spawns a shell and
runs the command inside the shell after the cd.  Blech.  What I did as a
quick hack was to do the same on the user side (eg in dpkg-buildpackage),
and it seemed to work.

Thanks (going to test the demuxer changes),
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]