[Pkg-javascript-devel] Bug#1029307: node-katex: reproducible-builds: build path in .mjs files

Vagrant Cascadian vagrant at reproducible-builds.org
Wed Sep 23 05:39:50 BST 2026


user reproducible-builds at lists.alioth.debian.org
usertag 1029307 -kernel -timestamps +buildpath
thanks

Correcting usertags...

live well,
  vagrant

On 2023-01-20, Vagrant Cascadian wrote:
> Source: node-katex
> Severity: normal
> Tags: patch
> User: reproducible-builds at lists.alioth.debian.org
> Usertags: timestamps kernel
> X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
>
> 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
> From bb4205c0a9b6f045bb614b3b9d9212a7b7c4ffe9 Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant at reproducible-builds.org>
> Date: Sat, 21 Jan 2023 02:41:10 +0000
> Subject: [PATCH] debian/rules: Replace build path with installed path to
>  katex.mjs in several contrib .mjs files.
>
> ---
>  debian/rules | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/debian/rules b/debian/rules
> index aba1567..9c3a32a 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -17,3 +17,6 @@ override_dh_install:
>  	# Remove useless files
>  	rm -rf debian/katex/usr/share/nodejs/katex/src/metrics \
>  		debian/katex/usr/share/nodejs/katex/src/fonts/generate_fonts.py
> +	# Replace build path with installed path
> +	sed -i -e "s,$(CURDIR)/contrib/katex.mjs,/usr/share/javascript/katex/katex.mjs,g" \
> +		debian/*/usr/share/javascript/katex/contrib/*.mjs
> -- 
> 2.39.0
-------------- 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/pkg-javascript-devel/attachments/20260922/19ceb59e/attachment.sig>


More information about the Pkg-javascript-devel mailing list