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

add CentOS7/8 support #356

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions share/ruby-install/jruby/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ yum: java-openjdk
pacman: jre8-openjdk
zypper: java-1.8.0-openjdk
pkg: openjdk
centos7: java-openjdk
centos8: java-openjdk
2 changes: 2 additions & 0 deletions share/ruby-install/mruby/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ brew: bison
pacman: gcc make bison
zypper: gcc make bison
pkg: gcc automake bison
centos7: gcc make bison
centos8: gcc make bison
17 changes: 16 additions & 1 deletion share/ruby-install/package_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
#
# Auto-detect the package manager.
#
function detect_distro()
{
[ "$1" = "centos7" ] && test -f /etc/redhat-release && \
grep -q '^CentOS Linux release 7' /etc/redhat-release && return 0

[ "$1" = "centos8" ] && test -f /etc/redhat-release && \
grep -q '^CentOS Linux release 8' /etc/redhat-release && return 0

return 1
}

function detect_package_manager()
{
if command -v zypper >/dev/null; then package_manager="zypper"
if detect_distro centos7 ; then package_manager="centos7"
elif detect_distro centos8 ; then package_manager="centos8"
elif command -v zypper >/dev/null; then package_manager="zypper"
elif command -v apt-get >/dev/null; then package_manager="apt"
elif command -v dnf >/dev/null; then package_manager="dnf"
elif command -v yum >/dev/null; then package_manager="yum"
Expand Down Expand Up @@ -49,6 +62,8 @@ function install_packages()
fi
;;
zypper) $sudo zypper -n in -l $* || return $? ;;
centos7)$sudo yum install -y "$@" || return $? ;;
centos8)$sudo dnf install -y --enablerepo PowerTools "$@" || return $? ;;
"") warn "Could not determine Package Manager. Proceeding anyway." ;;
esac
}
Expand Down
2 changes: 2 additions & 0 deletions share/ruby-install/rbx/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ brew: openssl readline libyaml gdbm
pacman: gcc automake flex bison ruby llvm libedit zlib libyaml openssl gdbm readline ncurses
zypper: gcc gcc-c++ make automake flex bison ruby2.2-devel ruby2.2-rubygem-bundler llvm-devel zlib-devel libyaml-devel libopenssl-devel gdbm-devel readline-devel ncurses-devel
pkg: gmake flex bison ruby devel/ruby-gems llvm-devel openssl readline libyaml gdbm
centos7: gcc gcc-c++ automake flex bison ruby-devel rubygems llvm-static llvm-devel libedit-devel zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel bzip2
centos8: gcc gcc-c++ automake flex bison ruby-devel rubygems llvm-static llvm-devel libedit-devel zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel bzip2
2 changes: 2 additions & 0 deletions share/ruby-install/ruby/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ brew: automake bison openssl readline libyaml gdbm libffi
pacman: gcc make bison zlib ncurses openssl readline libyaml gdbm libffi
zypper: gcc make automake zlib-devel libyaml-devel libopenssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel
pkg: openssl readline libyaml gdbm libffi
centos7: gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel bzip2
centos8: gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel bzip2
2 changes: 2 additions & 0 deletions share/ruby-install/truffleruby/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ brew: openssl llvm@4
pacman: zlib openssl clang llvm make
zypper: zlib-devel libopenssl-devel llvm-clang llvm make
pkg: openssl llvm-devel
centos7: zlib-devel openssl-devel clang llvm make
centos8: zlib-devel openssl-devel clang llvm make