Bug 247760 - rfe: add special ccache group and cache directory as well
rfe: add special ccache group and cache directory as well
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ccache (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-11 06:39 EDT by Andy Shevchenko
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 2.4-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-13 11:02:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Andy Shevchenko 2007-07-11 06:39:13 EDT
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 06:39:13 EDT
Created attachment 158933 [details]
Patch to specfile with all described ideas
Comment 2 Ville Skyttä 2007-07-11 14:30:46 EDT
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 15:45:28 EDT
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 16:25:47 EDT
(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 10:23:12 EDT
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 10:30:13 EDT
Created attachment 159269 [details]
New patch
Comment 7 Ville Skyttä 2007-07-21 06:05:58 EDT
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 11:02:06 EDT
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.