Update tar syntax to support OpenBSD. #2693
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR special-cases the archive extraction code when executed on OpenBSD. This is to workaround the use of the
-Jand--strip-componentsoptions, which OpenBSD'stardoes not support. If thexzformat archive was downloaded, it correctly callsxzcatand pipes the output totar. If not, it correctly calls thetarwith the normal compression flag. In either case, it does not append the--strip-components=1option, but rather uses the-soption to performed(1)-style basic regex replacement on the path.This is tested to execute correctly on OpenBSD 7.0 (current release as of this PR). It does not address compilation issues of the downloaded
nodesource code, as mentioned in #2134, which will likely require upstreaming of some subset of the OpenBSD-specific source patches that were developed for the OpenBSD ports build ofnode(see the OpenBSD patches for node-12.22.7 here or the implementation of binary builds for OpenBSD, but it does allow you to reach that step without error. This should, however, fully address #2660.Fixes #2660.