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
Support defining compilation date in $SOURCE_DATE_EPOCH #513
Conversation
James McCoy wrote:
I do not like picking up environment variables that happen to lay Why not add an option, a command line flag to configure? What is the difference between a professional and an amateur? /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
On Thu, Dec 03, 2015 at 12:38:41PM -0800, Bram Moolenaar wrote:
Well, that's the implementation defined in the spec:
The reason for the spec is to define how one can take advantage of this
The only thing it affects is the "compiled $date" string in :version.
Because that makes Vim its own unique snowflake, instead of adhering to Cheers,James |
James McCoy wrote:
Sorry, I just do not agree with that spec. Building software using hundred-and-one symptoms of being an internet addict: /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
This is a very targeted environment variable, so I don't see why it would be set "for various reasons" or why it's bound to go wrong. The build is already affected by environment variables like CFLAGS, CPPFLAGS, and LDFLAGS, which have far more impact to the build than SOURCE_DATE_EPOCH would. |
2b561f5
to
51ad2b5
Compare
What is your matter? Different timezone between local and build-server? |
On Thu, Dec 3, 2015 at 2:22 AM, James McCoy vim-dev-github@256bit.org wrote:
I don't care what some Debian employee says that we MUST, MUST NOT, This is as reproducible as anyone sensible could want; anything more Best regards, |
Hi Tony,
Debian doesn't have employees and this is not just a Debian effort, as can be seen at https://reproducible-builds.org/who/. As I stated from the start, this is a
If all you're concerned about is whether the source is the same as the
This is very important for various reasons but one obvious reason is increased
If you want to have a constructive discussion, I'll be glad to do so. If not, |
No, the issue is that embedding the date/time in the compiled output introduces It's understandable that this may not matter to the average Vim user/developer. |
Well, as the Solaris maintainer of vim, I appreciate this patch. Reproducible binary builds are important to us, and this is a great step. Thank you. |
51ad2b5
to
595fc0c
Compare
Rebased to v8.1.0105. |
595fc0c
to
b35c809
Compare
Codecov Report
@@ Coverage Diff @@
## master #513 +/- ##
==========================================
+ Coverage 82.24% 82.26% +0.01%
==========================================
Files 134 134
Lines 147604 147604
==========================================
+ Hits 121404 121421 +17
+ Misses 26200 26183 -17
Continue to review full report at Codecov.
|
There is an ongoing effort[0] to make FOSS software reproducibly buildable. In order to make Vim build reproducibly, it is necessary to allow defining the date/time that is part of VIM_VERSION_LONG as part of the build process. This commit enables that by adding support for the SOURCE_DATE_EPOCH spec[1]. When the $SOURCE_DATE_EPOCH environment variable is defined, it will be used to populate the BUILD_DATE preprocessor define. If BUILD_DATE is not defined, the existing behavior of relying on the preprocessor's __DATE__/__TIME__ symbols will be used. [0]: https://reproducible-builds.org/ [1]: https://reproducible-builds.org/specs/source-date-epoch/
b35c809
to
caec760
Compare
Looks like this is reasonably widely supported now. Giving a warning somewhere that the date is fixed will help. I would prefer to give a warning when the build date differs from now, but that seems complicated. |
There is an ongoing effort to make FOSS software reproducibly buildable. In order to make Vim build reproducibly, it is necessary to allow defining the date/time that is part of
VIM_VERSION_LONG
as part of the build process.This commit enables that by adding support for the
SOURCE_DATE_EPOCH
spec. When the$SOURCE_DATE_EPOCH
environment variable is defined, it will be used to populate theBUILD_DATE
preprocessor define.If
BUILD_DATE
is not defined, the existing behavior of relying on the preprocessor's__DATE__
/__TIME__
symbols will be used.