-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Local Build-System produces diferrent roms than CircleCI #1829
Comments
From : linuxboot/heads-wiki#70 (comment)
Same hashes. ie: That is, Makefile git operations are failing in container because of ID mismatches somewhere, and I cannot find where for the moment:
Problem vanishes if |
Problem was safedir in docker image (flake.nix) not creating gitconfig under /root dir. Testing fix under #1833 |
Reasoning of discrepancies for prosperity: git commands under Makefile were not able to get git commit/clean state, resulting in differences in produced binaries because version exported and not reused under kernel modules (modules.cpio) and tools/libraries packed (tools.cpio) packed in initrd.cpio.xz, resulting in payload (kernel+initramfs) packed as payload, resulting in coreboot image being different locally/ci (where CI runs docker in privileged mode and check for git was bypassed per how CircleCI runs docker images resulting in different behavior). Details:
|
@Oessel #1833 fixes the root cause of the issue, but not README.md which seems to need improvement so that users wanting to do local builds that matches hashes of CircleCI can do so arriving to same results. Can you repro and also provide PR/comment here what is missing under README.md so that it's clearer that CircleCI used versioned docker image is needed to produce reproducible builds that match from CircleCI and local builds? I seem to have failed writing docs that permit others, like you to arrive to same results. I would love to fix docs seperately, since I would merge #1833 as bugfix now and address docs seperately. |
Needs README.md fix, reopening issue until other PR fixes README.md with end user reported needed fixes |
I think i accidently caused some trouble here. I applied changes to some files in my local branch, so i usually don't check all hashes, but when i noticed the missing commit-id, i tried to figure out if this is caused by my changes. After some testing, i tried to build with a fresh build-system and fresh cloned source, but i simply forgot to run the right command and then checked the hashes. I caused the wrong hashes with my incorrect testing, so i am really sorry for this! I mixed up this two different problems and opened the issue, you're docs are correctly saying what is needed to build reproductible Roms. I would like to change the title of this issue and close it as completed if you are OK with this, because the dubious ownership is fixed and the different hashes are not an heads-issue |
@Oessel please replicate with master :) |
Now i got proper named output files and the same hashes as CircleCI, but both hashes.txt contain the hash of the bottom.rom twice and no hash of the combined rom. |
Not related to this issue, but another thing came to my mind. Of course this is a very specific scenario, but if a high skilled attacker would be able to manipulate my local source files, wouldn't it be possible that this attacker is able to replace the hashes.txt in my build-directory with a downloaded file from CircleCI? Does it make sense to compute the hashes of you local built roms on your own system (e.g. in a disposable VM on qubes) and check them against CircleCI too? But as i said, not related to this issue at all and very paranoid ;) |
This is why reproducible builds exists, hashes.txt are produced for discrepancy introspection/issue opening and final ROM hash is the only thing that matters at the end. Your concerns on github/git/TLS seems related to #1794 which as of now i'm not sure what to reply into. @Oessel Feel free to rename and close this issue. |
Context of the Build
1. What board are you trying to build?
t430-hotp-maximized
2. What repository:branch are you using to build from?
3. What version of coreboot are you trying to build
produced ROM's have no commit ID, source tree is up-to-date, so it should be 2399-g515ca5d
4. In building the rom where did you get the blobs?
5. If using the automated tools to get the blobs did you run the relevant scripts in the blobs directory
6. What operating system are you using
Debian-12 AppVM on QubesOS 4.2.3 ( with Docker and Nix installed after provided guides)
Please describe the problem
My build system produces Roms with different hashes than CircleCi, the Roms are only named e.g. t430-hotp-maximized-.rom (no commit-id). I even built a fresh docker image on a new created VM and built from a fresh cloned git-tree with the same result
To Reproduce
Steps to reproduce the behavior:
1.Create a build environment in a qubes AppVM after the guide in the documentation
2. clone https://github.com/linuxboot/heads
3. run
docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) linuxboot/heads:dev-env -- make BOARD=t430-hotp-maximized
Expected behavior
System produces a reproductible rom
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Please excuse my incomplete description, i'll try to provide any information you need
The text was updated successfully, but these errors were encountered: