-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl: 7.76.1 -> 7.77.0 #124502
curl: 7.76.1 -> 7.77.0 #124502
Conversation
We should probably backport this one to 20.09: These two I feel are optional: |
Testing a build of |
curl, nix, and the simple test built. The installer tests also seem fine, so |
I think this update might break darwin:
https://logs.nix.ci/?key=nixos/nixpkgs.124502&attempt_id=98158734-bf8f-4dbd-aa2a-abc9a125a501 @ofborg build curl /cc @NixOS/darwin-maintainers |
Can confirm @SuperSandro2000 's failure, macos 10.15, sandbox enabled. |
The diff between the two curls https://github.com/curl/curl/compare/curl-7_76_1..curl-7_77_0 suggests that |
This also migrates sslSupport to opensslSupport, which affects packages overriding the curl package in that regard.
Migrated to |
No it doesn't, still 👀 and 🤔 |
Yup, digging into the
the problem with this being that adding it causes a reference loop. |
|
Created #124982 in case we want to take that route. |
I feel like we do, thanks for investing the time. Did anyone mention the issue in #macos:nixos.org yet? |
Yes, the conclusion was that this is indeed the first time a macos framework in included in the curl loop, so there's no prior art. I think there are two possibilities: a) hack the curl build system to allow building a |
Option b) is tricky because apple sdk needed for framework's headers > comes in xar format > has xml-based metadata > libxml2 > python > expat ... |
cc @NixOS/darwin-maintainers |
This is my preferred solution. The more our build environment diverges from the expected build environment, the more likely problems like this will arise. If we include A start in that directiondiff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index 1b60abf562b..3cc9bd8e899 100644
--- a/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -16,27 +16,20 @@ let
sha256 = "13xq34sb7383b37hwy076gnhf96prpk1b4087p87xnwswxbrisih";
};
- nativeBuildInputs = [ xar cpio python3 pbzx ];
+ nativeBuildInputs = [ cpio pbzx ];
outputs = [ "out" "dev" "man" ];
unpackPhase = ''
- xar -x -f $src
+ pbzx $src | cpio -idm
'';
installPhase = ''
- start="$(pwd)"
- mkdir -p $out
- cd $out
- pbzx -n $start/Payload | cpio -idm
+ mkdir $out
- mv usr/* .
- rmdir usr
+ cp -r System/* usr/* $out
- mv System/* .
- rmdir System
-
- pushd lib
+ pushd $out/lib
cp ${darwin-stubs}/usr/lib/libcups*.tbd .
ln -s libcups.2.tbd libcups.tbd
ln -s libcupscgi.1.tbd libcupscgi.tbd
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
index 3af444a2e52..cd7c0fb9980 100644
--- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix
+++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
@@ -97,16 +97,16 @@ in rec {
mkdir $out/include
cp -rd ${llvmPackages.libcxx.dev}/include/c++ $out/include
+ # copy package extraction tools
+ cp -d ${pkgs.pbzx}/bin/pbzx $out/bin
+ cp -d ${pkgs.xar}/lib/libxar*.dylib $out/lib
+ cp -d ${pkgs.bzip2.out}/lib/libbz2*.dylib $out/lib
+
${lib.optionalString targetPlatform.isAarch64 ''
# copy .tbd assembly utils
cp -d ${pkgs.darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin
cp -d ${pkgs.libyaml}/lib/libyaml*.dylib $out/lib
- # copy package extraction tools
- cp -d ${pkgs.pbzx}/bin/pbzx $out/bin
- cp -d ${pkgs.xar}/lib/libxar*.dylib $out/lib
- cp -d ${pkgs.bzip2.out}/lib/libbz2*.dylib $out/lib
-
# copy sigtool
cp -d ${pkgs.darwin.sigtool}/bin/sigtool $out/bin
cp -d ${pkgs.darwin.sigtool}/bin/codesign $out/bin |
If possible I would rather avoid adding more things to bootstrap tools since anything in there is rather annoying to update. Since curl itself is part of bootstrap tools already however. If I'm not mistaken we only need curl as native input and don't link against it, if that's the case the bootstrap version can be propagated much further in the stdenv stages possibly eliminating curl as a dependency alltogether. |
I don't know... this feels like curl on all platform would get blocked due to this issue. What about... NAT64 not working on darwin in curl? (like so far, presumably) That commit isn't so complex, so e.g. simply revert it for darwin? (maybe just during bootstrapping) I mean, until someone implements some better solution like discussed above, but who knows how long that might take. |
Something needs to be done about this update.
Blocking this important update for more than 3 months just because Darwin stdenv is way behind and not easy to maintain is a pity but it shouldn't hold back Linux and create a lot of extra work for all people maintaining the Linux part of nixpkgs and NixOS. |
Has anyone mentioned this to upstream? I'm sure a project as low-level as curl would be sympathetic to this breakage and be willing to provide a blessed path for systemconfiguration-less building. |
My guess is that most macos developers wouldn't see the benefit of trying to build without |
Most apple users are not using a very old SDK to build curl. |
Superseded by #141829. Feel free to reopen if I've misunderstood. |
Motivation for this change
https://curl.se/changes.html\#7_77_0
Fixes: CVE-2021-22897, CVE-2021-22898, CVE-2021-22901
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)