-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[gitian] Default reference_datetime to commit author date #7283
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
[gitian] Default reference_datetime to commit author date #7283
Conversation
@jonasschnelli I don't want to break your debian box, so would you mind testing this after updating your gitian-builder to the latest version? |
Ping @theuni Concept ACK however: There's a potential determinism problem with making the datetime depend on the bitcoin repository: the dependencies are built with datetime set to a single commit date, then cached, then next time they'll be reused. If the dependencies embed the datetime anywhere, different builders can get different result depending on when they built the dependencies. |
Appears to be working:
|
Agree with @laanwj: would it be possible to build and cache the dependencies still with a fixed time? |
af1b8b2
to
2222962
Compare
BTW: Ugh. I think it was a mistake to add the build date there. It's worthless at most, and deceptive at the least. |
@laanwj I'm all for removing the build date and git commit from tagged releases. That would also mean that we could merge the signing steps, since the only reason they're staggered is the changed commit hash in the binary. @jonasschnelli I believe we've already removed all time sources from the depends. @laanwj I believe that would already be the case? |
Faketime prevents that at the moment by setting the date/time stamp to a fixed value |
Then, wouldn't stuff like be65628 break this as well? Anyway, depends could use a different (static) date other than |
You're right, but be65628 is a one-time change. So dependencies built before and after that may differ. The problem with this is that the time/date will change every time. Not sure it is an issue, but as this is a non-critical detail I'd like to be sure it doesn't cause problems down the line before merging it. |
2222962
to
fa7dc3b
Compare
Needs rebase |
297fd3f
to
fa34926
Compare
fa34926
to
fa6127f
Compare
@laanwj I've been running gitian builder to see if the results match:
So this appears to indicate that the result is independent |
fa6127f
to
fa58c76
Compare
@theuni Do you think this is ready to merge? |
Sorry for the delay, testing this. |
Yes, after taking a closer look, unfortunately this will not play nice with depends. Mostly because of the timestamps inside of tarballs, but also .a's and other problematic formats. Note that the end-results may or may not be the same, but the intermediates would differ. We can revisit this later though, as options for tar/binutils/ld/etc have been added recently that reliably purge this data. The only realistic thing I see that we can do here for now without a major overhaul would be to set the faketime once to a hard-coded date for depends, so that it remains the same regardless of the commit used, then reset for the bitcoin build itself. |
@theuni Something like the last commit I pushed (untested)? |
@MarcoFalke Yep, I think that approach should be fine. |
218029a
to
fad0d5a
Compare
fad0d5a
to
fa42a67
Compare
Not sure why gitian fails on the windows build...
|
Can one of the admins verify this patch? |
I think it would be better to remove use of the build date in our binary completely, making the use of faketime unnecessary. We don't have control over that for the dependencies but we do for our own code. If you want the date/time of the last commit somewhere in the binary there are better ways to do that (e.g. through |
The motivation for this pull was to avoid regular "bump date" pulls such as #7251 (comment). The build date was removed in #7732 and I don't think we should add the commit date to the gui. |
If this pull gets closes, it might be worth to update https://github.com/bitcoin/bitcoin/blob/950be19727a581970591d8f8138dfe4725750382/doc/release-process.md#bitcoin-maintainersrelease-engineers-update-version-in-sources and mention to bump the date in the same go. |
68146f6
to
fa42a67
Compare
There's another place where this matters: the times/dates in the .zip files and .tar.gz archives of the binary distribution. I guess that makes it worth doing this.
Only from the GUI though. It's still logged in two places:
|
Well my point was more 'why would we care about this'. If there is no reason to care about this date at all, there's no point in bumping it either. E.g. after making sure it doesn't get shown in the GUI or log anymore. |
Upstream gitian updates This PR pulls in all gitian-related PRs that have been merged upstream since 0.11.2. The only ones I left out were documentation-only PRs, because we removed `doc/gitian-building.md` at some point. Here are the commits applied here, in the order shown in `git log` (ie. last to first): - bitcoin/bitcoin#7283 - fa42a67 - fa58c76 - bitcoin/bitcoin#8175 - 74c1347 - bitcoin/bitcoin#8167 - 7e7eb27 - ad38204 - b676f38 - bitcoin/bitcoin#7776 - f063863 - bitcoin/bitcoin#7424 - a81c87f ~ we already partly applied - a8ce872 - f3d3eaf ~ we already partly applied - 475813b - ~~cd27bf5~~ X we already applied - bitcoin/bitcoin#7060 - 3b468a0 ~ we removed doc/gitian-building.md - ~~99fda26~~ X we removed doc/gitian-building.md - bitcoin/bitcoin#7251 - fa09562 - bitcoin/bitcoin#6900 - ~~2cecb24~~ X we removed doc/gitian-building.md - 957c0fd - 2e31d74 - ~~0b416c6~~ X we removed QT - 9f251b7 - bitcoin/bitcoin#6854 - 579b863 ~ we already partly applied Part of #540
No description provided.