Bug 247760 - rfe: add special ccache group and cache directory as well
Summary: rfe: add special ccache group and cache directory as well
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ccache
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-11 10:39 UTC by Andy Shevchenko
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 2.4-9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-13 15:02:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to specfile with all described ideas (1.98 KB, application/octet-stream)
2007-07-11 10:39 UTC, Andy Shevchenko
no flags Details
New patch (1.91 KB, patch)
2007-07-14 14:30 UTC, Andy Shevchenko
no flags Details | Diff

Description Andy Shevchenko 2007-07-11 10:39:13 UTC
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.

Comment 1 Andy Shevchenko 2007-07-11 10:39:13 UTC
Created attachment 158933 [details]
Patch to specfile with all described ideas

Comment 2 Ville Skyttä 2007-07-11 18:30:46 UTC
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).

Comment 3 Andy Shevchenko 2007-07-11 19:45:28 UTC
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.


Comment 4 Ville Skyttä 2007-07-11 20:25:47 UTC
(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
suffice.



Comment 5 Andy Shevchenko 2007-07-14 14:23:12 UTC
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.

Comment 6 Andy Shevchenko 2007-07-14 14:30:13 UTC
Created attachment 159269 [details]
New patch

Comment 7 Ville Skyttä 2007-07-21 10:05:58 UTC
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.

Comment 8 Ville Skyttä 2007-10-13 15:02:06 UTC
Done some time ago in 2.4-9


Note You need to log in before you can comment on or make changes to this bug.