[distcc] Monitor programs do not work with Portage/Gentoo Linux

Martin Pool mbp at samba.org
Tue Jun 24 04:10:58 GMT 2003


On 23 Jun 2003, Wayne Davison <wayned at users.sourceforge.net> wrote:
> On Mon, Jun 23, 2003 at 04:52:11PM +1000, Martin Pool wrote:
> > OK, this is done in CVS.  Would you be able to test it in the next day
> > or two before the release?
> 
> I'm running 2.8cvs at the moment and I've tried this out in gentoo.  The
> following command lets someone monitor emerge status (when run as
> "portage"):
> 
>     HOME=/var/tmp/portage/homedir distccmon-text

Thanks for working it out.  It's a bit gross though :-/

> 
> (assuming the default value of PORTAGE_TMPDIR).  If the user runs that
> as "root" when the directory already exists, they can also see status.
> However, if they run it as "root" when the directory does not yet exist,
> they can mess up status if they create the directory with root ownership
> and the portage user tries to write into it.
> 
> The following command would be safer to use, but only if the setting for
> 'portage's homedir (in /etc/passwd) has been fixed to the above value:
> 
>     sudo -H -u portage distccmon-text
> 

> Annoyance:  if the monitor process is re-scanning, it will die at the
> beginning and end of every ebuild because portage likes to clean out the
> entire "homedir" a lot.  This causes the monitor program to exit with an
> error if the state directory has vanished.

I guess it ought to just emit a warning or something.

> However, if people want to support long-running monitoring of a chain of
> ebuilds would require putting the state dir somewhere outside the home
> directory.  Perhaps we could allow the default location to be overridden
> with a DISTCC_STATEDIR environment variable.  Or, go back to putting it
> in the temp dir, and implement the DISTCC_TMPDIR suggestion in a way
> that overrides the TMPDIR setting instead of supplanting it.

But wouldn't ebuild want to override that for similar reasons to
setting TMPDIR?  I'd like to find out more about why it wants to
reassign it...

Perhaps it should really go in /var/state/distcc/something?

It might be nice to make all state visible across all users but there
might be some security problems.  Hm.

-- 
Martin 



More information about the distcc mailing list