nixpkgs/pkgs/development/interpreters
Will Dietz b11f3bc8e3 cpython: don't use lchmod() on Linux, fix w/musl
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 :).
2018-04-25 21:46:13 -05:00
..
acl2 acl2: 7.4 -> 8.0 2018-02-25 16:18:46 +01:00
angelscript angelscript: 2.31.2 -> 2.32.0 2018-02-24 14:45:37 -08:00
bats
ceptre
chibi
clips
clisp clisp-tip: 2.50pre20170130 -> 2.50pre20171114; progress on #31696 2017-11-15 19:05:58 +01:00
clojure clojure: 1.9.0.329 -> 1.9.0.358 2018-04-01 02:22:38 +02:00
dart dart: 1.16.1 -> 1.24.3 2018-02-18 09:09:48 -08:00
dhall dhall: passthru dhall prelude 2018-02-26 15:21:46 +01:00
duktape duktape: fix installation of shared libraries 2018-03-15 23:46:39 +13:00
eff eff: 20140928 -> 5.0 (#39264) 2018-04-23 08:16:03 +01:00
elixir elixir: 1.6.2 -> 1.6.4 2018-03-16 21:15:07 -04:00
erlang update erlangR20 from 20.3.1 to 20.3.2 2018-04-09 08:41:56 -05:00
falcon misc pkgs: Basic sed to get fix pkgconfig and autoreconfHook buildInputs 2017-09-21 15:49:53 -04:00
gnu-apl gnu-apl: fix clang build 2018-03-18 18:02:29 +01:00
groovy groovy: 2.4.14 -> 2.4.15 2018-03-30 13:36:06 +02:00
gtk-server misc pkgs: Basic sed to get fix pkgconfig and autoreconfHook buildInputs 2017-09-21 15:49:53 -04:00
guile tree-wide: disable doCheck and doInstallCheck where it fails (the trivial part) 2018-04-25 04:18:46 +00:00
hugs
hy hy: 0.13.1 -> 0.14.0 2018-02-24 16:42:20 -05:00
icon-lang
io treewide: transition mesa to libGLU_combined 2018-02-24 17:06:49 +02:00
j j: 806 -> 808 2018-04-20 04:42:42 -07:00
jimtcl
joker joker: 0.8.9 -> 0.9.1 2018-04-03 12:49:15 +02:00
jruby jruby: 9.1.13.0 -> 9.1.16.0 2018-02-26 19:39:25 -08:00
jython jython: 2.7.0 -> 2.7.1 2017-11-01 15:01:57 +01:00
kona
lfe
lolcode
love treewide: transition mesa to libGLU_combined 2018-02-24 17:06:49 +02:00
lua-4
lua-5 lua-{5.2,5.3}: cross fixups, drop crossAttrs 2018-03-21 16:13:27 -05:00
luajit luajit: symlink missing lua.hpp 2017-11-27 16:14:18 +00:00
lush treewide: transition mesa to libGLU_combined 2018-02-24 17:06:49 +02:00
maude
mujs
nix-exec nix-exec: mark as broken 2017-11-29 00:20:34 +00:00
octave octave: 4.2.1 -> 4.2.2 2018-03-21 09:59:18 +01:00
perl tree-wide: disable doCheck and doInstallCheck where it fails (the trivial part) 2018-04-25 04:18:46 +00:00
php php56: 5.6.34 -> 5.6.35 2018-03-31 10:50:26 +02:00
picoc Remove nckx as a maintainer for all packages 2018-01-16 23:00:49 +01:00
picolisp
pixie pixie: 1356 -> 1364 2018-02-01 00:36:49 +01:00
pure pure: 0.66 -> 0.68 2018-04-20 17:57:33 -05:00
pyrex
python cpython: don't use lchmod() on Linux, fix w/musl 2018-04-25 21:46:13 -05:00
qnial
racket racket: fix LD_LIBRARY_PATH 2018-04-11 11:59:43 +08:00
rakudo
rascal
rebol Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper" 2017-09-07 12:51:21 +02:00
red
regina
renpy renpy: 6.99.14.2 -> 6.99.14.3 2018-04-19 23:22:45 -07:00
ruby tree-wide: disable doCheck and doInstallCheck where it fails (the trivial part) 2018-04-25 04:18:46 +00:00
scheme48
scsh
self
spidermonkey spidermonkey_52: 52.2.1gnome1 → 52.6.0 2018-02-28 16:05:19 +01:00
supercollider supercollider: 3.9.2 -> 3.9.3 2018-04-19 22:41:26 -07:00
tcl
unicon-lang
wasm