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

k3s: fix build for aarch64 #84693

Merged
merged 1 commit into from May 9, 2020
Merged

k3s: fix build for aarch64 #84693

merged 1 commit into from May 9, 2020

Conversation

euank
Copy link
Member

@euank euank commented Apr 8, 2020

The upstream project already builds and releases for aarch64. This makes
the couple small tweaks that I found necessary for the nix package to also cross-compile
for aarch64.

Things done

I cross-compiled on an x86_64 nixos machine with nix-build --arg crossSystem '(import <nixpkgs/lib>).systems.examples.aarch64-multiplatform' -A k3s

I did not verify that the resulting binary runs, but I'm quite optimistic it should!

  • 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.

@FRidh
Copy link
Member

FRidh commented Apr 21, 2020

needs rebase

@euank
Copy link
Member Author

euank commented Apr 25, 2020

Rebased.

I also verified that this works correctly on an arm machine (specifically one of the a1.medium instances on ec2, using the nix package manager but not nixos).

k3s server ran and deployed the default components successfully, so this package seems to get everything packaged together correctly for arm too.

The upstream project already builds and releases for aarch64. This makes
the couple small tweaks that I found necessary for k3s to cross-compile
for aarch64.

I also ran it through nixpkgs-fmt.
@euank
Copy link
Member Author

euank commented May 9, 2020

ping @FRidh if you want to take another look.
I think this is at a good place to merge.

@FRidh FRidh merged commit e61dc85 into NixOS:master May 9, 2020
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.

None yet

2 participants