I've written a simple ebuild and a supporting file that: * Creates portage user and group * Normalizes permissions and ownership of the eprefix, for a privileged install (to what extent I could test) The ebuild creates directories (which probably already exist, anyway) and sets permissions (which won't get overrided). The support shell script will, mostly non-recursively, fix up permissions for an existing install. Notes are given to the user about how to run the script, as well as suggestions for adding their main user to the portage group. Because of this, one can do things like "ebuild foo-1.ebuild digest" without the use of sudo. Reproducible: Always Steps to Reproduce:
Created attachment 182913 [details] the main ebuild
Created attachment 182914 [details] the main support file
Created attachment 182915 [details] a tar that contains the ebuild and support file in place
This bug depends on bug #259912, so I marked it as such.
hmmm, an ebuild to convert a prefix into a privileged one... doesn't it make more sense to just bootstrap a privileged one and fix up the baselayout-prefix ebuild where necessary?
Of course it does. :-) I did boot-strap a privileged tree, and my permissions where a mess, however. At least the fix-perms script might help.
hmmm, what kind of mess? Perhaps portage needs some tuning, and ebuilds need fixin'
* Files owned by root where owned as "root:admin", which on my system is 0:80, instead of 0:0, which is root:wheel. * EPREFIX/tmp and EPREFIX/var/tmp are chmod 1777 now * EPREFIX/usr/portage and EPREFIX/var/tmp/portage should be owned as portage:portage * I just realized that it should fix PORTDIR and not /usr/portage explicitly I think you're right though -- now that enewuser and enewgroup can work well, it'd be nice to create the portage user and group in baselayout (or where ever else appropriate), and make sure the permissions are set correctly. I would also like to create both /Applications and /Users (on OS X), and create as many of the default directories that make sense. In this regard, it might be useful to bind mount (not sure if OS X has this atm) /dev to EPREFIX/dev, as well, for e.g.