nvm icon indicating copy to clipboard operation
nvm copied to clipboard

Adds support for OpenBSD's native tar

Open aramisf opened this issue 6 years ago • 10 comments

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

aramisf avatar Dec 31 '18 16:12 aramisf

Thanks

KFPJ4XL9JMNP avatar Jan 01 '19 21:01 KFPJ4XL9JMNP

What's the latest here? Anyone know?

tylerdmace avatar Jun 16 '19 02:06 tylerdmace

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.

aramisf avatar Jun 17 '19 06:06 aramisf

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!

ljharb avatar Jun 17 '19 06:06 ljharb

@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 avatar Jun 21 '19 01:06 tylerdmace

@tylerdmace same here bro, not enough time to dedicate :( I shall update my branch, at least.. 😅

aramisf avatar Jun 21 '19 15:06 aramisf

What needs doing to get this over the line?

adamsteen avatar May 17 '21 05:05 adamsteen

@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.

ljharb avatar May 17 '21 05:05 ljharb

@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.

aramisf avatar May 17 '21 15:05 aramisf

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.

ljharb avatar May 17 '21 16:05 ljharb

@aramisf unfortunately you deleted your fork, which means this PR is never recoverable :-/

ljharb avatar Jan 11 '23 17:01 ljharb

@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

aramisf avatar Jan 13 '23 07:01 aramisf