[rb-general] patch and groff

Fabian Keil fk at fabiankeil.de
Thu May 11 13:26:20 CEST 2017


"Bernhard M. Wiedemann" <bernhardout at lsmod.de> wrote:

> I noticed some reproducibility issues arriving from software like groff
> using the mtime of its input files (e.g. groff.man) to add text to its
> output file (e.g. groff.1(.gz)) - in this case via its mtime.sh
> 
> That is perfectly reproducible as long as you only use the upstream
> tarball, but then we apply a patch that modifies the input file
> and thus gets the current build time inserted into the output.
> 
> One (ugly) way to avoid that here is
> find -name \*.man | xargs touch -d at ...
> 
> We could also patch mtime.sh to clamp output values to SOURCE_DATE_EPOCH
> 
> Or we call patch --set-utc --force
> but unfortunately many patches do not contain timestamps.
> 
> or we patch patch itself to keep mtime of modified files - but that
> might confuse make in some places.
> 
> I was wondering how others were solving such issues.

In ElectroBSD this was fixed (for the man pages in the base system)
by patching mtime.sh:
https://www.fabiankeil.de/sourcecode/electrobsd/ElectroBSD-r312620-6cfa243f1516/0079-contrib-groff-mdate.sh-Use-EPOCH_DATE-when-set.diff

For the distribution tar balls the timestamps are faked by using
an mtree spec file. Example:
https://www.fabiankeil.de/sourcecode/electrobsd/ElectroBSD-r312620-6cfa243f1516/0080-Fake-modification-time-smarter-for-everything-but-EXT.diff

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20170511/c8576906/attachment.sig>


More information about the rb-general mailing list