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
krb5: Add patches to fix build with musl on 1.18 #83906
Conversation
Something is still off with the build, will look into it. |
9af14f8
to
5676e6d
Compare
OK, fixed. |
# TODO: Remove with next release > 1.18 | ||
# Patches to fix musl build with 1.18. | ||
# Not using `fetchpatch` for these for now to avoid infinite recursion | ||
# errors in downstream projects (unclear if it's a nixpkgs issue so far). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchpatch is broken in bootstrapping since fetchurlBoot doesn't support it so this is probably what you're seeing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewbauer Is krb5
part of bootstrapping? Should I indicate this fact here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's part of fetchurl definition here:
nixpkgs/pkgs/top-level/all-packages.nix
Lines 315 to 363 in cab6b01
# `fetchurl' downloads a file from the network. | |
fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform | |
then buildPackages.fetchurl # No need to do special overrides twice, | |
else makeOverridable (import ../build-support/fetchurl) { | |
inherit lib stdenvNoCC buildPackages; | |
curl = buildPackages.curl.override (old: rec { | |
# break dependency cycles | |
fetchurl = stdenv.fetchurlBoot; | |
zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; }; | |
pkgconfig = buildPackages.pkgconfig.override { fetchurl = stdenv.fetchurlBoot; }; | |
perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; }; | |
openssl = buildPackages.openssl.override { | |
fetchurl = stdenv.fetchurlBoot; | |
coreutils = buildPackages.coreutils.override { | |
fetchurl = stdenv.fetchurlBoot; | |
inherit perl; | |
xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; }; | |
gmp = null; | |
aclSupport = false; | |
attrSupport = false; | |
}; | |
inherit perl; | |
buildPackages = { inherit perl; }; | |
}; | |
libssh2 = buildPackages.libssh2.override { | |
fetchurl = stdenv.fetchurlBoot; | |
inherit zlib openssl; | |
}; | |
# On darwin, libkrb5 needs bootstrap_cmds which would require | |
# converting many packages to fetchurl_boot to avoid evaluation cycles. | |
# So turn gssSupport off there, and on Windows. | |
# On other platforms, keep the previous value. | |
gssSupport = | |
if stdenv.isDarwin || stdenv.hostPlatform.isWindows | |
then false | |
else old.gssSupport or true; # `? true` is the default | |
libkrb5 = buildPackages.libkrb5.override { | |
fetchurl = stdenv.fetchurlBoot; | |
inherit pkgconfig perl openssl; | |
keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; }; | |
}; | |
nghttp2 = buildPackages.nghttp2.override { | |
fetchurl = stdenv.fetchurlBoot; | |
inherit zlib pkgconfig openssl; | |
c-ares = buildPackages.c-ares.override { fetchurl = stdenv.fetchurlBoot; }; | |
libev = buildPackages.libev.override { fetchurl = stdenv.fetchurlBoot; }; | |
}; | |
}); | |
}; |
Motivation for this change
Unbreak musl build, see krb5/krb5@bf5953c#r37504446
These fixes are only in
krb5
master
so far, a release that includes them has not been made yet.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)