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: propagate runtime dependencies of the k3s binary #101739

Merged
merged 1 commit into from Dec 9, 2020

Conversation

euank
Copy link
Member

@euank euank commented Oct 26, 2020

Motivation for this change

Fixes #101734

Prior to this change, the k3s binary included a tarball containing
binaries like 'kubectl', but didn't keep a runtime reference to those
runtime dependencies in plaintext (since they were gzipped inside the
single combined k3s binary).

In order for nix's automatic runtime dependency detection to work, we
need to have a reference to them somewhere in $out. This adds a text
file that attempts to capture the correct runtime dependency closure.

This appears to work.
Running nix-store -q --tree /nix/store/path/to/k3s produces a
different output after this change which includes the libseccomp
reference I expect.

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 (nixos/tests/k3s.nix)
  • 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.

@euank euank force-pushed the k3s-seccomp-dep branch 2 times, most recently from e7e8d34 to 3aea54a Compare December 9, 2020 07:39
@euank euank mentioned this pull request Dec 9, 2020
10 tasks
Fixes NixOS#101734

Prior to this change, the k3s binary included a tarball containing
binaries like 'kubectl', but didn't keep a runtime reference to those
runtime dependencies in plaintext (since they were gzipped inside the
single combined k3s binary).

In order for nix's automatic runtime dependency detection to work, we
need to have a reference to them somewhere in $out.
propagatedBuildInputs seems to do the right thing for us here.
Running `nix-store -q --tree /nix/store/path/to/k3s` produces a
different output after this change which includes the `libseccomp`
reference I expect.
@flokli flokli merged commit c275660 into NixOS:master Dec 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.

k3s: package is missing a runtime dependency on libseccomp
2 participants