Sender | Message | Time |
---|---|---|
25 Nov 2024 | ||
in e.g. remove-references-to | 20:40:33 | |
Yeah, I thought so too, but I had some issues. I may not have hit it with the stick hard enough. | 20:40:47 | |
you might also want to add an example of a build tool that depends on a library, to screw all the nice properties up | 20:40:54 | |
Well yeah; that's going to be the interesting/unfortunate case. I was thinking of that in the context of 'glibc' upgrades. ISTM that if you have to relink users of glibc, this means relinking the compiler, which then means everything that uses the compiler has to be rebuilt. | 20:41:38 | |
yes | 20:42:05 | |
the alternative is letting buildPackages drift etc., which isn't fun | 20:42:21 | |
ultimately compiler upgrades are compiler upgrades. what I worry about is more, like, random build stuff that has OpenSSL dependencies | 20:42:43 | |
for hashing or because it has network functionality we don't use or – whatever | 20:42:51 | |
So I was wondering about how you could make stdenv.mkDerivation do what the gist above does under the hood. Perhaps by modifying how getDev works; I think this would be enough to handle buildInputs. Then you'd need some way to make packages 'be observed as' the relink. | 20:44:42 | |
Any bright ideas about where such logic could hide? | 20:44:54 | |
it's basically splicing in miniature I think. | 20:46:10 | |
the hard part is making relinking happen. | 20:46:21 | |
That's about where I was up to :) | 20:46:24 | |
Another thing I was wondering about was the eval cost of all of this, and whether that is an issue or not (for the likes of ofborg). | 20:47:03 | |
In reply to @Ericson2314:matrix.orgGood catch! Updated as https://github.com/NixOS/nixpkgs/pull/359098#issuecomment-2499050124 (don't know why I did staging last time, possibly because the initial change I had to mitigate was introduced in staging ) | 21:31:08 | |
26 Nov 2024 | ||
18:15:37 | ||
27 Nov 2024 | ||
John Ericson: re recent ca-derivations posts, you're aware that as of present it breaks aarch64-darwin basically entirely right? | 02:42:56 | |
(I assume there is no obstacle to rolling it out for Linux only, and there are things that could be done to fix the incompatibility with engineering work, but I just wanted to check that you know this) | 02:43:16 | |
(happy to discuss more) | 02:43:39 | |
@emilazy:matrix.org: err nope I'm not aware of this | 02:44:52 | |
ok. so on aarch64-darwin , every binary must include a code signature or it won't start up. we use "ad-hoc signatures" for everything at present, which is what you get by default when running a compiler and is basically just an SHA-1 hash | 02:46:05 | |
every time a binary is rewritten it must be re-signed, which all the basic tools (install_name_tool which is like macOS patchelf etc.) do out of the box | 02:46:28 | |
therefore rewriting binaries for CA self-references breaks them | 02:46:37 | |
three possible solutions, of increasing elegance and decreasing layer violations
| 02:49:36 | |
In reply to @emilazy:matrix.orgah ok emily I thought you meant the recent nixpkgs stuff | 06:36:32 | |
emily: my actual plan is simply to have have self references :D | 06:36:46 | |
I want "core" nixpkgs pkgs to be (a) no self references (b) relocatable, no /nix/store before any store path <asdfasdf>-<name> that's a reference | 06:37:36 | |
(you can have /nix/store/asdfasdf-nix if it's just a made up path that's not a reference, like the ones in the nix manual --- I wouldn't want to make the manual illegal) | 06:38:01 | |
my point is that every aarch64-darwin binary essentially has a self-reference | 06:38:11 | |
I mean, I guess it only actually breaks when you rewrite self-references | 06:38:28 |