Bug 37367 - Support reproducible builds
Summary: Support reproducible builds
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: Doctools ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-03 15:43 UTC by Jo Shields
Modified: 2017-12-12 21:40 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 37367 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Jo Shields 2016-01-03 15:43:16 UTC
As of 26842, when Mono compiles C# code, it uses a zero timestamp, such that multiple repeated builds of the same code always are bit-identical. See https://wiki.debian.org/ReproducibleBuilds/About for background on why this is good.

The same does not apply to mdoc output, which includes "real" timestamps for the files inside the .zip. e.g. https://reproducible.debian.net/dbd/unstable/amd64/mono_4.2.1.102+dfsg2-5.diffoscope.html
Comment 1 Joel Martinez 2017-12-12 21:25:50 UTC
So to be clear, you're referring to the output from `mdoc assemble` ?

mdoc uses SharpZipLib to write the zip file ... I can/will do some digging, but are you aware of any best-practices here? Should I set the all of the timestamps on the file to DateTime.MinValue, or something?
Comment 2 Jo Shields 2017-12-12 21:34:29 UTC
(In reply to Joel Martinez from comment #1)
> So to be clear, you're referring to the output from `mdoc assemble` ?
> 
> mdoc uses SharpZipLib to write the zip file ... I can/will do some digging,
> but are you aware of any best-practices here? Should I set the all of the
> timestamps on the file to DateTime.MinValue, or something?

MinValue, or pick a static date, or use another static date from somewhere (e.g. ship a release date with releases, and use that). As long as the date isn't DateTime.Now, it's fine
Comment 3 Joel Martinez 2017-12-12 21:40:28 UTC
Thanks ... I've created a GH issue to track this feature.  
https://github.com/mono/api-doc-tools/issues/185