-
-
Notifications
You must be signed in to change notification settings - Fork 198
bugfix: Fix data.cpio reproductibility issue introduced by #1961 #1973
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reverts the regression introduced in #1961 to fix the reproducibility of data.cpio and streamlines the initrd packaging process. Key changes include:
- Reverting the unconditional build of board.cpio to the pre-#1961 logic.
- Refactoring the staging and creation of data.cpio with explicit per-entry copy rules.
- Updating the organization of targets for heads.cpio, modules.cpio, tools.cpio, and adding a GPG key injection helper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a reproducibility issue for data.cpio by reverting the board.cpio logic to its previous behavior and cleaning up the data file staging process. Key changes include removing legacy data installation macros, introducing a new stage_data_file macro for better data file handling, and consolidating redundant targets and comments.
|
||
# Only build data.cpio if there are data files | ||
ifneq ($(strip $(data_files)),) | ||
# --- DATA.CPIO STAGING AND CREATION --- |
Copilot
AI
May 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a brief comment explaining the rationale behind switching from the old initrd_data_add macro to the new stage_data_file macro to aid future maintainers in understanding the changes.
Copilot uses AI. Check for mistakes.
Let me know if there is anything I can do to help with this. Happy to dig up my hashes.txt file if it will help in any way. My data.cpio was provided here in case you missed it: #1966 (comment) |
Yes. Locally rebuild any board rom from this PR and come to a different hash of data.cpio again. They should be the same, meaning data.cpi hash is the same.
I never was able to reproduce your hash :/ Tldr: please rebuild any board roms final hash and report rhy are the same @thickfont. That would help. And if different, detail your environment, not sure what would induce docker image rom built differences. |
I took the time to diffoscope your data.cpio with the one I consistently create the same data.cpio with same hash.
TLDR: both data.cpio were wrong (including empty files that aren't empty). |
With e746aab which successfully built at https://app.circleci.com/pipelines/github/tlaurion/heads/3339/workflows/8305914f-458a-4e97-bcb4-f17cf3669bae) Each build output results in "INSTALL-DATA" traces which picks each and single one of the files and put them in initrd/data dir prior of creating data.cpio with them in a reproducible way:
While diffoscope now only shows one dicrepency between @thickfont 's provided data.cpio and mine: and its in regard of their 0 byte file:
|
e746aab
to
d8749b9
Compare
…r cpio (make sure initrd data dir fresh + wiped after use) + document cpio properly under Makefile - move inject_gpg up (qemu workaround since we have no SPI internal flashing support), move all dev related helpers down the file. - revert old behavior for board.cpio construction; only construct if boards/board/initrd exists (currently Librem 11, Librem mini, and Librem mini 2) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
d8749b9
to
8417d4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a data.cpio reproducibility issue introduced by #1961 by reverting the unconditional board.cpio build and refactoring the data.cpio construction logic.
- Removed the old initrd_data_add macro and related calls.
- Introduced a new macro ("stage_data_file") to individually stage data files for reproducible builds.
- Consolidated and restructured cpio packaging rules including modules.cpio, tools.cpio, heads.cpio, and added an inject_gpg target.
$(if $(shell [ -d "$(src)" ] && echo yes),\ | ||
$(foreach f,$(shell find $(src) -type f),\ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Awesome yes.
Is the expected value. |
fixes #1969