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

bash-completion: Update GitHub hash #107511

Closed
wants to merge 1 commit into from

Conversation

nima2007
Copy link
Contributor

@nima2007 nima2007 commented Dec 24, 2020

Motivation for this change

To fix checksum failures when building from source

There is a hash mismatch error when building this derivation without binary cache because the sha256 hash no longer matches the github repo hash.

Proof of hash change:

sur@surs-MacBook-Pro lib % nix-prefetch-git https://github.com/scop/bash-completion 2.11
Initialized empty Git repository in /private/var/folders/7b/5z_1chpx7w5b6t75rt3px5y80000gn/T/git-checkout-tmp-XlyyFBc9/bash-completion/.git/
remote: Enumerating objects: 1404, done.
remote: Counting objects: 100% (1404/1404), done.
remote: Compressing objects: 100% (1164/1164), done.
remote: Total 1404 (delta 686), reused 366 (delta 173), pack-reused 0
Receiving objects: 100% (1404/1404), 501.36 KiB | 6.60 MiB/s, done.
Resolving deltas: 100% (686/686), done.
From https://github.com/scop/bash-completion
 * tag               2.11       -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...

git revision is b12639a6becec13a0a2c06173ba40fb3bbe972e1
path is /nix/store/bv8p05zsilary8lylwfmqw1bc6bhwmrl-bash-completion
git human-readable version is -- none --
Commit date is 2020-07-25 11:25:49 +0300
hash is 1kyj62wp4sd8629r1gx5ggnkkjfkwvggj98d6cwlx14y3iri0l87
{
  "url": "https://github.com/scop/bash-completion",
  "rev": "b12639a6becec13a0a2c06173ba40fb3bbe972e1",
  "date": "2020-07-25T11:25:49+03:00",
  "path": "/nix/store/bv8p05zsilary8lylwfmqw1bc6bhwmrl-bash-completion",
  "sha256": "1kyj62wp4sd8629r1gx5ggnkkjfkwvggj98d6cwlx14y3iri0l87",
  "fetchSubmodules": false,
  "deepClone": false,
  "leaveDotGit": false
}
Things done

Update the fetchFromGitHub sha256 hash

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

To fix checksum failures when building from source
@TredwellGit
Copy link
Member

Both ofborg and I cannot reproduce on NixOS.

@KamilaBorowska
Copy link
Member

KamilaBorowska commented Dec 24, 2020

nix-prefetch-git computes fetchgit checksum, however we use fetchFromGitHub (a different function) for which from what I can tell the checksum that was here before is correct. Note that ofborg lists the checksum that was previously listed in a file even when ignoring binary cache:

hash mismatch in fixed-output derivation '/nix/store/7aqljmqv7al8i2rb0y736gj220fg8ydx-source':
  wanted: sha256:1kyj62wp4sd8629r1gx5ggnkkjfkwvggj98d6cwlx14y3iri0l87
  got:    sha256:0m3brd5jx7w07h8vxvvcmbyrlnadrx6hra3cvx6grzv6rin89liv

The checksum you have provided will work on your computer, as the output checksum matches something that was already fetched (due to using nix-prefetch-git beforehand).

@SuperSandro2000
Copy link
Member

This needs to target staging.

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