#1029307 node-katex: reproducible-builds: build path in .mjs files

#1029307#5
Date:
2023-01-21 02:53:56 UTC
From:
To:
The build path is embedded in various .mjs files:

https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/node-katex.html

  /usr/share/javascript/katex/contrib/auto-render.mjs

  import·katex·from·'/build/1st/node-katex-0.16.4+~cs6.1.0/contrib/katex.mjs';
  vs.
  import·katex·from·'/build/2/node-katex-0.16.4+~cs6.1.0/2nd/contrib/katex.mjs';

Obviously, the build path is not likely to be present on an installed
system, so these files are presumably not functional.

The attached patch fixes this in debian/rules by replacing the build
path to katex.mjs with the installed path of katex.mjs.

Alternately, dropping these non-functional .mjs files might fix the
issue?

Hopefully it might also be possible to fix the problem some other way;
my guess is that rollup.config.js is where the build path gets embedded,
though I am honestly not sure:

https://sources.debian.org/src/node-katex/0.16.4%2B~cs6.1.0-1/rollup.config.js/#L18


According to my local tests, with this patch applied node-katex should
build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining node-katex!

live well,
  vagrant