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

treewide: replace base64 encoded hashes #89423

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Jun 3, 2020

Follow up on #89308.

Motivation for this change

These break compatibility with nix 2.0, see #89275.

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.

@LnL7 LnL7 requested review from FRidh and jonringer as code owners June 3, 2020 16:27
@LnL7 LnL7 force-pushed the replace-base64-hashes branch from 0bf900a to 7b3a296 Compare June 3, 2020 16:35
@ofborg ofborg bot added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: python 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jun 3, 2020
@edolstra edolstra merged commit 9a9f300 into NixOS:master Jun 3, 2020
@LnL7 LnL7 deleted the replace-base64-hashes branch June 3, 2020 17:08
@jtojnar
Copy link
Member

jtojnar commented Jun 3, 2020

Do you have a script for this I could set as pre-commit hook?

@LnL7
Copy link
Member Author

LnL7 commented Jun 3, 2020

The way this was generated is rather inefficient so I don't think it's really usable for that, but the plan is to enforce this in the evaluation checks. Otherwise we can't really maintain this.

@veprbl
Copy link
Member

veprbl commented Jun 4, 2020

If I'm not mistaken, base64 hashes were introduced in 2.0 (NixOS/nix@c0015e8) and SRI in 2.2 (NixOS/nix@6024dc1). The problem with this PR is that it's not consistent with what node2nix generates automatically (e.g. in pkgs/development/node-packages/node-packages.nix).

@LnL7
Copy link
Member Author

LnL7 commented Jun 5, 2020

@veprbl Weird, I must have accidentally used an SRI or invalid base64 hash when testing.

@worldofpeace worldofpeace mentioned this pull request Aug 17, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: python 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants