-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
storing the build date inside firmware #13
Comments
Nice fix, I will apply it and check all is ok |
Done thanks for your contribution |
In case there is any problem with: |
I have tested it with success but any feedback is welcome and if some On 6 September 2015 at 13:24, itsbert notifications@github.com wrote:
|
No, no problem here. it works for me. I just think that it is slightly less obtuse and more easily understood, but the name of the define, AIRSPY_FW_CHECKIN_DATE, helps to make things clear. EDIT: I haven't used git from python so it's behaviour may be different than the command that I'm using. : I also edited the post that I made to use "%ai" instead of "%cd" |
This has been at the back of my mind for a while, that two firmwares built by two people in different parts of the world, with the same tools, will get different checksums because the date that the binary was built was different. Included the date that the binary was built in a firmware is less useful than the date of the last commit in git. If 20 years from now, someone built the current firmware, having 2035-MM-DD as the date in the firmware version string would be less useful than seeing 2015-07-14.
Can the following line in firmware/scripts/airspy_fw-version.py
print '#define AIRSPY_FW_BUILD_DATE "' + date.today().isoformat() + '"'
be changed to something along the lines of the following:
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.show(['--pretty=format:%ai']).partition(' ')[0] + '"'
and version_string in firmware/airspy_m0/airspy_m0.c be changed as well, to use AIRSPY_FW_CHECKIN_DATE instead of AIRSPY_FW_BUILD_DATE or whatever you decide.
Feel free to close this, and go "nope, not going to happen", I just watched the below CCC video and it made me think about the different hashes again, and it probably put me in the mood for a mad rant :)
https://media.ccc.de/browse/conferences/camp2015/camp2015-6657-how_to_make_your_software_build_reproducibly.html
The text was updated successfully, but these errors were encountered: