Hi, I was trying to install Gentoo Prefix on RHEL7.7 and got this message at stage 3: ``` Type here what you want to wish me [luck] luck * Bootstrapping Gentoo prefixed portage installation using * host: x86_64-pc-linux-gnu * prefix: /opt/risk/tmp/xz4a0b2/gentoo * ready to bootstrap stage3_log * Triggering Linux RAP bootstrap * running emerge -u system !!! Directory initialization failed: '/opt/risk/tmp/xz4a0b2/gentoo/var/lib/portage' !!! chown('/opt/risk/tmp/xz4a0b2/gentoo/var/lib/portage', -1, 250) !!! Directory initialization failed: '/opt/risk/tmp/xz4a0b2/gentoo/var/cache/edb' !!! chown('/opt/risk/tmp/xz4a0b2/gentoo/var/cache/edb', -1, 250) emerge: superuser access is required Hmmmm, I was already afraid of this to happen. Running /opt/risk/tmp/xz4a0b2/gentoo/bin/bash ./bootstrap-prefix.sh "/opt/risk/tmp/xz4a0b2/gentoo" stage3 somewhere failed :( Details might be found in the build log: (no build logs found?!?) I have no clue, really. Please find friendly folks in #gentoo-prefix on irc.gentoo.org, gentoo-alt@lists.gentoo.org mailing list, or file a bug at bugs.gentoo.org under Gentoo/Alt, Prefix Support. This is most inconvenient, and it crushed my ego. Sorry, I give up. Should you want to give it a try, there is /opt/risk/tmp/xz4a0b2/gentoo/stage3.log ``` there was another problem before this one, which is `portage: 'portage' user or group missing.` (also stage 3). I solved it by adding portage to `$(EPREFIX)/etc/passwd` and `$(EPREFIX)/etc/group`. I'm not sure whether this is related. My environment: Linux uit-algo-d-21 3.10.0-1062.18.1.el7.x86_64 #1 SMP Wed Feb 12 14:08:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
what user are you running this with? what are your numeric user and group ids?
@heroxbd: is there any user-mapping taking place in RAP?
Hi Fabian, The user running bootstrap script: ``` uid=12261(xz4a0b2) gid=10031(uit) groups=10031(uit),9978(uitew) ``` $(EPREFIX)/etc/passwd (masked) ``` xz4a0b2:x:12261:10031:xxxxxx:/home/ext/xz4a0b2:/bin/bash portage:x:250:250:portage:/var/tmp/portage:/bin/false ``` $(EPREFIX)/etc/group ``` uit:x:10031: portage::250:portage ``` $(EPREFIX)/etc/passwd and $(EPREFIX)/etc/group previously look like copies of /etc/passwd and /etc/group and didn't have portage. I replaced them by myself.
I'm not too familiar with how RAP deals with this, but it feels "weird". It feels like there should be no special users, Portage should pick up your user and group id. Do you even have a const_autotool.py in $EPREFIX/usr/lib/python3.8/site-packages/portage/const_autotool.py?
(In reply to Fabian Groffen from comment #4) > Do you even have a const_autotool.py in > $EPREFIX/usr/lib/python3.8/site-packages/portage/const_autotool.py? No, I don't Thank you very much for your instant help anyway!
typo fix in bug summary
Ok, for this someone from RAP should chime in here on what is supposed to happen. Your setup doesn't sound too weird to me.
I remember this is a portage bug. What's the permission bits of /opt/risk/tmp/xz4a0b2/gentoo?
*** This bug has been marked as a duplicate of bug 766417 ***
(In reply to Benda Xu from comment #8) > I remember this is a portage bug. What's the permission bits of > /opt/risk/tmp/xz4a0b2/gentoo? It's drwxrwxrwx and belongs to user xz4a0b2 group uit. (In reply to Benda Xu from comment #9) > > *** This bug has been marked as a duplicate of bug 766417 *** Thank you. I believe it's the same problem, except that I manually added portage to $EPREFIX/etc/passwd and $EPREFIX/etc/group. I am sorry for not reporting under the previous bug post although I did searched.