Skip to content
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

Install script uses standalone for Amazon Linux instead of rpm #2343

Closed
jdogwilly opened this issue Nov 20, 2020 · 5 comments · Fixed by #2423
Closed

Install script uses standalone for Amazon Linux instead of rpm #2343

jdogwilly opened this issue Nov 20, 2020 · 5 comments · Fixed by #2423
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jdogwilly
Copy link

The install script picks the standalone version instead of the rpm based version when installing on an Amazon Linux 2 ec2 instance. I manually had to use rpm to install, which is included in Amazon Linux 2. The script should also use rpm so that the systemctl service is installed as well

Running: curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run gives the following output

Amazon Linux 2
Unsupported package manager.
Installing standalone release archive v3.7.2 from GitHub releases.

+ Reusing ~/.cache/code-server/code-server-3.7.2-linux-amd64.tar.gz
+ mkdir -p ~/.local/lib ~/.local/bin
+ tar -C ~/.local/lib -xzf ~/.cache/code-server/code-server-3.7.2-linux-amd64.tar.gz
+ mv -f ~/.local/lib/code-server-3.7.2-linux-amd64 ~/.local/lib/code-server-3.7.2
+ ln -fs ~/.local/lib/code-server-3.7.2/bin/code-server ~/.local/bin/code-server

Standalone release has been installed into ~/.local/lib/code-server-3.7.2
Please extend your path to use code-server:
  PATH="$HOME/.local/bin:$PATH"
Then you can run:
  code-server
@code-asher
Copy link
Member

code-asher commented Nov 20, 2020 via email

@jdogwilly
Copy link
Author

It seems that the OS environment variable isn’t set in Amazon Linux 2. I notice also the script looks at /etc/os-release and that might be better, using the ID_LIKE field to pick among the options.

Example /etc/os-release file

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

@code-asher
Copy link
Member

code-asher commented Nov 20, 2020 via email

@nhooyr nhooyr added the bug Something isn't working label Nov 30, 2020
@nhooyr nhooyr added this to the v3.7.5 milestone Nov 30, 2020
@oxy oxy self-assigned this Dec 8, 2020
@oxy
Copy link

oxy commented Dec 8, 2020

Planning to move all the distros over to ID_LIKE, here's what I documented from a bunch of Docker containers:

ubuntu:
	debian
raspbian:
	debian
debian:
	<none>
amazon linux/amzn:
	centos rhel fedora
centos:
	rhel fedora
rhel:
	fedora (source: https://opensource.com/article/18/6/linux-version)
fedora:
	<none>
opensuse-leap:
	suse opensuse
opensuse-tumbleweed:
	suse opensuse
alpine:
	<none>
arch:
	<none>

@nhooyr
Copy link
Contributor

nhooyr commented Dec 14, 2020

Whoops too trigger happy, will close after #2423 is merged.

@nhooyr nhooyr reopened this Dec 14, 2020
@nhooyr nhooyr closed this as completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants