Bug#1006473: nix: reproducible-builds: build path embedded in debug symbols

Vagrant Cascadian vagrant at reproducible-builds.org
Sat Feb 26 00:13:57 GMT 2022


Source: nix
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

The build path is embedded in debug symbols and possibly other places:

  /usr/lib/debug/.dwz/x86_64-linux-gnu/nix-bin.debug

  (string)        /tmp/reprotest.0U8byB/const_build_path
  vs.
  (string)        /tmp/reprotest.0U8byB/build-experiment-1

The attached patches fix this by passing -ffile-prefix-map via the
GLOBAL_CXXFLAGS variable in debian/rules.

Another option would be to figure out how to pass the values from
dpkg-buildflags...  CXXFLAGS should already be set by
debhelper/dpkg-buildflags, but it appears nix may ignore those values?


With this patch applied, nix should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining nix!


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-rules-Pass-argument-to-remove-full-path-to-bu.patch
Type: text/x-diff
Size: 993 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20220225/54883c85/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20220225/54883c85/attachment.sig>


More information about the Reproducible-bugs mailing list