nvm
nvm copied to clipboard
Adds support for OpenBSD's native tar
Hello all,
In order to download and unpack node source files under OpenBSD it is necessary to execute the extraction in two steps. Since OpenBSD's tar is not integrated with xz (as GNU tar is), the -J option is not available.
This commit adds a function that figures this out and handles the proper file extraction under OpenBSD, removing GNU tar's dependency. The previous behaviour for other operating systems should stay untouched (more testing and feedback are welcome) (and maybe aix can also benefit from it, I don't know).
This PR does not handles the next issue, which is to compile certain versions of Node.js under OpenBSD. This issue, a bit more specific, is related to SSL libraries and requires more attention.
I'm creating the pull request to ask you, if it makes sense to add this simple feature, even though the process is not entirely automated.
Does it?
Notes:
- I did not add any tests because I wasn't sure what exactly should be tested in this case;
- OpenBSD versions previous to 6.4 were not tested.
Fixes #2134
Thanks
What's the latest here? Anyone know?
Hey @tylerdmace, I've stopped on the point where a fresh node installation breaks. By default it expects to find OpenSSL, but it finds LibreSSL instead.
I did not have time to dig through it since my last commit. Would you like to join this effort? Are you an expert on those matters, and would like to help?
Cheers.
If anyone wants to help, please do not open a new PR - either @aramisf can add you to their fork, or you can post a link to your commits here and I can pull them in. Thanks!
@aramisf Unfortunately, I do not have the time nor energy to spend on this right now. Was just curious if there was active work being done that I just couldn't see. Thanks for the update!
@tylerdmace same here bro, not enough time to dedicate :( I shall update my branch, at least.. 😅
What needs doing to get this over the line?
@adamsteen https://github.com/nvm-sh/nvm/pull/1972#issuecomment-502554490 - at the least, a rebase, and ensuring that tests pass, and I'll be happy to give it a fresh review.
@adamsteen & @ljharb last time I was playing around with the update, the support for LibreSSL was the blocker.
I didn't go deep down in that direction, but while using tarballs, the OpenSSL dependency was always the point where the compilation broke. OpenBSD uses LibreSSL instead of OpenSSL, and that is the issue regarding compiling from source.
I don't know exactly how to manage that via the script, so I ended up not putting more effort on it.
If you folks are willing to cleanup the pending PRs, in the repo, feel free to close this one. I'm not sure I'll be able to support this in the future :[
You're welcome to share your thoughts.
I'd prefer to leave the PR open indefinitely, in case somebody can post a link to an updated branch that fixes it, so I can update this PR in-place at that time.
@aramisf unfortunately you deleted your fork, which means this PR is never recoverable :-/
@ljharb yeah, sorry about that, man. I was doing some cleanup here, and decided to remove that one. There were so many conflicts already. Hard to keep it up :(
But the diff is still there, it is still possible to check what to do, in case someone gets interested in doing it :D