Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913856 - dev-lang/python-3.11.5: bootstrap-prefix.sh stage3 fails (on unknown)
Summary: dev-lang/python-3.11.5: bootstrap-prefix.sh stage3 fails (on unknown)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-08 09:36 UTC by APN-Pucky
Modified: 2023-09-23 11:37 UTC (History)
3 users (show)

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


Attachments
full_stage3_STABLE_generic_gentoo_20230908074600.log.xz (full_stage3_STABLE_generic_gentoo_20230908074600.log.xz,914.96 KB, application/x-xz)
2023-09-08 09:36 UTC, APN-Pucky
Details
build_stage3_STABLE_generic_gentoo_20230908074600.log.xz (build_stage3_STABLE_generic_gentoo_20230908074600.log.xz,38.41 KB, application/x-xz)
2023-09-08 09:36 UTC, APN-Pucky
Details
full_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz (full_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz,912.45 KB, application/x-xz)
2023-09-10 09:13 UTC, APN-Pucky
Details
build_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz (build_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz,38.68 KB, application/x-xz)
2023-09-10 09:13 UTC, APN-Pucky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description APN-Pucky 2023-09-08 09:36:00 UTC
System:
Vagrant 2.3.7
generic_gentoo STABLE prefix
Linux gentoo.localdomain 6.1.19-gentoo #1 SMP PREEMPT_DYNAMIC Wed Mar 29 09:46:04 PDT 2023 x86_64 Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz GenuineIntel GNU/Linux

Steps to reproduce the bug:
Run the bootstrap-prefix.sh in mode STABLE (default STABLE) for stage3 (lower ones before)

Error message:
somewhere failed :(  Details might be found in the build log:
  /home/vagrant/gentoo-prefix/var/tmp/portage/dev-lang/python-3.11.5/temp/build.log
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 /home/vagrant/gentoo-prefix/stage3.log

  CHOST:     x86_64-pc-linux-gnu
  IDENT:     x86_64-rap-linux-gentoo

Extra info:
https://github.com/APN-Pucky/gentoo-prefix-tester/actions/runs/6118393026
Comment 1 APN-Pucky 2023-09-08 09:36:00 UTC
Created attachment 870077 [details]
full_stage3_STABLE_generic_gentoo_20230908074600.log.xz
Comment 2 APN-Pucky 2023-09-08 09:36:01 UTC
Created attachment 870078 [details]
build_stage3_STABLE_generic_gentoo_20230908074600.log.xz
Comment 3 APN-Pucky 2023-09-10 09:13:36 UTC
System:
Vagrant 2.3.7
generic_ubuntu1804 STABLE prefix
Linux ubuntu1804.localdomain 4.15.0-208-generic #220-Ubuntu SMP Mon Mar 20 14:27:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce the bug:
Run the bootstrap-prefix.sh in mode STABLE (default STABLE) for stage3 (lower ones before)

Error message:
somewhere failed :(  Details might be found in the build log:
  /home/vagrant/gentoo-prefix/var/tmp/portage/dev-lang/python-3.11.5/temp/build.log
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 /home/vagrant/gentoo-prefix/stage3.log

  CHOST:     x86_64-pc-linux-gnu
  IDENT:     x86_64-rap-linux-ubuntu18.04

Extra info:
https://github.com/APN-Pucky/gentoo-prefix-tester/actions/runs/6135520100
Comment 4 APN-Pucky 2023-09-10 09:13:37 UTC
Created attachment 870250 [details]
full_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz
Comment 5 APN-Pucky 2023-09-10 09:13:38 UTC
Created attachment 870251 [details]
build_stage3_STABLE_generic_ubuntu1804_20230910072831.log.xz
Comment 6 APN-Pucky 2023-09-17 12:33:37 UTC
On both gentoo and ubuntu the complaint is:

 * eprefixing shebang of home/vagrant/gentoo-prefix/usr/bin/python3.11-config
 * QA Notice: the following files use invalid (possible non-prefixed) shebangs:
 *   /home/vagrant/gentoo-prefix/etc/init.d/pydoc-3.11:/sbin/openrc-run (script pydoc-3.11 installed in PATH but interpreter /sbin/openrc-run not found)
 * ERROR: dev-lang/python-3.11.5::gentoo failed:
 *   Aborting due to QA concerns: invalid shebangs found

Connected to https://github.com/gentoo/prefix/blob/master/dev-lang/python/files/pydoc.init ?
Comment 7 APN-Pucky 2023-09-17 12:38:40 UTC
Seems like a duplicated of https://bugs.gentoo.org/911999, which might/should be fixed since last month.
Comment 8 Fabian Groffen gentoo-dev 2023-09-19 08:45:41 UTC
seeing this issue too
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-19 08:48:34 UTC
not again.. :(
Comment 10 Fabian Groffen gentoo-dev 2023-09-19 08:50:07 UTC
I don't think openrc would be installed on Prefix targets, if it is, it seems hprefixify call or something is missing, but wasn't the intended fix to ignore openrc stuff from Portage's QA check?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-19 08:53:59 UTC
The intention in bug 640658 seems to have been to autofix them instead.

I don't really get why it's failing here but for /etc/init.d/*, I don't think it's serious enough to abort installation at all.

idk if you want to spend time trying to figure out why it's failing all of a sudden or not, but it'd wfm to just downgrade the severity for init scripts given it's a miracle if they work on prefix anyway?
Comment 12 Fabian Groffen gentoo-dev 2023-09-19 08:58:09 UTC
I have a ubuntu bootstrap that failed here, I'll take a look later what's going on.
Comment 13 Fabian Groffen gentoo-dev 2023-09-19 09:20:22 UTC
Ok, so this is stage3, and the first time sys-apps/portage gets installed.  Python is a dep for that.  So the portage in use that does this is the bootstrapped portage, e.g. vanilla 3.0.49.
Comment 14 Artemis Everfree 2023-09-19 10:02:23 UTC
(In reply to Sam James from comment #11)
> The intention in bug 640658 seems to have been to autofix them instead.

the autoprefixing does work! the reason this is failing is because the autoprefixing has specific behavior to check if the interpreter actually exists in the prefix, and in this case it does not. The logic is

- oh a script in init.d, lets check it
- Ah, a shebang
- the shebang points to /sbin/openrc-run
- does ${EPREFIX}/sbin/openrc-run actually exist?
  - nope! :(
- QA ERR!

so i think the reason this is suddenly failing is actually because of 640658. there was existing autoprefixing logic that would run on things in PATH but not run on init scripts at all. 640658 makes it run on init scripts in the same way that it was already running for things on PATH. so now it is autoprefixing this init script, when previously it was not. but the init script references a /sbin/openrc-run that has not yet been installed during the bootstrap process, and QA gets annoyed about this
Comment 15 Fabian Groffen gentoo-dev 2023-09-19 10:36:26 UTC
Wow.

So, simplest thing I can think of is to just provide a dummy /sbin/openrc-run, to make the check happy.  I seem to recall we used to do that at some point.
Comment 16 Fabian Groffen gentoo-dev 2023-09-23 07:37:44 UTC
bug #858596 explains why e.g. Darwin bootstraps are not affected, since baselayout provides openrc-run for non-RAP installs.  Testing (yet another) fix for RAP targets.
Comment 17 Larry the Git Cow gentoo-dev 2023-09-23 11:07:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b0b5e39f1247c3cae5c8d4618a20d396cf70937d

commit b0b5e39f1247c3cae5c8d4618a20d396cf70937d
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2023-09-23 11:03:54 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2023-09-23 11:03:54 +0000

    scripts/bootstrap-prefix: fix RAP stage3 on python due to init.d script
    
    Portage enforces init.d scripts must have a valid shebang, which means
    openrc-run must exist on the system.  For RAP-systems this script is to
    be provided by openrc (in contrast to baselayout for non-RAP Prefix
    systems), however during bootstrap openrc is not pulled in, and in
    reality it never is.  So provide a dummy openrc-run in the RAP path for
    stage3 before python or rsync are pulled in, such that Portage's QA
    check is happy about their init.d scripts.
    
    Closes: https://bugs.gentoo.org/913856
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 scripts/bootstrap-prefix.sh | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-23 11:37:07 UTC
thanks grobian; might call in an exorcist so this one doesn't come back as well, for good measure