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: init at 1.17.3+k3s1 #84325

Merged
merged 1 commit into from Apr 5, 2020
Merged

k3s: init at 1.17.3+k3s1 #84325

merged 1 commit into from Apr 5, 2020

Conversation

euank
Copy link
Member

@euank euank commented Apr 5, 2020

This packages k3s as a single self-contained binary (as upstream k3s
does), but without having to download any impure already-built binaries.

The upstream packaging scripts are used. Due to k3s's rather complicated
packaging arrangement, this ends up being a rather long derivation.

Motivation for this change

k3s is handy to have on nix and nixos. This gets the binary built, and I intend to add a nixos service as a followup to this.

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 -- k3s doesn't run on 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
    $ nix path-info -rS $HOME/.nix-profile -h  | grep -i k3s
    /nix/store/326wrn9v9rajkm6sd526y2dc2abzdx38-k3s-build-bin                        	 128.2M
    /nix/store/kghvy2y79ni89v8i8hi7j57rm905p4vy-k3s                                  	 226.1M
    
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This packages k3s as a single self-contained binary (as upstream k3s
does), but without having to download any impure already-built binaries.

The upstream packaging scripts are used. Due to k3s's rather complicated
packaging arrangement, this ends up being a rather long derivation.
@@ -0,0 +1,233 @@
with import <nixpkgs> {};
Copy link
Contributor

Choose a reason for hiding this comment

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

this line fails to build on hydra: https://hydra.nixos.org/build/116132269

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed in #84369

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder how this wasn't caught on ofborg. cc @grahamc


patches = [ ./patches/00-k3s.patch ];

nativeBuildInputs = [ pkgconfig autoPatchelfHook breakpointHook ];
Copy link
Contributor

Choose a reason for hiding this comment

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

please also remove breakpointHook - that's for interactive development, not for nixpkgs.

Copy link
Contributor

Choose a reason for hiding this comment

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

in fact, the aarch64 build failed, and was stuck in a breakpointHook :-/

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, sorry about that! I was debugging an issue locally and forgot to delete it. I'll make a followup PR with some improvements, and I'll get the aarch64 build either working or properly skipped there.

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

5 participants