upstream issue:
https://bugs.python.org/issue31940
There are two PR's proposed to fix this,
but both seem to be stalling waiting for review.
I previously used what appears to be the favored
of the two approaches[1] to fix this,
with plan of keeping it musl-only until PR was merged.
However, while writing up a commit message
explaining the problem and why it needed fixing...
I investigated a bit and found it increasingly
hard to justify anything other than ...
simply not using lchmod.
Here's what I found:
* lchmod is non-POSIX, seems BSD-only these days
* Functionality of lchmod isn't supported on Linux
* best scenario on Linux would be an error
* POSIX does provide lchmod-esque functionality
with fchmodat(), which AFAICT is generally preferred.
* Python intentionally overlooks fchmodat()[2]
electing instead to use lchmod() behavior
as a proxy for whether fchmodat() "works".
I'm not sure I follow their reasoning...
* both glibc and musl provide lchmod impls:
* glibc returns ENOSYS "not implemented"
* musl implements lchmod with fchmodat(),
and so returns EOPNOTSUPP "op not supported"
* Python doesn't expect EOPNOTSUPP from lchmod,
since it's not valid on BSD's lchmod.
* "configure" doesn't actually check lchmod usefully,
instead checks for glibc preprocessor defines
to indicate if the function is just a stub[3];
somewhat fittingly, if the magic macros are defined
then the next line of the C source is "choke me",
causing the compiler to trip, fall, and point
a finger at whatever is near where it ends up.
(somewhat amusing, but AFAIK effective way to get an error :P)
I'm leaving out links to threads on mailing lists and such,
but for now I hope I've convinced you
(or to those reading commit history: explained my reasons)
that this is a bit of a mess[4].
And so instead of making a big mess messier,
and with hopes of never thinking about this again,
I propose we simply tell Python "don't use lchmod" on Linux.
[1] https://github.com/python/cpython/pull/4783
[2] 28453feaa8/Lib/os.py (L144)
[3] 28453feaa8/configure (L2198)
[4] Messes happen, no good intention goes unpunished :).
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/j/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/s4j1rrnwdrrqdaiyqci4c0cqy3azlnl2-j-808/bin/jconsole -h’ got 0 exit code
- ran ‘/nix/store/s4j1rrnwdrrqdaiyqci4c0cqy3azlnl2-j-808/bin/jconsole --help’ got 0 exit code
- ran ‘/nix/store/s4j1rrnwdrrqdaiyqci4c0cqy3azlnl2-j-808/bin/jconsole help’ got 0 exit code
- found 808 with grep in /nix/store/s4j1rrnwdrrqdaiyqci4c0cqy3azlnl2-j-808
- directory tree listing: https://gist.github.com/3c6f38056c15de42a7496ff1f576064e
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/supercollider/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/4azhvz3aw8jkcs3vib2aaii15yq5rr8k-supercollider-3.9.3/bin/supernova -h’ got 0 exit code
- ran ‘/nix/store/4azhvz3aw8jkcs3vib2aaii15yq5rr8k-supercollider-3.9.3/bin/supernova --help’ got 0 exit code
- ran ‘/nix/store/4azhvz3aw8jkcs3vib2aaii15yq5rr8k-supercollider-3.9.3/bin/sclang -h’ got 0 exit code
- found 3.9.3 with grep in /nix/store/4azhvz3aw8jkcs3vib2aaii15yq5rr8k-supercollider-3.9.3
- directory tree listing: https://gist.github.com/1dcdb0888d56e74baf1a827e371acad1
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.
This update was made based on information from https://repology.org/metapackage/renpy/versions.
These checks were done:
- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 6.99.14.2 with grep in /nix/store/ppm0viw59sf9hl0c6m9i84zf68yyjnhi-renpy-6.99.14.2
- found 6.99.14.2 in filename of file in /nix/store/ppm0viw59sf9hl0c6m9i84zf68yyjnhi-renpy-6.99.14.2
- directory tree listing: https://gist.github.com/0e25657f100ee2ecfeda5f3e8fb08167
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.
This update was made based on information from https://repology.org/metapackage/supercollider/versions.
These checks were done:
- built on NixOS
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/scsynth -v` and found version 3.9.2
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/supernova -h` got 0 exit code
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/supernova --help` got 0 exit code
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/supernova -v` and found version 3.9.2
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/supernova --version` and found version 3.9.2
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/sclang -h` got 0 exit code
- ran `/nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2/bin/sclang -v` and found version 3.9.2
- found 3.9.2 with grep in /nix/store/a6z8q6az7fzhh0sp4llp4fzp8c95bm6y-supercollider-3.9.2
- directory tree listing: https://gist.github.com/5b90384fd1df273cba0757c752a352d6
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.
This update was made based on information from https://repology.org/metapackage/php/versions.
These checks were done:
- built on NixOS
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar help` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phpdbg -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phpdbg --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -h` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --help` and found version 7.2.4
- found 7.2.4 with grep in /nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4
- directory tree listing: https://gist.github.com/3c197892ad9174dae3d07c1dd61b418c
Erlang's generic-builder isn't using the right /bin/sh in some
situations, causing build errors either in the erlang build itself or
in derivations depending on it.
This patch runs `patchShebangs make/` before running the rest of the
`postPatch` phase, hopefully using the right shell early enough.
This might be a solution for #36853, #36823 and #37638.
mostly just forward environment variables to make arguments,
this partially reverts 5d1e51a199
which removed them because they're already set in env--
but that's not enough to override make vars.
Also, readline is buildInput not nativeBuildInput
(we need headers and to link against it)