Skip to content

Conversation

@schmonz
Copy link

@schmonz schmonz commented Mar 14, 2022

This isn't mergeable as is, so don't worry that I don't have a signed contributor agreement. :-) But it's probably close enough for you to commit something that solves the problem.

The problem: on a platform where /bin/sh doesn't suffice for pkgsrc bootstrap and pkg_comp tries to find a bash, it's possible-to-likely that the host system has all of these properties:

  1. pkgsrc has been bootstrapped (presumably that's how we got pkgtools/pkg_comp installed)
  2. pkgsrc paths are early in $PATH, so that pkgsrc tools are found before system-provided ones
  3. shells/bash has been installed

In such cases, pkg_comp currently detects and chooses e.g. /usr/pkg/bin/bash as ${bootstrap_sh}. At some point early in the bootstrap, some build or other fails (one of the libnbcompat I think) because it's trying to run /usr/pkg/bin/bash, which is not available in the sandbox.

My change is a portion of what I'll commit to pkgsrc shortly (unless you recommend I don't): it removes pkgsrc paths from the $PATH that's in effect for which bash, so only a non-pkgsrc bash will be found. I've tested that this (in conjunction with the obvious SUBST) fixes the bootstrap on such platforms.

@schmonz
Copy link
Author

schmonz commented May 9, 2022

I've committed this locally to pkgsrc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant