21 lines
915 B
Plaintext
21 lines
915 B
Plaintext
Ugly hack to make --user-install option work. Without this, when
|
|
a user uses gem install --user-install, it calls
|
|
/usr/bin/install -o root -g bin, which fails due to permission issues.
|
|
This removes the -o root -g bin, so it can succeed as a regular user.
|
|
|
|
Index: lib/rubygems/ext/ext_conf_builder.rb
|
|
--- lib/rubygems/ext/ext_conf_builder.rb.orig
|
|
+++ lib/rubygems/ext/ext_conf_builder.rb
|
|
@@ -34,6 +34,11 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{dir}'] = dest_path"
|
|
siteconf.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
|
|
end
|
|
+ unless Process.euid == 0
|
|
+ %w[INSTALL INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM].each do |ins|
|
|
+ siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{ins}'] = RbConfig::CONFIG['#{ins}'] = RbConfig::CONFIG['#{ins}'].gsub(/-o root -g bin/, '')"
|
|
+ end
|
|
+ end
|
|
|
|
siteconf.close
|
|
|