If bash is executed within an environment where PATH is not set, it uses
the DEFAULT_PATH_VALUE compiled into bash to set PATH. In nixpkgs we set
this to /no-such-path by default. This makes sense in a nixpkgs/NixOS
environment since paths like /bin or /usr/bin should not be used.
However, when bash is used inside an FHS environment, this produces
results that differ from distributions which follow the FHS standard.
Before this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/no-such-path
After this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
- make the script runnable from any directory
- add missing nix dependency to run nix-hash
- make padding non implicit
- small shellcheck fixes (variable quoting...)
Readline 8.1 is required for bash-5.1 to work properly.
From bash-5.1 release message[1]:
> Bash can be linked against an already-installed Readline library
> rather than the private version in lib/readline if desired. Only
> readline-8.1 and later versions are able to provide all of the symbols
> that bash-5.1 requires; earlier versions of the Readline library will
> not work correctly.
[1] https://lists.gnu.org/archive/html/info-gnu/2020-12/msg00003.html
When, after patching, `configure.ac` is newer than `configure`, the
Makefile will try to regenerate `configure` from `configure.ac`.
While that might usually be desirable, in this case we want to keep
bootstrapping simple and directly use the `configure` from the package
so we can avoid a dependency on automake.
Previously, we used the `-T` parameter to automake to make sure the
timestamps were okay. However, this is brittle when we update: when the
timestamp of the original file changes, and no longer matches the
timestamp of the original file in the patch, `patch` will show a warning
but otherwise continue without updating the timestamp.
This PR changes things so we only patch `configure`, so that will always
have a newer timestamp.
Refs https://github.com/NixOS/nixpkgs/issues/115177
I made a mistake merge. Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.
I reconstructed the "desired" state of staging-next tree by:
- checking out the last commit of the problematic range: 4effe769e2
- `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
merge commit and its revert from that range (while keeping
reapplication from 4effe769e2)
- merging the last unaffected staging-next commit (803ca85c20)
- fortunately no other commits have been pushed to staging-next yet
- applying a diff on staging-next to get it into that state
The script assumed that `wget` was available in the environment
along with common CA certificates.
Replaced the detection of GPG, which is not necessary anymore.
Added pulling the public key bash releases and patches are signed with,
without which we cannot verify signatures.
This adds a warning to the top of each “boot” package that reads:
Note: this package is used for bootstrapping fetchurl, and thus cannot
use fetchpatch! All mutable patches (generated by GitHub or cgit) that
are needed here should be included directly in Nixpkgs as files.
This makes it clear to maintainer that they may need to treat this
package a little differently than others. Importantly, we can’t use
fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale
hashes, we need to include patches that are subject to changing
overtime (for instance, gitweb’s patches contain a version number at
the bottom).
This reverts commit a85b07cbcb as
executing the tests in parallel makes them flaky. This can be seen very
easily on armv7l machines (and probably other machines that are slower
than common x86_64 machines as well), but is also reproducible on
x86_64.
This fixes #91706.
Currently the tests take an eternity and are also sometimes flaky. By
following upstream in using xdist for parallel test execution we at
least get the feedback cycle down. On my machine that means instead of
running this for ~25min it runs in 1 minute and 10 seconds.