-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add FreeBSD support for an npm based install #1802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up @zathras777
I'm not sure if this would work though. Wouldn't the standalone release be installed instead as the os is unrecognized but the architecture is likely amd64?
It may well be the standalone release that's installed, but with this
change the install script can at least be used to perform an install.
Without this patch the script simply does nothing :-(
$ curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
Unsupported OS FreeBSD.
…On Fri, Jun 12, 2020 at 3:11 PM Anmol Sethi ***@***.***> wrote:
***@***.**** commented on this pull request.
Thanks for bringing this up @zathras777 <https://github.com/zathras777>
I'm not sure if this would work though. Wouldn't the standalone release be
installed instead as the os is unrecognized but the architecture is likely
amd64?
See
https://github.com/cdr/code-server/blob/264abed82c49319dd813dfb2128401da69c7ce7e/install.sh#L161-L170
and
https://github.com/cdr/code-server/blob/264abed82c49319dd813dfb2128401da69c7ce7e/install.sh#L193-L194
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1802 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFD6NN6PWJUOM6NK72ZYWTRWIZQRANCNFSM4N4IJE7A>
.
|
As FreeBSD does not use glibc, the standalone release won't work. I'll modify the install script to instead install via npm when an unrecognized unix system is detected instead of erring out. |
See #1803 |
Thanks again for finding this @zathras777! |
Whoops, sent a bit too soon :-) Following the patch,
$ sh ./install.sh
FreeBSD 12.1-RELEASE-p3
No precompiled releases for amd64.
Installing with npm.
…On Fri, Jun 12, 2020 at 3:18 PM david reid ***@***.***> wrote:
It may well be the standalone release that's installed, but with this
change the install script can at least be used to perform an install.
Without this patch the script simply does nothing :-(
$ curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
Unsupported OS FreeBSD.
On Fri, Jun 12, 2020 at 3:11 PM Anmol Sethi ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
>
> Thanks for bringing this up @zathras777 <https://github.com/zathras777>
>
> I'm not sure if this would work though. Wouldn't the standalone release
> be installed instead as the os is unrecognized but the architecture is
> likely amd64?
>
> See
> https://github.com/cdr/code-server/blob/264abed82c49319dd813dfb2128401da69c7ce7e/install.sh#L161-L170
>
> and
> https://github.com/cdr/code-server/blob/264abed82c49319dd813dfb2128401da69c7ce7e/install.sh#L193-L194
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1802 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFD6NN6PWJUOM6NK72ZYWTRWIZQRANCNFSM4N4IJE7A>
> .
>
|
Hmm. That's confusing, we do have precompiled releases for amd64? What does |
FreeBSD
$ uname -m
amd64
Linux,
$ uname -m
x86_64
Think the confusion comes from arch() being used for the logic
decision and then plain old "uname -m" in the echo statement.
ARCH="$(arch)"
if [ ! "$ARCH" ]; then
if [ "$METHOD" = standalone ]; then
echoerr "No releases available for the architecture $(uname -m)."
echoerr 'Please rerun without the "--method standalone" flag to
install from npm.'
exit 1
fi
echoh "No precompiled releases for $(uname -m)."
install_npm
return
fi
That probably explains why with the simple patch the script installs
an npm build :-)
…On Fri, Jun 12, 2020 at 3:30 PM Anmol Sethi ***@***.***> wrote:
Hmm. That's confusing, we do have precompiled releases for amd64? What does uname -m give you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yea that makes sense. |
Couldn't install on FreeBSD. With npm version 8 installed, gave error: Please install npm or yarn to install code-server!
You will need at least node v12 and a few C dependencies.
See the docs https://coder.com/docs/code-server/latest/install#yarn-npm After installing yarn, error: [1/4] Resolving packages...
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "= 14". Got "16.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command. Edit:Well this installed it, now let's see what it can do :) yarn add --ignore-engines install.sh |
With this small change code-server can be installed via npm on a FreeBSD amd64 install.