Add a reproducibility option for building ecodes.c#242
Conversation
ecodes.c currently contains the kernel info of the build machine and the full path of the input*.h headers: This is not reproducible as output can change even is headers content do not. Downstream distributions might package ecodes.c and get non-reproducible output. To fix this: introduce a --reproducible option in the build: - in setup.py build_ecodes command - in underlying genecodes_c.py Note: These options are disabled by default so no change is expected in current builds. Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
|
I can see removing the timestamps and kernel version, but not the headers. That's somewhat important info and shouldn't change. |
|
I should have mentioned that I come from the Yocto project (embedded software), in this cross-compiling environment : the targeted headers are not the system headers and come from a very user specific path (often deep in the home of the user). Writing this path to a file cause us reproducibility issue (hence this PR). |
|
Thank you for the contribution - I'm happy to hear that this project is being used in Yocto. I hope you don't mind that I changed |
I don't mind at all. I will upgrade to 1.9.2 and switch to |
ecodes.ccurrently contains the kernel info of the build machine and the full path of theinput*.hheaders: This is not reproducible as output can change even is headers content do not. Downstream distributions might packageecodes.cand get non-reproducible output.To fix this: introduce a
--reproducibleoption in the build:setup.py build_ecodescommandgenecodes_c.pyNote: These options are disabled by default so no change is expected in current builds.
Here is a sample of the
ecodes.coutput: