Skip to content
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 the build reproducible #699

Merged
merged 1 commit into from Aug 16, 2022
Merged

Make the build reproducible #699

merged 1 commit into from Aug 16, 2022

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Aug 16, 2022

Whilst working on the Reproducible Builds effort I noticed that psi could not be built reproducibly.

This is due to using CMake's TIMESTAMP feature without specifying a timezone. This means that, even if SOURCE_DATE_EPOCH is present, the value (and thus the binary) will vary depending on the build machine's timezone setting.

(I originally filed this in Debian as bug #1017473.)

Whilst working on the Reproducible Builds effort [0] I noticed that
psi could not be built reproducibly.

This is due to using CMake's TIMESTAMP feature without specifying a timezone.
This means that, even if SOURCE_DATE_EPOCH is present, the value (and thus the
binary) will vary depending on the build machine's timezone setting.

I originally filed this in Debian as bug #1017473 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/1017473
@Ri0n Ri0n requested a review from Vitozz August 16, 2022 19:30
@Ri0n
Copy link
Member

Ri0n commented Aug 16, 2022

Hi @lamby.
I think UTC is a good idea. But I don't believe this make the build reproducible since we put build date to Psi version.
In other words if you build psi today and tomorrow the binaries will be different.

@Ri0n Ri0n merged commit cf8f615 into psi-im:master Aug 16, 2022
@lamby
Copy link
Contributor Author

lamby commented Aug 17, 2022

Not quite - since CMake 3.8.0, CMake will use the SOURCE_DATE_EPOCH environment variable if it exists, so ensuring the output is in UTC will indeed actually make psi reproducible from day to day.

@Ri0n
Copy link
Member

Ri0n commented Aug 17, 2022

I see. Thanks @lamby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants