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

krb5: Add patches to fix build with musl on 1.18 #83906

Merged
merged 1 commit into from Apr 1, 2020

Conversation

nh2
Copy link
Contributor

@nh2 nh2 commented Mar 31, 2020

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@nh2 nh2 requested a review from dtzWill March 31, 2020 23:49
@nh2
Copy link
Contributor Author

nh2 commented Apr 1, 2020

Something is still off with the build, will look into it.

@nh2 nh2 force-pushed the krb5-1.18-fix-musl-build branch from 9af14f8 to 5676e6d Compare April 1, 2020 00:23
@nh2
Copy link
Contributor Author

nh2 commented Apr 1, 2020

Something is still off with the build, will look into it.

OK, fixed.

@nh2 nh2 self-assigned this Apr 1, 2020
@veprbl veprbl linked an issue Apr 1, 2020 that may be closed by this pull request
# 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).
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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:

# `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; };
};
});
};

@matthewbauer matthewbauer merged commit efae68a into NixOS:master Apr 1, 2020
@ajs124 ajs124 mentioned this pull request May 12, 2021
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.

krb5 does not build with musl anymore
2 participants