-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add GitHub workflow to check that binaries are reproducible. #94
Conversation
For now, this fails for two reasons.
|
This is currently blocked on |
There is currently a discrepancy between Linux and OSX builds of Tock, despite the
I'll report it upstream to Tock and Rust. |
0600c21
to
fee89d9
Compare
It seems that Rust builds won't be reproducible across hosts for the time being (rust-lang/cargo#8140). Until then, setting up two reference files for the SHA-256 hashes. |
a0b67c3
to
0bc7b62
Compare
Should we do like in the tock-on-titan project and symlink the |
Definitely! This would also reduce the time wasted by the workflows to install various versions of the compiler, and therefore reduce the likelihood of being cancelled by the GitHub runner. |
With elf2tab 0.5.0 published on crates.io, this pull request is now unblocked. |
What's going to be the process to keep these hashes up-to-date? |
One should be able to run the Maybe we can leave this workflow as non required until then? And for example only update hashes after all the reviews have been resolved on a pull request. |
74999b2
to
82c1eeb
Compare
5320c7a
to
15bd2c7
Compare
Ok, let's merge it like this and revisit later when we need to run the workflow. |
This would be a good idea too (although wouldn't catch regressions in reproducibility). The current workflow already uploads the reproduced binaries, so it wouldn't be hard to upload the expected hashes in there, or to print them in the workflow's console output. |
Fixes #70.
This pull request is the last step for reproducible builds.
reproduce_hashes.sh
tool generates reference SHA-256 sums for the OpenSK binaries. These hashes must then be checked in git in thereference_binaries.sha256sum
file.Currently blocked on:
Cargo doesn't yield reproducible builds if the host is different: Non-reproducible -C metadata=hash passed to rustc depending on the compiling OS rust-lang/cargo#8140 (also Ignore the host in rustc.verbose_version for metadata rust-lang/cargo#7873).The upstream Cargo issue won't be fixed soon, so for now 2 sets of hashes are provided for reference and checked by GitHub Actions: Linux and MacOS.elf2tab
is currently not reproducible (Implement a --deterministic mode for reproducibility. tock/elf2tab#16). It stores files into a TAR file, which contains, for each file: a uid, file permissions, a timestamp. Themetadata.toml
also contains a build timestamp.