On a Gentoo systems, lets say I have a lot of my homemade components with one ebuild each (normal case), and I want to apply default permissions on files at installation phase.
Is there a way to automatically set/configure default permissions on installed files, without modifying each ebuild file? Is it possible to do this globally (one modification working for all ebuilds)?
I came across "libopts", "diropts", "exeopts", etc.., but it requires to modify each ebuild to set my own default permissions.
bashrc to the rescue! This file is sourced before each phase of the build runs. The phase you're interested in is called
preinst. This phase will run before installing the data to disk. So your code could look like:NOTE: the code is not tested, use at your own risk