#1009934 openssl: reproducible-builds: Embeded compiler flags contain build paths

Package:
src:openssl
Source:
openssl
Submitter:
Vagrant Cascadian
Date:
2022-05-01 16:15:02 UTC
Severity:
normal
Tags:
#1009934#5
Date:
2022-04-20 22:46:41 UTC
From:
To:
The compiler flags usually contain the build path on Debian package
builds, and openssl embeds the compiler flags used in various binaries:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/armhf/diffoscope-results/openssl.html

  /usr/lib/libcrypto.so.1.1

  compiler:·gcc·-fPIC...-ffile-prefix-map=/build/1st/openssl-1.1.1n=.·-fstack-...
  vs.
  compiler:·gcc·-fPIC...-ffile-prefix-map=/build/2/openssl-1.1.1n/2nd=.·-fstack-...


The attached patch fixes this by adjusting util/mkbuildinf.pl to strip
the buildpath out and replace it with the with the placeholder string
"BUILDPATH".


Unfortunately, there are other outstanding issues affecting the
reproducibility of openssl, but applying this patch should reduce the
differences, making it easier to debug the remaining issues.


Thanks for maintaining openssl!


live well,
  vagrant

#1009934#10
Date:
2022-05-01 06:34:41 UTC
From:
To:
control: forwarded -1 https://github.com/openssl/openssl/pull/11545
…

so this report looked awkwardly familiar. The pull request
https://github.com/openssl/openssl/pull/11545

should work for you, right?

Sebastian

#1009934#17
Date:
2022-05-01 16:11:21 UTC
From:
To:
That looks great, glad it is in progress!

It should be updated to also handle -fmacro-prefix-map and
-ffile-prefix-map (basically combining both -fmacro-prefix-map and
-fdebug-prefix-map), which were more recently added to various
compilers.

Fairly recently -ffile-prefix-map became the default dpkg-buildflags.

I'll comment on the pull request...

live well,
  vagrant