Hi gentoo devs,
This question is regarding interaction of fowners [1] and estrip functionality in portage.
fowners is used on various binaries and files to assign the ownership to specific users or group.
GNU objcopy and strip do not change the file ownership when run as root. However, llvm's versions do not preserve it and instead make root the owner of the modified file.
e.g.
sudo strip <file> keeps the original ownership .
sudo llvm-strip <file> will change ownership to root.
We have modified the LLVM patch to avoid chown on the final file and rather doing it on the temporay file but I am not sure if that will be enough to placate the llvm devs.
What does everyone think of modifying usages of calls to strip and objcopy inside estrip so that file ownership is manually restored. e.g
owner=$(stat -U file)
group=$(stat -G file)
strip <file>
chown owner:group file
Thanks,
Manoj