auerswal / ssocr

Seven Segment Optical Character Recognition
https://www.unix-ag.uni-kl.de/~auerswal/ssocr/index.html
GNU General Public License v3.0
202 stars 38 forks source link

reproducibility #22

Closed alexmyczko closed 1 year ago

alexmyczko commented 1 year ago

Hi

I have these two reports, do you want to fix them in the future?

https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ssocr

auerswal commented 1 year ago

Thanks for letting me know! :-)

For the record, both bug reports pertain to reproducible builds, not to functional issues in ssocr.

I'll have to look into it some more, but at first glance this seems to concern two reproducibility issues:

  1. Some compiler flag needs to be added in order to tell the compiler that its output should not contain information about the build system (or build date). (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021514)
  2. Building the man page adds the build date. (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021516)

The second issue is something I would like to address, but I am not yet sure, how exactly. I might look into something similar to what I did with the section man page, see https://github.com/auerswal/section/blob/master/Makefile#L29 and https://github.com/auerswal/section/blob/master/generate_man_page_date.sh.

For the first issue, I have to find out what GCC option(s) to add, and if the same option(s) work(s) for LLVM, too. If the different compilers require different options, then I'd rather not add them to the Makefile, but rather document them instead. Thus the suggested change to the build process for the Debian package might be preferable.

auerswal commented 1 year ago

I have adjusted the man page generation to use the latest release date from the NEWS file as man page date. This should address Debian bug 1021516 "ssocr: reproducible-builds: date in ssocr manpage".

Regarding Debian bug 1021514 "ssocr: reproducible-builds: build path embedded in /usr/bin/ssocr", this seems to be caused by default GCC functionality, not by the ssocr source code. As such I do not think that any source code changes are warranted to address this issue. The Debian bug report includes a patch to the Debian package that allows to pass in additional information during package creation to create a reproducible build of the Debian package. It seems to me as if this issue is best addressed by changes in the Debian packaging, not in the upstream ssocr project.

Of course, if I were provided with actionable information regarding the 1021514 bug, I might reconsider that issue.