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

linode-cli: Fix sha256 hash for openapi spec #86823

Merged
merged 1 commit into from May 4, 2020

Conversation

tshaynik
Copy link
Contributor

@tshaynik tshaynik commented May 4, 2020

Replaced the has for the openapi spec with a working hash, as
attempting to install linode-cli was failing, with the following
message:

hash mismatch in fixed-output derivation '/nix/store/px3cdbcb84bvw6xslr1k6hszyxpdis6j-openapi.yaml':
wanted: sha256:1l2fahdcmv7sp1qkwr5nv2vls8fypvlybwylqfzhyjmn7jqkw4hq
got: sha256:03ngzbq24zazfqmfd7xjmxixkcb9vv1jgamplsj633j7sjj708s0
cannot build derivation '/nix/store/49xrq47id66kwszyaqg1qapknc3i8mmx-linode-cli-2.14.1.drv': 1 dependencies couldn't be built

Motivation for this change

Wanting to be able to install linode-cli properly.

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 (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.

Copy link
Contributor

@srhb srhb left a comment

Choose a reason for hiding this comment

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

Instead of just updating the hash, I suggest instead grabbing it from a stable url/fixed commit from here: https://github.com/linode/linode-api-docs

That way, it won't change arbitrarily for us.

Pull linode openapi spec from a fixed version in github, and so the
sha256 hash will not break on each new release of the api spec.

Replaced the hash for the openapi spec with a working hash.

Attempting to install linode-cli was failing, with the following
message:

hash mismatch in fixed-output derivation '/nix/store/px3cdbcb84bvw6xslr1k6hszyxpdis6j-openapi.yaml':
  wanted: sha256:1l2fahdcmv7sp1qkwr5nv2vls8fypvlybwylqfzhyjmn7jqkw4hq
  got:    sha256:03ngzbq24zazfqmfd7xjmxixkcb9vv1jgamplsj633j7sjj708s0
cannot build derivation '/nix/store/49xrq47id66kwszyaqg1qapknc3i8mmx-linode-cli-2.14.1.drv': 1 dependencies couldn't be built
@tshaynik
Copy link
Contributor Author

tshaynik commented May 4, 2020

Thanks @srhb ,

That makes a lot of sense. I changed the file to fetch from the current release (4.63.1) of the openapi spec from github, and tested the install and basic functionality.

@srhb
Copy link
Contributor

srhb commented May 4, 2020

Beautiful, thank you. 😸

@srhb srhb merged commit 2e3ae54 into NixOS:master May 4, 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.

None yet

2 participants