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 #430
Make the build reproducible #430
Conversation
|
It should also be done on the mate-about/meson.build file, otherwise the build won't be reproducible using meson. |
Whilst working on the Reproducible Builds effort [0] we noticed that mate-desktop could not be built reproducibly. This is is because it generated a "release year" etc. based on the current build date which was embedded in the binary and possibly other files. A patch attached that uses SOURCE_DATE_EPOCH [1] instead. As a side-effect, this fixes the (accidental) reset of MATE_DATE in the Autotools build system in inherited from mate-desktop-environment.git. This was originally filed in Debian as #951357 [2]. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ [2] https://bugs.debian.org/951357
731b97f
to
6d8dfce
Compare
|
Sure thing; updated patch attached. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me:
$ ./autogen.sh --prefix=/usr && make && sudo make install
$ mate-about$ meson setup builddir --prefix=/usr && ninja -C builddir && sudo ninja -C builddir install
$ mate-about|
test: Year 2038 problem PASSED Screenshot showing the year 2038: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got a clean build with meson, and it correctly showed the year 2020 with normal clock settings in mate-about.
Note that being able to reproduce and hash-check builds in general benefits security both by allowing users to confirm builds and because of that deterring malicious persons or organizationbs from distributing builds from covertly altered source.

Whilst working on the Reproducible Builds effort I noticed that mate-desktop could not be built reproducibly.
This is is because it generated a "release year" based on the current build date which was embedded in the binary and possibly other files. A patch attached that uses SOURCE_DATE_EPOCH instead.
As a side-effect, this fixes the (accidental) reset of
MATE_DATEin the Autotools build system in inherited frommate-desktop-environment.git.This was originally filed in Debian as #951357.