diff --git a/get-deps.sh b/get-deps.sh index 5eb8edcd..727c95e6 100755 --- a/get-deps.sh +++ b/get-deps.sh @@ -68,6 +68,44 @@ fedora_deps() { 'telnet' } +amazon_deps() { + if have_command 'dnf'; then + YUM="$SUDO dnf" + elif have_command 'yum'; then + YUM="$SUDO yum" + else + echo "No idea what package manager to use, sorry! (perhaps 'dnf' or 'yum' is not in \$PATH?)" + return 1 + fi + # perl stuff moved around in different versions of the distro. + # Make a soft attempt under this name. + $YUM install -y 'perl-FindBin' 'perl-File-Compare' || true + if ! have_command 'curl' ; then + # Some systems have curl-minimal which won't tolerate us + # trying to install curl, so only try to install if we + # don't have it already + $YUM install -y 'curl' + fi + $YUM install -y \ + 'binutils' \ + 'ca-certificates' \ + 'clang-devel' \ + 'cmake' \ + 'gcc' \ + 'gcc-c++' \ + 'glibc-devel' \ + 'git' \ + 'kernel-devel' \ + 'kernel-headers' \ + 'make' \ + 'openssl-devel' \ + 'pkg-config' \ + 'python3' \ + 'python3-pip' \ + 'rpm-build' \ + 'rpm-sign' +} + mariner_deps() { if have_command 'dnf'; then YUM="$SUDO dnf" @@ -279,6 +317,9 @@ case $ID in mariner) mariner_deps ;; + amzn) + amazon_deps + ;; *) echo "Couldn't find OS by ID, found ID: $ID" echo "Fallback to detecting '/etc/-release'"