Red Hat Bugzilla – Bug 247760
rfe: add special ccache group and cache directory as well
Last modified: 2007-11-30 17:12:10 EST
Description of problem:
After install ccache the tool is allowed for anyone of the local user. In such
case the users have their own cache directory. The proposition is to add
special ccache group to dividing users on two classes who can and can't use
system cache directory by including in the special group like ccache.
The common system cache directory is used in conjunction with ccache group.
Version-Release number of selected component (if applicable):
Last Fedora releases.
Please, review attached patch that also includes the zsh ccache script.
Created attachment 158933 [details]
Patch to specfile with all described ideas
While the idea is nice, at least worth exploring, the implementation needs some
work - see "SHARING A CACHE" in the ccache man page. Also, the group should not
be deleted in the package's scriptlets, I don't see a reason for a static gid
mapping for the group.
About the zsh profile.d script: what is it used for? I don't use zsh but a
brief look into /etc/zprofile and /etc/zshrc reveals that they appear to be
sourcing the usual /etc/profile and /etc/profile.d/*.sh (not /etc/profile.d/*.zsh).
As I understand correctly the two things shoud be added to my proposition:
- Set the CCACHE_NOLINK environment variable
- Make sure everyone sets the CCACHE_UMASK environment variable to 002,
this ensures that cached files are accessible to everyone in the group.
The group deleting and zsh script is a noise in the patch. It was maked for
old versions of the zsh.
Also we need to reserve group in the Fedora Extras grouplist (I don't remember
exactly its URL) with number more than 300.
(In reply to comment #3)
> Also we need to reserve group in the Fedora Extras grouplist (I don't remember
> exactly its URL) with number more than 300.
As said, I see no reason for that. Plain dynamic "groupadd -r ccache" should
Ah, I miss those words in the first your comment. Yes, I agree with dynamical
group id for shared cache group.
Also, I provide a new one patch.
Created attachment 159269 [details]
That patch looks better, however it introduces some bugs: scripts in
/etc/profile.d/ are sourced, not executed, so they do not need a shebang and
should not be executable.
No need to submit another patch, I'll work from this one.
Done some time ago in 2.4-9