Summary: | Unified EVCS_UMASK for live eclasses to handle umask of files checked to distfiles subdir | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mart Raudsepp <leio> |
Component: | Eclasses | Assignee: | Ulrich Müller <ulm> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | djc, junghans, mgorny, vapier |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=311101 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Mart Raudsepp
2014-01-11 16:26:26 UTC
Example implementation is in subversion.eclass: # @ECLASS-VARIABLE: ESVN_UMASK # @DESCRIPTION: # By setting this to something like 002, it can make life easier for people # who do development as non-root (but are in the portage group), and then # switch over to building with FEATURES=userpriv. Or vice-versa. Shouldn't # be a security issue here as anyone who has portage group write access # already can screw the system over in more creative ways. ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}" and in the fetch function: if [[ -n "${ESVN_UMASK}" ]] && eumask_push "${ESVN_UMASK}" # ... fetch operations done here if [[ -n "${ESVN_UMASK}" ]] && eumask_pop CCing maintainers of bzr, cvs, darcs, git-r3, and mercurial eclasses. Just to be clear, is there a point in setting this to something else than 002? If we're all in agreement over 002, I think plaing eumask_push 002 would be cleaner. Especially that I'd expect future src_fetch() phase to handle umask. Then, git-r3 would behave differently on EAPI -- respect EVCS_UMASK in EAPI 5, and rely on portage choice of umask in EAPI 6+. (In reply to Michał Górny from comment #2) > Just to be clear, is there a point in setting this to something else than > 002? If we're all in agreement over 002, I think plaing eumask_push 002 > would be cleaner. Some people have 027 as default umask, and I guess they would prefer 007. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3880bcae6b796a9662e7a394edb68ae9c9762c2 commit a3880bcae6b796a9662e7a394edb68ae9c9762c2 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-09-02 13:48:58 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-09-09 08:10:27 +0000 bzr.eclass: Respect the EVCS_UMASK variable. Bug: https://bugs.gentoo.org/497798 Signed-off-by: Ulrich Müller <ulm@gentoo.org> eclass/bzr.eclass | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) |