Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 822936 - bootstrap-prefix.sh - portage.exception.OperationNotPermitted: chown('/nas/weka.zone/resources/tools/apps/software/bio/gentoo/var/lib/portage', -1, 0)
Summary: bootstrap-prefix.sh - portage.exception.OperationNotPermitted: chown('/nas/we...
Status: CONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-10 15:52 UTC by Pietro
Modified: 2021-11-19 14:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
error output (stage3-fails.txt,17.38 KB, text/plain)
2021-11-10 15:54 UTC, Pietro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro 2021-11-10 15:52:51 UTC
Hello, 

I am trying to bootstrap Gentoo prefix on a HPC cluster part of an AD domain, but fails some 50%(I guess) into the stage 3. The error is not very clear to me but hints to a possible permission problem. While the error is different, and I may be wrong, but it sounds as if it could be related to this bug https://bugs.gentoo.org/777303.

Please do let me know if you need additional information from me.

Regards,
Pietro

Reproducible: Always

Steps to Reproduce:
${EPREFIX}/bootstrap-prefix.sh ${EPREFIX} stage3
Comment 1 Pietro 2021-11-10 15:54:02 UTC
Created attachment 750195 [details]
error output
Comment 2 Pietro 2021-11-10 16:05:38 UTC
Also, $EPREFIX/etc/passwd does have my username.

>>>
(base) pietro@003:~$ tail -1 $EPREFIX/etc/passwd
pietro@corp.ac:*:43009:5000:pietro:/home/pietro:/bin/bash
(base) pietro@003:~$
<<<

Thanks
Comment 3 Guilherme Amadio gentoo-dev 2021-11-15 08:09:17 UTC
Im my commit to try to address this issue [1], I used getent to fill passwd and group with the current user/group. However, that doesn't seem to solve your case, as your username appears to be your email in passwd. I think that if you just replace pietro@corp.ac with pietro in ${EPREFIX}/etc/passwd, then portage should recognize your username and the bootstrap process will finish. We should probably look into exporting environment variables in the bootstrap instead, to avoid this issue, or at least document better the caveats of trying to bootstrap with a user managed centrally.

1. https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d39c38ea123c5eaea7f06c1cde0a47ec4d58807d
Comment 4 Pietro 2021-11-18 10:08:58 UTC
Hello, removing the domain name from the user in $EPREFIX/etc/passwd did the trick. Thanks Guilherme
Comment 5 Guilherme Amadio gentoo-dev 2021-11-18 10:28:34 UTC
What does "id -un" return for you? I think I will just change the script to add the line to passwd using that rather than getent, so that others don't encounter the same problem.
Comment 6 Pietro 2021-11-18 11:36:00 UTC
(base) pietro@003:~$ id -un
pietro@corp.ac
(base) pietro@003:~$
Comment 7 Guilherme Amadio gentoo-dev 2021-11-18 11:39:29 UTC
I guess we need to use $USER, then, that should not have the domain name, right?
Comment 8 Pietro 2021-11-19 14:07:52 UTC
Sadly it does
(base) pietro@003:~$ echo $USER
pietro@corp.ac
(base) pietro@003:~$