-
Notifications
You must be signed in to change notification settings - Fork 427
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
Better hashing of sources #4762
Comments
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
This would be handy if we ever start storing sources along the built artifacts. One thing to take care of is the local conda-build cache. |
We could also record a content hash in the "finalized sources" section of the "rendered recipe" for the new recipe format: conda/ceps#74 |
Just a thought on the YAML structure regarding
(I doubt that the above is valid YAML but you get the idea.) |
Checklist
What is the idea?
Support a content dependent hash of sources rather than only hashing the source file itself. This is how nixpkgs's
fetchzip
works and could also be used to have a stable hash for recipes usinggit_url
/git_rev
.Why is this needed?
I occasionally see builds failing due to the source coming from an autogenerated git tarball/zip being different (most commonly on github, but the same applies to most git hosts). This is because the git archives are dependent on the git version used and are not intended to be stable or reproducible.
It would also be nice to have more resistance to changing tags if it was also applied to
git_url
/git_rev
.What should happen?
My first guess would be to have an key like
sha256
in the sources section likecontent_sha256
which would trigger the content-based hash to be checked.Additional Context
Mixpkgs solved this quite a long time ago with their
fetchzip
funcion so that would probably be a valuable source of ideas on the implementation.The text was updated successfully, but these errors were encountered: