When distcc is used with ccache, if the distcc user is not also in the portage group, programs such as genkernel fail with permissions problems creating locks in the cache directory.
I'm sorry but I'm confused. Are you talking of running genkernel or building it? Could you maybe attach some console log to help me understand this better? FWICS the old ebuild didn't do this. Is this documented somewhere?
Running genkernel. There's a persistent problem with cache permissions with portage+ccache+distcc. The wiki indicates to create the cache at /var/cache/ccache, which the distcc user doesn't have write access to. Creating the initial subdirectories is a workaround for portage, but fails for genkernel, which does some compilations as the portage user instead. Adding distcc to the portage group solves the problem. I can put together a test case later today.
Wait a minute. Are you saying that you are putting ccache behind distcc, rather than the other way around?
Sorry, didn't mean to imply order: ccache is in front of distcc.
Now I'm confused which side front is. Technically, distcc should run the actual compiler which should not require write access to any directory. In fact, e.g. fedora runs distccd as nobody. I presume it's the other way around on your system, i.e. distcc server is maintaining a ccache of its work.
In order for distcc to maintain cache coherency between nodes, it has to lock parts of the cache, so it requires write access to create the lock files.
Could you link the wiki page you've mentioned?
https://wiki.gentoo.org/wiki/Distcc
This doesn't seem like an abuse of portage group. As such, the instructions should probably mention using ACCT_USER_DISTCC_GROUPS_ADD to add the group membership locally. I don't think this should be the default.