How can I setup a shared ccache without falling into a permissions problem?
I would like to run a nightly or CI build with latest changes and share all created binaries throughout the R&D using a large ccache repository.
How can I setup a shared ccache without falling into a permissions problem?
I would like to run a nightly or CI build with latest changes and share all created binaries throughout the R&D using a large ccache repository.
The easiest solution: create a new group (e.g. "devel"), and make all developers members of it. Give read/write permissions to that group on the directory hierarchy where the cache is maintained. The developers will also need to fix their umask.
If you also use the related distcc, then the permission problems would largely go away, as the compilations would be run under it's control on whatever compile-farm hosts you set.
You could also include the developers desktop machines among the distcc hosts, though at the expense of having some duplicated work where a file would potentially be compiled on more than one machine - though it would never return an out of date compiled object file. It would also speed up day to day recompilations.
See the newly written Sharing a cache section in ccache's manual. In essence, use the same CCACHE_DIR
setting, set CCACHE_UMASK
appropriately and consider using CCACHE_BASEDIR
.