Bug 14132 - umask causes leakage of file modes into target packages
Summary: umask causes leakage of file modes into target packages
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 3.1.5
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 3.1.5
Assignee: Steve Sakoman
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-11-21 14:31 UTC by Richard Purdie
Modified: 2020-12-10 16:23 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2020-11-21 14:31:11 UTC
Depending on whether the host umask is 0002 or 0022, the permissions of files in the target packages changes. In particular for example, makedevs.c in makedevs-src. A more complete lists of leakage:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20201121-x10g6tpd/packages/diff-html/

This was illustrated with a new fedora33 worker bringup with a umask of 0002 instead of the usual 0022 of the other workers.

The issue is that package.bbclass copies in files using cpio but we don't appear to force the mode bits of debug/source files. fs-perms says:

# Cleanup debug src
/usr/src/debug		0755	root	root	true	-	root	root

Probably needs an fmode set? (the - above)
Comment 1 Richard Purdie 2020-11-25 11:57:25 UTC
This was fixed in master with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=670b1be774e19bbc0d4a93f4b7c1c5ba9efa7374
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=451af0105bc934c6be239a79821193139e49ab1a

but we probably want to backport these for gatesgarth and LTS?