-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from essentialkaos/develop
Version 3.0.1
- Loading branch information
Showing
15 changed files
with
650 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
# Bibop recipe for rbinstall (EL7/EL8/EL9) | ||
# See more: https://kaos.sh/bibop | ||
|
||
################################################################################ | ||
|
||
pkg rbinstall rbenv jemalloc jre11 | ||
|
||
################################################################################ | ||
|
||
require-root yes | ||
unsafe-actions yes | ||
fast-finish yes | ||
|
||
################################################################################ | ||
|
||
var config /etc/rbinstall.knf | ||
var data_dir {ENV:RBENV_ROOT}/versions | ||
var log_file /var/log/rbinstall/rbinstall.log | ||
|
||
var ruby2_ver "2.7.7" | ||
var ruby3_ver "3.1.3" | ||
var jruby_ver "9.3.9.0" | ||
var truff_ver "22.3.0" | ||
|
||
var deadline 600 | ||
|
||
## PREPARE ##################################################################### | ||
|
||
command "-" "Check binary" | ||
app rbinstall | ||
|
||
command "-" "Check RBEnv" | ||
app rbenv | ||
env RBENV_ROOT /usr/local/rbenv | ||
dir {ENV:RBENV_ROOT}/versions | ||
|
||
command "-" "Check original configuration" | ||
mode {config} 644 | ||
|
||
command "-" "Backup original configuration" | ||
backup {config} | ||
|
||
command "-" "Replace original configuration with test configuration" | ||
copy rbinstall_fast.knf {config} | ||
|
||
command:full "-" "Replace original configuration with default configuration" | ||
copy rbinstall_default.knf {config} | ||
|
||
command "-" "Clear old log files" | ||
touch {log_file} | ||
truncate {log_file} | ||
|
||
## INSTALL ##################################################################### | ||
|
||
command "rbinstall {ruby2_ver} -np -nc" "Install Ruby 2.x" | ||
exit 0 {deadline} | ||
dir {data_dir}/{ruby2_ver} | ||
exist {data_dir}/{ruby2_ver}/bin/ruby | ||
mode {data_dir}/{ruby2_ver}/bin/ruby 755 | ||
|
||
command "rbinstall {ruby2_ver}-jemalloc -np -nc" "Install Ruby 2.x (jemalloc)" | ||
exit 0 {deadline} | ||
dir {data_dir}/{ruby2_ver}-jemalloc | ||
exist {data_dir}/{ruby2_ver}-jemalloc/bin/ruby | ||
mode {data_dir}/{ruby2_ver}-jemalloc/bin/ruby 755 | ||
|
||
command "rbinstall {ruby3_ver} -np -nc" "Install Ruby 3.x" | ||
exit 0 {deadline} | ||
dir {data_dir}/{ruby3_ver} | ||
exist {data_dir}/{ruby3_ver}/bin/ruby | ||
mode {data_dir}/{ruby3_ver}/bin/ruby 755 | ||
|
||
command "rbinstall {ruby3_ver}-jemalloc -np -nc" "Install Ruby 3.x (jemalloc)" | ||
exit 0 {deadline} | ||
dir {data_dir}/{ruby3_ver}-jemalloc | ||
exist {data_dir}/{ruby3_ver}-jemalloc/bin/ruby | ||
mode {data_dir}/{ruby3_ver}-jemalloc/bin/ruby 755 | ||
|
||
command "rbinstall jruby-{jruby_ver} -np -nc" "Install JRuby" | ||
exit 0 {deadline} | ||
dir {data_dir}/jruby-{jruby_ver} | ||
exist {data_dir}/jruby-{jruby_ver}/bin/ruby | ||
mode {data_dir}/jruby-{jruby_ver}/bin/ruby 755 | ||
|
||
command "rbinstall truffleruby-{truff_ver} -np -nc" "Install TruffleRuby" | ||
exit 0 {deadline} | ||
dir {data_dir}/truffleruby-{truff_ver} | ||
exist {data_dir}/truffleruby-{truff_ver}/bin/ruby | ||
mode {data_dir}/truffleruby-{truff_ver}/bin/ruby 755 | ||
|
||
## CHECK ####################################################################### | ||
|
||
command "rbenv local {ruby2_ver}" "Set current local version to {ruby2_ver}" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "ruby {ruby2_ver}" | ||
|
||
command "rbenv local {ruby2_ver}-jemalloc" "Set current local version to {ruby2_ver}-jemalloc" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "ruby {ruby2_ver}" | ||
|
||
command "rbenv local {ruby3_ver}" "Set current local version to {ruby3_ver}" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "ruby {ruby3_ver}" | ||
|
||
command "rbenv local {ruby3_ver}-jemalloc" "Set current local version to {ruby3_ver}-jemalloc" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "ruby {ruby3_ver}" | ||
|
||
command "rbenv local jruby-{jruby_ver}" "Set current local version to jruby-{jruby_ver}" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "jruby {jruby_ver}" | ||
|
||
command "rbenv local truffleruby-{truff_ver}" "Set current local version to truffleruby-{truff_ver}" | ||
exit 0 | ||
|
||
command "ruby --version" "Check Ruby version info" | ||
exit 0 | ||
output-contains "truffleruby {truff_ver}" | ||
|
||
## FINISH ###################################################################### | ||
|
||
command "-" "Remove local version info" | ||
remove ".ruby-version" | ||
|
||
command "-" "Clear log files" | ||
truncate {log_file} | ||
|
||
command:teardown "-" "Remove Ruby 2.x" | ||
remove {data_dir}/{ruby2_ver} | ||
|
||
command:teardown "-" "Remove Ruby 2.x (jemalloc)" | ||
remove {data_dir}/{ruby2_ver}-jemalloc | ||
|
||
command:teardown "-" "Remove Ruby 3.x" | ||
remove {data_dir}/{ruby3_ver} | ||
|
||
command:teardown "-" "Remove Ruby 3.x (jemalloc)" | ||
remove {data_dir}/{ruby3_ver}-jemalloc | ||
|
||
command:teardown "-" "Remove JRuby" | ||
remove {data_dir}/jruby-{jruby_ver} | ||
|
||
command:teardown "-" "Remove TruffleRuby" | ||
remove {data_dir}/truffleruby-{truff_ver} | ||
|
||
command:teardown "-" "Configuration restore" | ||
backup-restore {config} | ||
|
||
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Configuration file for rbinstall | ||
|
||
[main] | ||
|
||
# Path to writable temorary directory | ||
tmp-dir: /tmp | ||
|
||
[storage] | ||
|
||
# URL of rbinstall storage | ||
url: https://rbinstall.kaos.st | ||
|
||
[proxy] | ||
|
||
# Enable HTTP proxy here | ||
enabled: false | ||
|
||
# HTTP proxy URL | ||
url: | ||
|
||
[rbenv] | ||
|
||
# Path to rbenv main directory | ||
dir: /usr/local/rbenv | ||
|
||
# Allow version overwriting (reinstall) | ||
allow-overwrite: true | ||
|
||
# Allow uninstalling | ||
allow-uninstall: true | ||
|
||
# Make alias for versions with -p0 suffix | ||
make-alias: true | ||
|
||
[gems] | ||
|
||
# Update rubygems gem | ||
rubygems-update: true | ||
|
||
# Allow gems update | ||
allow-update: true | ||
|
||
# Add --no-document to install/update command | ||
no-document: true | ||
|
||
# Source for gem install without scheme | ||
source: gems.kaos.st | ||
|
||
# If source support https this property must be set to true | ||
source-secure: true | ||
|
||
# List of gems to install on each Ruby version | ||
install: bundler=1 bundler | ||
|
||
[log] | ||
|
||
# Log file dir | ||
dir: /var/log/rbinstall | ||
|
||
# Path to log file | ||
file: {log:dir}/rbinstall.log | ||
|
||
# Log permissions | ||
perms: 644 | ||
|
||
# Default log level (debug/info/warn/error/crit) | ||
level: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Configuration file for rbinstall | ||
|
||
[main] | ||
|
||
# Path to writable temorary directory | ||
tmp-dir: /tmp | ||
|
||
[storage] | ||
|
||
# URL of rbinstall storage | ||
url: https://rbinstall.kaos.st | ||
|
||
[proxy] | ||
|
||
# Enable HTTP proxy here | ||
enabled: false | ||
|
||
# HTTP proxy URL | ||
url: | ||
|
||
[rbenv] | ||
|
||
# Path to rbenv main directory | ||
dir: /usr/local/rbenv | ||
|
||
# Allow version overwriting (reinstall) | ||
allow-overwrite: true | ||
|
||
# Allow uninstalling | ||
allow-uninstall: true | ||
|
||
# Make alias for versions with -p0 suffix | ||
make-alias: true | ||
|
||
[gems] | ||
|
||
# Update rubygems gem | ||
rubygems-update: false | ||
|
||
# Allow gems update | ||
allow-update: true | ||
|
||
# Add --no-document to install/update command | ||
no-document: true | ||
|
||
# Source for gem install without scheme | ||
source: gems.kaos.st | ||
|
||
# If source support https this property must be set to true | ||
source-secure: true | ||
|
||
# List of gems to install on each Ruby version | ||
install: | ||
|
||
[log] | ||
|
||
# Log file dir | ||
dir: /var/log/rbinstall | ||
|
||
# Path to log file | ||
file: {log:dir}/rbinstall.log | ||
|
||
# Log permissions | ||
perms: 644 | ||
|
||
# Default log level (debug/info/warn/error/crit) | ||
level: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.