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

firefox: sha{256, 512} → hash #255518

Closed
wants to merge 3 commits into from

Conversation

nbraud
Copy link
Contributor

@nbraud nbraud commented Sep 16, 2023

Description of changes

  • Convert hexadecimal hashes to SRI format in firefox.updateScript
  • Convert existing hashes in firefox/*.nix

The maintainer script is from #255512, I only included it in the history so as to document how the automatic rewrites were performed.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Fits CONTRIBUTING.md.

@nbraud
Copy link
Contributor Author

nbraud commented Sep 16, 2023

@mweinelt Does this address the feedback in #255512 ?

@@ -43,6 +43,7 @@ writeScript "update-${attrPath}" ''
gpgv --keyring="$GNUPGHOME"/pubring.kbx "$HOME"/shasums.asc "$HOME"/shasums

hash=$(grep '\.source\.tar\.xz$' "$HOME"/shasums | grep '^[^ ]*' -o)
sriHash=$(nix-hash --type sha512 --to-sri "$hash")

Copy link
Member

Choose a reason for hiding this comment

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

sriHash is not used, maybe you forgot to update the update-source-version expr

@mweinelt
Copy link
Member

I'm opposed to changing these hashes from the upstream provided ones to SRI.

That just makes them harder to compare for just about anyone.

@nbraud nbraud closed this Dec 3, 2023
@nbraud nbraud deleted the firefox/sha512-to-hash branch December 3, 2023 18:24
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.

3 participants