node-build-update-defs
node-build-update-defs copied to clipboard
Merge definitions from different sources (or support musl libc pre-compiled binaries)
Currently, node-build only supports installing a bare version from a single source (nodejs official dist). Different variants or branches need to be prefixed. For example, installing a release-candidate version would be something like node-build v14.0.0-rc1 instead of node-build v14.0.0. This makes sense for variants where the binary is a completely different premise (like the graalvm and chakracore branches) or if it's on an unstable release (nightly/rc).
Unnoficial builds, however, have feature parity and the same release cycle as the main stable branch but are compiled for not-so-popular distros/architectures (musl libc, x86 and armv6). My idea is to make these work with bare versions. Running node-build 14.0.0 on a muslc system would download a binary from https://unofficial-builds.nodejs.org/download/release/, and when installing from an officially supported system, it would download binaries from the default https://nodejs.org/dist/
For that idea to work, we would need to add new logic to handle multiple mirror URLs in a single scrapper or logic for merging two scrapper results in a single one. The definition file would then contains binaries from all the different architectures present in all mirrors.
I can give a shot at the implementation, but I need some confirmation if the idea is in the right direction
It would be great to have an official way to build the glibc 2.17 unofficial builds of v18