Re: [hatari-devel] Preparing release 2.3 - re-producible builds

[ Thread Index | Date Index | More Archives ]


Nicolas, do you have any comments on this?

On 10/16/20 12:53 PM, Eero Tamminen wrote:
On 10/16/20 8:40 AM, Thomas Huth wrote:
Am Fri, 16 Oct 2020 00:50:28 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
Another user applied patch to support
re-producible builds:

=> I think we should actually get rid of *_fileid stuff in the
sources before release.

They're obsolete with GCC adding build IDs to
object files, and distros requiring reproducible
builds.  I've never heard anybody needing them...

Is there any objection on me removing them?

They've been useful in the past already to identify whether other
people steal our GPL code into their propriatary emulators, so I'd
rather prefer to keep them.

Some files seem to be missing them:
# skip external files
$ skip="fgrep -v -e cpu/ -e convert/ -e gui-osx/"
$ git ls-files '*.c' | $skip > files-all
$ git ls-files '*.c' | $skip | xargs grep -l _fileid > files-id
$ diff -u files-all files-id

=> Besides all test files missing fileid,
also these are missing them:

Should they have *_fileid also?

But we could remove the __DATE__ and
__TIME__ macros from them to allow reproducible builds, I guess?

Hm. After removing those:
$ git grep -l _fileid | \
   xargs sed -i 's/\(_fileid.*[^ ]\) *:.*$/\1";/'

That still leaves:
$ git grep -e __DATE__ -e __TIME__
src/includes/version.h://#define PROG_NAME "Hatari v2.3.0-devel (" __DATE__ ") " CPU_CORE_NAME src/main.c:     Log_Printf(LOG_INFO, PROG_NAME ", compiled on:  " __DATE__ ", " __TIME__ "\n");

I think TIME should be remove from log output,
but keeping DATE seems still useful although
it causes some non-reproducibility to Hatari

Mail converted by MHonArc 2.6.19+