johnsonjh / duma

duma: Detect Unintended Memory Access (D.U.M.A.) - A Red-Zone memory allocator
https://github.com/johnsonjh/duma
GNU General Public License v2.0
99 stars 10 forks source link

Reproducible build issue (use of 'date') #206

Closed PeterBBBBB closed 9 months ago

PeterBBBBB commented 9 months ago

Use of 'date' in make_git_source_version.sh makes the build unreproducible. Can be fixed (on Linux anyway) by changing to '__DATE__'

johnsonjh commented 9 months ago

@PeterBBBBB

I believe that is used only for the herald:

DUMA (shared) 2.5.24.BETA.1+-g7340050 2022-06-16 (compiled 2022-09-04)

If you require a fully reproducible build (and cannot or don't want to use something like libfaketime), it would probably be better to just remove the compilation date from the herald completely.

Would making that optional be a good solution?

PeterBBBBB commented 9 months ago

The problem is that without some fix, it fails Debian's reprotest tool, so we have a patch to change date to __DATE__ I guess that making the date in the herald optional should also fix it.

johnsonjh commented 9 months ago

@PeterBBBBB

If you set REPRODUCIBLE=1 in your package build environment (assuming this is a completely clean build environment for package building purposes) does this appease things?

Herald would be like: DUMA (static) 2.5.24.BETA.1+-g76d4987 2023-11-29.

(with master)

PeterBBBBB commented 9 months ago

Hi Jeffrey, with the latest version of make_git_source_version.sh (7ba9feb), reprotest works in both 2.5.21 & 2.5.24.BETA

However, it works in both cases without needing to set the variable! Anyway, I suggest the issue be closed. When 2.5.24 is released I can obviously drop my patch.

Cheers, Peter