Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764821 - acct-user/distcc needs to create distcc user in portage group
Summary: acct-user/distcc needs to create distcc user in portage group
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-10 15:57 UTC by Mark G. Woodruff
Modified: 2021-01-11 18:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark G. Woodruff 2021-01-10 15:57:15 UTC
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.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-10 21:01:19 UTC
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?
Comment 2 Mark G. Woodruff 2021-01-11 15:03:10 UTC
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.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-11 15:08:09 UTC
Wait a minute.  Are you saying that you are putting ccache behind distcc, rather than the other way around?
Comment 4 Mark G. Woodruff 2021-01-11 15:58:45 UTC
Sorry, didn't mean to imply order: ccache is in front of distcc.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-11 16:05:08 UTC
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.
Comment 6 Mark G. Woodruff 2021-01-11 16:15:46 UTC
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.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-11 16:54:47 UTC
Could you link the wiki page you've mentioned?
Comment 8 Mark G. Woodruff 2021-01-11 17:29:33 UTC
https://wiki.gentoo.org/wiki/Distcc
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-11 18:13:55 UTC
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.