Skip to content
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: fix infinite recursion in staging-next #260963

Merged
merged 3 commits into from
Oct 21, 2023
Merged

Conversation

reckenrode
Copy link
Contributor

Description of changes

Fixes the infinite recursion in staging-next #257792. Built both Python 3 and curl.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

curl needs to link against several frameworks, but building the
frameworks (directly or indirectly) depends on curl via fetchurl and
fetchFromGitHub. Break the infinite recursion by building the SDKs’
dependencies in the last stage of the stdenv bootstrap using the prior
stage’s fetchurl and fetchFromGitHub.
Unblocks staging-next and restores NAT64 support on Darwin.

Closes NixOS#260599
@vcunat
Copy link
Member

vcunat commented Oct 15, 2023

It's a thing not changed in this PR, but I find it confusing that the fetchurlBoot defined in pkgs/stdenv/darwin/default.nix is actually an almost-normal fetchurl, not like on linux where it's mostly built-in from nix.

@vcunat
Copy link
Member

vcunat commented Oct 15, 2023

The recursion issue had been reverted/solved, so I think the main expected benefit of this PR should be in adding those frameworks, which supposedly fixes some issues with macOS 14?

Those issues were reported with 8.3.0 which we already had in nixpkgs master, so let's not be hasty here and keep the current staging-next iteration without this nontrivial change? Hopefully it could get better review thanks to that. (I expect it's still desirable to catch 23.11.)

@reckenrode reckenrode changed the base branch from staging-next to staging October 15, 2023 12:49
@reckenrode
Copy link
Contributor Author

reckenrode commented Oct 15, 2023

It's a thing not changed in this PR, but I find it confusing that the fetchurlBoot defined in pkgs/stdenv/darwin/default.nix is actually an almost-normal fetchurl, not like on linux where it's mostly built-in from nix.

I tried to change it when I was working on #240433, but the Darwin stdenv bootstrap has dependencies that use fetchpatch and fetchFromGitHub. Even if the patches could be moved in-tree, there’s still the problem of dependencies hosted on GitHub, which need special handling to hash deterministically.

The recursion issue had been reverted/solved, so I think the main expected benefit of this PR should be in adding those frameworks, which supposedly fixes some issues with macOS 14?

It does that, but a more practical benefit to nixpkgs is it makes curl build (more or less) like any other normal package. It will (or should) be able to link whatever frameworks it needs. Future updates that require more should be less painful.

Those issues were reported with 8.3.0 which we already had in nixpkgs master, so let's not be hasty here and keep the current staging-next iteration without this nontrivial change? Hopefully it could get better review thanks to that. (I expect it's still desirable to catch 23.11.)

I retargeted it to staging. I’d personally rank this change behind #241692 and #256590 for 23.11, but I otherwise agree it’s desirable because it will make backporting curl updates to 23.11 much easier (especially if they require more frameworks).

Copy link
Contributor

@toonn toonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toonn toonn merged commit b525407 into NixOS:staging Oct 21, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants