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
nerdctl: init at 0.2.0 #106546
nerdctl: init at 0.2.0 #106546
Conversation
Result of 2 packages built:
|
Both get |
"-w" | ||
"-s" | ||
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Version=v${version}" | ||
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=${commitSha}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A commit hash that hasn't been updated in a version bump often gets overlooked in reviews, the bot won't update it and if the revision is overridden it will be incorrect unless it is also updated to match. I'd suggest just using src.rev
.
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=${commitSha}" | |
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=${src.rev}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried it before but it's just the same value as ${version}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct. Currently there isn't an easy way to get the git hash without setting it manually which then gets overlooked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I'm happy to leave it empty so it falls back to it's default value (<unknown>
) but I can put src.rev
if you'd prefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src.rev
is useful if the revision
is overridden to point to another commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I'm now specifically setting it to it's default of <unknown>
So if I understand correctly the binary itself during normal use doesn't require it but it's the module which starts the daemon that then points to the cni-plugins dir? In this case with |
Result of 2 packages built:
|
Neither will work at all without the module or the user doing manual setup. Besides |
Motivation for this change
Package
nerdctl
There is
nerdctl-unwrapped
which is as-is, andnerdctl
which is wrapped withcni-plugins
andbuildkit
to allow for networking and building containers.Since there is
nerdctl
andnerdctl-unwrapped
let me know if I need to change my commit message to fit contributinghttps://github.com/AkihiroSuda/nerdctl#install
I'm not sure why
podman
andcri-o
can get away withcni-plugins
just being arguments & not even in the PATH.https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/podman/wrapper.nix#L13
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/cri-o/wrapper.nix#L11
@adisbladis @zowoq
nerdctl
will explicitly look for severalcni-plugins
binaries in/opt/cni/bin
which is overridden with the env varCNI_PATH
in the wrapped version.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)