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

Wayne Davison wayned at users.sourceforge.net
Mon Jun 23 16:55:55 GMT 2003


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

(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.

So, this is certainly better than before where the user had to know what
ebuild was running and try to set the value of TMPDIR to the custom
ebuild value -- the same monitor command can work for all ebuilds.

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.

..wayne..



More information about the distcc mailing list