luban 0.12.6 → 0.12.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d994ba8e032a835c2f4db5e904ed43d95fe9539
4
- data.tar.gz: 39445b62899ebc545b71e73b6f6c9a337b372e87
3
+ metadata.gz: a9f9b648431a95c66eb7a079013f84a96269b4f9
4
+ data.tar.gz: 88853e1b771216a81f113edd2386ed1facd16909
5
5
  SHA512:
6
- metadata.gz: 6a0bcf85fbfa1534bd0dabd52d4d49caccc6855b70caf2aa8b253ac7ddf27684d958b3638d452eaf95f5f295f6706ceb20319a7e7da96df8a3c800d2432c20dd
7
- data.tar.gz: 2e704c5e1f3b786721b57de9c523f7f5cc806ffd68ce04bca8dace5238175c530a232278a064c100790c7e834dabb680e8301d3a618f2ac19407e3b5770e0b35
6
+ metadata.gz: 41bffc8aa7bf3e2312300f502fadac78466d4d3830ac69b0e657b8baa736c75ed62ef6d9dde025c6b4ac10e405a318889bf9b3f0884a88257f78c48f7fc30a1d
7
+ data.tar.gz: 4140711eeedb8f6e74f2168028caa0a7d71422d5f3a2fbeb1f845871c9f0bce430c5f80dc7be14b5ad82a812307dc311a5e51df3bf9b12ce045266138a723c54
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.12.7 (Feb 22, 2017)
4
+
5
+ Minor enhancements:
6
+ * Upgraded Curl's dependency on OpenSSL to version 1.1.0e
7
+ * Upgraded Git's dependency on OpenSSL to version 1.0.2k
8
+ * Upgraded Ruby's dependency on Rubygems to version 2.6.10
9
+ * Supported Ruby 2.4.0 installation with OpenSSL 1.1.0e
10
+ * For Ruby version between 1.9.3 and 2.4.0, Upgraded dependency on OpenSSL to version 1.0.2k
11
+ * Cleaned up Bundler environment before executing any worker tasks
12
+ * Deprecated docker build command and used docker compose instead
13
+ * Separated packages and releases by stage
14
+ * Although packages and releases are not related to stages directly, there are edge cases that package config and release config could be conflicting between stages; therefore,
15
+ * decided to put back stage into packages and releases deployment
16
+ * Added convenient method, #version_match?, to check version requirements easily
17
+ * Supported OpenSSL 1.1 installation
18
+ * Optimized OpenSSL configuration parameters for 1.1.x and 1.0.x
19
+ * Added switch to enable/disable document generation
20
+ * Decompose OpenSSL version more accurately
21
+
22
+ Bug fixes:
23
+ * Disabled rdoc/ri generation gracefully based on actual Rubygems version
24
+ * Output exception backtrace regardless what output format is specified
25
+
3
26
  ## Version 0.12.6 (Feb 17, 2017)
4
27
 
5
28
  Minor enhancements:
@@ -256,12 +256,6 @@ module Luban
256
256
  end
257
257
  end
258
258
 
259
- def build_application!
260
- within build[:context] do
261
- capture(:docker, :build, "-t", build[:image_tag], ".", "2>&1")
262
- end
263
- end
264
-
265
259
  def compose_application!
266
260
  within build[:path] { capture(:"docker-compose", :build, "2>&1") }
267
261
  end
@@ -151,7 +151,7 @@ module Luban
151
151
  assure_dirs(bundle_config_path, gems_cache_path, bundle_path)
152
152
  sync_gems_cache
153
153
  sync_locked_gemfile
154
- with_clean_env { install_gems_from_cache }
154
+ install_gems_from_cache
155
155
  end
156
156
 
157
157
  def sync_gems_cache
@@ -184,7 +184,7 @@ module Luban
184
184
  bundle_path = Pathname.new('vendor').join('bundle')
185
185
  if release_with_gemfile?(gemfile_path)
186
186
  assure_dirs(gems_path)
187
- with_clean_env { bundle_gems!(gemfile_path, gems_cache, bundle_path) }
187
+ bundle_gems!(gemfile_path, gems_cache, bundle_path)
188
188
  else
189
189
  {}
190
190
  end
@@ -29,7 +29,7 @@ module Luban
29
29
  def release_tag; task.opts.release[:tag]; end
30
30
 
31
31
  def releases_path
32
- @releases_path ||= releases_root_path.join(project, application, 'app')
32
+ @releases_path ||= releases_root_path.join("#{stage}.#{project}", application, 'app')
33
33
  end
34
34
 
35
35
  def release_path
@@ -309,6 +309,7 @@ module Luban
309
309
  task_msg = { cmd: cmd, config: config, local: locally,
310
310
  args: task_args, opts: task_opts}
311
311
  result = []
312
+ exception_raised = false
312
313
  mutex = Mutex.new
313
314
  run(**run_opts) do |backend|
314
315
  begin
@@ -321,9 +322,9 @@ module Luban
321
322
  error: e
322
323
  }
323
324
  end
324
- mutex.synchronize { result << r }
325
+ mutex.synchronize { result << r; exception_raised = true }
325
326
  end
326
- print_task_result(result) if opts[:format] == :blackhole
327
+ print_task_result(result) if opts[:format] == :blackhole or exception_raised
327
328
  locally ? result.first[:__return__] : result
328
329
  end
329
330
 
@@ -6,7 +6,7 @@ module Luban
6
6
 
7
7
  module Base
8
8
  def packages_path
9
- @packages_path ||= packages_root_path.join(project, application)
9
+ @packages_path ||= packages_root_path.join("#{stage}.#{project}", application)
10
10
  end
11
11
 
12
12
  def package_install_path(package_name)
@@ -199,8 +199,8 @@ module Luban
199
199
  succeeded
200
200
  end
201
201
 
202
- def start_process!; with_clean_env { capture(start_command) }; end
203
- def stop_process!; with_clean_env { capture(stop_command) }; end
202
+ def start_process!; capture(start_command); end
203
+ def stop_process!; capture(stop_command); end
204
204
 
205
205
  def check_process!
206
206
  if pid_file_missing?
@@ -211,6 +211,12 @@ module Luban
211
211
  defined?(Bundler) ? Bundler.with_clean_env { yield } : yield
212
212
  end
213
213
 
214
+ def version_match?(version, version_requirement)
215
+ with_clean_env do
216
+ Gem::Requirement.new(version_requirement).satisfied_by?(Gem::Version.new(version))
217
+ end
218
+ end
219
+
214
220
  #def method_missing(sym, *args, &blk)
215
221
  # backend.respond_to?(sym) ? backend.send(sym, *args, &blk) : super
216
222
  #end
@@ -9,7 +9,7 @@ module Luban
9
9
 
10
10
  def installed?
11
11
  return false unless file?(bundler_executable)
12
- with_clean_env { match?("#{bundler_executable} -v", package_version) }
12
+ match?("#{bundler_executable} -v", package_version)
13
13
  end
14
14
 
15
15
  protected
@@ -4,7 +4,7 @@ module Luban
4
4
  class Curl < Luban::Deployment::Package::Base
5
5
  apply_to :all do
6
6
  before_install do
7
- depend_on 'openssl', version: '1.0.2j'
7
+ depend_on 'openssl', version: '1.1.0e'
8
8
  end
9
9
  end
10
10
 
@@ -58,15 +58,11 @@ module Luban
58
58
  end
59
59
 
60
60
  def install_gem!
61
- with_clean_env do
62
- test("#{gem_executable} install #{install_opts.join(' ')} #{src_cache_path} >> #{install_log_file_path} 2>&1")
63
- end
61
+ test("#{gem_executable} install #{install_opts.join(' ')} #{src_cache_path} >> #{install_log_file_path} 2>&1")
64
62
  end
65
63
 
66
64
  def uninstall_gem!
67
- with_clean_env do
68
- test("#{gem_executable} uninstall #{package_name} -a -x -I >> #{install_log_file_path} 2>&1")
69
- end
65
+ test("#{gem_executable} uninstall #{package_name} -a -x -I >> #{install_log_file_path} 2>&1")
70
66
  end
71
67
  end
72
68
  end
@@ -4,7 +4,7 @@ module Luban
4
4
  class Git < Luban::Deployment::Package::Base
5
5
  apply_to :all do
6
6
  before_install do
7
- depend_on 'openssl', version: '1.0.2j'
7
+ depend_on 'openssl', version: '1.0.2k'
8
8
  depend_on 'curl', version: '7.52.1'
9
9
  end
10
10
  end
@@ -2,15 +2,34 @@ module Luban
2
2
  module Deployment
3
3
  module Packages
4
4
  class Openssl < Luban::Deployment::Package::Base
5
+ def self.decompose_version(version)
6
+ major_version, patch_level = version.split('-')
7
+ if patch_level.nil?
8
+ major_version = version[/^[0-9.]+/]
9
+ patch_level = version[/[a-z]+$/]
10
+ end
11
+ { major_version: major_version, patch_level: patch_level }
12
+ end
13
+
14
+ protected
15
+
16
+ def setup_provision_tasks
17
+ super
18
+ provision_tasks[:install].switch :install_doc, "Install OpenSSL document"
19
+ end
20
+
5
21
  class Installer < Luban::Deployment::Package::Installer
6
22
  OSXArchArgs = {
7
- x86_64: %w(darwin64-x86_64-cc enable-ec_nistp_64_gcc_128),
23
+ x86_64: %w(darwin64-x86_64-cc),
8
24
  i386: %w(darwin-i386-cc)
9
25
  }
10
26
 
27
+ def install_doc?
28
+ task.opts.install_doc
29
+ end
30
+
11
31
  def configure_executable
12
32
  @configure_executable = osx? ? './Configure' : './config'
13
-
14
33
  end
15
34
 
16
35
  define_executable 'openssl'
@@ -24,7 +43,7 @@ module Luban
24
43
  end
25
44
 
26
45
  def old_source_url_root
27
- @old_source_url_root ||= "source/old/#{package_version.gsub(/[a-z]/, '')}"
46
+ @old_source_url_root ||= "source/old/#{package_major_version}"
28
47
  end
29
48
 
30
49
  def installed?
@@ -33,7 +52,7 @@ module Luban
33
52
  end
34
53
 
35
54
  def default_configure_opts
36
- @default_configure_opts ||= %w(no-ssl2 zlib-dynamic shared enable-cms)
55
+ @default_configure_opts ||= %w(enable-ec_nistp_64_gcc_128 zlib-dynamic shared enable-cms)
37
56
  end
38
57
 
39
58
  protected
@@ -41,6 +60,12 @@ module Luban
41
60
  def configure_build_options
42
61
  super
43
62
  @configure_opts.unshift(OSXArchArgs[hardware_name.to_sym]) if osx?
63
+ if version_match?(package_major_version, ">=1.1.0")
64
+ @configure_opts << "-Wl,-rpath -Wl,#{lib_path}"
65
+ #@configure_opts << "-Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'"
66
+ else
67
+ @configure_opts << "no-ssl2"
68
+ end
44
69
  end
45
70
 
46
71
  def switch_source_url_root
@@ -60,14 +85,13 @@ module Luban
60
85
  end
61
86
 
62
87
  def make_package!
63
- super and test(:make, "depend >> #{install_log_file_path} 2>&1")
88
+ (version_match?(package_major_version, ">=1.1.0") or
89
+ test(:make, :depend, ">> #{install_log_file_path} 2>&1")) and
90
+ super
64
91
  end
65
92
 
66
- def cleanup_temp!
67
- super
68
- # Clean up man pages
69
- manpages_path = install_path.join('ssl/man')
70
- rmdir(manpages_path) if directory?(manpages_path)
93
+ def install_package!
94
+ test(:make, install_doc? ? :install : :install_sw, ">> #{install_log_file_path} 2>&1")
71
95
  end
72
96
  end
73
97
  end
@@ -44,19 +44,27 @@ module Luban
44
44
  end
45
45
  end
46
46
 
47
- apply_to '>= 1.9.3' do
47
+ apply_to [">= 1.9.3", "< 2.4.0"] do
48
+ before_install do
49
+ depend_on 'openssl', version: '1.0.2k'
50
+ end
51
+ end
52
+
53
+ apply_to '>= 2.4.0' do
48
54
  before_install do
49
- depend_on 'openssl', version: '1.0.2j'
50
- #depend_on 'yaml', version: '0.1.6'
55
+ depend_on 'openssl', version: '1.1.0e'
51
56
  end
57
+ end
58
+
59
+ apply_to '>= 1.9.3' do
52
60
  after_install do
53
- depend_on 'rubygems', version: '2.6.8'
61
+ depend_on 'rubygems', version: '2.6.10'
54
62
  end
55
63
  end
56
64
 
57
65
  apply_to :all do
58
66
  after_install do
59
- depend_on 'bundler', version: '1.13.6'
67
+ depend_on 'bundler', version: '1.14.4'
60
68
  end
61
69
  end
62
70
 
@@ -52,7 +52,11 @@ module Luban
52
52
  def configure_build_options
53
53
  super
54
54
  unless install_doc?
55
- @configure_opts.push('--no-rdoc', '--no-ri')
55
+ if version_match?(package_version, ">=2.0.0")
56
+ @configure_opts.push("--no-document")
57
+ else
58
+ @configure_opts.push('--no-rdoc', '--no-ri')
59
+ end
56
60
  end
57
61
  end
58
62
 
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.12.6"
3
+ VERSION = "0.12.7"
4
4
  end
5
5
  end
@@ -35,7 +35,9 @@ module Luban
35
35
  def packages; task.opts.packages; end
36
36
 
37
37
  def run
38
- update_result(__return__: @run_blk ? run_with_block : run_with_command).to_h
38
+ with_clean_env do
39
+ update_result(__return__: @run_blk ? run_with_block : run_with_command).to_h
40
+ end
39
41
  end
40
42
 
41
43
  def method_missing(sym, *args, &blk)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.6
4
+ version: 0.12.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli