syncwrap 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.rdoc +14 -1
- data/lib/syncwrap/base.rb +1 -1
- data/lib/syncwrap/cli.rb +1 -1
- data/lib/syncwrap/components/jruby_vm.rb +67 -12
- data/sync/src/hashdot/profiles/jruby.hdp.erb +4 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41675f753b936a41dfa9adc50306cba476cb7809
|
4
|
+
data.tar.gz: 8a61feac7054cf90aa1226abe47fbaf5b1e88913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 357c6f3382234c6bf91e49e43434a0056ead68bd30921276101b0e2399011de55d202b9f90fa9a48e016a12e8b34e20445df6dd06ce99121d9b75a5054bf9aca
|
7
|
+
data.tar.gz: 85a464dd1ebe06e37de0973cb90a00bf660eea82807d7cc34ac3da29bbfa93c01ba55a349fe13047d60a71671ccb495b5920fde86d5c0f3221e166e696d73468
|
data/History.rdoc
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 2.9.1 (2017-8-4)
|
2
|
+
* SyncWrap::JRubyVM
|
3
|
+
* Avoid setting Env['GEM_HOME'] in the jruby 9.x installed profile
|
4
|
+
by default. In 2.9.0, this was added as a substitute for the
|
5
|
+
jruby.gem.home system property, which when set caused incessant
|
6
|
+
warnings with 9.x. However setting GEM_HOME also undesirably
|
7
|
+
effects gem bin wrapper install location. Instead just use the
|
8
|
+
default in-dist path of jruby 9.x, and system gems will need to be
|
9
|
+
re-installed with a jruby upgrade.
|
10
|
+
* Add support for fast path gem user_install (no-op if same version
|
11
|
+
specification is found)
|
12
|
+
* Fix error message for CLI -S (session) with host not found
|
13
|
+
|
1
14
|
=== 2.9.0 (2017-7-18)
|
2
15
|
* SyncWrap::Debian
|
3
16
|
* Fix Debian#dist_if_installed? grep pattern. Was previously giving
|
@@ -20,7 +33,7 @@
|
|
20
33
|
* Add --yes flag to final lvconvert call, required by later
|
21
34
|
versions, compatible with earlier
|
22
35
|
* Add thin-provisioning-tools as dependency on Debian, as the included
|
23
|
-
|
36
|
+
cache_check command is needed for reboot.
|
24
37
|
* SyncWrap::Sudoers
|
25
38
|
* Collect all sudoers config details here. This was previously
|
26
39
|
spread between SyncWrap::Users and SyncWrap::UserData.
|
data/lib/syncwrap/base.rb
CHANGED
data/lib/syncwrap/cli.rb
CHANGED
@@ -268,7 +268,7 @@ TEXT
|
|
268
268
|
|
269
269
|
if @ssh_session
|
270
270
|
host = space.get_host( @ssh_session )
|
271
|
-
host
|
271
|
+
host &&= space.ssh_host_name( host )
|
272
272
|
raise "Host #{@ssh_session} not found in sync file" unless host
|
273
273
|
extra_args = @component_plan
|
274
274
|
raise "SSH args? #{extra_args.inspect}" if extra_args.first =~ /^[^\-]/
|
@@ -77,8 +77,43 @@ module SyncWrap
|
|
77
77
|
"#{jruby_dist_path}/etc"
|
78
78
|
end
|
79
79
|
|
80
|
+
# The jruby system gem home, depending on #jruby_gem_home_prop?
|
80
81
|
def jruby_gem_home
|
81
|
-
|
82
|
+
if jruby_gem_home_prop?
|
83
|
+
"#{local_root}/lib/jruby/gems"
|
84
|
+
else
|
85
|
+
"#{jruby_dist_path}/lib/ruby/gems/shared"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def jruby_user_gem_dir( user )
|
90
|
+
"~#{user}/.gem/jruby/#{ruby_compat_version}"
|
91
|
+
end
|
92
|
+
|
93
|
+
# True if jruby (1.7.x) supports an alternative system gem home
|
94
|
+
# via the jruby.gem.home java property. By default, for jruby
|
95
|
+
# 1.7.x this will be used to move gems outside to allow for
|
96
|
+
# graceful jruby upgrades without needing to reinstall gems.
|
97
|
+
#
|
98
|
+
# Jruby 9.x continues to abide by this property, through 9.1.12.0
|
99
|
+
# atleast, but with an incessant warning, so the setting is
|
100
|
+
# dropped by default.
|
101
|
+
attr_writer :jruby_gem_home_prop
|
102
|
+
|
103
|
+
def jruby_gem_home_prop?
|
104
|
+
@jruby_gem_home_prop ||= version_lt?( jruby_version, [9] )
|
105
|
+
end
|
106
|
+
|
107
|
+
# The ruby compatability version, as can be found in
|
108
|
+
# RbConfig::CONFIG['ruby_version'] on the same ruby, and used as a
|
109
|
+
# sub-directory of the user gem directory. In recent rubies this is 3
|
110
|
+
# version numbers with 0 in the least significant (ruby naming:
|
111
|
+
# TEENY) position, e.g. '2.3.0'. By default, computed based on
|
112
|
+
# jruby_version for known versions.
|
113
|
+
attr_writer :ruby_compat_version
|
114
|
+
|
115
|
+
def ruby_compat_version
|
116
|
+
@ruby_compat_version ||= default_ruby_compat_version
|
82
117
|
end
|
83
118
|
|
84
119
|
# Install jruby if the jruby_version is not already present.
|
@@ -132,29 +167,39 @@ module SyncWrap
|
|
132
167
|
version = Array( opts[ :version ] )
|
133
168
|
ver = (version.length == 1) && version[0] =~ /^=?\s*([0-9]\S+)/ && $1
|
134
169
|
|
135
|
-
unless ( opts[:check] ||
|
136
|
-
opts[:minimize] == false ||
|
170
|
+
unless ( opts[:check] ||
|
171
|
+
opts[:minimize] == false ||
|
172
|
+
opts[:spec_check] == false ||
|
137
173
|
ver.nil? )
|
138
174
|
|
139
|
-
|
140
|
-
|
175
|
+
prefix = if opts[:user_install]
|
176
|
+
jruby_user_gem_dir( opts[:user_install] )
|
177
|
+
else
|
178
|
+
jruby_gem_home
|
179
|
+
end
|
180
|
+
|
181
|
+
specs = [ "#{prefix}/specifications/#{gem}-#{ver}-java.gemspec",
|
182
|
+
"#{prefix}/specifications/#{gem}-#{ver}.gemspec" ]
|
183
|
+
|
184
|
+
cond = "if [ ! -e #{specs[0]} -a ! -e #{specs[1]} ]; then"
|
185
|
+
shopts = { close: 'fi' }
|
186
|
+
case opts[ :user_install ]
|
187
|
+
when String
|
188
|
+
shopts[ :user ] = opts[ :user_install ]
|
189
|
+
when nil, false
|
190
|
+
shopts[ :user ] = :root
|
191
|
+
end
|
141
192
|
|
142
|
-
|
143
|
-
close: "fi" ) do
|
193
|
+
sh( cond, shopts ) do
|
144
194
|
super
|
145
195
|
end
|
146
196
|
else
|
147
197
|
super
|
148
198
|
end
|
149
|
-
|
150
199
|
end
|
151
200
|
|
152
201
|
alias :jruby_gem_install :gem_install
|
153
202
|
|
154
|
-
def jruby_gem_home_prop?
|
155
|
-
version_lt?( jruby_version, [9] )
|
156
|
-
end
|
157
|
-
|
158
203
|
protected
|
159
204
|
|
160
205
|
def min_deps_supported?
|
@@ -165,6 +210,16 @@ module SyncWrap
|
|
165
210
|
Array( reqs ).flatten.compact.map { |req| "-v'#{req}'" }
|
166
211
|
end
|
167
212
|
|
213
|
+
def default_ruby_compat_version
|
214
|
+
if version_lt?( jruby_version, [9] )
|
215
|
+
'1.9'
|
216
|
+
elsif version_lt?( jruby_version, [9,1] )
|
217
|
+
'2.2.0'
|
218
|
+
else
|
219
|
+
'2.3.0'
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
168
223
|
end
|
169
224
|
|
170
225
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# HashDot launch profile for JRuby
|
1
|
+
# HashDot launch profile for JRuby
|
2
2
|
#. hashdot.profile = jruby
|
3
3
|
|
4
4
|
jruby.home = <%= jruby_dist_path %>
|
@@ -8,10 +8,8 @@ jruby.shell = /bin/sh
|
|
8
8
|
jruby.bindir = <%= local_root %>/bin
|
9
9
|
|
10
10
|
hashdot.profile += jruby-common
|
11
|
-
|
12
|
-
# Rubygems Home (Install)
|
13
11
|
<% if jruby_gem_home_prop? %>
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
|
13
|
+
# System Rubygems Home
|
14
|
+
jruby.gem.home = <%= jruby_gem_home %>
|
17
15
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syncwrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Kellum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|