-
Notifications
You must be signed in to change notification settings - Fork 131
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
Make builds of esp_app_desc
reproducible
#257
Conversation
This is relevant when |
Ty for your PR, in the end we found the culprits and got it working ;) PR LGTM! |
efc41c6
to
429fb72
Compare
@Vollbrecht sorry for the force pushes here, I think this is now correct. |
@Vollbrecht I believe 3f0c137 is better. Now my question is why |
do you mean because it says so in the documentation, or is it the real behavior? Could be that the docu is wrong here. You can check what flags are set and not with |
Thanks for the tip! This is the real behavior. When I remove the When I set If I want a reproducible build, I have to do:
|
hmm that sounds interesting, for me logically i would assume that CONFIG_APP_REPRODUCIBLE_BUILD will unset CONFIG_APP_COMPILE_TIME_DATE. Maybe its a bug in esp-idf? Well for our case i would see it more ergonomic to just use the CONFIG_APP_REPRODUCIBLE_BUILD as the base flag to erase the timing data from the app_desc, if the user choose to use our macro for it. Though i have no strong opinion on it. |
@Vollbrecht I am happy to leave that decision to the maintainers here - just let me know which solution you would merge. |
i think i would go with CONFIG_APP_REPRODUCIBLE_BUILD last word and the one who will merge is @ivmarkov |
Based on the above we should do exactly what ESP IDF 5 does, here, i.e., only set the date and time when #[cfg(all(esp_idf_app_compile_time_date, not(esp_idf_app_reproducible_build)))] ... and otherwise keep them zeroed. |
5d46da1
to
5d35b4e
Compare
Done. Thanks for your time. |
Only set time and date fields of `esp_app_desc_t` when `esp_idf_app_compile_time_date` is set and `esp_idf_app_reproducible_build` is not set
don't forget to run |
It seems to me both of them are happy with f4d1296 ? |
Adding onto this, I found that adding |
Zero out time and date fields of
esp_app_desc_t
whenesp_idf_app_compile_time_date
is not set