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
Contributor

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 euank force-pushed the euank:k3s-aarch64 branch from d4f9455 to 0a30068 Apr 25, 2020
@euank
Copy link
Contributor 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.

@euank euank force-pushed the euank:k3s-aarch64 branch from 0a30068 to d53fd4d May 9, 2020
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 euank force-pushed the euank:k3s-aarch64 branch from d53fd4d to 4306be5 May 9, 2020
@euank
Copy link
Contributor 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
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4306be5"; rev="4306be5c1def5cc5e28e0a4aacd62ee4536ed045"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
k3s, k3s.passthru.tests on aarch64-linux Success
Details
k3s, k3s.passthru.tests on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.