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

Fix helm version #50299

Closed
wants to merge 1 commit into from
Closed

Fix helm version #50299

wants to merge 1 commit into from

Conversation

edude03
Copy link
Contributor

@edude03 edude03 commented Nov 13, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Fixes the inability to run helm init due to helm using it's own version to pick the version of tiller to fetch. See helm/helm#3770 for more details.

rev = "v${version}";
sha256 = "1z810a6mxyrrw4i908dip8aqsj95c0kmv6xpb1wwhskg1zmf85wk";
sha256 = "1jjyyidffls0yzi00p7icg19f10wdrmcgb52migdy4kv2chvmrah";
leaveDotGit = "true";
Copy link
Member

Choose a reason for hiding this comment

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

The problem about this option is that the checksum can break at any time git decides to change their .git directory layout. Therefore we want to avoid it at all cost.
I would suggest to either write a script instead that generates this information automatically,
like here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/analysis/radare2/default.nix#L92

Or just set the version only, which might be enough in most cases.

Copy link
Member

Choose a reason for hiding this comment

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

I think you could try to manually set the CommitID with LDFLAGS. See
https://github.com/helm/helm/blob/aa98e7e3dd2356bce72e8e367e8c87e8085c692b/versioning.mk#L25.

We could then use fetchFromGitHub. The drawback is you would have to manually specify both tag and commitId.

Here an example to set LDFLAGS https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/skopeo/default.nix#L33.

Copy link
Member

Choose a reason for hiding this comment

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

Better doing that manually then going through the leaveDotGit hell.

@nlewo
Copy link
Member

nlewo commented Nov 22, 2018

Fixed in #50918

@nlewo nlewo closed this Nov 22, 2018
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

4 participants