michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
428 stars 157 forks source link

allow to override man-page date #193

Closed bmwiedemann closed 7 years ago

bmwiedemann commented 7 years ago

in order to allow for reproducible builds. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable.

michaelrsweet commented 7 years ago

I'd prefer not to use an environment variable for this, but am happy to add a command-line argument that can pass the environment variable.

bmwiedemann commented 7 years ago

The disadvantage with command-line arguments is that every distribution needs to add it explicitly in their build process, which this variable is only set in one place and already used by hundreds of packages.

But then, it is still better than what we have now ;-)

michaelrsweet commented 7 years ago

and the disadvantage of the environment variable is that it can cause unintended behavior... This isn't the only place I'd need to change things - also the HTML, docset, and new EPUB support...

I assume you've addressed the compiler tool chain issues already?

bmwiedemann commented 7 years ago

At least for mxml itself, this was the only issue. And yes, we got such patches into gcc, cmake and rpm upstream already, so we can already build 8098 of 10636 openSUSE packages with bit-identical results. I publish such stats (updated every few weeks) at http://rb.zq1.de/compare.factory/rbstats and diffs like http://rb.zq1.de/compare.factory-20170324/mxml-compare.out

What 'unintended behaviour' are you afraid of? Some concerns are already addressed in the source-date-epoch FAQ.

michaelrsweet commented 7 years ago

I've committed a simpler change to support the environment variable.

[master b79d3e0] Add support for SOURCE_DATE_EPOCH environment variable (Issue #193)

bmwiedemann commented 7 years ago

tested your change. works nicely. Thanks again.