Skip to content

Commit

Permalink
Merge branch 'hotfix/1.26.5' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Dec 20, 2014
2 parents 1e8e6f9 + 2836a05 commit 389236b
Show file tree
Hide file tree
Showing 17 changed files with 282 additions and 103 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.26.4
1.26.5
2 changes: 1 addition & 1 deletion binscripts/rvm-installer
Expand Up @@ -411,7 +411,7 @@ key (downloading the signatures).
GPG signature verification failed for '$1' - '$3'!
try downloading the signatures:
${SUDO_USER:+sudo }${rvm_gpg_command##*/} --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
${SUDO_USER:+sudo }${rvm_gpg_command##*/} --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
or if it fails:
Expand Down
26 changes: 13 additions & 13 deletions binscripts/rvm-installer.asc
@@ -1,17 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABAgAGBQJUdbUQAAoJEOIGwp+/BP8XBysQAIxy4SCyna7VYZvBVLB40LbF
bf4YmkCMVh5UUOZTb3+VXUXCoXx9Qmg7KV6VCbb7ZlxmGHD0dbIN0h6/ZAmmZIO3
eCPvOWgNCZ3HatGaysMSPutiQSYZ1wsym7jryRsdeGHVwrBRrImcTXG0RnYrNXGr
XdR4OGB43iDLIddXRIKeMxhBEtYg7PBFnXQ4FhDuBxzTSyhVzZPb602Wcz9rNTEr
MS0DSqcub1kmckYYHIIQE1q00bxsMaI6JvG7PytlkLTDIoQEmYY7hEVQpMcWV+cl
z9XarcsitfujgwisywdLi+fEJNWntOlff7DYzuG9vqbjlJ72kO6UAgwEZicQZkGL
rTsK0n3S+ixgfyAfvKZ91noQVHZUtJa2hmmg3+bBcOXw7+9bu2xeTsRAnoxP8TfZ
hPdXnrh5W30VEAYqSDKLlUl8fep1e1LooR+90sH80bdz7Nez6rYA8oPzWMAZQKZI
u4KAdGvKPeHkm7k+vjdl3Q39oSZkzZr3inUd9N2fWkou9ORSWB9nti1J4Z9lo1wm
20/26z+/d2Tb81F2IybU60n2JoWUrNxWWDm2P4v7uyQpsNn+jROVv4KUulfjzovs
gvF9i8zd057MSJAF2ColwHJovl0ipix4PixVXBdx153qlqHiLVhoDL2fTbIUrepc
lmh5a9FZJmCjDzwkeXUJ
=+KT0
iQIcBAABAgAGBQJUlKEZAAoJEOIGwp+/BP8XQjEP/0fzDq3g6zwCKurpc0WCWI/f
1Ri+lIIk9RBpyJJByqEI8jrBg6Cf65aGqN8S8f9z1sdZYv6RtNnF9fyY8NWETwlh
yOLrjdXhLvyoOaq0Z9SuvYumrnZkpf5pVQsJszkLD0+g9a70D5aM+CWyHJyOLoWr
dg0L3SU7DA1FeyweZA47LnQzxY+QRSzHn64ISH/GRfdQUNogfpq7C9iww++8VHcv
mGLLgcTUqZfPr4Hm8pTs0cRC8b2UhcMWjtoQGrwXDZwsVvAd5O1Qkcupca5oLhUo
IExzMSff/GKT3Dkj3L5Z+oPawnqZUp97Y6qyaAnGv0waAu+giRUwmq+UrMs4x9Q3
TSZXTK9d/Qnv/GzKkzJn7MIva+FnaeqysBNLryvRUec6PcyAvd61rsYirnACwZHd
lxAtrdkDISEnQOCFaVY0k8ZdS+wUdJToR4GX7UJTP6gLqFPwRGZh80mnUOWTx5r1
nEvE4JFKSx93vX7tKUUj6RJ612o4kVsewya5UUUj1GijUv08LXPDkFCBFgQ6RU7k
vEGr1JGr7qpmJJ95gqyQJi1B0aA78o0HVJXJBVDglMaZdGVRuTYyy3HJxz8vt0me
Uw8QeOt+ngm4me6ubq9swoZbhaFPQYijTmyZIHD+o5Vc5FITXiGencV1OoGOehxK
4rgqvuW1HC69VqlfHV4Y
=oisx
-----END PGP SIGNATURE-----
2 changes: 1 addition & 1 deletion scripts/cli
Expand Up @@ -821,10 +821,10 @@ rvm()
__rvm_cli_posix_check || return $?
__rvm_cli_load_rvmrc || return $?
__rvm_cli_version_check "$@" || return $?
__rvm_cli_autoupdate "$@" || return $?
__rvm_path_match_gem_home_check
__rvm_initialize
__rvm_setup
__rvm_cli_autoupdate "$@" || return $?

next_token="$1"
(( $# == 0 )) || shift
Expand Down
10 changes: 9 additions & 1 deletion scripts/functions/build_requirements
Expand Up @@ -10,7 +10,7 @@ __rvm_requirements_run()
__type=$1
__lib_type=$1
shift
for __iterator in load reset before define summary update custom install custom_after after
for __iterator in load reset before define summary before_update update custom install custom_after after
do
__rvm_requirements_run_${__iterator} "$@" || return $?
done
Expand Down Expand Up @@ -132,6 +132,14 @@ __rvm_requirements_run_summary()
return ${__summary_status}
}

__rvm_requirements_run_before_update()
{
if is_a_function requirements_${__lib_type}_before_update
then requirements_${__lib_type}_before_update "$@" || return $?
fi
true # for osx
}

__rvm_requirements_run_update()
{
if
Expand Down
46 changes: 35 additions & 11 deletions scripts/functions/cli
Expand Up @@ -24,19 +24,43 @@ Warning! PATH is not properly set up, '$GEM_HOME/bin' $1,
to fix temporarily in this shell session run: 'rvm use ${GEM_HOME##*/}'."
}

__rvm_path_match_gem_home_check_warning_missing()
{
rvm_warn "\
Warning! PATH is not properly set up, \$GEM_HOME is not set,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use $1'."
}

__rvm_path_match_gem_home_check()
{
(( ${rvm_silence_path_mismatch_check_flag:-0} == 0 )) || return 0
[[ -n "${GEM_HOME:-}" ]] || return 0
case "$PATH:" in
($GEM_HOME/bin:*) true ;; # all fine here
(*:$GEM_HOME/bin:*)
__rvm_path_match_gem_home_check_warning "is not at first place"
;;
(*)
__rvm_path_match_gem_home_check_warning "is not available"
;;
esac
if
[[ -n "${GEM_HOME:-}" ]]
then
case "$PATH:" in
($GEM_HOME/bin:*) true ;; # all fine here
(*:$GEM_HOME/bin:*)
__rvm_path_match_gem_home_check_warning "is not at first place"
;;
(*)
__rvm_path_match_gem_home_check_warning "is not available"
;;
esac
else
typeset __path_to_ruby
if
__path_to_ruby="$( builtin command -v ruby 2>/dev/null )" &&
[[ "${__path_to_ruby}" == "${rvm_path}"* ]]
then
# get the ruby string from path to ruby executable
__path_to_ruby="${__path_to_ruby%/bin/ruby}"
__path_to_ruby="${__path_to_ruby##*/}"
# warning
__rvm_path_match_gem_home_check_warning_missing "${__path_to_ruby}"
fi
fi
}

__rvm_use_ruby_warnings()
Expand Down Expand Up @@ -202,7 +226,7 @@ key (downloading the signatures).
GPG signature verification failed for '$1' - '$3'!
try downloading the signatures:
${SUDO_USER:+sudo }${rvm_gpg_command##*/} --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
${SUDO_USER:+sudo }${rvm_gpg_command##*/} --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
or if it fails:
Expand Down
18 changes: 7 additions & 11 deletions scripts/functions/env
Expand Up @@ -93,22 +93,18 @@ __rvm_unset_exports()
typeset wrap_name name value
typeset -a __variables_list
__rvm_read_lines __variables_list <<<"$(
printenv | __rvm_sed '/=/ { s/=.*$//; p; }; d;'
printenv | __rvm_sed '/^rvm_old_.*=/ { s/=.*$//; p; }; d;'
)"

for wrap_name in "${__variables_list[@]}"
do
eval "value=\"\${${wrap_name}}\""
case "$wrap_name" in
rvm_old_*)
name=${wrap_name#rvm_old_}
if [[ -n "${value:-}" ]]
then export $name="${value}"
else unset $name
fi
unset $wrap_name
;;
esac
name=${wrap_name#rvm_old_}
if [[ -n "${value:-}" ]]
then export $name="${value}"
else unset $name
fi
unset $wrap_name
done
}

Expand Down
18 changes: 2 additions & 16 deletions scripts/functions/installer
Expand Up @@ -753,29 +753,15 @@ setup_configuration_files()
check_file_group()
{
typeset _group
case "${_system_type}" in
(Darwin|BSD)
_group="$( __rvm_stat -f "%Sg" "$1" )"
;;
*)
_group="$( __rvm_stat -c "%G" "$1" )"
;;
esac
_group="$( __rvm_statf "%G" "%Sg" "$1" )"
[[ "${_group}" == "$2" ]] || return $?
true # for OSX
}

check_file_rights()
{
typeset _all
case "${_system_type}" in
(Darwin|BSD)
_all="$( __rvm_stat -f "%Sp" "$1" )"
;;
*)
_all="$( __rvm_stat -c "%A" "$1" )"
;;
esac
_all="$( __rvm_statf "%A" "%Sp" "$1" )"
shift
while
(( $# ))
Expand Down
4 changes: 3 additions & 1 deletion scripts/functions/manage/base_fetch
Expand Up @@ -235,7 +235,9 @@ __rvm_fetch_from_git_revision_or_sha()
{
typeset result __from
__from=""
if [[ -n "${rvm_ruby_tag:-}" ]]
if [[ -n "${rvm_ruby_repo_branch:-}" ]]
then __from="${rvm_ruby_repo_branch}"
elif [[ -n "${rvm_ruby_tag:-}" ]]
then __from="${rvm_ruby_tag#t}"
elif [[ -n "$rvm_ruby_revision" ]]
then __from="${rvm_ruby_revision}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/osx-ssl-certs
Expand Up @@ -49,7 +49,7 @@ requirements_osx_update_openssl_cert_create_cert()
requirements_osx_update_openssl_cert_target_move()
{
[[ "$__target" == "$cert_file" ]] ||
__rvm_try_sudo \command \mv -f "$__target" "$cert_file" ||
__rvm_try_sudo \command \tee "$cert_file" < "$__target" > /dev/null ||
{
typeset __ret=$?
rm -f "$__target"
Expand Down
118 changes: 80 additions & 38 deletions scripts/functions/requirements/centos
Expand Up @@ -31,7 +31,30 @@ requirements_centos_libs_install()
__rvm_try_sudo yum install -y "$@" || return $?
}

requirements_centos_update_system_install_epel()
requirements_centos_before_update_check_repos_missing_error()
{
rvm_error "There is no '$*' package available for installation and RVM does not know how to make that happen,
please tell us how to install '$*' on '${_system_name}-${_system_version}' here: https://github.com/wayneeseguin/rvm/issues"
return 49
}

requirements_centos_before_update_check_rhn_channel()
{
__rvm_try_sudo rhn-channel -l | grep optional >/dev/null ||
{
typeset __package_name="$(
__rvm_try_sudo rhn-channel -l |
awk '/^rhel-'"${_system_arch}"'-(server|client|workstation)-[0-9]+$/{print gensub(/(-[0-9]+)$/, "-optional\\1", "g")}'
)"
rvm_log "Enabling optional repository"
rvm_requiremnts_fail_or_run_action 2 \
"It is not possible to enable optional repository for $*, enable it using: rhn-channel -a -c ${__package_name}" \
__rvm_try_sudo rhn-channel -a -c "${__package_name}" ||
return $?
}
}

requirements_centos_before_install_epel()
{
"${rvm_scripts_path}/fetch" "${epel_key}"
"${rvm_scripts_path}/fetch" "${epel_rpm}"
Expand All @@ -46,35 +69,79 @@ or there was problem checking if libyaml-devel is available / installed."
}
}

requirements_centos_update_system_check_epel()
requirements_centos_before_update_check_epel()
{
[[ " ${packages_to_install[*]} " == *" libyaml-devel "* ]] || return 0
[[ ! "${_system_name_lowercase}" == "redhat" && ${_system_version:-0} -ge 6 ]] || return 0
[[ " $* " == *" libyaml-devel "* ]] || return 0
# if you change this, change the scripts/functions/pkg version too
[[ -f /etc/yum.repos.d/epel.repo ]] ||
requirements_centos_lib_installed libyaml-devel ||
requirements_centos_lib_available_no_caching libyaml-devel ||
{
typeset version="${_system_version%%.*}"
__rvm_db "epel${version}_key" "epel_key"
__rvm_db "epel${version}_${_system_arch}_rpm" "epel_rpm"
if
[[ -z "$epel_rpm" || -z "$epel_key" ]]
then
rvm_error "There is no 'libyaml-devel' package available for installation and RVM does not know how to make that happen,
please tell us how to install 'libyaml-devel' on '${_system_name}-${_system_version}' here: https://github.com/wayneeseguin/rvm/issues"
return 49
requirements_centos_before_update_check_repos_missing_error $* || return $?
fi
rvm_requiremnts_fail_or_run_action 2 \
"It is not possible to install EPEL repository for YAML, install it using: $epel_rpm" \
__rvm_log_command centos_install_epel "Installing EPEL repository" requirements_centos_update_system_install_epel ||
__rvm_log_command centos_install_epel "Installing EPEL repository" requirements_centos_before_install_epel ||
return $?
}
}

requirements_centos_update_system()
# return 0 when found missing packages
# return >0 when no missing packages
requirements_centos_before_update_check_missing_packages()
{
typeset -a __packages_to_check
typeset __package_name
case "${_system_name_lowercase}" in
(redhat)
__packages_to_check=( libyaml-devel libffi-devel )
;;
(centos)
__packages_to_check=( libyaml-devel )
;;
(*)
return 1
;;
esac
__missing_packages=()
for __package_name in "${__packages_to_check[@]}"
do
if
[[ " ${packages_to_install[*]} " == *" ${__package_name} "* ]] &&
! requirements_centos_lib_installed "${__package_name}" &&
! requirements_centos_lib_available_no_caching "${__package_name}"
then
__missing_packages+=( "${__package_name}" )
fi
done
[[ ${#__missing_packages[*]} -gt 0 ]] || return 2
}

requirements_centos_before_update_check_repos()
{
requirements_centos_update_system_check_epel || return $?
typeset -a __missing_packages
requirements_centos_before_update_check_missing_packages || return 0

case "${_system_name_lowercase}" in
(redhat)
requirements_centos_before_update_check_rhn_channel "${__missing_packages[@]}" || return $?
;;
(centos)
requirements_centos_before_update_check_epel "${__missing_packages[@]}" || return $?
;;
(*)
requirements_centos_before_update_check_repos_missing_error "${__missing_packages[@]}" || return $?
;;
esac
}

requirements_centos_before_update()
{
requirements_centos_before_update_check_repos || return $?
}

requirements_centos_check_binary()
Expand Down Expand Up @@ -120,48 +187,23 @@ requirements_centos_define()
;;
(*)
if
[[ "${_system_name_lowercase}" == "redhat" && ${_system_version:-0} -ge 6 ]]
then
requirements_check pkgconfig
requirements_rvm_pkg_lib_installed_custom yaml
elif
[[ "${_system_name} ${_system_arch}" == "Mageia x86_64" ]]
then
requirements_check lib64yaml-devel
else
requirements_check libyaml-devel
fi
if
[[ "${_system_name_lowercase}" == "redhat" && ${_system_version:-0} -ge 6 ]] &&
! requirements_centos_lib_available libffi-devel
then
rvm_warn "
Skipping installation of 'libffi-devel', in case you depend on FFI reinstall your ruby after following this instructions:
https://gist.github.com/rderoldan1/5920539
"
else
requirements_check libffi-devel
fi
if [[ "${_system_name}" != "Mageia" ]]
then requirements_check glibc-headers
fi
if [[ ${#rvm_patch_names[@]} -gt 0 ]]
then requirements_version_minimal autoconf 2.67
fi
requirements_check autoconf gcc-c++ glibc-devel patch readline readline-devel zlib zlib-devel openssl-devel make bzip2 automake libtool bison
requirements_check autoconf gcc-c++ glibc-devel patch readline readline-devel zlib zlib-devel libffi-devel openssl-devel make bzip2 automake libtool bison
;;
esac
}

requirements_centos_after()
{
if
[[ "${_system_name_lowercase}" == "redhat" && ${_system_version:-0} -ge 6 ]]
then
requirements_rvm_pkg_configure "$1" yaml
fi
}

requirements_fedora_before_update_cache()
{
__rvm_try_sudo yum clean all || true # can fail to clean
Expand Down

0 comments on commit 389236b

Please sign in to comment.