rkd77 / elinks

Fork of elinks
Other
349 stars 38 forks source link

HTML manuals builds are not reproducible #219

Closed aelmahmoudy closed 1 year ago

aelmahmoudy commented 1 year ago

The build of a couple of HTML manuals (manual.html & hacking.html) are not reproducible:

<div id="footer-text">
Last updated 14-Apr-2023 17:16:56 GMT
 </div>
aelmahmoudy commented 1 year ago

I was mistaken, I was building by manually adding -DCONFIG_REPRODUCIBLE to CFLAGS & CXXFLAGS. I found tabout the --enable-reproducible config option, and rebuilt. Yet I got this error:

 [ASCIIDOC]   doc/elinks.1.xml
FAILED: unexpected error:
------------------------------------------------------------
Traceback (most recent call last):
  File
"/builds/aelmahmoudy/elinks/debian/output/source_dir/doc/.././doc/tools/asciidoc/as
ciidoc.py", line 3764, in asciidoc
    document.init_attrs()
  File
"/builds/aelmahmoudy/elinks/debian/output/source_dir/doc/.././doc/tools/asciidoc/as
ciidoc.py", line 1066, in init_attrs
    d = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
------------------------------------------------------------
make[2]: *** [Makefile:185: elinks.1.xml] Error 1

Python 3.11 was used during build. Full build log: https://salsa.debian.org/aelmahmoudy/elinks/-/jobs/4138496/raw

rkd77 commented 1 year ago

There is another configure option: --with-source-date-epoch=TIME

TIME is number of seconds since epoch I guess. Try it combined with --enable-reproducible

aelmahmoudy commented 1 year ago

Yes, I used that and the problem got fixed. So it seems that time.time() returns an empty string, causing that build error.