From 7f4d0484969ac7162a87390e9d1a9a6c4bbdb4c3 Mon Sep 17 00:00:00 2001 From: sksat Date: Fri, 31 Dec 2021 14:35:27 +0900 Subject: [PATCH 01/29] Add sensitive attribute (#115) --- mrblib/mitamae/resource/file.rb | 1 + mrblib/mitamae/resource/http_request.rb | 1 + mrblib/mitamae/resource/remote_file.rb | 1 + mrblib/mitamae/resource/template.rb | 1 + mrblib/mitamae/resource_executor/file.rb | 5 +++++ 5 files changed, 9 insertions(+) diff --git a/mrblib/mitamae/resource/file.rb b/mrblib/mitamae/resource/file.rb index 3eded06..9f83d12 100644 --- a/mrblib/mitamae/resource/file.rb +++ b/mrblib/mitamae/resource/file.rb @@ -9,6 +9,7 @@ class File < Base define_attribute :group, type: String define_attribute :block, type: Proc, default: proc {} define_attribute :atomic_update, type: [TrueClass, FalseClass], default: false + define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:create, :delete, :edit] end diff --git a/mrblib/mitamae/resource/http_request.rb b/mrblib/mitamae/resource/http_request.rb index 968bf40..af9252b 100644 --- a/mrblib/mitamae/resource/http_request.rb +++ b/mrblib/mitamae/resource/http_request.rb @@ -6,6 +6,7 @@ class HTTPRequest < File define_attribute :message, type: String, default: '' define_attribute :redirect_limit, type: Integer, default: 10 define_attribute :url, type: String, required: true + define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:get, :post, :put, :delete] end diff --git a/mrblib/mitamae/resource/remote_file.rb b/mrblib/mitamae/resource/remote_file.rb index e7218e1..ce323c5 100644 --- a/mrblib/mitamae/resource/remote_file.rb +++ b/mrblib/mitamae/resource/remote_file.rb @@ -2,6 +2,7 @@ module MItamae module Resource class RemoteFile < File define_attribute :source, type: [String, Symbol], default: :auto + define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:create, :delete] end diff --git a/mrblib/mitamae/resource/template.rb b/mrblib/mitamae/resource/template.rb index d58d62f..c9aac68 100644 --- a/mrblib/mitamae/resource/template.rb +++ b/mrblib/mitamae/resource/template.rb @@ -3,6 +3,7 @@ module Resource class Template < RemoteFile attr_accessor :node define_attribute :variables, type: Hash, default: {} + define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:create, :delete] end diff --git a/mrblib/mitamae/resource_executor/file.rb b/mrblib/mitamae/resource_executor/file.rb index 66d73d2..3fa15da 100644 --- a/mrblib/mitamae/resource_executor/file.rb +++ b/mrblib/mitamae/resource_executor/file.rb @@ -125,6 +125,11 @@ def compare_file end def show_content_diff + if attributes.sensitive + MItamae.logger.info "diff exists, but not displaying sensitive content" + return + end + if @modified MItamae.logger.info "diff:" diff = run_command(["diff", "-u", compare_to, @temppath], error: false) From 856b6bd78023f1760ba573e73544d14943affc3f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 30 Dec 2021 21:37:36 -0800 Subject: [PATCH 02/29] Remove redundant declarations --- mrblib/mitamae/resource/http_request.rb | 1 - mrblib/mitamae/resource/remote_file.rb | 1 - mrblib/mitamae/resource/template.rb | 1 - spec/recipes/file.rb | 1 + spec/recipes/template.rb | 1 + 5 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mrblib/mitamae/resource/http_request.rb b/mrblib/mitamae/resource/http_request.rb index af9252b..968bf40 100644 --- a/mrblib/mitamae/resource/http_request.rb +++ b/mrblib/mitamae/resource/http_request.rb @@ -6,7 +6,6 @@ class HTTPRequest < File define_attribute :message, type: String, default: '' define_attribute :redirect_limit, type: Integer, default: 10 define_attribute :url, type: String, required: true - define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:get, :post, :put, :delete] end diff --git a/mrblib/mitamae/resource/remote_file.rb b/mrblib/mitamae/resource/remote_file.rb index ce323c5..e7218e1 100644 --- a/mrblib/mitamae/resource/remote_file.rb +++ b/mrblib/mitamae/resource/remote_file.rb @@ -2,7 +2,6 @@ module MItamae module Resource class RemoteFile < File define_attribute :source, type: [String, Symbol], default: :auto - define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:create, :delete] end diff --git a/mrblib/mitamae/resource/template.rb b/mrblib/mitamae/resource/template.rb index c9aac68..d58d62f 100644 --- a/mrblib/mitamae/resource/template.rb +++ b/mrblib/mitamae/resource/template.rb @@ -3,7 +3,6 @@ module Resource class Template < RemoteFile attr_accessor :node define_attribute :variables, type: Hash, default: {} - define_attribute :sensitive, type: [TrueClass, FalseClass], default: false self.available_actions = [:create, :delete] end diff --git a/spec/recipes/file.rb b/spec/recipes/file.rb index 3e72d33..12be8ab 100644 --- a/spec/recipes/file.rb +++ b/spec/recipes/file.rb @@ -31,6 +31,7 @@ file "/tmp/file1" do content "Hello, World" + sensitive true end file "/tmp/file1" do diff --git a/spec/recipes/template.rb b/spec/recipes/template.rb index d615c5a..25d9d2d 100644 --- a/spec/recipes/template.rb +++ b/spec/recipes/template.rb @@ -6,6 +6,7 @@ template "/tmp/template_auto" do source :auto variables goodbye: "Good bye" + sensitive true end template "/tmp/template_content" do From db241aebc03182187ad0fa06c2257ad738a0476f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 30 Dec 2021 21:40:05 -0800 Subject: [PATCH 03/29] Version 1.12.8 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 495fe68..4599286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.8 + +- Support Itamae v1.11.0's `sensitive` attribute in file resources + ## v1.12.7 - Add mruby-enum-ext diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index b6b6ebe..88c2175 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.7' + VERSION = '1.12.8' end From 785fa862f2e95f150872095ce4f3a2bf587cfc7a Mon Sep 17 00:00:00 2001 From: Tomoaki <34957299+tomothy83@users.noreply.github.com> Date: Mon, 31 Jan 2022 07:21:04 +0900 Subject: [PATCH 04/29] Get user encrypted password from /etc/shadow (#116) * Add tests of user encrypted password. * Use mruby-specinfra to get encrypted password. --- .../mitamae/inline_backends/user_backend.rb | 4 -- spec/integration/user_spec.rb | 8 ++++ spec/recipes/user.rb | 44 +++++++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/mrblib/mitamae/inline_backends/user_backend.rb b/mrblib/mitamae/inline_backends/user_backend.rb index 50cfe98..3c998ae 100644 --- a/mrblib/mitamae/inline_backends/user_backend.rb +++ b/mrblib/mitamae/inline_backends/user_backend.rb @@ -40,10 +40,6 @@ def get_user_home_directory(user_name) def get_user_login_shell(user_name) get_passwd_entry(user_name) { |pw| pw.shell } end - - def get_user_encrypted_password(user_name) - get_passwd_entry(user_name) { |pw| pw.passwd } - end end end end diff --git a/spec/integration/user_spec.rb b/spec/integration/user_spec.rb index 8b4862e..e7146c2 100644 --- a/spec/integration/user_spec.rb +++ b/spec/integration/user_spec.rb @@ -17,4 +17,12 @@ it { should be_owned_by 'itamae2' } it { should be_grouped_into 'itamae2' } end + + describe file('/tmp/itamae3-password-should-not-be-updated') do + it { should_not exist } + end + + describe file('/tmp/itamae3-password-should-be-updated') do + it { should exist } + end end diff --git a/spec/recipes/user.rb b/spec/recipes/user.rb index ae47559..45a3a11 100644 --- a/spec/recipes/user.rb +++ b/spec/recipes/user.rb @@ -24,3 +24,47 @@ home '/home/itamae2' shell '/bin/sh' end + +execute 'deluser --remove-home itamae3' do + only_if 'id itamae3' +end + +file '/tmp/itamae3-password-should-not-be-updated' do + action :delete +end + +file '/tmp/itamae3-password-should-be-updated' do + action :delete +end + +# salt: 'salt', password: 'password' +itamae3_encrypted_password = '$6$salt$IxDD3jeSOb5eB1CX5LBsqZFVkJdido3OUILO5Ifz5iwMuTS4XMS130MTSuDDl3aCI6WouIL9AjRbLCelDCy.g.' +# salt: 'salt', password: 'password2' +itamae3_encrypted_password2 = '$6$salt$j48aGM/5GaMl0CCDSihdu1QGIFET5rK.L/ZpznS41s/HgxCe/2sNJ5kU39.gBvsagjQldZ9K8zJg0N.W9zWGp1' + +user 'create itamae3 user with password hash' do + username 'itamae3' + password itamae3_encrypted_password +end + +user 'create itamae3 user with password hash again' do + username 'itamae3' + password itamae3_encrypted_password + notifies :create, 'file[itamae3 password should not be updated]' +end + +user 'change password of itamae3' do + username 'itamae3' + password itamae3_encrypted_password2 + notifies :create, 'file[itamae3 password should be updated]' +end + +file 'itamae3 password should not be updated' do + action :nothing + path '/tmp/itamae3-password-should-not-be-updated' +end + +file 'itamae3 password should be updated' do + action :nothing + path '/tmp/itamae3-password-should-be-updated' +end From 0714eaa1ea59e19cc34ccacc70b74fb574f2226b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 30 Jan 2022 14:24:19 -0800 Subject: [PATCH 05/29] Version 1.12.9 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4599286..202932e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.9 + +- Get encrypted passwords from `/etc/shadow` for some platforms + ## v1.12.8 - Support Itamae v1.11.0's `sensitive` attribute in file resources diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 88c2175..4910d46 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.8' + VERSION = '1.12.9' end From 95cc4db0f22f81967fb88b34a8ec073087fc0ea3 Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Mon, 23 May 2022 22:38:29 -0500 Subject: [PATCH 06/29] Add support for live streaming command output to the console (#118) This adds a new argument to `run_command`, `log_output: true`, that will log output lines to the console as they come in. In addition, if debug logging is enabled, command output will be streamed instead of being collected and then printed. --- README.md | 2 + mrblib/mitamae/backend.rb | 80 ++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index cc38b69..279a6dd 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,8 @@ They should be ported to Itamae at some point. * `not_if` / `only_if` can take a block instead of a command * `file`, `remote_file`, and `template` resources have `atomic_update` attribute +* `run_command` can take `log_output: true`, which will stream the command's + output to to the console ### Plugins diff --git a/mrblib/mitamae/backend.rb b/mrblib/mitamae/backend.rb index 5e74627..7201df5 100644 --- a/mrblib/mitamae/backend.rb +++ b/mrblib/mitamae/backend.rb @@ -9,15 +9,26 @@ def initialize(shell: '/bin/sh') end # https://github.com/itamae-kitchen/itamae/blob/v1.9.9/lib/itamae/backend.rb#L46-L86 - def run_command(commands, error: true, user: nil, cwd: nil) + def run_command(commands, error: true, user: nil, cwd: nil, log_output: false) + log_output_severity = if log_output + :info + elsif MItamae.logger.level == Logger::DEBUG + :debug + else + nil + end + command_for_display = build_command(commands, user: user, cwd: cwd) MItamae.logger.debug "Executing `#{command_for_display}`..." - stdout, stderr, status = run_with_open3(commands, user: user, cwd: cwd) + stdout, stderr, status = run_with_open3( + commands, + user: user, + cwd: cwd, + log_output_severity: log_output_severity + ) MItamae.logger.with_indent do - flush_buffers(stdout, stderr) - if status.exitstatus == 0 || !error method = :debug message = "exited with #{status.exitstatus}" @@ -25,12 +36,12 @@ def run_command(commands, error: true, user: nil, cwd: nil) method = :error message = "Command `#{command_for_display}` failed. (exit status: #{status.exitstatus})" - unless MItamae.logger.level == Logger::DEBUG + unless log_output stdout.each_line do |l| - log_output_line("stdout", l) + log_output_line(:error, "stdout", l) end stderr.each_line do |l| - log_output_line("stderr", l) + log_output_line(:error, "stderr", l) end end end @@ -54,18 +65,9 @@ def host_inventory private - def flush_buffers(stdout, stderr) - unless stdout.empty? - MItamae.logger.debug("stdout | #{stdout}") - end - unless stderr.empty? - MItamae.logger.debug("stderr | #{stderr}") - end - end - - def log_output_line(output_name, line) + def log_output_line(level, output_name, line) line = line.gsub(/[[:cntrl:]]/, '') - MItamae.logger.error("#{output_name} | #{line}") + MItamae.logger.send(level, "#{output_name} | #{line}") end # https://github.com/itamae-kitchen/itamae/blob/v1.9.9/lib/itamae/backend.rb#L168-L189 @@ -88,22 +90,56 @@ def build_command(commands, user: nil, cwd: nil) command end - def run_with_open3(commands, user: nil, cwd: nil) + def run_with_open3(commands, user: nil, cwd: nil, log_output_severity: nil) + spawn_opts = {} if user # Cannot emulate `:user` option without the shell. Fallback to the slow version. - Open3.capture3(@shell, '-c', build_command(commands, cwd: cwd, user: user)) + commands = [@shell, '-c', build_command(commands, cwd: cwd, user: user)] else if commands.is_a?(String) commands = [@shell, '-c', commands] end - spawn_opts = {} if cwd spawn_opts[:chdir] = cwd end + end - Open3.capture3(*commands, spawn_opts) + out_r, out_w = IO.pipe + err_r, err_w = IO.pipe + spawn_opts[:out] = out_w.to_i + spawn_opts[:err] = err_w.to_i + + pid = Open3.spawn(*commands, spawn_opts) + + out_w.close + err_w.close + + stdout = '' + stderr = '' + + remaining_ios = [out_r, err_r] + until remaining_ios.empty? + readable_ios, = IO.select(remaining_ios) + readable_ios.each do |io| + begin + line = io.readline + if io == out_r + log_output_line(log_output_severity, "stdout", line) if log_output_severity + stdout << line + else + log_output_line(log_output_severity, "stderr", line) if log_output_severity + stderr << line + end + rescue EOFError + io.close unless io.closed? + remaining_ios.delete(io) + end + end end + + _, status = Process.waitpid2(pid) + [stdout, stderr, status] end end end From b5ed3d584106e9d58a91178e2dac296009266556 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 23 May 2022 21:02:37 -0700 Subject: [PATCH 07/29] A command is not commands --- mrblib/mitamae/backend.rb | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/mrblib/mitamae/backend.rb b/mrblib/mitamae/backend.rb index 7201df5..63285f9 100644 --- a/mrblib/mitamae/backend.rb +++ b/mrblib/mitamae/backend.rb @@ -9,7 +9,7 @@ def initialize(shell: '/bin/sh') end # https://github.com/itamae-kitchen/itamae/blob/v1.9.9/lib/itamae/backend.rb#L46-L86 - def run_command(commands, error: true, user: nil, cwd: nil, log_output: false) + def run_command(command, error: true, user: nil, cwd: nil, log_output: false) log_output_severity = if log_output :info elsif MItamae.logger.level == Logger::DEBUG @@ -18,11 +18,11 @@ def run_command(commands, error: true, user: nil, cwd: nil, log_output: false) nil end - command_for_display = build_command(commands, user: user, cwd: cwd) + command_for_display = build_command(command, user: user, cwd: cwd) MItamae.logger.debug "Executing `#{command_for_display}`..." stdout, stderr, status = run_with_open3( - commands, + command, user: user, cwd: cwd, log_output_severity: log_output_severity @@ -71,11 +71,9 @@ def log_output_line(level, output_name, line) end # https://github.com/itamae-kitchen/itamae/blob/v1.9.9/lib/itamae/backend.rb#L168-L189 - def build_command(commands, user: nil, cwd: nil) - if commands.is_a?(Array) - command = Shellwords.shelljoin(commands) - else - command = commands + def build_command(command, user: nil, cwd: nil) + if command.is_a?(Array) + command = Shellwords.shelljoin(command) end if cwd @@ -90,14 +88,14 @@ def build_command(commands, user: nil, cwd: nil) command end - def run_with_open3(commands, user: nil, cwd: nil, log_output_severity: nil) + def run_with_open3(command, user: nil, cwd: nil, log_output_severity: nil) spawn_opts = {} if user # Cannot emulate `:user` option without the shell. Fallback to the slow version. - commands = [@shell, '-c', build_command(commands, cwd: cwd, user: user)] + command = [@shell, '-c', build_command(command, cwd: cwd, user: user)] else - if commands.is_a?(String) - commands = [@shell, '-c', commands] + if command.is_a?(String) + command = [@shell, '-c', command] end if cwd @@ -110,7 +108,7 @@ def run_with_open3(commands, user: nil, cwd: nil, log_output_severity: nil) spawn_opts[:out] = out_w.to_i spawn_opts[:err] = err_w.to_i - pid = Open3.spawn(*commands, spawn_opts) + pid = Open3.spawn(*command, spawn_opts) out_w.close err_w.close From cbd3d3c965185e22341637a30b44e93a9b513848 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 23 May 2022 21:47:24 -0700 Subject: [PATCH 08/29] Refactor run_command (#120) --- mrblib/mitamae/backend.rb | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/mrblib/mitamae/backend.rb b/mrblib/mitamae/backend.rb index 63285f9..e9291a7 100644 --- a/mrblib/mitamae/backend.rb +++ b/mrblib/mitamae/backend.rb @@ -10,42 +10,30 @@ def initialize(shell: '/bin/sh') # https://github.com/itamae-kitchen/itamae/blob/v1.9.9/lib/itamae/backend.rb#L46-L86 def run_command(command, error: true, user: nil, cwd: nil, log_output: false) - log_output_severity = if log_output - :info - elsif MItamae.logger.level == Logger::DEBUG - :debug - else - nil - end - command_for_display = build_command(command, user: user, cwd: cwd) MItamae.logger.debug "Executing `#{command_for_display}`..." - stdout, stderr, status = run_with_open3( + stdout, stderr, status = run_command_with_log_output( command, user: user, cwd: cwd, - log_output_severity: log_output_severity + log_output: log_output, ) MItamae.logger.with_indent do if status.exitstatus == 0 || !error - method = :debug - message = "exited with #{status.exitstatus}" + MItamae.logger.debug("exited with #{status.exitstatus}") else - method = :error - message = "Command `#{command_for_display}` failed. (exit status: #{status.exitstatus})" - unless log_output - stdout.each_line do |l| - log_output_line(:error, "stdout", l) + stdout.each_line do |line| + log_output_line(:error, 'stdout', line) end - stderr.each_line do |l| - log_output_line(:error, "stderr", l) + stderr.each_line do |line| + log_output_line(:error, 'stderr', line) end end + MItamae.logger.error("Command `#{command_for_display}` failed. (exit status: #{status.exitstatus})") end - MItamae.logger.send(method, message) end if error && status.exitstatus != 0 @@ -88,7 +76,7 @@ def build_command(command, user: nil, cwd: nil) command end - def run_with_open3(command, user: nil, cwd: nil, log_output_severity: nil) + def run_command_with_log_output(command, user:, cwd:, log_output:) spawn_opts = {} if user # Cannot emulate `:user` option without the shell. Fallback to the slow version. @@ -102,6 +90,7 @@ def run_with_open3(command, user: nil, cwd: nil, log_output_severity: nil) spawn_opts[:chdir] = cwd end end + log_level = (log_output ? :info : :debug) out_r, out_w = IO.pipe err_r, err_w = IO.pipe @@ -123,10 +112,10 @@ def run_with_open3(command, user: nil, cwd: nil, log_output_severity: nil) begin line = io.readline if io == out_r - log_output_line(log_output_severity, "stdout", line) if log_output_severity + log_output_line(log_level, 'stdout', line) stdout << line else - log_output_line(log_output_severity, "stderr", line) if log_output_severity + log_output_line(log_level, 'stderr', line) stderr << line end rescue EOFError From edb730e0055b1af7af3b3bf19ad308632a92d002 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 23 May 2022 21:48:13 -0700 Subject: [PATCH 09/29] Update mruby-yaml for Ruby 3.2 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 1333cc5..17cfbfb 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -67,7 +67,7 @@ builds: https://github.com/mrbgems/mruby-yaml.git: url: https://github.com/mrbgems/mruby-yaml.git branch: master - commit: 9f4408d4d46ffc8668ea07cc9c6249f33114d3a9 + commit: a7345b3124bac6084e58c236882f3e27918f5126 version: 0.1.0 https://github.com/k0kubun/mruby-erb.git: url: https://github.com/k0kubun/mruby-erb.git From c7082f04fc4a6f92edb134ee3408da976fe775ba Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 23 May 2022 21:55:13 -0700 Subject: [PATCH 10/29] Version 1.12.10 --- CHANGELOG.md | 4 ++++ README.md | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 202932e..58410ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.10 + +- Stream output of `run_command` with `--log-level debug` or `log_output: true` option + ## v1.12.9 - Get encrypted passwords from `/etc/shadow` for some platforms diff --git a/README.md b/README.md index 279a6dd..dab1820 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,7 @@ They should be ported to Itamae at some point. * `not_if` / `only_if` can take a block instead of a command * `file`, `remote_file`, and `template` resources have `atomic_update` attribute -* `run_command` can take `log_output: true`, which will stream the command's - output to to the console +* `run_command` streams log output with `--log-level debug` or `log_output: true` option. ### Plugins From f15d4201fce7ec91ea632874b42b8a7d2c587eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ka=C3=ADque=20Kandy=20Koga?= Date: Mon, 13 Jun 2022 13:12:03 -0300 Subject: [PATCH 11/29] Use execute instead of excute (#121) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dab1820..8db8d4d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ service 'nginx' do end ``` -And then excute `mitamae local` command to apply a recipe to a local machine. +And then execute `mitamae local` command to apply a recipe to a local machine. ```diff $ mv mitamae-x86_64-linux mitamae From b5e4e6bf104728aebc1053b5c059df10b13289e1 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 13 Jun 2022 09:13:01 -0700 Subject: [PATCH 12/29] Revert "Version 1.12.10" This reverts commit c7082f04fc4a6f92edb134ee3408da976fe775ba. --- CHANGELOG.md | 4 ---- README.md | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58410ad..202932e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,3 @@ -## v1.12.10 - -- Stream output of `run_command` with `--log-level debug` or `log_output: true` option - ## v1.12.9 - Get encrypted passwords from `/etc/shadow` for some platforms diff --git a/README.md b/README.md index 8db8d4d..e6b5b4e 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,8 @@ They should be ported to Itamae at some point. * `not_if` / `only_if` can take a block instead of a command * `file`, `remote_file`, and `template` resources have `atomic_update` attribute -* `run_command` streams log output with `--log-level debug` or `log_output: true` option. +* `run_command` can take `log_output: true`, which will stream the command's + output to to the console ### Plugins From c72a935590e5322873029ace713352a425ad6b42 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 13 Jun 2022 09:13:17 -0700 Subject: [PATCH 13/29] Version 1.12.10 This reverts commit b5e4e6bf104728aebc1053b5c059df10b13289e1. changing version.rb as well --- CHANGELOG.md | 4 ++++ README.md | 3 +-- mrblib/mitamae/version.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 202932e..58410ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.10 + +- Stream output of `run_command` with `--log-level debug` or `log_output: true` option + ## v1.12.9 - Get encrypted passwords from `/etc/shadow` for some platforms diff --git a/README.md b/README.md index e6b5b4e..8db8d4d 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,7 @@ They should be ported to Itamae at some point. * `not_if` / `only_if` can take a block instead of a command * `file`, `remote_file`, and `template` resources have `atomic_update` attribute -* `run_command` can take `log_output: true`, which will stream the command's - output to to the console +* `run_command` streams log output with `--log-level debug` or `log_output: true` option. ### Plugins diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 4910d46..3246ba8 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.9' + VERSION = '1.12.10' end From d375bfc6a52463655eefacae71be9af221b565d1 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Wed, 6 Jul 2022 05:26:51 +0900 Subject: [PATCH 14/29] Execute local_ruby_block code inside of chdir-ed block if cwd presented (#122) "local_ruby_block" execute by itamae's ruby process. The process doesn't change its working directory, which is presented by "cwd" attribute. I think it's the root cause of itamae's issue 353. https://github.com/itamae-kitchen/itamae/issues/353 I made the local_ruby_block code execute inside of Dir.chdir block if cwd attribute was presented to fix it. This behavior has existed since 2015 (in itamae pr 146, not mitamae). https://github.com/itamae-kitchen/itamae/pull/146 There might be a recipe that is dependent on current behavior somewhere. Although I couldn't find public itamae recipes that use "local_ruby_block" with "cwd", the change has a small impact, I think. ref https://github.com/itamae-kitchen/itamae/pull/355 --- mrblib/mitamae/resource_executor/local_ruby_block.rb | 8 +++++++- spec/recipes/local_ruby_block.rb | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/mrblib/mitamae/resource_executor/local_ruby_block.rb b/mrblib/mitamae/resource_executor/local_ruby_block.rb index cb625d2..bd5e613 100644 --- a/mrblib/mitamae/resource_executor/local_ruby_block.rb +++ b/mrblib/mitamae/resource_executor/local_ruby_block.rb @@ -3,7 +3,13 @@ module ResourceExecutor class LocalRubyBlock < Base def apply if desired.executed - desired.block.call + if desired.cwd + Dir.chdir(desired.cwd) do + desired.block.call + end + else + desired.block.call + end end end diff --git a/spec/recipes/local_ruby_block.rb b/spec/recipes/local_ruby_block.rb index 3c7fdfc..b2af521 100644 --- a/spec/recipes/local_ruby_block.rb +++ b/spec/recipes/local_ruby_block.rb @@ -35,3 +35,12 @@ File.open('/tmp/local_ruby_block_nothing', 'w') {} end end + +local_ruby_block 'test' do + cwd "/tmp" + block do + unless `pwd`.chomp == "/tmp" + raise "working directory mismatched" + end + end +end From 1718c0c80b2da7c9c1e0139b1c94ff325d5d6c85 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 5 Jul 2022 13:28:06 -0700 Subject: [PATCH 15/29] Version 1.13.0 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58410ad..92d9ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.13.0 + +- `local_ruby_block` executes `code` under `cwd` if it's present + ## v1.12.10 - Stream output of `run_command` with `--log-level debug` or `log_output: true` option diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 3246ba8..e650927 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.10' + VERSION = '1.13.0' end From 79fe7b7d9c9f8e1279c1778eacc07a1dc522bc0e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 27 Jul 2022 23:31:13 -0700 Subject: [PATCH 16/29] Specinfra v2.83.3 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 17cfbfb..6cc5224 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -57,7 +57,7 @@ builds: https://github.com/k0kubun/mruby-specinfra.git: url: https://github.com/k0kubun/mruby-specinfra.git branch: master - commit: 6581261797b38bc7698f27c22733f74fcc102b30 + commit: 2a66b88cf87143b7d0ee8ab28ca3cbd69ad367cf version: 0.0.0 https://github.com/k0kubun/mruby-tempfile.git: url: https://github.com/k0kubun/mruby-tempfile.git From d0e809453f7586ff22c7a53186dd9f674bfebc84 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 27 Jul 2022 23:32:07 -0700 Subject: [PATCH 17/29] Version 1.13.1 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92d9ed8..383ec8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.13.1 + +- Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) + ## v1.13.0 - `local_ruby_block` executes `code` under `cwd` if it's present diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index e650927..30326df 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.13.0' + VERSION = '1.13.1' end From 58cc435cf1aa240f842a05e35121da376dd3ee11 Mon Sep 17 00:00:00 2001 From: kaito Date: Tue, 2 Aug 2022 00:57:34 +0900 Subject: [PATCH 18/29] fix host inventory spec (#123) --- spec/integration/host_inventory_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/host_inventory_spec.rb b/spec/integration/host_inventory_spec.rb index 13dd750..6f761bf 100644 --- a/spec/integration/host_inventory_spec.rb +++ b/spec/integration/host_inventory_spec.rb @@ -17,7 +17,7 @@ cpu: /"cpu_family"/, virtualization: /\A{("system"=>(nil|"docker"))?}\z/, kernel: /"name"=>"Linux"/, - block_device: /\A{}\z/, + block_device: /\A{.*}\z/, user: /"root"=>{[^{}]*"uid"=>"0", /, }.each do |key, expected| describe file("/tmp/host_inventory_#{key}") do From af32696d773efc53d54d6b783f50c9fa5978324d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 1 Aug 2022 08:58:04 -0700 Subject: [PATCH 19/29] Revert "Version 1.13.1" This reverts commit d0e809453f7586ff22c7a53186dd9f674bfebc84. --- CHANGELOG.md | 4 ---- mrblib/mitamae/version.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 383ec8e..92d9ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,3 @@ -## v1.13.1 - -- Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) - ## v1.13.0 - `local_ruby_block` executes `code` under `cwd` if it's present diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 30326df..e650927 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.13.1' + VERSION = '1.13.0' end From a0641a23e585f775c1ea89b978482559d8cf3582 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 1 Aug 2022 08:58:12 -0700 Subject: [PATCH 20/29] Version 1.13.1 Revert "Revert "Version 1.13.1"" This reverts commit af32696d773efc53d54d6b783f50c9fa5978324d. --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92d9ed8..383ec8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.13.1 + +- Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) + ## v1.13.0 - `local_ruby_block` executes `code` under `cwd` if it's present diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index e650927..30326df 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.13.0' + VERSION = '1.13.1' end From ea5c10fadb58d002df7062096cdc354ca39882a6 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 8 Aug 2022 00:24:34 -0700 Subject: [PATCH 21/29] Use Zig for cross compilation (#124) --- .github/workflows/build.yml | 104 +++++---------------------- .gitignore | 1 + Rakefile | 23 +++--- build_config.rb | 108 ++++++++++++----------------- build_config.rb.lock | 18 ++--- dockcross/linux-aarch64/Dockerfile | 5 -- dockcross/linux-armhf/Dockerfile | 25 ------- dockcross/linux-i686/Dockerfile | 6 -- dockcross/linux-x86_64/Dockerfile | 7 -- spec/spec_helper.rb | 9 +-- 10 files changed, 84 insertions(+), 222 deletions(-) delete mode 100644 dockcross/linux-aarch64/Dockerfile delete mode 100644 dockcross/linux-armhf/Dockerfile delete mode 100644 dockcross/linux-i686/Dockerfile delete mode 100644 dockcross/linux-x86_64/Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08623f6..93862e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,41 +12,44 @@ on: schedule: - cron: "30 15 * * *" # 7:30 PST (-8), 8:30 PDT (-7) -env: - OSXCROSS_REVISION: 4287300a5c96397a2ee9ab3942e66578a1982031 - XCODE_VERSION: '12.4' - jobs: test: runs-on: ubuntu-latest steps: - - name: Install libraries - run: sudo apt-get install bison git libonig-dev - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' bundler-cache: true + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.9.1 - name: Integration test run: bundle exec rake test:integration - docker-build: + build: runs-on: ubuntu-latest strategy: matrix: - os: [linux] - arch: [x86_64, i686, armhf, aarch64] + include: + - { os: linux, arch: x86_64 } + - { os: linux, arch: i386 } + - { os: linux, arch: armhf } + - { os: linux, arch: aarch64 } + - { os: darwin, arch: x86_64 } + - { os: darwin, arch: aarch64 } fail-fast: false steps: - - name: Install libraries - run: sudo apt-get install bison git libonig-dev - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' bundler-cache: true + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.9.1 - name: Build ${{ matrix.os }}-${{ matrix.arch }} binary run: bundle exec rake release:build:${{ matrix.os }}-${{ matrix.arch }} release:compress @@ -56,86 +59,11 @@ jobs: name: mitamae-${{ matrix.arch }}-${{ matrix.os }} path: mitamae-build/ - macos-sdk: - runs-on: macos-latest - steps: - - uses: actions/cache@v2 - id: macos-sdk-cache - with: - key: macos-sdk-${{ env.OSXCROSS_REVISION }}-${{ env.XCODE_VERSION }} - path: osxcross/tarballs - - name: Package MacOSX SDK - if: steps.macos-sdk-cache.outputs.cache-hit != 'true' - run: | - curl -sSLf https://github.com/tpoechtrager/osxcross/archive/${OSXCROSS_REVISION}.tar.gz | tar zxf - - mv osxcross-${OSXCROSS_REVISION} osxcross - cd osxcross - XCODEDIR=/Applications/Xcode_${XCODE_VERSION}.app tools/gen_sdk_package.sh - mv MacOSX*.sdk.tar.xz tarballs/ - - osxcross: - runs-on: ubuntu-latest - needs: - - macos-sdk - steps: - - name: Download osxcross - run: | - curl -sSLf https://github.com/tpoechtrager/osxcross/archive/${OSXCROSS_REVISION}.tar.gz | tar zxf - - mv osxcross-${OSXCROSS_REVISION} osxcross - - uses: actions/cache@v2 - with: - key: macos-sdk-${{ env.OSXCROSS_REVISION }}-${{ env.XCODE_VERSION }} - path: osxcross/tarballs - - uses: actions/cache@v2 - id: osxcross-cache - with: - key: osxcross-${{ runner.os }}-${{ env.OSXCROSS_REVISION }}-${{ env.XCODE_VERSION }} - path: osxcross/target - - name: Build osxcross - if: steps.osxcross-cache.outputs.cache-hit != 'true' - run: UNATTENDED=1 ./build.sh - working-directory: osxcross - - osxcross-build: - runs-on: ubuntu-latest - strategy: - matrix: - os: [darwin] - arch: [x86_64, aarch64] - fail-fast: false - needs: - - osxcross - steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - bundler-cache: true - - uses: actions/cache@v2 - id: osxcross-cache - with: - key: osxcross-${{ runner.os }}-${{ env.OSXCROSS_REVISION }}-${{ env.XCODE_VERSION }} - path: osxcross/target - - name: Build mitamae - run: | - export PATH="$PWD/osxcross/target/bin:$PATH" - bundle exec rake compile BUILD_TARGET="${{ matrix.os }}-${{ matrix.arch }}" - mkdir -p mitamae-build - cp "mruby/build/${{ matrix.os }}-${{ matrix.arch }}/bin/mitamae" "mitamae-build/mitamae-${{ matrix.arch }}-${{ matrix.os }}" - cd mitamae-build - tar zcvf "mitamae-${{ matrix.arch }}-${{ matrix.os }}.tar.gz" "mitamae-${{ matrix.arch }}-${{ matrix.os }}" - - name: Upload artifacts - uses: actions/upload-artifact@v1 - with: - name: mitamae-${{ matrix.arch }}-${{ matrix.os }} - path: mitamae-build/ - release: runs-on: ubuntu-latest needs: - test - - docker-build - - osxcross-build + - build if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/download-artifact@v1 @@ -144,7 +72,7 @@ jobs: path: mitamae-build/ - uses: actions/download-artifact@v1 with: - name: mitamae-i686-linux + name: mitamae-i386-linux path: mitamae-build/ - uses: actions/download-artifact@v1 with: diff --git a/.gitignore b/.gitignore index 6cfa427..d1991ec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ mitamae-build/ ghr *.zip /mruby +/MacOSX.sdk diff --git a/Rakefile b/Rakefile index f8be028..f0cc28c 100644 --- a/Rakefile +++ b/Rakefile @@ -46,18 +46,18 @@ file :mruby do end end -DOCKCROSS_TARGETS = %w[ +CROSS_TARGETS = %w[ linux-x86_64 - linux-i686 + linux-i386 linux-armhf linux-aarch64 darwin-x86_64 - darwin-i386 + darwin-aarch64 ] STRIP_TARGETS = %w[ linux-x86_64 - linux-i686 + linux-i386 ] # avoid redefining constants in mruby Rakefile @@ -86,18 +86,17 @@ task :clean do end desc 'cross compile for release' -task 'release:build' => DOCKCROSS_TARGETS.map { |target| "release:build:#{target}" } +task 'release:build' => CROSS_TARGETS.map { |target| "release:build:#{target}" } -DOCKCROSS_TARGETS.each do |target| +CROSS_TARGETS.each do |target| desc "Build for #{target}" task "release:build:#{target}" do - sh [ - 'docker', 'run', '--rm', '-e', "BUILD_TARGET=#{target}", - '-v', "#{File.expand_path(__dir__)}:/home/mruby/code", '-w', '/home/mruby/code', - "k0kubun/mitamae-dockcross:#{target}", 'rake', 'compile', - ].shelljoin - Dir.chdir(__dir__) do + # Workaround: Running `rake compile` twice breaks mattn/mruby-onig-regexp + FileUtils.rm_rf('mruby/build') + + sh "rake compile BUILD_TARGET=#{target.shellescape}" + FileUtils.mkdir_p('mitamae-build') os, arch = target.split('-', 2) bin = "mitamae-build/mitamae-#{arch}-#{os}" diff --git a/build_config.rb b/build_config.rb index d5e7ea9..e55da07 100644 --- a/build_config.rb +++ b/build_config.rb @@ -10,17 +10,17 @@ def debug_config(conf) end end -build_targets = ENV.fetch('BUILD_TARGET', '').split(',') -if ENV.key?('CROSS_ROOT') && ENV.key?('CROSS_TRIPLE') # dockcross - # Unset dockcross env to make mrbgem's configure work for host build - dockcross_ar = ENV.delete('AR') - dockcross_cc = ENV.delete('CC') - dockcross_cxx = ENV.delete('CXX') - %w[AS CPP LD FD].each do |env| - ENV.delete(env) - end +def download_macos_sdk(path) + version = '11.3' + system('wget', "https://github.com/phracker/MacOSX-SDKs/releases/download/#{version}/MacOSX#{version}.sdk.tar.xz", exception: true) + system('tar', 'xf', "MacOSX#{version}.sdk.tar.xz", exception: true) + system('rm', "MacOSX#{version}.sdk.tar.xz", exception: true) + system('mv', "MacOSX#{version}.sdk", path, exception: true) end +macos_sdk = File.expand_path('./MacOSX.sdk', __dir__) +build_targets = ENV.fetch('BUILD_TARGET', '').split(',') + # mruby's build system always requires to run host build for mrbc MRuby::Build.new do |conf| toolchain :gcc @@ -38,25 +38,26 @@ def debug_config(conf) toolchain :gcc [conf.cc, conf.linker].each do |cc| - cc.command = 'musl-gcc' - cc.flags += %w[-static -Os] + cc.command = 'zig cc -target x86_64-linux-musl' end + conf.archiver.command = 'zig ar' debug_config(conf) gem_config(conf) end end -if build_targets.include?('linux-i686') - MRuby::CrossBuild.new('linux-i686') do |conf| +if build_targets.include?('linux-i386') + MRuby::CrossBuild.new('linux-i386') do |conf| toolchain :gcc - [conf.cc, conf.cxx, conf.linker].each do |cc| - cc.flags << '-m32' + [conf.cc, conf.linker].each do |cc| + cc.command = 'zig cc -target i386-linux-musl' end + conf.archiver.command = 'zig ar' - # To configure: k0kubun/mruby-onig-regexp - conf.host_target = 'i686-pc-linux-gnu' + # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp + conf.host_target = 'i386-pc-linux-gnu' debug_config(conf) gem_config(conf) @@ -67,15 +68,13 @@ def debug_config(conf) MRuby::CrossBuild.new('linux-armhf') do |conf| toolchain :gcc - # dockcross/linux-armhf - conf.cc.command = dockcross_cc - conf.cxx.command = dockcross_cxx - conf.linker.command = dockcross_cxx - conf.archiver.command = dockcross_ar + [conf.cc, conf.linker].each do |cc| + cc.command = 'zig cc -target arm-linux-musleabihf' + end + conf.archiver.command = 'zig ar' # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp - conf.build_target = 'x86_64-pc-linux-gnu' - conf.host_target = 'arm-linux-gnueabihf' + conf.host_target = 'arm-linux-musleabihf' debug_config(conf) gem_config(conf) @@ -86,15 +85,13 @@ def debug_config(conf) MRuby::CrossBuild.new('linux-aarch64') do |conf| toolchain :gcc - # dockcross/linux-aarch64 - conf.cc.command = dockcross_cc - conf.cxx.command = dockcross_cxx - conf.linker.command = dockcross_cxx - conf.archiver.command = dockcross_ar + [conf.cc, conf.linker].each do |cc| + cc.command = 'zig cc -target aarch64-linux-musl' + end + conf.archiver.command = 'zig ar' # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp - conf.build_target = 'x86_64-pc-linux-gnu' - conf.host_target = 'aarch64-linux-gnu' + conf.host_target = 'aarch64-linux-musl' debug_config(conf) gem_config(conf) @@ -103,36 +100,19 @@ def debug_config(conf) if build_targets.include?('darwin-x86_64') MRuby::CrossBuild.new('darwin-x86_64') do |conf| - toolchain :clang + toolchain :gcc - [conf.cc, conf.linker].each do |cc| - cc.command = 'x86_64-apple-darwin20.2-clang' + unless Dir.exist?(macos_sdk) + download_macos_sdk(macos_sdk) end - conf.cxx.command = 'x86_64-apple-darwin20.2-clang++' - conf.archiver.command = 'x86_64-apple-darwin20.2-ar' - # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp - conf.build_target = 'x86_64-pc-linux-gnu' - conf.host_target = 'x86_64-apple-darwin20.2' - - debug_config(conf) - gem_config(conf) - end -end - -if build_targets.include?('darwin-i386') - MRuby::CrossBuild.new('darwin-i386') do |conf| - toolchain :clang - - [conf.cc, conf.linker].each do |cc| - cc.command = 'i386-apple-darwin20.2-clang' - end - conf.cxx.command = 'i386-apple-darwin20.2-clang++' - conf.archiver.command = 'i386-apple-darwin20.2-ar' + conf.cc.command = "zig cc -target x86_64-macos -mmacosx-version-min=10.14 -isysroot #{macos_sdk.shellescape} -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks" + conf.linker.command = "zig cc -target x86_64-macos -mmacosx-version-min=10.4 --sysroot #{macos_sdk.shellescape} -F/System/Library/Frameworks -L/usr/lib" + conf.archiver.command = 'zig ar' + ENV['RANLIB'] ||= 'zig ranlib' # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp - conf.build_target = 'i386-pc-linux-gnu' - conf.host_target = 'i386-apple-darwin20.2' + conf.host_target = 'x86_64-darwin' debug_config(conf) gem_config(conf) @@ -141,17 +121,19 @@ def debug_config(conf) if build_targets.include?('darwin-aarch64') MRuby::CrossBuild.new('darwin-aarch64') do |conf| - toolchain :clang + toolchain :gcc - [conf.cc, conf.linker].each do |cc| - cc.command = 'aarch64-apple-darwin20.2-clang' + unless Dir.exist?(macos_sdk) + download_macos_sdk(macos_sdk) end - conf.cxx.command = 'aarch64-apple-darwin20.2-clang++' - conf.archiver.command = 'aarch64-apple-darwin20.2-ar' + + conf.cc.command = "zig cc -target aarch64-macos -mmacosx-version-min=11.1 -isysroot #{macos_sdk.shellescape} -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks" + conf.linker.command = "zig cc -target aarch64-macos -mmacosx-version-min=11.1 --sysroot #{macos_sdk.shellescape} -F/System/Library/Frameworks -L/usr/lib" + conf.archiver.command = 'zig ar' + ENV['RANLIB'] ||= 'zig ranlib' # To configure: mrbgems/mruby-yaml, k0kubun/mruby-onig-regexp - conf.build_target = 'aarch64-pc-linux-gnu' - conf.host_target = 'aarch64-apple-darwin20.2' + conf.host_target = 'aarch64-darwin' debug_config(conf) gem_config(conf) diff --git a/build_config.rb.lock b/build_config.rb.lock index 6cc5224..a5e603d 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -1,7 +1,7 @@ --- -mruby_version: - version: 2.1.2 - release_no: 20102 +mruby: + version: 3.0.0 + release_no: 30000 builds: host: https://github.com/ksss/mruby-at_exit.git: @@ -27,22 +27,22 @@ builds: https://github.com/ksss/mruby-file-stat.git: url: https://github.com/ksss/mruby-file-stat.git branch: master - commit: b81bc71a6f2ddd424fd5e544d2cccd289d4d7545 + commit: f3e858f01361b9b4a8e77ada52470068630c9530 version: 0.0.0 https://github.com/k0kubun/mruby-hashie.git: url: https://github.com/k0kubun/mruby-hashie.git branch: master - commit: c69255a94debcd641f2087b569f5625509bde698 + commit: 381741184e3382ebfa9aa40e6f02645494874df3 version: 0.0.0 https://github.com/mattn/mruby-json.git: url: https://github.com/mattn/mruby-json.git branch: master - commit: '054699892b0d681110e7348440cddb70a3fd671e' + commit: f99d9428025469f2400f93c53b185f65f963e507 version: 0.0.0 https://github.com/k0kubun/mruby-open3.git: url: https://github.com/k0kubun/mruby-open3.git branch: master - commit: d6ab1bcd13446661c2e134ad8343caba9d15e59a + commit: c2c269b07d0bc819be3e8bddd621429e59134de0 version: 0.0.0 https://github.com/fastly/mruby-optparse.git: url: https://github.com/fastly/mruby-optparse.git @@ -67,7 +67,7 @@ builds: https://github.com/mrbgems/mruby-yaml.git: url: https://github.com/mrbgems/mruby-yaml.git branch: master - commit: a7345b3124bac6084e58c236882f3e27918f5126 + commit: 123010195bf621e784ee9d4ff9144a4b8e9cbb6a version: 0.1.0 https://github.com/k0kubun/mruby-erb.git: url: https://github.com/k0kubun/mruby-erb.git @@ -107,7 +107,7 @@ builds: https://github.com/mattn/mruby-onig-regexp.git: url: https://github.com/mattn/mruby-onig-regexp.git branch: master - commit: 76087d150d12f167e95ae10d326099b352cf3d18 + commit: 20ba3325d6fa504cbbf193e1b2a90e20fdab544f version: 0.0.0 https://github.com/ksss/mruby-singleton.git: url: https://github.com/ksss/mruby-singleton.git diff --git a/dockcross/linux-aarch64/Dockerfile b/dockcross/linux-aarch64/Dockerfile deleted file mode 100644 index 68c6c7e..0000000 --- a/dockcross/linux-aarch64/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -# k0kubun/mitamae-dockcross:linux-aarch64 -FROM dockcross/linux-arm64:20200119-1c10fb2 - -# Install ruby and rake -RUN apt-get update && apt-get install -y --no-install-recommends ruby diff --git a/dockcross/linux-armhf/Dockerfile b/dockcross/linux-armhf/Dockerfile deleted file mode 100644 index f9664f9..0000000 --- a/dockcross/linux-armhf/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# k0kubun/mitamae-dockcross:linux-arm64 -# mitamae's original platform for backward compatibility -# TODO: replace this with dockcross/linux-armv* -FROM dockcross/linux-x64:20200119-1c10fb2 - -# Install ruby and rake -RUN apt-get update && apt-get install -y --no-install-recommends ruby - -# Not using since it's too slow -# RUN git clone https://github.com/raspberrypi/tools /opt/raspberrypi-tools && \ -# git -C /opt/raspberrypi-tools reset --hard 5caa7046982f0539cf5380f94da04b31129ed521 - -RUN git clone --depth=1 https://github.com/raspberrypi/tools /opt/raspberrypi-tools && \ - rm -rf /opt/raspberrypi-tools/.git && \ - rm -rf /opt/raspberrypi-tools/arm-bcm2708/arm-bcm2708-linux-gnueabi && \ - rm -rf /opt/raspberrypi-tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi && \ - rm -rf /opt/raspberrypi-tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf && \ - rm -rf /opt/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian -ENV PATH /opt/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/:$PATH - -ENV CROSS_TRIPLE=arm-linux-gnueabihf -ENV CROSS_ROOT=/opt/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64 -ENV AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \ - CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \ - CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ diff --git a/dockcross/linux-i686/Dockerfile b/dockcross/linux-i686/Dockerfile deleted file mode 100644 index 17645a1..0000000 --- a/dockcross/linux-i686/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# k0kubun/mitamae-dockcross:linux-i686 -# Using x86_64 + -m32 because linux-x86 image added some more dynamic lib dependencies -FROM dockcross/linux-x64:20200119-1c10fb2 - -# Install multilib, ruby and rake -RUN apt-get update && apt-get install -y --no-install-recommends gcc-multilib g++-multilib ruby diff --git a/dockcross/linux-x86_64/Dockerfile b/dockcross/linux-x86_64/Dockerfile deleted file mode 100644 index 0226a1c..0000000 --- a/dockcross/linux-x86_64/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -# k0kubun/mitamae-dockcross:linux-x86_64 -# Not just using linux-x86 as is because I wanted to statically link (musl-)libc for CentOS 6.9 -FROM dockcross/linux-x64:20200119-1c10fb2 - -# Install musl-libc, ruby and rake -RUN apt-get update && apt-get install -y --no-install-recommends \ - musl musl-dev musl-tools ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b27c5e5..90af89a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -31,17 +31,12 @@ def run_command(*cmd, cwd: '/', redirect: {}) config.before(:suite) do if ENV['SKIP_MITAMAE_COMPILE'] != '1' - system( - 'docker', 'run', '--rm', '-e', "BUILD_TARGET=#{MItamaeSpec::TARGET}", - '-v', "#{File.expand_path('..', __dir__)}:/home/mruby/code", '-w', '/home/mruby/code', - "k0kubun/mitamae-dockcross:#{MItamaeSpec::TARGET}", 'rake', 'compile', - 'compile' - ) || raise + system('rake', 'compile', "BUILD_TARGET=#{MItamaeSpec::TARGET}", exception: true) end - system('docker', 'rm', '-f', MItamaeSpec.container) # k0kubun/mitamae-spec is automatically built from `spec/Dockerfile`: # https://hub.docker.com/r/k0kubun/mitamae-spec/builds/ + system('docker', 'rm', '-f', MItamaeSpec.container) system( 'docker', 'run', '-d', '--privileged', '--rm', '--name', MItamaeSpec.container, '-v', "#{File.expand_path("mruby/build/#{MItamaeSpec::TARGET}")}:/mitamae", From 23de3aba4c17dbec717ff6aef7fade7cc5d6aba9 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 8 Aug 2022 00:36:34 -0700 Subject: [PATCH 22/29] Version 1.14.0 --- CHANGELOG.md | 8 ++++++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 383ec8e..4ba1821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.14.0 + +- Migrate the cross-compilation toolchain to Zig + - All Linux targets use musl, so no libc dependency. + - Now linux-i386 is distributed instead of linux-i686 +- Upgrade mruby-yaml + - `123_456` is parsed as `123456` instead of `"123_456"` + ## v1.13.1 - Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 30326df..5da85e6 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.13.1' + VERSION = '1.14.0' end From 6772ddc10f62b393711a83204e823c4f59a428ab Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 8 Aug 2022 00:48:40 -0700 Subject: [PATCH 23/29] Revert "Version 1.14.0" This reverts commit 23de3aba4c17dbec717ff6aef7fade7cc5d6aba9. --- CHANGELOG.md | 8 -------- mrblib/mitamae/version.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ba1821..383ec8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,3 @@ -## v0.14.0 - -- Migrate the cross-compilation toolchain to Zig - - All Linux targets use musl, so no libc dependency. - - Now linux-i386 is distributed instead of linux-i686 -- Upgrade mruby-yaml - - `123_456` is parsed as `123456` instead of `"123_456"` - ## v1.13.1 - Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 5da85e6..30326df 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.14.0' + VERSION = '1.13.1' end From 2bf311e2dde4527351932f0c132076e432cf6aaa Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 8 Aug 2022 00:48:45 -0700 Subject: [PATCH 24/29] Version 1.14.0 Revert "Revert "Version 1.14.0"" This reverts commit 6772ddc10f62b393711a83204e823c4f59a428ab. Fixing the version number typo in the CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 383ec8e..c2a80c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v1.14.0 + +- Migrate the cross-compilation toolchain to Zig + - All Linux targets use musl, so no libc dependency. + - Now linux-i386 is distributed instead of linux-i686 +- Upgrade mruby-yaml + - `123_456` is parsed as `123456` instead of `"123_456"` + ## v1.13.1 - Upgrade specinfra [from v2.82.25 to v2.83.3](https://github.com/mizzy/specinfra/compare/v2.82.25...v2.83.3) diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 30326df..5da85e6 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.13.1' + VERSION = '1.14.0' end From 3a053980d5b7c9306f41ef1a8988c3c2acb59420 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 25 Oct 2022 15:48:50 -0700 Subject: [PATCH 25/29] Put example usages --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8db8d4d..fdef141 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ mitamae is a tool to automate configuration management using a Chef-like DSL powered by mruby. +It's been used for provisioning servers, e.g. [RubyCI servers](https://github.com/ruby/ruby-infra-recipe) +and [Ruby's git server](https://github.com/ruby/git.ruby-lang.org), and setting up local environments +with [dotfiles](https://github.com/search?q=dotfiles+mitamae&type=code). + ### Key Features * **Fast** - @@ -146,6 +150,14 @@ and recipes to the servers and run them remotely. There are at least the followi and recipes from an object storage and run them. Deployment tools like [AWS CodeDeploy](https://aws.amazon.com/codedeploy/) are useful to achieve them. +### Example recipes + +The following recipes are open-source usages of mitamae. + +* [ruby/ruby-infra-recipe](https://github.com/ruby/ruby-infra-recipe) +* [ruby/git.ruby-lang.org](https://github.com/ruby/git.ruby-lang.org) +* [k0kubun/dotfiles](https://github.com/k0kubun/dotfiles) + ### Migrating from Chef While the DSL is inspired by Chef, there are some differences you need to keep in mind From dbb2ff43f62ec4f4461b8d02ffd462656ab80740 Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Tue, 31 Oct 2023 01:18:47 +0900 Subject: [PATCH 26/29] bump the actions of GitHub Actions (#127) --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93862e1..400e0d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,13 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' bundler-cache: true - - uses: goto-bus-stop/setup-zig@v1 + - uses: goto-bus-stop/setup-zig@v2 with: version: 0.9.1 - name: Integration test @@ -41,20 +41,20 @@ jobs: - { os: darwin, arch: aarch64 } fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' bundler-cache: true - - uses: goto-bus-stop/setup-zig@v1 + - uses: goto-bus-stop/setup-zig@v2 with: version: 0.9.1 - name: Build ${{ matrix.os }}-${{ matrix.arch }} binary run: bundle exec rake release:build:${{ matrix.os }}-${{ matrix.arch }} release:compress - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: mitamae-${{ matrix.arch }}-${{ matrix.os }} path: mitamae-build/ @@ -66,27 +66,27 @@ jobs: - build if: startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-x86_64-linux path: mitamae-build/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-i386-linux path: mitamae-build/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-armhf-linux path: mitamae-build/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-aarch64-linux path: mitamae-build/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-x86_64-darwin path: mitamae-build/ - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v3 with: name: mitamae-aarch64-darwin path: mitamae-build/ From b0f19c5fb56789d5df6e7f1bfa3004e91814149b Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Tue, 31 Oct 2023 01:19:18 +0900 Subject: [PATCH 27/29] fix broken integrated tests (#128) httpbingo.org now checks redirect URLs. ``` % curl 'http://httpbingo.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Fget%3Ffrom%3Ditamae' Forbidden redirect URL. Please be careful with this link. Allowed redirect destinations: - example.com - example.net - example.org - httpbingo.org ``` This pull request changes to use allowed URLs --- spec/integration/http_request_spec.rb | 2 +- spec/recipes/http_request.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/http_request_spec.rb b/spec/integration/http_request_spec.rb index a932888..b1f24bd 100644 --- a/spec/integration/http_request_spec.rb +++ b/spec/integration/http_request_spec.rb @@ -53,7 +53,7 @@ describe file('/tmp/http_request_redirect.html') do it { should be_file } - its(:content) { should match(/"from": ?"itamae"/) } + its(:content) { should match(/"from":\s*\[\s*"itamae"\s*\]/) } end describe file('/tmp/https_request.json') do diff --git a/spec/recipes/http_request.rb b/spec/recipes/http_request.rb index fe4080f..f717d87 100644 --- a/spec/recipes/http_request.rb +++ b/spec/recipes/http_request.rb @@ -29,7 +29,7 @@ http_request "/tmp/http_request_redirect.html" do redirect_limit 1 - url "http://httpbingo.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Fget%3Ffrom%3Ditamae" + url "http://httpbingo.org/redirect-to?url=https%3A%2F%2Fhttpbingo.org%2Fget%3Ffrom%3Ditamae" end http_request "/tmp/https_request.json" do From ad32aa5e1c7c9c11eb1a8abc6120ef240d7fb7de Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Tue, 31 Oct 2023 01:19:34 +0900 Subject: [PATCH 28/29] bump specinfra v2.87.0 from v2.83.3 (#126) - Support Amazon Linux 2022 https://github.com/mizzy/specinfra/pull/738 - Replace obsolete File.exists? with File.exist? https://github.com/mizzy/specinfra/pull/739 - Add Guix support https://github.com/mizzy/specinfra/pull/740 - add KDE Neon support https://github.com/mizzy/specinfra/pull/742 - Add VyOS Support https://github.com/mizzy/specinfra/pull/743 - Add support for Amazon Linux 2023 https://github.com/mizzy/specinfra/pull/744 https://github.com/mizzy/specinfra/compare/v2.83.4...v2.87.0 https://github.com/itamae-kitchen/mruby-specinfra/compare/2a66b88cf87143b7d0ee8ab28ca3cbd69ad367cf...aa98e3e9aa89f9a305cf0f875bfe76a6fff905e6 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index a5e603d..db17cf7 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -57,7 +57,7 @@ builds: https://github.com/k0kubun/mruby-specinfra.git: url: https://github.com/k0kubun/mruby-specinfra.git branch: master - commit: 2a66b88cf87143b7d0ee8ab28ca3cbd69ad367cf + commit: aa98e3e9aa89f9a305cf0f875bfe76a6fff905e6 version: 0.0.0 https://github.com/k0kubun/mruby-tempfile.git: url: https://github.com/k0kubun/mruby-tempfile.git From 889bafd8a9032d0e063d0646977fddac7b4609c8 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 30 Oct 2023 09:21:01 -0700 Subject: [PATCH 29/29] Version 1.14.1 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2a80c6..60d5d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.14.1 + +- Upgrade specinfra [from v2.83.3 to v2.87.0](https://github.com/mizzy/specinfra/compare/v2.83.3...v2.87.0) + ## v1.14.0 - Migrate the cross-compilation toolchain to Zig diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 5da85e6..bc2d53e 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.14.0' + VERSION = '1.14.1' end