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: update SRI hashes for fetchpatch2 FODs #157

Conversation

johnrichardrinehart
Copy link

Description of changes

I failed to build uefi-firmware because some of these hashes were wrong. It's possible that GitHub changed the patch content slightly. fetchpatch (vs. fetchpatch2) can avoid instability in certain git portions of the patch file (index, diff --git, etc.) but unfortunately fetchpatch does not support file renames so patches like https://github.com/tianocore/edk2/commit/ea6d859b50b692577c4ccbeac0fb8686fad83a6e.patch (in https://github.com/johnrichardrinehart/jetpack-nixos/blob/5acff7ab88f0fa7a511a107f55ebf219ab3e661e/pkgs/uefi-firmware/edk2-openssl-patches.nix#L31) will silently skip the rename (i.e. the source won't have the expected file that may later need to be patched which would cause subsequent patches to fail with a "file not found" kind of error). Since these patches do contain renames which later patches expect were applied a switch to using fetchpatch for all patches would, unfortunately, not work. It would be possible to change only some patches to use fetchpatch to increase robustness. But, it's simpler to only fix those patches whose hash has changed.

Worth noting is that GitHub supports a URL query parameter called full_index which acts like --full-index for git diff. I'm not sure about other git interfaces (cgit, GitLab, BitBucket, etc.). If it would be preferable to change all URLs to take advantage of this undocumented feature of GitHub's API then I'm happy to make that change.

@johnrichardrinehart johnrichardrinehart marked this pull request as ready for review November 19, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants