diff --git a/sources b/sources index b967078..e27ee7e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.3.4.tar.gz) = 0d47e57c3c190743b4d0484ba1e48e3aad73ced3b356f0a4e54b66649eab2bd5d3fc57a06c62b4cc7d6c8e4617ef18a283c03d01553cc575c0884e464a27b501 -SHA512 (vagrant-spec-a88825f4cb254b703d0f9235667223f02ad5c600.tar.gz) = 50e4e2c9e69ccb0309876d204d8d66f606188e1d11853071a74819fe75126ed65fa3d02a31bdf2f8e29679a81d12fa2daed806eba034532c8150fe53d749fb84 +SHA512 (v2.2.16.tar.gz) = cb1edf0d614e9dda252b0a99571febc05f3dc497825852167d0e80e2a59821fb52ddb91b8085646c7bdeaf6ece642c0889d1a6cb4fdcc37b9f789f86fd8c0ee9 +SHA512 (vagrant-spec-9057cd6e0ac299688da608d459deac66bfad8880.tar.gz) = 7846e910cd4b9a036d1edb22d4ead7f9180ebed60a58c10c26044879b9b5d0adab9cfe645625d9d7f2f399707c5044a36eb06fb0f9dc4e32df66910398dab65c diff --git a/vagrant-2.2.10-Updates-to-address-all-Ruby-deprecations-and-warnings.patch b/vagrant-2.2.10-Updates-to-address-all-Ruby-deprecations-and-warnings.patch new file mode 100644 index 0000000..c65382f --- /dev/null +++ b/vagrant-2.2.10-Updates-to-address-all-Ruby-deprecations-and-warnings.patch @@ -0,0 +1,1384 @@ +From 5003bb6e150dd7f812969acfd45aac3b92ce5cae Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Mon, 10 Aug 2020 11:11:30 -0700 +Subject: [PATCH 1/3] Updates to address all Ruby deprecations and warnings + +This includes updates for resolving all warnings provided by Ruby +for deprecations and/or removed methods. It also enables support +for Ruby 2.7 in the specification constraint as all 2.7 related +warnings are resolved with this changeset. +--- + lib/vagrant/action/builder.rb | 62 ++++++++--- + lib/vagrant/action/builtin/box_add.rb | 11 +- + .../action/builtin/mixin_synced_folders.rb | 2 +- + lib/vagrant/action/hook.rb | 83 +++++++++----- + lib/vagrant/action/warden.rb | 30 +++++- + lib/vagrant/box.rb | 9 +- + lib/vagrant/bundler.rb | 7 +- + lib/vagrant/errors.rb | 2 +- + lib/vagrant/machine_index.rb | 2 +- + lib/vagrant/ui.rb | 2 +- + lib/vagrant/util/downloader.rb | 5 +- + plugins/communicators/winssh/communicator.rb | 2 +- + plugins/kernel_v2/config/vm.rb | 2 +- + .../plugins/commands/box/command/add_test.rb | 4 +- + .../commands/box/command/outdated_test.rb | 2 +- + .../communicators/ssh/communicator_test.rb | 2 +- + .../windows/cap/change_host_name_test.rb | 4 +- + .../providers/docker/driver_compose_test.rb | 4 +- + .../virtualbox/action/network_test.rb | 14 +-- + .../chef/config/chef_apply_test.rb | 2 +- + test/unit/vagrant/action/builder_test.rb | 26 ++--- + .../vagrant/action/builtin/box_add_test.rb | 46 ++++---- + test/unit/vagrant/action/hook_test.rb | 102 ++++++++++++------ + test/unit/vagrant/plugin/manager_test.rb | 4 +- + test/unit/vagrant/ui_test.rb | 14 +-- + vagrant.gemspec | 2 +- + 26 files changed, 286 insertions(+), 159 deletions(-) + +diff --git a/lib/vagrant/action/builder.rb b/lib/vagrant/action/builder.rb +index 074d512b12..7e25d185b8 100644 +--- a/lib/vagrant/action/builder.rb ++++ b/lib/vagrant/action/builder.rb +@@ -17,6 +17,11 @@ module Action + # Vagrant::Action.run(app) + # + class Builder ++ # Container for Action arguments ++ MiddlewareArguments = Struct.new(:parameters, :block, :keywords, keyword_init: true) ++ # Item within the stack ++ StackItem = Struct.new(:middleware, :arguments, keyword_init: true) ++ + # This is the stack of middlewares added. This should NOT be used + # directly. + # +@@ -28,8 +33,8 @@ class Builder + # see {#use} instead. + # + # @return [Builder] +- def self.build(middleware, *args, &block) +- new.use(middleware, *args, &block) ++ def self.build(middleware, *args, **keywords, &block) ++ new.use(middleware, *args, **keywords, &block) + end + + def initialize +@@ -58,12 +63,21 @@ def flatten + # of the middleware. + # + # @param [Class] middleware The middleware class +- def use(middleware, *args, &block) ++ def use(middleware, *args, **keywords, &block) ++ item = StackItem.new( ++ middleware: middleware, ++ arguments: MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ + if middleware.kind_of?(Builder) + # Merge in the other builder's stack into our own + self.stack.concat(middleware.stack) + else +- self.stack << [middleware, args, block] ++ self.stack << item + end + + self +@@ -71,8 +85,22 @@ def use(middleware, *args, &block) + + # Inserts a middleware at the given index or directly before the + # given middleware object. +- def insert(index, middleware, *args, &block) +- index = self.index(index) unless index.is_a?(Integer) ++ def insert(idx_or_item, middleware, *args, **keywords, &block) ++ item = StackItem.new( ++ middleware: middleware, ++ arguments: MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ ++ if idx_or_item.is_a?(Integer) ++ index = idx_or_item ++ else ++ index = self.index(idx_or_item) ++ end ++ + raise "no such middleware to insert before: #{index.inspect}" unless index + + if middleware.kind_of?(Builder) +@@ -80,27 +108,32 @@ def insert(index, middleware, *args, &block) + stack.insert(index, stack_item) + end + else +- stack.insert(index, [middleware, args, block]) ++ stack.insert(index, item) + end + end + + alias_method :insert_before, :insert + + # Inserts a middleware after the given index or middleware object. +- def insert_after(index, middleware, *args, &block) +- index = self.index(index) unless index.is_a?(Integer) ++ def insert_after(idx_or_item, middleware, *args, **keywords, &block) ++ if idx_or_item.is_a?(Integer) ++ index = idx_or_item ++ else ++ index = self.index(idx_or_item) ++ end ++ + raise "no such middleware to insert after: #{index.inspect}" unless index + insert(index + 1, middleware, *args, &block) + end + + # Replaces the given middlware object or index with the new + # middleware. +- def replace(index, middleware, *args, &block) ++ def replace(index, middleware, *args, **keywords, &block) + if index.is_a?(Integer) + delete(index) +- insert(index, middleware, *args, &block) ++ insert(index, middleware, *args, **keywords, &block) + else +- insert_before(index, middleware, *args, &block) ++ insert_before(index, middleware, *args, **keywords, &block) + delete(index) + end + end +@@ -123,8 +156,9 @@ def call(env) + def index(object) + stack.each_with_index do |item, i| + return i if item == object +- return i if item[0] == object +- return i if item[0].respond_to?(:name) && item[0].name == object ++ return i if item.middleware == object ++ return i if item.middleware.respond_to?(:name) && ++ item.middleware.name == object + end + + nil +diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb +index dac1fefa52..a635d77cec 100644 +--- a/lib/vagrant/action/builtin/box_add.rb ++++ b/lib/vagrant/action/builtin/box_add.rb +@@ -25,6 +25,7 @@ class BoxAdd + def initialize(app, env) + @app = app + @logger = Log4r::Logger.new("vagrant::action::builtin::box_add") ++ @parser = URI::RFC2396_Parser.new + end + + def call(env) +@@ -44,7 +45,7 @@ def call(env) + u = u.gsub("\\", "/") + if Util::Platform.windows? && u =~ /^[a-z]:/i + # On Windows, we need to be careful about drive letters +- u = "file:///#{URI.escape(u)}" ++ u = "file:///#{@parser.escape(u)}" + end + + if u =~ /^[a-z0-9]+:.*$/i && !u.start_with?("file://") +@@ -53,9 +54,9 @@ def call(env) + end + + # Expand the path and try to use that, if possible +- p = File.expand_path(URI.unescape(u.gsub(/^file:\/\//, ""))) ++ p = File.expand_path(@parser.unescape(u.gsub(/^file:\/\//, ""))) + p = Util::Platform.cygwin_windows_path(p) +- next "file://#{URI.escape(p.gsub("\\", "/"))}" if File.file?(p) ++ next "file://#{@parser.escape(p.gsub("\\", "/"))}" if File.file?(p) + + u + end +@@ -434,7 +435,7 @@ def downloader(url, env, **opts) + downloader_options[:ui] = env[:ui] if opts[:ui] + downloader_options[:location_trusted] = env[:box_download_location_trusted] + downloader_options[:box_extra_download_options] = env[:box_extra_download_options] +- ++ + Util::Downloader.new(url, temp_path, downloader_options) + end + +@@ -495,7 +496,7 @@ def metadata_url?(url, env) + url ||= uri.opaque + #7570 Strip leading slash left in front of drive letter by uri.path + Util::Platform.windows? && url.gsub!(/^\/([a-zA-Z]:)/, '\1') +- url = URI.unescape(url) ++ url = @parser.unescape(url) + + begin + File.open(url, "r") do |f| +diff --git a/lib/vagrant/action/builtin/mixin_synced_folders.rb b/lib/vagrant/action/builtin/mixin_synced_folders.rb +index c2d8aabb5a..1209f5d690 100644 +--- a/lib/vagrant/action/builtin/mixin_synced_folders.rb ++++ b/lib/vagrant/action/builtin/mixin_synced_folders.rb +@@ -72,7 +72,7 @@ def plugins + # + # @param [Machine] machine The machine that the folders belong to + # @param [Hash] folders The result from a {#synced_folders} call. +- def save_synced_folders(machine, folders, **opts) ++ def save_synced_folders(machine, folders, opts={}) + if opts[:merge] + existing = cached_synced_folders(machine) + if existing +diff --git a/lib/vagrant/action/hook.rb b/lib/vagrant/action/hook.rb +index 3ab3080859..7270e6a33f 100644 +--- a/lib/vagrant/action/hook.rb ++++ b/lib/vagrant/action/hook.rb +@@ -7,23 +7,23 @@ class Hook + # This is a hash of the middleware to prepend to a certain + # other middleware. + # +- # @return [Hash>] ++ # @return [Hash>] + attr_reader :before_hooks + + # This is a hash of the middleware to append to a certain other + # middleware. + # +- # @return [Hash>] ++ # @return [Hash>] + attr_reader :after_hooks + + # This is a list of the hooks to just prepend to the beginning + # +- # @return [Array] ++ # @return [Array] + attr_reader :prepend_hooks + + # This is a list of the hooks to just append to the end + # +- # @return [Array] ++ # @return [Array] + attr_reader :append_hooks + + def initialize +@@ -37,16 +37,32 @@ def initialize + # + # @param [Class] existing The existing middleware. + # @param [Class] new The new middleware. +- def before(existing, new, *args, &block) +- @before_hooks[existing] << [new, args, block] ++ def before(existing, new, *args, **keywords, &block) ++ item = Builder::StackItem.new( ++ middleware: new, ++ arguments: Builder::MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ @before_hooks[existing] << item + end + + # Add a middleware after an existing middleware. + # + # @param [Class] existing The existing middleware. + # @param [Class] new The new middleware. +- def after(existing, new, *args, &block) +- @after_hooks[existing] << [new, args, block] ++ def after(existing, new, *args, **keywords, &block) ++ item = Builder::StackItem.new( ++ middleware: new, ++ arguments: Builder::MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ @after_hooks[existing] << item + end + + # Append a middleware to the end of the stack. Note that if the +@@ -54,15 +70,31 @@ def after(existing, new, *args, &block) + # be run. + # + # @param [Class] new The middleware to append. +- def append(new, *args, &block) +- @append_hooks << [new, args, block] ++ def append(new, *args, **keywords, &block) ++ item = Builder::StackItem.new( ++ middleware: new, ++ arguments: Builder::MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ @append_hooks << item + end + + # Prepend a middleware to the beginning of the stack. + # + # @param [Class] new The new middleware to prepend. +- def prepend(new, *args, &block) +- @prepend_hooks << [new, args, block] ++ def prepend(new, *args, **keywords, &block) ++ item = Builder::StackItem.new( ++ middleware: new, ++ arguments: Builder::MiddlewareArguments.new( ++ parameters: args, ++ keywords: keywords, ++ block: block ++ ) ++ ) ++ @prepend_hooks << item + end + + # @return [Boolean] +@@ -77,27 +109,28 @@ def empty? + # called directly. + # + # @param [Builder] builder +- def apply(builder, options=nil) +- options ||= {} +- ++ def apply(builder, options={}) + if !options[:no_prepend_or_append] + # Prepends first +- @prepend_hooks.each do |klass, args, block| ++ @prepend_hooks.each do |item| + if options[:root] + idx = builder.index(options[:root]) + else + idx = 0 + end +- builder.insert(idx, klass, *args, &block) ++ builder.insert(idx, item.middleware, *item.arguments.parameters, ++ **item.arguments.keywords, &item.arguments.block) + end + + # Appends +- @append_hooks.each do |klass, args, block| ++ @append_hooks.each do |item| + if options[:root] + idx = builder.index(options[:root]) +- builder.insert(idx + 1, klass, *args, &block) ++ builder.insert(idx + 1, item.middleware, *item.arguments.parameters, ++ **item.arguments.keywords, &item.arguments.block) + else +- builder.use(klass, *args, &block) ++ builder.use(item.middleware, *item.arguments.parameters, ++ **item.arguments.keywords, &item.arguments.block) + end + end + end +@@ -106,8 +139,9 @@ def apply(builder, options=nil) + @before_hooks.each do |key, list| + next if !builder.index(key) + +- list.each do |klass, args, block| +- builder.insert_before(key, klass, *args, &block) ++ list.each do |item| ++ builder.insert_before(key, item.middleware, *item.arguments.parameters, ++ **item.arguments.keywords, &item.arguments.block) + end + end + +@@ -115,8 +149,9 @@ def apply(builder, options=nil) + @after_hooks.each do |key, list| + next if !builder.index(key) + +- list.each do |klass, args, block| +- builder.insert_after(key, klass, *args, &block) ++ list.each do |item| ++ builder.insert_after(key, item.middleware, *item.arguments.parameters, ++ **item.arguments.keywords, &item.arguments.block) + end + end + end +diff --git a/lib/vagrant/action/warden.rb b/lib/vagrant/action/warden.rb +index 828e317fcc..931ce87fc8 100644 +--- a/lib/vagrant/action/warden.rb ++++ b/lib/vagrant/action/warden.rb +@@ -92,14 +92,34 @@ def recover(env) + # A somewhat confusing function which simply initializes each + # middleware properly to call the next middleware in the sequence. + def finalize_action(action, env) +- klass, args, block = action ++ if action.is_a?(Builder::StackItem) ++ klass = action.middleware ++ args = action.arguments.parameters ++ keywords = action.arguments.keywords ++ block = action.arguments.block ++ else ++ klass = action ++ args = [] ++ keywords = {} ++ end + +- # Default the arguments to an empty array. Otherwise in Ruby 1.8 +- # a `nil` args will actually pass `nil` into the class. +- args ||= [] ++ args = nil if args.empty? ++ keywords = nil if keywords.empty? + + if klass.is_a?(Class) +- klass.new(self, env, *args, &block) ++ # NOTE: We need to detect if we are passing args and/or ++ # keywords and do it explicitly. Earlier versions ++ # are not as lax about splatting keywords when the ++ # target method is not expecting them. ++ if args && keywords ++ klass.new(self, env, *args, **keywords, &block) ++ elsif args ++ klass.new(self, env, *args, &block) ++ elsif keywords ++ klass.new(self, env, **keywords, &block) ++ else ++ klass.new(self, env, &block) ++ end + elsif klass.respond_to?(:call) + # Make it a lambda which calls the item then forwards + # up the chain +diff --git a/lib/vagrant/box.rb b/lib/vagrant/box.rb +index 2f12775f5e..0ee5d29f39 100644 +--- a/lib/vagrant/box.rb ++++ b/lib/vagrant/box.rb +@@ -57,12 +57,13 @@ class Box + # @param [Symbol] provider The provider that this box implements. + # @param [Pathname] directory The directory where this box exists on + # disk. +- def initialize(name, provider, version, directory, **opts) ++ # @param [String] metadata_url Metadata URL for box ++ def initialize(name, provider, version, directory, metadata_url: nil) + @name = name + @version = version + @provider = provider + @directory = directory +- @metadata_url = opts[:metadata_url] ++ @metadata_url = metadata_url + + metadata_file = directory.join("metadata.json") + raise Errors::BoxMetadataFileNotFound, name: @name if !metadata_file.file? +@@ -120,7 +121,7 @@ def in_use?(index) + # + # @param [Hash] download_options Options to pass to the downloader. + # @return [BoxMetadata] +- def load_metadata(**download_options) ++ def load_metadata(download_options={}) + tf = Tempfile.new("vagrant-load-metadata") + tf.close + +@@ -132,7 +133,7 @@ def load_metadata(**download_options) + end + + opts = { headers: ["Accept: application/json"] }.merge(download_options) +- Util::Downloader.new(url, tf.path, **opts).download! ++ Util::Downloader.new(url, tf.path, opts).download! + BoxMetadata.new(File.open(tf.path, "r")) + rescue Errors::DownloaderError => e + raise Errors::BoxMetadataDownloadError, +diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb +index f4d2a02396..336ac1e057 100644 +--- a/lib/vagrant/bundler.rb ++++ b/lib/vagrant/bundler.rb +@@ -632,7 +632,12 @@ def vagrant_internal_specs + self_spec.runtime_dependencies.each { |d| gem d.name, *d.requirement.as_list } + # discover all the gems we have available + list = {} +- directories = [Gem::Specification.default_specifications_dir] ++ if Gem.respond_to?(:default_specifications_dir) ++ spec_dir = Gem.default_specifications_dir ++ else ++ spec_dir = Gem::Specification.default_specifications_dir ++ end ++ directories = [spec_dir] + Gem::Specification.find_all{true}.each do |spec| + list[spec.full_name] = spec + end +diff --git a/lib/vagrant/errors.rb b/lib/vagrant/errors.rb +index e41c0f72eb..782615bc45 100644 +--- a/lib/vagrant/errors.rb ++++ b/lib/vagrant/errors.rb +@@ -100,7 +100,7 @@ def status_code; 1; end + + def translate_error(opts) + return nil if !opts[:_key] +- I18n.t("#{opts[:_namespace]}.#{opts[:_key]}", opts) ++ I18n.t("#{opts[:_namespace]}.#{opts[:_key]}", **opts) + end + end + +diff --git a/lib/vagrant/machine_index.rb b/lib/vagrant/machine_index.rb +index eec0062923..802f6dfa73 100644 +--- a/lib/vagrant/machine_index.rb ++++ b/lib/vagrant/machine_index.rb +@@ -452,7 +452,7 @@ def valid?(home_path) + # Creates a {Vagrant::Environment} for this entry. + # + # @return [Vagrant::Environment] +- def vagrant_env(home_path, **opts) ++ def vagrant_env(home_path, opts={}) + Vagrant::Util::SilenceWarnings.silence! do + Environment.new({ + cwd: @vagrantfile_path, +diff --git a/lib/vagrant/ui.rb b/lib/vagrant/ui.rb +index a521fd105a..b1a80a49f5 100644 +--- a/lib/vagrant/ui.rb ++++ b/lib/vagrant/ui.rb +@@ -227,7 +227,7 @@ def clear_line + + # This method handles actually outputting a message of a given type + # to the console. +- def say(type, message, **opts) ++ def say(type, message, opts={}) + defaults = { new_line: true, prefix: true } + opts = defaults.merge(@opts).merge(opts) + +diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb +index 26c0d7067e..bf966ecafe 100644 +--- a/lib/vagrant/util/downloader.rb ++++ b/lib/vagrant/util/downloader.rb +@@ -1,3 +1,4 @@ ++require "cgi" + require "uri" + + require "log4r" +@@ -42,8 +43,8 @@ def initialize(source, destination, options=nil) + begin + url = URI.parse(@source) + if url.scheme && url.scheme.start_with?("http") && url.user +- auth = "#{URI.unescape(url.user)}" +- auth += ":#{URI.unescape(url.password)}" if url.password ++ auth = "#{CGI.unescape(url.user)}" ++ auth += ":#{CGI.unescape(url.password)}" if url.password + url.user = nil + url.password = nil + options[:auth] ||= auth +diff --git a/plugins/communicators/winssh/communicator.rb b/plugins/communicators/winssh/communicator.rb +index 1239049d21..3ea012f618 100644 +--- a/plugins/communicators/winssh/communicator.rb ++++ b/plugins/communicators/winssh/communicator.rb +@@ -217,7 +217,7 @@ def sftp_connect + # The WinSSH communicator connection provides isolated modification + # to the generated connection instances. This modification forces + # all provided commands to run within powershell +- def connect(*args) ++ def connect(**opts) + connection = nil + super { |c| connection = c } + +diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb +index acc6df6a6b..f6fb07c000 100644 +--- a/plugins/kernel_v2/config/vm.rb ++++ b/plugins/kernel_v2/config/vm.rb +@@ -380,7 +380,7 @@ def provision(name, **options, &block) + prov.preserve_order = !!options.delete(:preserve_order) if \ + options.key?(:preserve_order) + prov.run = options.delete(:run) if options.key?(:run) +- prov.add_config(options, &block) ++ prov.add_config(**options, &block) + nil + end + +@@ -435,7 +435,7 @@ def disk(type, **options, &block) + disk_config.set_options(options) + + # Add provider config +- disk_config.add_provider_config(provider_options, &block) ++ disk_config.add_provider_config(**provider_options, &block) + + if !Vagrant::Util::Experimental.feature_enabled?("disks") + @logger.warn("Disk config defined, but experimental feature is not enabled. To use this feature, enable it with the experimental flag `disks`. Disk will not be added to internal config, and will be ignored.") +diff --git a/test/unit/plugins/commands/box/command/add_test.rb b/test/unit/plugins/commands/box/command/add_test.rb +index 77cf7d1acd..ea3c5f3317 100644 +--- a/test/unit/plugins/commands/box/command/add_test.rb ++++ b/test/unit/plugins/commands/box/command/add_test.rb +@@ -32,7 +32,7 @@ + let(:argv) { ["foo"] } + + it "executes the runner with the proper actions" do +- expect(action_runner).to receive(:run).with(any_args) { |action, **opts| ++ expect(action_runner).to receive(:run).with(any_args) { |action, opts| + expect(opts[:box_name]).to be_nil + expect(opts[:box_url]).to eq("foo") + true +@@ -46,7 +46,7 @@ + let(:argv) { ["foo", "bar"] } + + it "executes the runner with the proper actions" do +- expect(action_runner).to receive(:run).with(any_args) { |action, **opts| ++ expect(action_runner).to receive(:run).with(any_args) { |action, opts| + expect(opts[:box_name]).to eq("foo") + expect(opts[:box_url]).to eq("bar") + true +diff --git a/test/unit/plugins/commands/box/command/outdated_test.rb b/test/unit/plugins/commands/box/command/outdated_test.rb +index c395171aaa..6b52614cdc 100644 +--- a/test/unit/plugins/commands/box/command/outdated_test.rb ++++ b/test/unit/plugins/commands/box/command/outdated_test.rb +@@ -24,7 +24,7 @@ + let(:argv) { ["--force"] } + + it "passes along the force update option" do +- expect(action_runner).to receive(:run).with(any_args) { |action, **opts| ++ expect(action_runner).to receive(:run).with(any_args) { |action, opts| + expect(opts[:box_outdated_force]).to be_truthy + true + } +diff --git a/test/unit/plugins/communicators/ssh/communicator_test.rb b/test/unit/plugins/communicators/ssh/communicator_test.rb +index 3686fa6a04..f04ddf673b 100644 +--- a/test/unit/plugins/communicators/ssh/communicator_test.rb ++++ b/test/unit/plugins/communicators/ssh/communicator_test.rb +@@ -120,7 +120,7 @@ + context "when printing message to the user" do + before do + allow(machine).to receive(:ssh_info). +- and_return(host: '10.1.2.3', port: 22).ordered ++ and_return(host: '10.1.2.3', port: 22) + allow(communicator).to receive(:connect) + allow(communicator).to receive(:ready?).and_return(true) + end +diff --git a/test/unit/plugins/guests/windows/cap/change_host_name_test.rb b/test/unit/plugins/guests/windows/cap/change_host_name_test.rb +index a75412ae22..07ef98461d 100644 +--- a/test/unit/plugins/guests/windows/cap/change_host_name_test.rb ++++ b/test/unit/plugins/guests/windows/cap/change_host_name_test.rb +@@ -6,7 +6,8 @@ + let(:described_class) do + VagrantPlugins::GuestWindows::Plugin.components.guest_capabilities[:windows].get(:change_host_name) + end +- let(:machine) { double("machine") } ++ let(:machine) { double("machine", guest: guest) } ++ let(:guest) { double("guest") } + let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) } + + before do +@@ -34,7 +35,6 @@ + 'if (!([System.Net.Dns]::GetHostName() -eq \'newhostname\')) { exit 0 } exit 1', + exit_code: 0) + communicator.stub_command(rename_script, exit_code: 0) +- allow(machine).to receive(:guest) + allow(machine.guest).to receive(:capability) + allow(machine.guest).to receive(:capability?) + described_class.change_host_name_and_wait(machine, 'newhostname', 0) +diff --git a/test/unit/plugins/providers/docker/driver_compose_test.rb b/test/unit/plugins/providers/docker/driver_compose_test.rb +index 9606de5ddb..d8b3006cab 100644 +--- a/test/unit/plugins/providers/docker/driver_compose_test.rb ++++ b/test/unit/plugins/providers/docker/driver_compose_test.rb +@@ -32,7 +32,7 @@ + end + let(:data_directory){ double("data-directory", join: composition_path) } + let(:local_data_path){ double("local-data-path") } +- let(:compose_execute_up){ ["docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "up", "--remove-orphans", "-d", {}] } ++ let(:compose_execute_up){ ["docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "up", "--remove-orphans", "-d", any_args] } + + + subject{ described_class.new(machine) } +@@ -277,7 +277,7 @@ + before { allow(subject).to receive(:created?).and_return(true) } + + it 'removes the container' do +- expect(subject).to receive(:execute).with("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "rm", "-f", "docker_1", {}) ++ expect(subject).to receive(:execute).with("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "rm", "-f", "docker_1", any_args) + subject.rm(cid) + end + end +diff --git a/test/unit/plugins/providers/virtualbox/action/network_test.rb b/test/unit/plugins/providers/virtualbox/action/network_test.rb +index 34ed17d94e..69b30b3390 100644 +--- a/test/unit/plugins/providers/virtualbox/action/network_test.rb ++++ b/test/unit/plugins/providers/virtualbox/action/network_test.rb +@@ -44,7 +44,7 @@ + + it "creates a host-only interface with an IPv6 address :1" do + guest = double("guest") +- machine.config.vm.network 'private_network', { type: :static, ip: 'dead:beef::100' } ++ machine.config.vm.network 'private_network', type: :static, ip: 'dead:beef::100' + #allow(driver).to receive(:read_bridged_interfaces) { [] } + allow(driver).to receive(:read_host_only_interfaces) { [] } + #allow(driver).to receive(:read_dhcp_servers) { [] } +@@ -71,19 +71,11 @@ + end + + it "raises the appropriate error when provided with an invalid IP address" do +- guest = double("guest") +- machine.config.vm.network 'private_network', { ip: '192.168.33.06' } ++ machine.config.vm.network 'private_network', ip: '192.168.33.06' + + expect{ subject.call(env) }.to raise_error(Vagrant::Errors::NetworkAddressInvalid) + end + +- it "raises no invalid network error when provided with a valid IP address" do +- guest = double("guest") +- machine.config.vm.network 'private_network', { ip: '192.168.33.6' } +- +- expect{ subject.call(env) }.not_to raise_error(Vagrant::Errors::NetworkAddressInvalid) +- end +- + context "with a dhcp private network" do + let(:bridgedifs) { [] } + let(:hostonlyifs) { [] } +@@ -92,7 +84,7 @@ + let(:network_args) {{ type: :dhcp }} + + before do +- machine.config.vm.network 'private_network', network_args ++ machine.config.vm.network 'private_network', **network_args + allow(driver).to receive(:read_bridged_interfaces) { bridgedifs } + allow(driver).to receive(:read_host_only_interfaces) { hostonlyifs } + allow(driver).to receive(:read_dhcp_servers) { dhcpservers } +diff --git a/test/unit/plugins/provisioners/chef/config/chef_apply_test.rb b/test/unit/plugins/provisioners/chef/config/chef_apply_test.rb +index 135c042138..5bcee520c1 100644 +--- a/test/unit/plugins/provisioners/chef/config/chef_apply_test.rb ++++ b/test/unit/plugins/provisioners/chef/config/chef_apply_test.rb +@@ -10,7 +10,7 @@ + let(:machine) { double("machine") } + + def chef_error(key, options = {}) +- I18n.t("vagrant.provisioners.chef.#{key}", options) ++ I18n.t("vagrant.provisioners.chef.#{key}", **options) + end + + describe "#recipe" do +diff --git a/test/unit/vagrant/action/builder_test.rb b/test/unit/vagrant/action/builder_test.rb +index cf87f375e3..efb4194573 100644 +--- a/test/unit/vagrant/action/builder_test.rb ++++ b/test/unit/vagrant/action/builder_test.rb +@@ -549,12 +549,12 @@ def call(env) + + it "should add trigger action to start of stack" do + subject.apply_dynamic_updates(env) +- expect(subject.stack[0].first).to eq(Vagrant::Action::Builtin::Trigger) ++ expect(subject.stack[0].middleware).to eq(Vagrant::Action::Builtin::Trigger) + end + + it "should have timing and type arguments" do + subject.apply_dynamic_updates(env) +- args = subject.stack[0][1] ++ args = subject.stack[0].arguments.parameters + expect(args).to include(type) + expect(args).to include(timing) + expect(args).to include(action.to_s) +@@ -566,12 +566,12 @@ def call(env) + + it "should add trigger action to middle of stack" do + subject.apply_dynamic_updates(env) +- expect(subject.stack[1].first).to eq(Vagrant::Action::Builtin::Trigger) ++ expect(subject.stack[1].middleware).to eq(Vagrant::Action::Builtin::Trigger) + end + + it "should have timing and type arguments" do + subject.apply_dynamic_updates(env) +- args = subject.stack[1][1] ++ args = subject.stack[1].arguments.parameters + expect(args).to include(type) + expect(args).to include(timing) + expect(args).to include(action.to_s) +@@ -587,12 +587,12 @@ def call(env) + + it "should add trigger action to start of stack" do + subject.apply_dynamic_updates(env) +- expect(subject.stack[0].first).to eq(Vagrant::Action::Builtin::Trigger) ++ expect(subject.stack[0].middleware).to eq(Vagrant::Action::Builtin::Trigger) + end + + it "should have timing and type arguments" do + subject.apply_dynamic_updates(env) +- args = subject.stack[0][1] ++ args = subject.stack[0].arguments.parameters + expect(args).to include(type) + expect(args).to include(timing) + expect(args).to include(action.to_s) +@@ -609,7 +609,7 @@ def call(env) + + it "should have timing and type arguments" do + subject.apply_dynamic_updates(env) +- args = subject.stack[1][1] ++ args = subject.stack[1].arguments.parameters + expect(args).to include(type) + expect(args).to include(timing) + expect(args).to include(action.to_s) +@@ -688,7 +688,7 @@ def call(env) + + it "should include arguments to the trigger action" do + subject.apply_action_name(env) +- args = subject.stack[0][1] ++ args = subject.stack[0].arguments.parameters + expect(args).to include(raw_action_name) + expect(args).to include(timing) + expect(args).to include(:action) +@@ -705,9 +705,9 @@ def call(env) + + it "should include arguments to the trigger action" do + subject.apply_action_name(env) +- builder = subject.stack.first[1]&.first ++ builder = subject.stack.first.arguments.parameters.first + expect(builder).not_to be_nil +- args = builder.stack.first[1] ++ args = builder.stack.first.arguments.parameters + expect(args).to include(raw_action_name) + expect(args).to include(timing) + expect(args).to include(:action) +@@ -728,12 +728,12 @@ def call(env) + + it "should add a trigger action to the start of the stack" do + subject.apply_action_name(env) +- expect(subject.stack[0].first).to eq(Vagrant::Action::Builtin::Trigger) ++ expect(subject.stack[0].middleware).to eq(Vagrant::Action::Builtin::Trigger) + end + + it "should include arguments to the trigger action" do + subject.apply_action_name(env) +- args = subject.stack[0][1] ++ args = subject.stack[0].arguments.parameters + expect(args).to include(action_name) + expect(args).to include(timing) + expect(args).to include(:hook) +@@ -750,7 +750,7 @@ def call(env) + + it "should include arguments to the trigger action" do + subject.apply_action_name(env) +- args = subject.stack.last[1] ++ args = subject.stack.last.arguments.parameters + expect(args).to include(action_name) + expect(args).to include(timing) + expect(args).to include(:hook) +diff --git a/test/unit/vagrant/action/builtin/box_add_test.rb b/test/unit/vagrant/action/builtin/box_add_test.rb +index 91bbc27a25..48406c2cf8 100644 +--- a/test/unit/vagrant/action/builtin/box_add_test.rb ++++ b/test/unit/vagrant/action/builtin/box_add_test.rb +@@ -91,7 +91,7 @@ def with_web_server(path, **opts) + env[:box_name] = "foo" + env[:box_url] = box_path.to_s + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -113,7 +113,7 @@ def with_web_server(path, **opts) + box_path.to_s, + ] + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -132,7 +132,7 @@ def with_web_server(path, **opts) + env[:box_name] = "foo" + env[:box_url] = "http://127.0.0.1:#{port}/#{box_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -152,7 +152,7 @@ def with_web_server(path, **opts) + env[:box_name] = "foo" + env[:box_url] = "ftp://127.0.0.1:#{port}/#{box_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -218,7 +218,7 @@ def with_web_server(path, **opts) + env[:box_checksum_type] = "" + + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -291,7 +291,7 @@ def with_web_server(path, **opts) + env[:box_provider] = "virtualbox" + + allow(box_collection).to receive(:find).and_return(box) +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -311,7 +311,7 @@ def with_web_server(path, **opts) + box_url_name = "http://127.0.0.1:#{port}/#{box_path.basename}" + env[:box_name] = box_url_name + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq(box_url_name) + expect(version).to eq("0") + expect(opts[:metadata_url]).to be_nil +@@ -333,7 +333,7 @@ def with_web_server(path, **opts) + box_url_name = "box name with spaces" + env[:box_name] = box_url_name + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq(box_url_name) + expect(version).to eq("0") + expect(opts[:metadata_url]).to be_nil +@@ -356,7 +356,7 @@ def with_web_server(path, **opts) + env[:box_name] = "foo" + env[:box_url] = "http://#{username}:#{password}@127.0.0.1:#{port}/#{box_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo") + expect(version).to eq("0") +@@ -404,7 +404,7 @@ def with_web_server(path, **opts) + with_web_server(md_path) do |port| + env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -449,7 +449,7 @@ def with_web_server(path, **opts) + with_web_server(md_path, **opts) do |port| + env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -494,7 +494,7 @@ def with_web_server(path, **opts) + url = "http://127.0.0.1:#{port}" + env[:box_url] = "mitchellh/precise64.json" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("mitchellh/precise64") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -545,7 +545,7 @@ def with_web_server(path, **opts) + env[:box_url] = "mitchellh/precise64.json" + env[:box_server_url] = url + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("mitchellh/precise64") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -606,7 +606,7 @@ def with_web_server(path, **opts) + end + end + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -651,7 +651,7 @@ def with_web_server(path, **opts) + with_web_server(md_path) do |port| + env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}" + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") + expect(checksum(path)).to eq(checksum(box_path)) +@@ -795,7 +795,7 @@ def with_web_server(path, **opts) + end + + env[:box_url] = tf.path +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +@@ -839,7 +839,7 @@ def with_web_server(path, **opts) + + env[:box_url] = tf.path + env[:box_provider] = "vmware" +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +@@ -888,7 +888,7 @@ def with_web_server(path, **opts) + + env[:box_url] = tf.path + env[:box_provider] = "vmware" +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +@@ -928,7 +928,7 @@ def with_web_server(path, **opts) + + env[:box_url] = tf.path + env[:box_version] = "~> 0.1" +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.5") +@@ -973,7 +973,7 @@ def with_web_server(path, **opts) + env[:box_url] = tf.path + env[:box_provider] = "vmware" + env[:box_version] = "~> 0.1" +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.5") +@@ -1021,7 +1021,7 @@ def with_web_server(path, **opts) + + env[:box_url] = tf.path + env[:box_provider] = ["virtualbox", "vmware"] +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +@@ -1069,7 +1069,7 @@ def with_web_server(path, **opts) + + expect(env[:ui]).to receive(:ask).and_return("1") + +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +@@ -1245,7 +1245,7 @@ def with_web_server(path, **opts) + env[:box_force] = true + env[:box_url] = tf.path + allow(box_collection).to receive(:find).and_return(box) +- expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts| ++ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, opts| + expect(checksum(path)).to eq(checksum(box_path)) + expect(name).to eq("foo/bar") + expect(version).to eq("0.7") +diff --git a/test/unit/vagrant/action/hook_test.rb b/test/unit/vagrant/action/hook_test.rb +index 9c6054b099..c4a3ba9dd8 100644 +--- a/test/unit/vagrant/action/hook_test.rb ++++ b/test/unit/vagrant/action/hook_test.rb +@@ -36,11 +36,20 @@ + subject.before(existing, 2) + subject.before(existing, 3, :arg, &block) + +- expect(subject.before_hooks[existing]).to eq([ +- [1, [], nil], +- [2, [], nil], +- [3, [:arg], block] +- ]) ++ hooks = subject.before_hooks[existing] ++ expect(hooks.size).to eq(3) ++ expect(hooks[0].middleware).to eq(1) ++ expect(hooks[0].arguments.parameters).to eq([]) ++ expect(hooks[0].arguments.keywords).to eq({}) ++ expect(hooks[0].arguments.block).to be_nil ++ expect(hooks[1].middleware).to eq(2) ++ expect(hooks[1].arguments.parameters).to eq([]) ++ expect(hooks[1].arguments.keywords).to eq({}) ++ expect(hooks[1].arguments.block).to be_nil ++ expect(hooks[2].middleware).to eq(3) ++ expect(hooks[2].arguments.parameters).to eq([:arg]) ++ expect(hooks[2].arguments.keywords).to eq({}) ++ expect(hooks[2].arguments.block).to eq(block) + end + end + +@@ -54,11 +63,20 @@ + subject.after(existing, 2) + subject.after(existing, 3, :arg, &block) + +- expect(subject.after_hooks[existing]).to eq([ +- [1, [], nil], +- [2, [], nil], +- [3, [:arg], block] +- ]) ++ hooks = subject.after_hooks[existing] ++ expect(hooks.size).to eq(3) ++ expect(hooks[0].middleware).to eq(1) ++ expect(hooks[0].arguments.parameters).to eq([]) ++ expect(hooks[0].arguments.keywords).to eq({}) ++ expect(hooks[0].arguments.block).to be_nil ++ expect(hooks[1].middleware).to eq(2) ++ expect(hooks[1].arguments.parameters).to eq([]) ++ expect(hooks[1].arguments.keywords).to eq({}) ++ expect(hooks[1].arguments.block).to be_nil ++ expect(hooks[2].middleware).to eq(3) ++ expect(hooks[2].arguments.parameters).to eq([:arg]) ++ expect(hooks[2].arguments.keywords).to eq({}) ++ expect(hooks[2].arguments.block).to eq(block) + end + end + +@@ -70,11 +88,20 @@ + subject.append(2) + subject.append(3, :arg, &block) + +- expect(subject.append_hooks).to eq([ +- [1, [], nil], +- [2, [], nil], +- [3, [:arg], block] +- ]) ++ hooks = subject.append_hooks ++ expect(hooks.size).to eq(3) ++ expect(hooks[0].middleware).to eq(1) ++ expect(hooks[0].arguments.parameters).to eq([]) ++ expect(hooks[0].arguments.keywords).to eq({}) ++ expect(hooks[0].arguments.block).to be_nil ++ expect(hooks[1].middleware).to eq(2) ++ expect(hooks[1].arguments.parameters).to eq([]) ++ expect(hooks[1].arguments.keywords).to eq({}) ++ expect(hooks[1].arguments.block).to be_nil ++ expect(hooks[2].middleware).to eq(3) ++ expect(hooks[2].arguments.parameters).to eq([:arg]) ++ expect(hooks[2].arguments.keywords).to eq({}) ++ expect(hooks[2].arguments.block).to eq(block) + end + end + +@@ -86,11 +113,20 @@ + subject.prepend(2) + subject.prepend(3, :arg, &block) + +- expect(subject.prepend_hooks).to eq([ +- [1, [], nil], +- [2, [], nil], +- [3, [:arg], block] +- ]) ++ hooks = subject.prepend_hooks ++ expect(hooks.size).to eq(3) ++ expect(hooks[0].middleware).to eq(1) ++ expect(hooks[0].arguments.parameters).to eq([]) ++ expect(hooks[0].arguments.keywords).to eq({}) ++ expect(hooks[0].arguments.block).to be_nil ++ expect(hooks[1].middleware).to eq(2) ++ expect(hooks[1].arguments.parameters).to eq([]) ++ expect(hooks[1].arguments.keywords).to eq({}) ++ expect(hooks[1].arguments.block).to be_nil ++ expect(hooks[2].middleware).to eq(3) ++ expect(hooks[2].arguments.parameters).to eq([:arg]) ++ expect(hooks[2].arguments.keywords).to eq({}) ++ expect(hooks[2].arguments.block).to eq(block) + end + end + +@@ -105,12 +141,15 @@ + + subject.apply(builder) + +- expect(builder.stack).to eq([ +- ["1", [2], nil], +- ["2", [], nil], +- ["8", [], nil], +- ["9", [], nil] +- ]) ++ stack = builder.stack ++ expect(stack[0].middleware).to eq("1") ++ expect(stack[0].arguments.parameters).to eq([2]) ++ expect(stack[1].middleware).to eq("2") ++ expect(stack[1].arguments.parameters).to eq([]) ++ expect(stack[2].middleware).to eq("8") ++ expect(stack[2].arguments.parameters).to eq([]) ++ expect(stack[3].middleware).to eq("9") ++ expect(stack[3].arguments.parameters).to eq([]) + end + + it "should not prepend or append if disabled" do +@@ -124,12 +163,11 @@ + + subject.apply(builder, no_prepend_or_append: true) + +- expect(builder.stack).to eq([ +- ["3", [], nil], +- ["4", [], nil], +- ["7", [], nil], +- ["8", [], nil] +- ]) ++ stack = builder.stack ++ expect(stack[0].middleware).to eq("3") ++ expect(stack[1].middleware).to eq("4") ++ expect(stack[2].middleware).to eq("7") ++ expect(stack[3].middleware).to eq("8") + end + end + end +diff --git a/test/unit/vagrant/plugin/manager_test.rb b/test/unit/vagrant/plugin/manager_test.rb +index dcb3dbf5e8..08ac2c3f83 100644 +--- a/test/unit/vagrant/plugin/manager_test.rb ++++ b/test/unit/vagrant/plugin/manager_test.rb +@@ -53,7 +53,7 @@ + before do + allow(Vagrant::Plugin::StateFile).to receive(:new).and_return(state_file) + allow(bundler).to receive(:environment_path=) +- allow(local_data_path).to receive(:join).and_return(local_data_path) ++ allow(local_data_path).to receive(:join).and_return(local_data_path) if local_data_path + allow(subject).to receive(:bundler_init) + end + +@@ -118,7 +118,7 @@ + end + + it "should init the bundler instance with plugins" do +- expect(bundler).to receive(:init!).with(plugins, anything) ++ expect(bundler).to receive(:init!).with(plugins, any_args) + subject.bundler_init(plugins) + end + +diff --git a/test/unit/vagrant/ui_test.rb b/test/unit/vagrant/ui_test.rb +index 4d1ded16e9..e484b81543 100644 +--- a/test/unit/vagrant/ui_test.rb ++++ b/test/unit/vagrant/ui_test.rb +@@ -14,7 +14,7 @@ + end + + it "outputs using `puts` by default" do +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(opts[:printer]).to eq(:puts) + true + } +@@ -23,7 +23,7 @@ + end + + it "outputs using `print` if new_line is false" do +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(opts[:printer]).to eq(:print) + true + } +@@ -32,7 +32,7 @@ + end + + it "outputs using `print` if new_line is false" do +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(opts[:printer]).to eq(:print) + true + } +@@ -44,7 +44,7 @@ + stdout = StringIO.new + subject.stdout = stdout + +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(opts[:io]).to be(stdout) + true + } +@@ -60,7 +60,7 @@ + stderr = StringIO.new + subject.stderr = stderr + +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(opts[:io]).to be(stderr) + true + } +@@ -81,7 +81,7 @@ + + context "#detail" do + it "outputs details" do +- expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) { |message, opts| + expect(message).to eq("foo") + true + } +@@ -104,7 +104,7 @@ + before{ Vagrant::Util::CredentialScrubber.sensitive(password) } + + it "should remove sensitive information from the output" do +- expect(subject).to receive(:safe_puts).with(any_args) do |message, **opts| ++ expect(subject).to receive(:safe_puts).with(any_args) do |message, opts| + expect(message).not_to include(password) + end + subject.detail(output) +diff --git a/vagrant.gemspec b/vagrant.gemspec +index 8aaf9cc7d9..9287a99a3e 100644 +--- a/vagrant.gemspec ++++ b/vagrant.gemspec +@@ -12,7 +12,7 @@ Gem::Specification.new do |s| + s.summary = "Build and distribute virtualized development environments." + s.description = "Vagrant is a tool for building and distributing virtualized development environments." + +- s.required_ruby_version = "~> 2.4", "< 2.7" ++ s.required_ruby_version = "~> 2.4", "< 2.8" + s.required_rubygems_version = ">= 1.3.6" + + s.add_dependency "bcrypt_pbkdf", "~> 1.0.0" + +From 203ebf59adf161826a63ecede0e6318a39f13a1a Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Mon, 10 Aug 2020 11:17:24 -0700 +Subject: [PATCH 2/3] Update minimum Ruby constriant to 2.5 + +--- + .github/workflows/testing.yml | 2 +- + vagrant.gemspec | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml +index 95591be6a5..68d284de78 100644 +--- a/.github/workflows/testing.yml ++++ b/.github/workflows/testing.yml +@@ -22,7 +22,7 @@ jobs: + runs-on: ubuntu-18.04 + strategy: + matrix: +- ruby: [ '2.4.x', '2.5.x', '2.6.x' ] ++ ruby: [ '2.5.x', '2.6.x', '2.7.x' ] + name: Vagrant unit tests on Ruby ${{ matrix.ruby }} + steps: + - name: Code Checkout +diff --git a/vagrant.gemspec b/vagrant.gemspec +index 9287a99a3e..f088f3adf0 100644 +--- a/vagrant.gemspec ++++ b/vagrant.gemspec +@@ -12,7 +12,7 @@ Gem::Specification.new do |s| + s.summary = "Build and distribute virtualized development environments." + s.description = "Vagrant is a tool for building and distributing virtualized development environments." + +- s.required_ruby_version = "~> 2.4", "< 2.8" ++ s.required_ruby_version = "~> 2.5", "< 2.8" + s.required_rubygems_version = ">= 1.3.6" + + s.add_dependency "bcrypt_pbkdf", "~> 1.0.0" + +From e7e956ca1244410558f74ab6c5e52838cf2106d8 Mon Sep 17 00:00:00 2001 +From: sophia +Date: Mon, 10 Aug 2020 16:32:54 -0500 +Subject: [PATCH 3/3] Fix a few deprecation warnings for ruby 2.7 + +--- + plugins/kernel_v2/config/vm.rb | 2 +- + plugins/providers/virtualbox/action/forward_ports.rb | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb +index f6fb07c000..14dc2de808 100644 +--- a/plugins/kernel_v2/config/vm.rb ++++ b/plugins/kernel_v2/config/vm.rb +@@ -370,7 +370,7 @@ def provision(name, **options, &block) + + if Vagrant::Util::Experimental.feature_enabled?("dependency_provisioners") + opts = {before: before, after: after} +- prov = VagrantConfigProvisioner.new(name, type.to_sym, opts) ++ prov = VagrantConfigProvisioner.new(name, type.to_sym, **opts) + else + prov = VagrantConfigProvisioner.new(name, type.to_sym) + end +diff --git a/plugins/providers/virtualbox/action/forward_ports.rb b/plugins/providers/virtualbox/action/forward_ports.rb +index aac6639186..a468ae61bc 100644 +--- a/plugins/providers/virtualbox/action/forward_ports.rb ++++ b/plugins/providers/virtualbox/action/forward_ports.rb +@@ -48,7 +48,7 @@ def forward_ports + # bridged networking don't require port-forwarding and establishing + # forwarded ports on these attachment types has uncertain behaviour. + @env[:ui].detail(I18n.t("vagrant.actions.vm.forward_ports.forwarding_entry", +- message_attributes)) ++ **message_attributes)) + + # Verify we have the network interface to attach to + if !interfaces[fp.adapter] +@@ -62,7 +62,7 @@ def forward_ports + # so verify that that is the case. + if interfaces[fp.adapter][:type] != :nat + @env[:ui].detail(I18n.t("vagrant.actions.vm.forward_ports.non_nat", +- message_attributes)) ++ **message_attributes)) + next + end + diff --git a/vagrant-2.2.16-fix-compatibility-with-ruby-3.0.patch b/vagrant-2.2.16-fix-compatibility-with-ruby-3.0.patch new file mode 100644 index 0000000..bf30e63 --- /dev/null +++ b/vagrant-2.2.16-fix-compatibility-with-ruby-3.0.patch @@ -0,0 +1,185 @@ +From e4859e2486a3ac031a79ae62ef17bd8cbdbb86e2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= +Date: Sun, 4 Apr 2021 22:46:45 +0200 +Subject: [PATCH] Fix shell provisioner with ruby 3.0 + +I recently updated to Fedora 34 (which uses ruby 3.0), and `vagrant up` errors out like this: + +``` +/usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/ui.rb:230:in `say': wrong number of arguments (given 4, expected 2..3) (ArgumentError) + from (eval):3:in `detail' + from (eval):9:in `detail' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:79:in `handle_comm' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:127:in `block (3 levels) in provision_ssh' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:254:in `block (2 levels) in execute' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:617:in `block (3 levels) in shell_execute' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/channel.rb:598:in `do_extended_data' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:673:in `channel_extended_data' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:548:in `dispatch_incoming_packets' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:248:in `ev_preprocess' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:100:in `each' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:100:in `ev_preprocess' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:28:in `process' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:227:in `process' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:in `block in loop' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:in `loop' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:in `loop' + from /usr/share/gems/gems/net-ssh-6.1.0/lib/net/ssh/connection/channel.rb:272:in `wait' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:702:in `shell_execute' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:247:in `block in execute' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:391:in `connect' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:240:in `execute' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:122:in `block (2 levels) in provision_ssh' + from :90:in `tap' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:96:in `block in provision_ssh' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:329:in `with_script_file' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:94:in `provision_ssh' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/plugins/provisioners/shell/provisioner.rb:33:in `provision' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/provision.rb:138:in `run_provisioner' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:127:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:127:in `block in finalize_action' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builder.rb:149:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/runner.rb:89:in `block in run' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/util/busy.rb:19:in `busy' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/runner.rb:89:in `run' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/environment.rb:525:in `hook' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/provision.rb:126:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/provision.rb:126:in `block in call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/provision.rb:103:in `each' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/provision.rb:103:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.1.2/lib/vagrant-libvirt/action/create_domain.rb:363:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.1.2/lib/vagrant-libvirt/action/create_domain_volume.rb:89:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.1.2/lib/vagrant-libvirt/action/handle_box_image.rb:124:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/handle_box.rb:56:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.1.2/lib/vagrant-libvirt/action/handle_storage_pool.rb:57:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.1.2/lib/vagrant-libvirt/action/set_name_of_domain.rb:32:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:127:in `block in finalize_action' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/warden.rb:48:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builder.rb:149:in `call' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/runner.rb:89:in `block in run' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/util/busy.rb:19:in `busy' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/runner.rb:89:in `run' + from /usr/share/vagrant/gems/gems/vagrant-2.2.9/lib/vagrant/action/builtin/call.rb:53:in `call' +``` + +I'm not a ruby expert but I believe it's related to [this breaking change](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). This change fixes it for me. +--- + plugins/provisioners/shell/provisioner.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb +index 08c8cf739d3..e95f176f28b 100644 +--- a/plugins/provisioners/shell/provisioner.rb ++++ b/plugins/provisioners/shell/provisioner.rb +@@ -78,7 +78,7 @@ def handle_comm(type, data) + options = {} + options[:color] = color if !config.keep_color + +- @machine.ui.detail(data.chomp, options) ++ @machine.ui.detail(data.chomp, **options) + end + end + +From c145867fdd4fb2767f73534057a7bdb9cad3468e Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Fri, 7 May 2021 01:52:27 +0200 +Subject: [PATCH] Fix compatibility with Ruby 3.0 + +Currently it fails with Ruby 3.0: +``` + 1) VagrantPlugins::Kernel_V2::VagrantConfigDisk#add_provider_config normalizes +provider config + Failure/Error: subject.add_provider_config(test_provider_config) + + ArgumentError: + wrong number of arguments (given 1, expected 0) + # ./plugins/kernel_v2/config/disk.rb:88:in `add_provider_config' + # ./test/unit/plugins/kernel_v2/config/disk_test.rb:122:in `block (3 levels) +in ' + # /usr/share/gems/gems/webmock-3.12.1/lib/webmock/rspec.rb:37:in `block (2 +levels) in ' +``` +--- + test/unit/plugins/kernel_v2/config/disk_test.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/unit/plugins/kernel_v2/config/disk_test.rb b/test/unit/plugins/kernel_v2/config/disk_test.rb +index b05d4f105fb..05e91ced6ed 100644 +--- a/test/unit/plugins/kernel_v2/config/disk_test.rb ++++ b/test/unit/plugins/kernel_v2/config/disk_test.rb +@@ -119,7 +119,7 @@ def assert_valid + describe "#add_provider_config" do + it "normalizes provider config" do + test_provider_config = {provider__something: "special" } +- subject.add_provider_config(test_provider_config) ++ subject.add_provider_config(**test_provider_config) + expect(subject.provider_config).to eq( { provider: {something: "special" }} ) + end + end +From bda7c07c02fafb2a3817982d827fc12d71daa817 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Fri, 7 May 2021 01:49:31 +0200 +Subject: [PATCH] Remove unsused &block in add_provider_config. + +Also AFAIK this is not valid with Ruby 3.0. +--- + plugins/kernel_v2/config/disk.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/kernel_v2/config/disk.rb b/plugins/kernel_v2/config/disk.rb +index 0062d8d354b..bd16941ff3c 100644 +--- a/plugins/kernel_v2/config/disk.rb ++++ b/plugins/kernel_v2/config/disk.rb +@@ -85,7 +85,7 @@ def initialize(type) + # Duplicates will be overriden + # + # @param [Hash] options +- def add_provider_config(**options, &block) ++ def add_provider_config(**options) + current = {} + options.each do |k,v| + opts = k.to_s.split("__") +From 3ec791d1687903f6d7a7d837b27633559f791230 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaime=20Caama=C3=B1o=20Ruiz?= +Date: Wed, 12 May 2021 17:01:34 +0200 +Subject: [PATCH] Additional ruby 3.0 keyword argument fixes + +--- + lib/vagrant/plugin/v2/trigger.rb | 2 +- + plugins/provisioners/container/client.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb +index 99d6ac05325..731b5854733 100644 +--- a/lib/vagrant/plugin/v2/trigger.rb ++++ b/lib/vagrant/plugin/v2/trigger.rb +@@ -271,7 +271,7 @@ def run(config, on_error, exit_codes) + options[:color] = :red if !config.keep_color + end + +- @ui.detail(data, options) ++ @ui.detail(data, **options) + end + if !exit_codes.include?(result.exit_code) + raise Errors::TriggersBadExitCodes, +diff --git a/plugins/provisioners/container/client.rb b/plugins/provisioners/container/client.rb +index 72a2d86ab44..db3e2c0ac94 100644 +--- a/plugins/provisioners/container/client.rb ++++ b/plugins/provisioners/container/client.rb +@@ -195,7 +195,7 @@ def handle_comm(type, data) + options = {} + #options[:color] = color if !config.keep_color + +- @machine.ui.info(data.chomp, options) ++ @machine.ui.info(data.chomp, **options) + end + end + end diff --git a/vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch b/vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch new file mode 100644 index 0000000..3b4b484 --- /dev/null +++ b/vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch @@ -0,0 +1,52 @@ +From 60214f4f66ef4fb864aa535c6dccfe5a8b197de8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 26 Feb 2019 12:17:44 +0100 +Subject: [PATCH] Fix fake_ftp 0.3.x compatibility. + +fake_ftp introduced support direcotry support, which changes the +behavior: + +https://github.com/livinginthepast/fake_ftp/pull/42 +--- + test/unit/plugins/pushes/ftp/adapter_test.rb | 4 ++-- + test/unit/plugins/pushes/ftp/push_test.rb | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/unit/plugins/pushes/ftp/adapter_test.rb b/test/unit/plugins/pushes/ftp/adapter_test.rb +index 93888f840..a92cc7422 100644 +--- a/test/unit/plugins/pushes/ftp/adapter_test.rb ++++ b/test/unit/plugins/pushes/ftp/adapter_test.rb +@@ -77,7 +77,7 @@ describe VagrantPlugins::FTPPush::FTPAdapter do + ftp.upload("#{@dir}/file", "/file") + end + +- expect(server.files).to include("file") ++ expect(server.files).to include("/file") + end + + it "uploads in passive mode" do +@@ -86,7 +86,7 @@ describe VagrantPlugins::FTPPush::FTPAdapter do + ftp.upload("#{@dir}/file", "/file") + end + +- expect(server.file("file")).to be_passive ++ expect(server.file("/file")).to be_passive + end + end + end +diff --git a/test/unit/plugins/pushes/ftp/push_test.rb b/test/unit/plugins/pushes/ftp/push_test.rb +index 83509fb7d..49c08da6f 100644 +--- a/test/unit/plugins/pushes/ftp/push_test.rb ++++ b/test/unit/plugins/pushes/ftp/push_test.rb +@@ -71,7 +71,7 @@ describe VagrantPlugins::FTPPush::Push do + + it "pushes the files to the server" do + subject.push +- expect(server.files).to eq(%w(Gemfile data.txt)) ++ expect(server.files).to eq(%w(/var/www/site/Gemfile /var/www/site/data.txt)) + end + + it "raises informative exception when too many files to process" do +-- +2.20.1 + diff --git a/vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch b/vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch deleted file mode 100644 index 7c4a732..0000000 --- a/vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2fe4056a7dcf96dd894875b02032a988777e05d4 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Mon, 14 Nov 2022 10:11:00 -0800 -Subject: [PATCH] Fix test using `File.exists?` to use non-deprecated name - ---- - test/unit/vagrant/util/install_cli_autocomplete_test.rb | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/test/unit/vagrant/util/install_cli_autocomplete_test.rb b/test/unit/vagrant/util/install_cli_autocomplete_test.rb -index a62c065ddce..330b8b44805 100644 ---- a/test/unit/vagrant/util/install_cli_autocomplete_test.rb -+++ b/test/unit/vagrant/util/install_cli_autocomplete_test.rb -@@ -12,7 +12,7 @@ - - describe "#shell_installed" do - it "should return path to config file if exists" do -- allow(File).to receive(:exists?).with(target_file).and_return(true) -+ allow(File).to receive(:exist?).with(target_file).and_return(true) - expect(subject.shell_installed(home)).to eq(target_file) - end - -@@ -36,7 +36,7 @@ - - describe "#install" do - it "installs autocomplete" do -- allow(File).to receive(:exists?).with(target_file).and_return(true) -+ allow(File).to receive(:exist?).with(target_file).and_return(true) - allow(File).to receive(:foreach).with(target_file).and_yield("nothing") - expect(File).to receive(:open).with(target_file, "a") - subject.install(home) -@@ -67,4 +67,4 @@ - expect{ subject.install(["oops"]) }.to raise_error(ArgumentError) - end - end --end -\ No newline at end of file -+end diff --git a/vagrant-2.2.9-Relax-Ruby-dependency-restriction.patch b/vagrant-2.2.9-Relax-Ruby-dependency-restriction.patch new file mode 100644 index 0000000..84a2923 --- /dev/null +++ b/vagrant-2.2.9-Relax-Ruby-dependency-restriction.patch @@ -0,0 +1,13 @@ +diff --git a/vagrant.gemspec b/vagrant.gemspec +index 1643681..7b87b63 100644 +--- a/vagrant.gemspec ++++ b/vagrant.gemspec +@@ -12,7 +12,6 @@ Gem::Specification.new do |s| + s.summary = "Build and distribute virtualized development environments." + s.description = "Vagrant is a tool for building and distributing virtualized development environments." + +- s.required_ruby_version = "~> 2.5", "< 2.8" + s.required_rubygems_version = ">= 1.3.6" + + s.add_dependency "bcrypt_pbkdf", "~> 1.1" + diff --git a/vagrant-2.3.1-Fix-downloader-user-agent.patch b/vagrant-2.3.1-Fix-downloader-user-agent.patch deleted file mode 100644 index 6085623..0000000 --- a/vagrant-2.3.1-Fix-downloader-user-agent.patch +++ /dev/null @@ -1,21 +0,0 @@ -From c7ef689d86294bcdb8ae5d31ddabcba416e3382d Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Wed, 28 Sep 2022 13:51:54 -0700 -Subject: [PATCH] Prevent trailing space character on user agent - ---- - lib/vagrant/util/downloader.rb | 2 +- - -diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb -index eee9744e74f..a7daf9684b7 100644 ---- a/lib/vagrant/util/downloader.rb -+++ b/lib/vagrant/util/downloader.rb -@@ -21,7 +21,7 @@ class Downloader - # are properly tracked. - # - # Vagrant/1.7.4 (+https://www.vagrantup.com; ruby2.1.0) -- USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".freeze -+ USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".strip.freeze - - # Hosts that do not require notification on redirect - SILENCED_HOSTS = [ diff --git a/vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch b/vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch deleted file mode 100644 index 2d2ee21..0000000 --- a/vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch +++ /dev/null @@ -1,41 +0,0 @@ -From aa62e1be219a129efe09464981bd3ae1f7b31282 Mon Sep 17 00:00:00 2001 -From: Jarek Prokop -Date: Tue, 9 May 2023 19:41:28 +0200 -Subject: [PATCH] Disable loading of direct_conversions file. - -plugins/commands/serve/util/direct_conversions.rb file contains -logic for Protobuf related code. It needs related google/protobuf -dependencies, therefore it is better to remove the file and -prevent loading it until we have google/protobuf components available -in Fedora. ---- - plugins/commands/serve/command.rb | 2 +- - plugins/commands/serve/util.rb | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/commands/serve/command.rb b/plugins/commands/serve/command.rb -index 9948f28bd..65d74f5d2 100644 ---- a/plugins/commands/serve/command.rb -+++ b/plugins/commands/serve/command.rb -@@ -138,4 +138,4 @@ module VagrantPlugins - end - - # Load in our conversions down here so all the autoload stuff is in place --require Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions.rb").to_s -+#require Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions.rb").to_s -diff --git a/plugins/commands/serve/util.rb b/plugins/commands/serve/util.rb -index a8f963df7..930d023a6 100644 ---- a/plugins/commands/serve/util.rb -+++ b/plugins/commands/serve/util.rb -@@ -4,7 +4,7 @@ module VagrantPlugins - autoload :Cacher, Vagrant.source_root.join("plugins/commands/serve/util/cacher").to_s - autoload :ClientSetup, Vagrant.source_root.join("plugins/commands/serve/util/client_setup").to_s - autoload :Connector, Vagrant.source_root.join("plugins/commands/serve/util/connector").to_s -- autoload :DirectConversion, Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions").to_s -+ # autoload :DirectConversion, Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions").to_s - autoload :ExceptionTransformer, Vagrant.source_root.join("plugins/commands/serve/util/exception_transformer").to_s - autoload :FuncSpec, Vagrant.source_root.join("plugins/commands/serve/util/func_spec").to_s - autoload :HasBroker, Vagrant.source_root.join("plugins/commands/serve/util/has_broker").to_s --- -2.40.1 - diff --git a/vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch b/vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch deleted file mode 100644 index 2afd734..0000000 --- a/vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 7661eba89a5786a1b0826dbb2f45f8827d9a5103 Mon Sep 17 00:00:00 2001 -From: sophia -Date: Tue, 3 Jan 2023 12:23:37 -0800 -Subject: [PATCH] Environment home dir is also not accessible if EROFS error - occurs - ---- - lib/vagrant/environment.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb -index de99cbf3ba5..8b2531182ca 100644 ---- a/lib/vagrant/environment.rb -+++ b/lib/vagrant/environment.rb -@@ -846,7 +846,7 @@ def setup_home_path - begin - @logger.info("Creating: #{dir}") - FileUtils.mkdir_p(dir) -- rescue Errno::EACCES -+ rescue Errno::EACCES, Errno::EROFS - raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s - end - end diff --git a/vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch b/vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch deleted file mode 100644 index c181831..0000000 --- a/vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 27440fdd8cebf57882e3672376d409b139cc1e86 Mon Sep 17 00:00:00 2001 -From: Jarek Prokop -Date: Thu, 16 Jan 2025 13:36:05 +0100 -Subject: [PATCH] Fix the default vagrant URL for pulling boxes. - ---- - lib/vagrant/shared_helpers.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb -index b07c89a48..3c57cad6d 100644 ---- a/lib/vagrant/shared_helpers.rb -+++ b/lib/vagrant/shared_helpers.rb -@@ -10,7 +10,7 @@ module Vagrant - # of Vagrant that may require remote access. - # - # @return [String] -- DEFAULT_SERVER_URL = "https://vagrantcloud.com".freeze -+ DEFAULT_SERVER_URL = "https://vagrantcloud.com/api/v2/vagrant".freeze - - # Max number of seconds to wait for joining an active thread. - # diff --git a/vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch b/vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch deleted file mode 100644 index 50ae417..0000000 --- a/vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9743c857481556838ee417a0033efdee3fb0c7fc Mon Sep 17 00:00:00 2001 -From: sophia -Date: Tue, 3 Jan 2023 13:20:14 -0800 -Subject: [PATCH] Only check for arguments matching test string if the argument - is a string - -This issue surfaced in the tests after updating to Ruby 3.2.0 where -the =~ operator has been removed. - -ref: https://github.com/ruby/ruby/blob/cca54c8b1b71072bb07850c9d3f20b261d3b312c/NEWS.md?plain=1#L498 ---- - test/unit/plugins/provisioners/ansible/provisioner_test.rb | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -index f5828f14340..fdf9aa67eaa 100644 ---- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb -+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -@@ -91,7 +91,7 @@ def self.it_should_set_arguments_and_environment_variables( - expect(args[1]).to eq("--connection=ssh") - expect(args[2]).to eq("--timeout=30") - -- inventory_count = args.count { |x| x =~ /^--inventory-file=.+$/ } -+ inventory_count = args.count { |x| x.match(/^--inventory-file=.+$/) if x.is_a?(String) } - expect(inventory_count).to be > 0 - - expect(args[args.length-2]).to eq("playbook.yml") -@@ -100,9 +100,9 @@ def self.it_should_set_arguments_and_environment_variables( - - it "sets --limit argument" do - expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args| -- all_limits = args.select { |x| x =~ /^(--limit=|-l)/ } -+ all_limits = args.select { |x| x.match(/^(--limit=|-l)/) if x.is_a?(String) } - if config.raw_arguments -- raw_limits = config.raw_arguments.select { |x| x =~ /^(--limit=|-l)/ } -+ raw_limits = config.raw_arguments.select { |x| x.match(/^(--limit=|-l)/) if x.is_a?(String) } - expect(all_limits.length - raw_limits.length).to eq(1) - expect(all_limits.last).to eq(raw_limits.last) - else diff --git a/vagrant-2.3.4-remove_grpc.patch b/vagrant-2.3.4-remove_grpc.patch deleted file mode 100644 index 27c12d6..0000000 --- a/vagrant-2.3.4-remove_grpc.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb ---- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb 2023-02-16 13:41:49.267357857 +0100 -+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb 2023-03-17 16:47:49.956035219 +0100 -@@ -46,19 +46,19 @@ - require "vagrant/plugin/manager" - - # Update the load path so our protos can be located --$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs").to_s --$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s --$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto/vagrant_plugin_sdk").to_s -+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs").to_s -+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s -+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto/vagrant_plugin_sdk").to_s - - # Load our protos so they are available --require 'vagrant/protobufs/proto/vagrant_server/server_pb' --require 'vagrant/protobufs/proto/vagrant_server/server_services_pb' --require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_pb' --require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_services_pb' --require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb' --require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb' --require 'vagrant/protobufs/proto/plugin/grpc_broker_pb' --require 'vagrant/protobufs/proto/plugin/grpc_broker_services_pb' -+# require 'vagrant/protobufs/proto/vagrant_server/server_pb' -+# require 'vagrant/protobufs/proto/vagrant_server/server_services_pb' -+# require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_pb' -+# require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_services_pb' -+# require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb' -+# require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb' -+# require 'vagrant/protobufs/proto/plugin/grpc_broker_pb' -+# require 'vagrant/protobufs/proto/plugin/grpc_broker_services_pb' - - # Enable logging if it is requested. We do this before - # anything else so that we can setup the output before -diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb ---- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb 2023-02-16 13:41:49.358357676 +0100 -+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb 2023-03-17 16:57:02.859959067 +0100 -@@ -3,9 +3,9 @@ - module VagrantPlugins - module CommandServe - # Simple constant aliases to reduce namespace typing -- SDK = Hashicorp::Vagrant::Sdk -- SRV = Hashicorp::Vagrant -- Empty = ::Google::Protobuf::Empty -+ # SDK = Hashicorp::Vagrant::Sdk -+ # SRV = Hashicorp::Vagrant -+ Empty = [] - - autoload :Broker, Vagrant.source_root.join("plugins/commands/serve/broker").to_s - autoload :Client, Vagrant.source_root.join("plugins/commands/serve/client").to_s -diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb ---- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb 2023-02-16 13:41:49.475357444 +0100 -+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb 2023-03-17 16:48:26.940189713 +0100 -@@ -11,11 +11,11 @@ - require "vagrant/util/map_command_options" - require "vagrant/util/map_command_options" - --$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s -- --require "vagrant/protobufs/proto/protostructure_pb" --require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb" --require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb" -+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s -+# -+# require "vagrant/protobufs/proto/protostructure_pb" -+# require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb" -+# require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb" - - # Include mappers - require Vagrant.source_root.join("plugins/commands/serve/command").to_s diff --git a/vagrant-pr12913-ruby32-File_exists-removal.patch b/vagrant-pr12913-ruby32-File_exists-removal.patch deleted file mode 100644 index 1f44dd6..0000000 --- a/vagrant-pr12913-ruby32-File_exists-removal.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 6f9f88e05557d40570a3885b6d3d3a6a24c06090 Mon Sep 17 00:00:00 2001 -From: Nicolas St-Laurent -Date: Thu, 22 Sep 2022 08:54:46 -0400 -Subject: [PATCH] Replace deprecated File.exists? with File.exist?. - ---- - lib/vagrant/util/install_cli_autocomplete.rb | 2 +- - plugins/hosts/gentoo/host.rb | 2 +- - plugins/hosts/slackware/host.rb | 2 +- - plugins/provisioners/ansible/provisioner/host.rb | 2 +- - plugins/provisioners/chef/config/chef_zero.rb | 2 +- - test/unit/plugins/provisioners/ansible/provisioner_test.rb | 6 +++--- - 6 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/lib/vagrant/util/install_cli_autocomplete.rb b/lib/vagrant/util/install_cli_autocomplete.rb -index 9aaf61a1de2..119749e0f08 100644 ---- a/lib/vagrant/util/install_cli_autocomplete.rb -+++ b/lib/vagrant/util/install_cli_autocomplete.rb -@@ -29,7 +29,7 @@ def shell_installed(home) - @logger.info("Searching for config in home #{home}") - @config_paths.each do |path| - config_file = File.join(home, path) -- if File.exists?(config_file) -+ if File.exist?(config_file) - @logger.info("Found config file #{config_file}") - return config_file - end -diff --git a/plugins/hosts/gentoo/host.rb b/plugins/hosts/gentoo/host.rb -index ac7e019d045..6d8b88a6a35 100644 ---- a/plugins/hosts/gentoo/host.rb -+++ b/plugins/hosts/gentoo/host.rb -@@ -4,7 +4,7 @@ module VagrantPlugins - module HostGentoo - class Host < Vagrant.plugin("2", :host) - def detect?(env) -- File.exists?("/etc/gentoo-release") -+ File.exist?("/etc/gentoo-release") - end - end - end -diff --git a/plugins/hosts/slackware/host.rb b/plugins/hosts/slackware/host.rb -index ec3503ac02e..bea7cab7476 100644 ---- a/plugins/hosts/slackware/host.rb -+++ b/plugins/hosts/slackware/host.rb -@@ -4,7 +4,7 @@ module VagrantPlugins - module HostSlackware - class Host < Vagrant.plugin("2", :host) - def detect?(env) -- return File.exists?("/etc/slackware-version") || -+ return File.exist?("/etc/slackware-version") || - !Dir.glob("/usr/lib/setup/Plamo-*").empty? - end - end -diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb -index 3e594b83c11..f2a57133c79 100644 ---- a/plugins/provisioners/ansible/provisioner/host.rb -+++ b/plugins/provisioners/ansible/provisioner/host.rb -@@ -185,7 +185,7 @@ def ship_generated_inventory(inventory_content) - - inventory_file = Pathname.new(File.join(inventory_path, 'vagrant_ansible_inventory')) - @@lock.synchronize do -- if !File.exists?(inventory_file) or inventory_content != File.read(inventory_file) -+ if !File.exist?(inventory_file) or inventory_content != File.read(inventory_file) - begin - # ansible dir inventory will ignore files starting with '.' - inventory_tmpfile = Tempfile.new('.vagrant_ansible_inventory', inventory_path) -diff --git a/plugins/provisioners/chef/config/chef_zero.rb b/plugins/provisioners/chef/config/chef_zero.rb -index c19485f882e..84ed08cf5b2 100644 ---- a/plugins/provisioners/chef/config/chef_zero.rb -+++ b/plugins/provisioners/chef/config/chef_zero.rb -@@ -81,7 +81,7 @@ def validate(machine) - errors << I18n.t("vagrant.config.chef.nodes_path_empty") - else - missing_paths = Array.new -- nodes_path.each { |dir| missing_paths << dir[1] if !File.exists? dir[1] } -+ nodes_path.each { |dir| missing_paths << dir[1] if !File.exist? dir[1] } - # If it exists at least one path on disk it's ok for Chef provisioning - if missing_paths.size == nodes_path.size - errors << I18n.t("vagrant.config.chef.nodes_path_missing", path: missing_paths.to_s) -diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -index 180f26869bb..f5828f14340 100644 ---- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb -+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -@@ -181,7 +181,7 @@ def self.it_should_create_and_use_generated_inventory(with_user = true) - it "generates an inventory with all active machines" do - expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args| - expect(config.inventory_path).to be_nil -- expect(File.exists?(generated_inventory_file)).to be(true) -+ expect(File.exist?(generated_inventory_file)).to be(true) - inventory_content = File.read(generated_inventory_file) - _ssh = config.compatibility_mode == VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0 ? "" : "_ssh" - if with_user -@@ -697,7 +697,7 @@ def ensure_that_config_is_valid - it "generates an inventory with winrm connection settings" do - expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args| - expect(config.inventory_path).to be_nil -- expect(File.exists?(generated_inventory_file)).to be(true) -+ expect(File.exist?(generated_inventory_file)).to be(true) - inventory_content = File.read(generated_inventory_file) - - expect(inventory_content).to include("machine1 ansible_connection=winrm ansible_ssh_host=127.0.0.1 ansible_ssh_port=55986 ansible_ssh_user='winner' ansible_ssh_pass='winword'\n") -@@ -731,7 +731,7 @@ def ensure_that_config_is_valid - expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args| - expect(args).to include("--inventory-file=#{existing_file}") - expect(args).not_to include("--inventory-file=#{generated_inventory_file}") -- expect(File.exists?(generated_inventory_file)).to be(false) -+ expect(File.exist?(generated_inventory_file)).to be(false) - }.and_return(default_execute_result) - end - diff --git a/vagrant-pr13043-ruby32-object-regex-match-removal.patch b/vagrant-pr13043-ruby32-object-regex-match-removal.patch deleted file mode 100644 index a78c2a1..0000000 --- a/vagrant-pr13043-ruby32-object-regex-match-removal.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9743c857481556838ee417a0033efdee3fb0c7fc Mon Sep 17 00:00:00 2001 -From: sophia -Date: Tue, 3 Jan 2023 13:20:14 -0800 -Subject: [PATCH 4/5] Only check for arguments matching test string if the - argument is a string - -This issue surfaced in the tests after updating to Ruby 3.2.0 where -the =~ operator has been removed. - -ref: https://github.com/ruby/ruby/blob/cca54c8b1b71072bb07850c9d3f20b261d3b312c/NEWS.md?plain=1#L498 ---- - test/unit/plugins/provisioners/ansible/provisioner_test.rb | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -index f5828f14340..fdf9aa67eaa 100644 ---- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb -+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb -@@ -91,7 +91,7 @@ def self.it_should_set_arguments_and_environment_variables( - expect(args[1]).to eq("--connection=ssh") - expect(args[2]).to eq("--timeout=30") - -- inventory_count = args.count { |x| x =~ /^--inventory-file=.+$/ } -+ inventory_count = args.count { |x| x.match(/^--inventory-file=.+$/) if x.is_a?(String) } - expect(inventory_count).to be > 0 - - expect(args[args.length-2]).to eq("playbook.yml") -@@ -100,9 +100,9 @@ def self.it_should_set_arguments_and_environment_variables( - - it "sets --limit argument" do - expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args| -- all_limits = args.select { |x| x =~ /^(--limit=|-l)/ } -+ all_limits = args.select { |x| x.match(/^(--limit=|-l)/) if x.is_a?(String) } - if config.raw_arguments -- raw_limits = config.raw_arguments.select { |x| x =~ /^(--limit=|-l)/ } -+ raw_limits = config.raw_arguments.select { |x| x.match(/^(--limit=|-l)/) if x.is_a?(String) } - expect(all_limits.length - raw_limits.length).to eq(1) - expect(all_limits.last).to eq(raw_limits.last) - else - - diff --git a/vagrant.spec b/vagrant.spec index 224083e..926a186 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -1,13 +1,13 @@ %global bashcompletion_dir %(pkg-config --variable=completionsdir bash-completion 2> /dev/null || :) -%global vagrant_spec_commit a88825f4cb254b703d0f9235667223f02ad5c600 +%global vagrant_spec_commit 9057cd6e0ac299688da608d459deac66bfad8880 %bcond_without help2man -%bcond_without ed25519 +%bcond_with ed25519 Name: vagrant -Version: 2.3.4 -Release: 9%{?dist} +Version: 2.2.16 +Release: 1%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -16,34 +16,28 @@ Source0: https://github.com/hashicorp/%{name}/archive/refs/tags/v%{version}.tar. Source1: binstub # The library has no official release yet. But since it is just test # dependency, it should be fine to include the source right here. -# wget https://github.com/hashicorp/vagrant-spec/archive/03d88fe2467716b072951c2b55d78223130851a6/vagrant-spec-03d88fe2467716b072951c2b55d78223130851a6.tar.gz -Source2: https://github.com/hashicorp/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz +# wget https://github.com/mitchellh/vagrant-spec/archive/9057cd6e0ac299688da608d459deac66bfad8880/vagrant-spec-9057cd6e0ac299688da608d459deac66bfad8880.tar.gz +Source2: https://github.com/vagrant/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz # Monkey-patching needed for Vagrant to work until the respective patches # for RubyGems and Bundler are in place Source4: macros.vagrant +# Fix fake_ftp 0.3.x compatibility. +# https://github.com/hashicorp/vagrant/issues/10646 +Patch0: vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch # Do not load runtime dependencies in %%check if vagrant is not loaded # https://github.com/hashicorp/vagrant/pull/10945 Patch1: vagrant-2.2.9-do-not-load-dependencies.patch -# Remove GRPC dependencies for Fedora. It seems that it will serve -# for communication with upcoming Golang backend, however -# it is only in tech-preview now and grpc is not simple to package. -# Let's remove it for now and revisit in the future. -Patch2: vagrant-2.3.4-remove_grpc.patch -# Ruby 3.2 compatibility for tests. -# Commits are cherry-picked instead of a whole PR as it also edits .github -# files that we do not care about. -# https://github.com/hashicorp/vagrant/pull/13043 -Patch3: vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch -Patch4: vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch -# Disable loading of direc_conversions.rb in other files. -# The file is removed as it requires protobuf components not yet -# packaged in Fedora. -Patch5: vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch -# Default URL for pulling boxes seems to have changed. -# This fix allows vagrant to pull boxes again. -# See: https://bugzilla.redhat.com/show_bug.cgi?id=2337302 -Patch6: vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch +# Relax Ruby version restriction (use patch to make sure we don't regress +# if upstream fixes this. +# https://bugzilla.redhat.com/show_bug.cgi?id=1915671 +Patch5: vagrant-2.2.9-Relax-Ruby-dependency-restriction.patch +# Fix shell provisioner compatibility with ruby 3.0 +# https://github.com/hashicorp/vagrant/pull/12273 +# https://github.com/hashicorp/vagrant/pull/12353 +# https://github.com/hashicorp/vagrant/pull/12352 +# https://github.com/jcaamano/vagrant/commit/3ec791d1687903f6d7a7d837b27633559f791230 +Patch6: vagrant-2.2.16-fix-compatibility-with-ruby-3.0.patch # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -60,28 +54,23 @@ Requires: (rubygem(i18n) >= 1.8 with rubygem(i18n) < 2.0) Requires: rubygem(json) Requires: (rubygem(listen) >= 3.2 with rubygem(listen) < 4) Requires: rubygem(log4r) >= 1.1.9 -Requires: (rubygem(net-ssh) >= 5.2.0 with rubygem(net-ssh) < 8) +Requires: (rubygem(net-ssh) >= 5.2.0 with rubygem(net-ssh) < 7) Requires: rubygem(net-scp) >= 1.2.0 Requires: rubygem(net-sftp) >= 2.1 +Requires: rubygem(rest-client) >= 1.6.0 Requires: rubygem(rubyzip) >= 1.1.7 -Requires: rubygem(net-ftp) -Requires: rubygem(rexml) -Requires: rubygem(mime-types) Requires: bsdtar Requires: curl -Requires: %{_bindir}/ps Recommends: vagrant(vagrant-libvirt) +Recommends: rubygem(bcrypt_pbkdf) Recommends: (podman-docker if podman) %if %{with ed25519} Requires: rubygem(ed25519) -Requires: rubygem(bcrypt_pbkdf) BuildRequires: rubygem(ed25519) -BuildRequires: rubygem(bcrypt_pbkdf) %else Recommends: rubygem(ed25519) -Recommends: rubygem(bcrypt_pbkdf) %endif BuildRequires: bsdtar @@ -99,15 +88,12 @@ BuildRequires: rubygem(erubi) BuildRequires: rubygem(rspec) BuildRequires: rubygem(rspec-its) BuildRequires: rubygem(net-sftp) +BuildRequires: rubygem(rest-client) BuildRequires: rubygem(rubyzip) BuildRequires: rubygem(thor) BuildRequires: rubygem(webmock) BuildRequires: rubygem(webrick) BuildRequires: rubygem(fake_ftp) -BuildRequires: rubygem(rake) -BuildRequires: rubygem(net-ftp) -BuildRequires: rubygem(rexml) -BuildRequires: rubygem(mime-types) BuildRequires: pkgconfig(bash-completion) %if %{with help2man} BuildRequires: help2man @@ -115,6 +101,11 @@ BuildRequires: help2man BuildRequires: %{_bindir}/ssh BuildArch: noarch +# vagrant-atomic was retired in F26, since it was merged into Vagrant. +# https://github.com/projectatomic/vagrant-atomic/issues/5 +# https://github.com/mitchellh/vagrant/pull/5847 +Obsoletes: vagrant-atomic <= 0.1.0-4 + # Since Vagrant itself is installed on the same place as its plugins # the vagrant_plugin macros can be reused in the spec file, but the plugin # name must be specified. @@ -135,6 +126,10 @@ Documentation for %{name}. %prep %setup -q -b2 +%patch0 -p1 +%patch5 -p1 +%patch6 -p1 + # TODO: package vagrant_cloud, as it is not in Fedora yet %gemspec_remove_dep -s %{name}.gemspec -g vagrant_cloud @@ -144,22 +139,13 @@ rm -rf ./plugins/commands/cloud/ sed -i '/^\s*I18n\..*$/ s/^/#/g' plugins/commands/login/plugin.rb sed -i '/^\s*command(:login) do$/,/\s*end$/ s/^/#/g' plugins/commands/login/plugin.rb -# Expand required Ruby compatibility, otherwise RubyGems throws exceptions. -# Relevant rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=2053476#c0 -# Relevant RubyGems issue: https://github.com/rubygems/rubygems/issues/4338 -sed -i -e '/required_ruby_version/ s/, "< 3.2"//' %{name}.gemspec - -# We have older version in Fedora -%gemspec_remove_dep -s %{name}.gemspec -g net-sftp '~> 4.0' -%gemspec_add_dep -s %{name}.gemspec -g net-sftp '>= 2.1.2' -%gemspec_remove_dep -s %{name}.gemspec -g net-scp '~> 4.0' +# We have newer versions in Fedora +%gemspec_remove_dep -s %{name}.gemspec -g net-scp '~> 1.2.0' %gemspec_add_dep -s %{name}.gemspec -g net-scp '>= 1.2.0' -# We have newer version in Fedora -%gemspec_remove_dep -s %{name}.gemspec -g listen -%gemspec_add_dep -s %{name}.gemspec -g listen '>= 3.5.1' -%gemspec_remove_dep -s %{name}.gemspec -g rubyzip '~> 2.0' -%gemspec_add_dep -s %{name}.gemspec -g rubyzip '>= 2.0.0' +# We have older version in Fedora +%gemspec_remove_dep -s %{name}.gemspec -g net-sftp '~> 3.0' +%gemspec_add_dep -s %{name}.gemspec -g net-sftp '>= 2.1.2' # Remove Windows specific dependencies %gemspec_remove_dep -s %{name}.gemspec -g wdm @@ -174,50 +160,25 @@ sed -i -e '/required_ruby_version/ s/, "< 3.2"//' %{name}.gemspec %gemspec_remove_dep -s %{name}.gemspec -g childprocess %gemspec_add_dep -s %{name}.gemspec -g childprocess '>= 1.0.1' -# Relax net-ssh dependency. We have newer net-ssh in Fedora -%gemspec_remove_dep -s %{name}.gemspec -g net-ssh -%gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 8'] +# Remove optional dependencies +%gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf -# Remove "optional" dependencies -# This seems like prelude for the in-development golang backend. -# Nothing runtime critical. -%gemspec_remove_dep -s %{name}.gemspec -g googleapis-common-protos-types -%gemspec_remove_dep -s %{name}.gemspec -g grpc -%gemspec_remove_dep -s %{name}.gemspec -g rgl # Load missing dependency Vagrant::Util::MapCommandOptions # https://github.com/hashicorp/vagrant/pull/11609 sed -i '/^\s*require..vagrant.util.experimental.\s*$/ a\require "vagrant/util/map_command_options"' \ plugins/kernel_v2/config/vm.rb -%if %{without ed25519} -# Remove optional dependencies -%gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf +# Apply net-ssh patches apply regardless of net-ssh version +sed -i 's/^if Net::SSH::Version::STRING.*$/if true/' \ + lib/vagrant/patches/net-ssh.rb +%if %{without ed25519} %gemspec_remove_dep -s %{name}.gemspec -g ed25519 # Disable patch for ed25519 sed -i '/^ require .net\/ssh\/authentication\/ed25519.$/,/^ end$/ s/^/#/' \ lib/vagrant/patches/net-ssh.rb -%else -%gemspec_remove_dep -s %{name}.gemspec -g ed25519 -%gemspec_add_dep -s %{name}.gemspec -g ed25519 ['>= 1.2.4', '< 1.4'] %endif -# Let's get rid of protobuf related components -%patch 2 -p16 - -%gemspec_remove_file -s %{name}.gemspec Dir.glob('lib/vagrant/protobufs/**/*.*') -# This file contains monkey patching and compatibility for Protobuf serialization. -# We do not need that as we skip protobuf related parts completely. -%gemspec_remove_file -s %{name}.gemspec "plugins/commands/serve/util/direct_conversions.rb" -rm -rf plugins/commands/serve/util/direct_conversions.rb -# Patch out related requires in code. -%patch 5 -p1 - -%patch 3 -p1 - -%patch 6 -p1 - - %build gem build %{name}.gemspec @@ -246,9 +207,6 @@ install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/bash/completion %{buildroot}%{bashcompletion_dir}/%{name} sed -i '/#!\// d' %{buildroot}%{bashcompletion_dir}/%{name} -install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/zsh/_%{name} \ - %{buildroot}%{_datadir}/zsh/site-functions/_%{name} - # Install Vagrant macros mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ @@ -282,8 +240,6 @@ help2man -N -s1 -o %{buildroot}%{_mandir}/man1/%{name}.1 \ %check # Do not load dependencies from gemspec cat %{PATCH1} | patch -p1 -# Ruby 3.2 compatibility fix -cat %{PATCH4} | patch -p1 sed -i '/^\s*context "when vagrant specification is not found" do$/,/^ end$/ s/^/#/' \ test/unit/vagrant/bundler_test.rb @@ -322,26 +278,45 @@ mv test/unit/vagrant/util/env_test.rb{,.disable} # in favor of vagrant_cloud rm -r test/unit/plugins/commands/cloud/ +# fake_ftp 0.3.0 compatibility. +# https://github.com/livinginthepast/fake_ftp/pull/56 +sed -i '/^\s*it "adds from FTP URL" do$/ a skip' test/unit/vagrant/action/builtin/box_add_test.rb + # Disable test that requires network sed -i '/^ it "generates a network name and configuration" do$/,/^ end/ s/^/#/' \ test/unit/plugins/providers/docker/action/prepare_networks_test.rb +# There are some Ruby 2.7 incompatibilities which might be fixed by: +# https://github.com/hashicorp/vagrant/pull/11459 +# but workarond the offending test case for now. +sed -i "/describe '#create' do/,/^ end$/ s/^/#/" \ + test/unit/plugins/providers/docker/driver_compose_test.rb +sed -i "/it 'removes the container' do/a\ skip 'Ruby 2.7 incompatibility'" \ + test/unit/plugins/providers/docker/driver_compose_test.rb + # Remove failing BSD-host tests, as we don't care about those. rm -rf test/unit/plugins/hosts/bsd +# Disable broken test for installing docker on host +# https://github.com/hashicorp/vagrant/issues/11606 +sed -i '/^\s*it "installs docker if not present" do$/ a\ skip "GH#11606"' \ + test/unit/plugins/provisioners/docker/installer_test.rb + +# Disable tests failing on class variable access from toplevel +# > Failure/Error: @@logger = nil +# https://github.com/hashicorp/vagrant/issues/12362 +mv test/unit/plugins/synced_folders/unix_mount_helpers_test.rb{,.disable} + +# Disable currently broken powershell tests, due to: +# https://github.com/hashicorp/vagrant/commit/5967a23fa097e89726d335dcf781ae43cb256bc1# +# https://github.com/hashicorp/vagrant/issues/12363 +mv test/unit/vagrant/util/powershell_test.rb{,.disable} + # Export the OS as an environment variable that Vagrant can access, so the # test suite is executed with same host it will be run (also avoids docker # installer_test issue). export VAGRANT_DETECTED_OS="$(uname -s 2>/dev/null)" -# Disable tests concerning protobuf -mv ./test/unit/plugins/commands/serve/service/guest_service_test.rb{,.disabled} -mv ./test/unit/plugins/commands/serve/service/host_service_test.rb{,.disabled} -mv ./test/unit/plugins/commands/serve/util/exception_transformer_test.rb{,.disabled} -mv ./test/unit/plugins/commands/serve/mappers_test.rb{,.disabled} -sed -i -e '/ it "uses a directory within the home directory by default" do/a\ - skip "Requires protobuf"' ./test/unit/vagrant/environment_test.rb - # Put gem load path on top of the load path, so they are loaded earlier then # their StdLib symlinks. %{!?buildtime_libdir:%global buildtime_libdir $(ruby -rrbconfig -e 'puts RbConfig::CONFIG["libdir"]')} @@ -364,6 +339,37 @@ export RUBYOPT rake -f tasks/test.rake test:unit \ | tee error.log +# Additional failures (3) +# > Cannot proxy frozen objects, rspec-mocks relies on proxies for method... +# https://github.com/hashicorp/vagrant/issues/12365 +# +# Temporarily disable (3) tests failing on older childprocess +# 4) Vagrant::Util::Subprocess#running? should return false when subprocess has completed +# Failure/Error: expect(sp.running?).to be(false) +# expected false +# got true +# # ./test/unit/vagrant/util/subprocess_test.rb:123:in `block (4 levels) in ' +# # ./test/unit/vagrant/util/subprocess_test.rb:120:in `each' +# # ./test/unit/vagrant/util/subprocess_test.rb:120:in `block (3 levels) in ' +# # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in ' +# 5) Vagrant::Util::Subprocess#stop when subprocess has already completed should return false +# Failure/Error: expect(sp.stop).to be(false) +# expected false +# got true +# # ./test/unit/vagrant/util/subprocess_test.rb:152:in `block (5 levels) in ' +# # ./test/unit/vagrant/util/subprocess_test.rb:149:in `each' +# # ./test/unit/vagrant/util/subprocess_test.rb:149:in `block (4 levels) in ' +# # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in ' +# 6) Vagrant::Util::Subprocess#stop when subprocess is running should stop the process +# Failure/Error: expect(sp.running?).to be(false) +# expected false +# got true +# # ./test/unit/vagrant/util/subprocess_test.rb:172:in `block (5 levels) in ' +# # ./test/unit/vagrant/util/subprocess_test.rb:168:in `each' +# # ./test/unit/vagrant/util/subprocess_test.rb:168:in `block (4 levels) in ' +# # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in ' +grep ', 6 failures, ' error.log || exit 1 + %if %{with help2man} # Check `--help` output, using which man page is created export GEM_PATH="%{gem_dir}:%{buildroot}/usr/share/vagrant/gems" @@ -440,16 +446,6 @@ end %dir %{dirname:%{vagrant_plugin_instdir}} %dir %{dirname:%{vagrant_plugin_spec}} -%exclude %{vagrant_plugin_instdir}/Makefile -%exclude %{vagrant_plugin_instdir}/Dockerfile -%exclude %{vagrant_plugin_instdir}/flake* -%exclude %{vagrant_plugin_instdir}/go.{mod,sum} -%exclude %{vagrant_plugin_instdir}/gen.go -%exclude %{vagrant_plugin_instdir}/binstubs/vagrant -%exclude %{vagrant_plugin_instdir}/nix/*.nix -%exclude %{vagrant_plugin_instdir}/shell.nix -%exclude %{vagrant_plugin_instdir}/vagrant-config.hcl - %{_bindir}/%{name} %dir %{vagrant_plugin_instdir} %license %{vagrant_plugin_instdir}/LICENSE @@ -461,7 +457,6 @@ end # TODO: Make more use of contribs. %{vagrant_plugin_instdir}/contrib %exclude %{vagrant_plugin_instdir}/contrib/bash -%exclude %{vagrant_plugin_instdir}/contrib/zsh/_%{name} # This is not the original .gemspec. %exclude %{vagrant_plugin_instdir}/vagrant.gemspec %{vagrant_plugin_instdir}/keys @@ -479,9 +474,6 @@ end %dir %{dirname:%{bashcompletion_dir}} %dir %{bashcompletion_dir} %{bashcompletion_dir}/%{name} -# By "owning" the site-functions dir, we don't need to Require zsh -%dir %{_datadir}/zsh -%{_datadir}/zsh/site-functions/_%{name} %{_rpmconfigdir}/macros.d/macros.%{name} %if %{with help2man} %{_mandir}/man1/%{name}.1* @@ -496,74 +488,6 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog -* Mon Dec 22 2025 Vít Ondruch - 2.3.4-9 -- Relax `rubygem(rubyzip)` dependency - -* Fri Jul 25 2025 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jan 16 2025 Jarek Prokop - 2.3.4-7 -- Fix default URL used for pulling boxes. - Resolves: rhbz#2337302 - -* Sat Jul 20 2024 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Feb 07 2024 Vít Ondruch - 2.3.4-5 -- Drop superfluous rest-client dependency. - -* Sat Jan 27 2024 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jun 21 2023 Zdenek Zambersky - 2.3.4-2 -- Added missing dependency on rexml and mime-types - -* Tue May 09 2023 Jarek Prokop - 2.3.4-1 -- Upgrade to Vagrant 2.3.4. - -* Thu Mar 16 2023 Pavel Valena - 2.2.19-10 -- Handle URL properly - -* Sat Jan 21 2023 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Jan 09 2023 Jarek Prokop - 2.2.19-8 -- Enable rubygem-ed25519 requires. - Resolves: rhbz#1962869 - -* Fri Jan 6 2023 Mamoru TASAKA - 2.2.19-7 -- Replace regex match patch with the one by the upstream - -* Mon Dec 26 2022 Mamoru TASAKA - 2.2.19-6 -- Backport upstream fix for ruby3.2 File.exists? removal -- Apply proposal fix for ruby3.2 Object#=~ removal - -* Sat Jul 23 2022 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Mar 11 2022 Pavel Valena - 2.2.19-4 -- Add missing dependency on bin/ps - -* Mon Feb 21 2022 Jarek Prokop - 2.2.19-3 -- Fix FTBFS due to new rspec-mocks. -- Relax required ruby version. - Resolves: rhbz#2053476 - -* Sat Jan 22 2022 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Nov 15 2021 Pavel Valena - 2.2.19-1 -- Upgrade Vagrant to 2.2.19. - Resolves: rhbz#1980195 -- Add zsh autocompletion. -- Relax net-ssh dependency once more. - -* Fri Jul 23 2021 Fedora Release Engineering -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - * Fri Apr 16 2021 Pavel Valena - 2.2.16-1 - Update to Vagrant 2.2.16. Resolves: rhbz#1872307