setup.sh: verify that find is from findutils#177693
Conversation
PR #168413 causes `setup.sh` to use `find`. Packages which put `busybox` into their `nativeBuildInputs` will have `$busybox/bin/find` ahead of `$findutils/bin/find` in `$PATH` when `setup.sh` is run, causing `setup.sh` to fail. Let's check that `find` is really from findutils so we can provide a more useful error message. The `setup.sh` script already does a similar check to make sure that the shell it is running under is `bash` rather than some other shell. A longer-term solution to the problem of `busybox`'s outpaths conflicting with `stdenv`s is described here: #177682 (comment)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
|
|
||
| # Make sure `find` is the full `find` from findutils, rather | ||
| # than from busybox or some other implementation. This is | ||
| # analogous to `shellcheck shell=bash` at the top of this |
There was a problem hiding this comment.
shellcheck is a tool to verify if shell scripts are valid, it's unrelated to checking if the correct shell is used.
|
Could there be reasons for people to want to use find from busybox? This seems quite strict, though I understand where you're coming from. |
|
What features of GNU findutils do we need that Busybox's find doesn't have? Would it be possible to make setup.sh compatible with both? |
|
Hmm, I thought it was abuild that was expecting find with printf. I don't see -printf in the fixLibtool PR. So putting it here may be at the wrong layer, but not sure where to put it then. And I agree we don't want conflicting binaries in stdemv regardless. |
Just
I'm not sure. But it can't hurt.
Sure: #177789 |
It's the
I am certainly on board with using the minimum features needed for the task, so I'm switching this to |
|
It would be really nice if build inputs looked at |
Hrm, is that possible? I thought that changing a package's If |
|
Also while we're wishing for things, I wish So for any given package you can add a list of other packages it is strictly-less-than (or strictly-greater than). No integers to remember and no running out of priority levels between e.g. "5" and "6". I can never seem to remember integer priority systems like the one in nftables. |
Description of changes
PR #168413 causes
setup.shto usefind. Packages which putbusyboxinto theirnativeBuildInputswill have$busybox/bin/findahead of$findutils/bin/findin$PATHwhensetup.shis run, causingsetup.shto fail.Let's check that
findis really from findutils so we can provide a more useful error message.The
setup.shscript already does a similar check to make sure that the shell it is running under isbashrather than some other shell.A longer-term solution to the problem of
busybox's outpaths conflicting withstdenvs is described here:#177682 (comment)
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes