We have some packages that install files u-w to the filesystem (not writable by owner). This looks like a bug. While the issue is not immediately noticeable since usually all write operations on those files (e.g. stripping) are done as root. However, this is upstream issue that will eventually cause some random failures. For example, this will fail if the whole build & install is done as unprivileged user. Or when SELinux (without dac_override) is effective [pointed out by perfinion].
Can you provide an explanation we can copy/paste for upstream bug reports please?
This is an issue that does not seem to affect installation from most upstream sources. install(1) from coreutils unlinks the destination file if it exists; therefore, the mode of the installed file does not matter at all. Perhaps portage should be adjusted to unlink existing files when merging them onto ROOT if it does not do so already.
> While the issue is not immediately noticeable since usually all write operations on those files (e.g. stripping) are done as root. Oh, I see. We are talking about operations that may also be performed during/after src_install, not necessarily during the merge phase.