| Summary: | Prevent portage from adjusting permissions every time on AFS/NFSv4 mounted distfiles | ||
|---|---|---|---|
| Product: | Portage Development | Reporter: | Petr Polezhaev <NightNord> |
| Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | Keywords: | InVCS |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Bug Depends on: | |||
| Bug Blocks: | 94133 | ||
| Attachments: | Patch for /usr/lib/portage/pym/portage/__init__.py | ||
|
Description
Petr Polezhaev
2008-07-29 18:15:40 UTC
Created attachment 161643 [details, diff]
Patch for /usr/lib/portage/pym/portage/__init__.py
More cornercase FEATURES bloat ... It seems a better alternative would be to let the user set the perms on distdir in a var and just reset them to those perms; with the caveat that the user could possibly stab themselves in the foot with retarded permissions. I would prefer that over some randomly named FEATURE. I think we can make it work automatically, without any extra config (though some config variable like that suggested in comment #3 might be useful in some cases). The main use cases for the permissions code that I see are: 1) Initial creation, when the directory doesn't yet exist. This is easy to handle. Simply create dir and apply permissions. 2) Directory already exists, but may not have correct read/write permission in order for userfetch and userpriv FEATURES to function. I this case we only need to touch permissions if it's and issue when dropping privileges (like the user has just added userpriv to FEATURES). We can spawn mktemp or similar, to test read/write access dropped privileges. This test only has to be done for the first fetch and the result can then be cached in a private global variable. There is some issues. AFS set files' uids to it's internal ASF IDs, but, when you create new file (it located in cache) - it's uid set to your system id, so, actually, there is always different permissions on files. Maybe it will be better to check permissions only when it needed by some other features (comment #4) (when you use AFS, you need to switch off 'userfetch') This should be fixed by the patch attached to bug 94133. This is fixed in 2.2_rc6. |