forked from blt04/puppet-rvm
-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Current versions of Homebrew refuse to execute as user root
so I created a dedicated homebrew
user, but there is no way to tell this module to use this user when executing /usr/local/rvm/bin/rvm install ruby-2.2
.
More details: Puppet fails with an error:
==> osx.ci: Debug: Executing '/usr/local/rvm/bin/rvm install ruby-2.2 '
==> osx.ci: Error: Execution of '/usr/local/rvm/bin/rvm install ruby-2.2 ' returned 1: Searching for binary rubies, this might take some time.
==> osx.ci: No binary rubies available for: osx/10.11/x86_64/ruby-2.2.4.
==> osx.ci: Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
==> osx.ci: Checking requirements for osx.
==> osx.ci: Installing requirements for osx.
==> osx.ci: Updating system.......
==> osx.ci: Error running 'requirements_osx_brew_update_system ruby-2.2.4',
==> osx.ci: showing last 15 lines of /usr/local/rvm/log/1461901999_ruby-2.2.4/update_system.log
==> osx.ci: https://github.com/Homebrew/homebrew/wiki/Common-Issues
==> osx.ci: and make sure `brew update` works before continuing.'
==> osx.ci: ++ rvm_pretty_print stderr
==> osx.ci: ++ case "${rvm_pretty_print_flag:=auto}" in
==> osx.ci: ++ case "${TERM:-dumb}" in
==> osx.ci: ++ case "$1" in
==> osx.ci: ++ [[ -t 2 ]]
==> osx.ci: ++ return 1
==> osx.ci: ++ printf %b 'Failed to update Homebrew, follow instructions here:
==> osx.ci: https://github.com/Homebrew/homebrew/wiki/Common-Issues
==> osx.ci: and make sure `brew update` works before continuing.\n'
==> osx.ci: Failed to update Homebrew, follow instructions here:
==> osx.ci: https://github.com/Homebrew/homebrew/wiki/Common-Issues
==> osx.ci: and make sure `brew update` works before continuing.
==> osx.ci: ++ return 1
==> osx.ci: Requirements installation failed with status: 1.
But if I repeat this command manually as the dedicated homebrew
user it succeeds:
osx:~ homebrew$ /usr/local/rvm/bin/rvm install --verbose ruby-2.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Installing requirements for osx_brew.
Updating system.....
Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl........
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.2.4, this may take a while depending on your cpu(s)...
ruby-2.2.4 - #downloading ruby-2.2.4, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.7M 100 12.7M 0 0 7213k 0 0:00:01 0:00:01 --:--:-- 7211k
ruby-2.2.4 - #extracting ruby-2.2.4 to /usr/local/rvm/src/ruby-2.2.4....
ruby-2.2.4 - #applying patch /usr/local/rvm/patches/ruby/2.2.4/fix_installing_bundled_gems.patch.
ruby-2.2.4 - #configuring..........................................................
ruby-2.2.4 - #post-configuration.
ruby-2.2.4 - #compiling.............................................................
ruby-2.2.4 - #installing..........
ruby-2.2.4 - #making binaries executable..
ruby-2.2.4 - #downloading rubygems-2.4.8
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 154 100 154 0 0 127 0 0:00:01 0:00:01 --:--:-- 127
100 437k 100 437k 0 0 233k 0 0:00:01 0:00:01 --:--:-- 1201k
ruby-2.2.4 - #extracting rubygems-2.4.8....
ruby-2.2.4 - #removing old rubygems.........
$LANG was empty, setting up LANG=en_US, if it fails again try setting LANG to something sane and try again.
ruby-2.2.4 - #installing rubygems-2.4.8......................
ruby-2.2.4 - #gemset created /usr/local/rvm/gems/ruby-2.2.4@global
ruby-2.2.4 - #importing gemset /usr/local/rvm/gemsets/global.gems...............................................
ruby-2.2.4 - #generating global wrappers........
ruby-2.2.4 - #gemset created /usr/local/rvm/gems/ruby-2.2.4
ruby-2.2.4 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.2.4 - #generating default wrappers........
ruby-2.2.4 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.2.4 - #complete
Please be aware that you just installed a ruby that requires 1 patches just to be compiled on an up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to ruby-2.3.0 which will have all of the latest security patches.
Ruby was built without documentation, to build it run: rvm docs generate-ri
I think that a proper solution might be to allow a way to pass the username to execute the external command as.
Metadata
Metadata
Assignees
Labels
No labels