Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868669 - PMS should specify umask settings in ebuild envs
Summary: PMS should specify umask settings in ebuild envs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 269064
  Show dependency tree
 
Reported: 2022-09-06 06:48 UTC by SpanKY
Modified: 2022-10-20 07:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild-format.tex: Document that umask is set to 022 (0001-ebuild-format.tex-Document-that-umask-is-set-to-022.patch,1.41 KB, patch)
2022-09-07 06:36 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2022-09-06 06:48:09 UTC
PMS is currently silent on umask settings.  seems like a glaring oversight when ebuilds rely on this via `cp` and such command.
Comment 1 Ulrich Müller gentoo-dev 2022-09-06 06:57:05 UTC
What do you suggest, and what does Portage do? umask 022 everywhere in the ebuild environment?
Comment 2 SpanKY gentoo-dev 2022-09-06 18:36:11 UTC
documenting `umask 022` as the execution environment seems like the only reasonable thing.  portage has been doing this "forever" afaict.

should also note that the umask is not preserved between phase functions and is always reset to the initial value.
Comment 3 Ulrich Müller gentoo-dev 2022-09-07 06:36:10 UTC
Created attachment 803665 [details, diff]
ebuild-format.tex: Document that umask is set to 022

Please review.
Comment 4 SpanKY gentoo-dev 2022-09-08 12:49:00 UTC
(In reply to Ulrich Müller from comment #3)

lgtm, thanks
Comment 5 Larry the Git Cow gentoo-dev 2022-10-20 07:06:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=2c69291b26fea14b6a93f1bf6b4f0bfd7f74f7b9

commit 2c69291b26fea14b6a93f1bf6b4f0bfd7f74f7b9
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2022-09-07 06:35:09 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-09-07 06:35:09 +0000

    ebuild-format.tex: Document that umask is set to 022
    
    Portage has been doing this since 2001.
    
    Closes: https://bugs.gentoo.org/868669
    Reported-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-format.tex | 3 +++
 1 file changed, 3 insertions(+)