From e781282c4e85f4111b5a705852daf084ad8b831f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:38:12 +0000 Subject: [PATCH 01/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 8eb1791..dfa63c5 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -500,6 +500,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 43092b81b63fd3f83fed7a9015d382eb48f7013e Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 26 Dec 2022 16:49:25 +0900 Subject: [PATCH 02/19] Backport upstream fix for ruby3.2 File.exists? removal Apply proposal fix for ruby3.2 Object#=~ removal --- ...-ruby32-File_exists-removal-zsh-test.patch | 38 ++++++ ...t-pr12913-ruby32-File_exists-removal.patch | 110 ++++++++++++++++++ ...34-ruby32-object-regex-match-removal.patch | 41 +++++++ vagrant.spec | 18 ++- 4 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch create mode 100644 vagrant-pr12913-ruby32-File_exists-removal.patch create mode 100644 vagrant-pr13034-ruby32-object-regex-match-removal.patch 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 new file mode 100644 index 0000000..7c4a732 --- /dev/null +++ b/vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch @@ -0,0 +1,38 @@ +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-pr12913-ruby32-File_exists-removal.patch b/vagrant-pr12913-ruby32-File_exists-removal.patch new file mode 100644 index 0000000..1f44dd6 --- /dev/null +++ b/vagrant-pr12913-ruby32-File_exists-removal.patch @@ -0,0 +1,110 @@ +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-pr13034-ruby32-object-regex-match-removal.patch b/vagrant-pr13034-ruby32-object-regex-match-removal.patch new file mode 100644 index 0000000..f8af034 --- /dev/null +++ b/vagrant-pr13034-ruby32-object-regex-match-removal.patch @@ -0,0 +1,41 @@ +From 1dd089fc97e44066982cec62b8264dd03b1df531 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Tue, 20 Dec 2022 23:27:59 +0900 +Subject: [PATCH] ansible/provisioner_test: fix for ruby32 Kernel#=~ removal + +Kernel#=~ has done nothing and just has returned nil, and +now with ruby3.2 this deprecated method is removed. + +So for $ bundle exec rake under ruby 3.2, check if variable +really accepts =~ method first. + +Fixes #13028 . +--- + 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..15fb3bbdcf1 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.respond_to?(:=~) && x =~ /^--inventory-file=.+$/ } + 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.respond_to?(:=~) && x =~ /^(--limit=|-l)/ } + if config.raw_arguments +- raw_limits = config.raw_arguments.select { |x| x =~ /^(--limit=|-l)/ } ++ raw_limits = config.raw_arguments.select { |x| x.respond_to?(:=~) && x =~ /^(--limit=|-l)/ } + 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 dfa63c5..ae0be77 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -31,6 +31,15 @@ Patch1: vagrant-2.2.9-do-not-load-dependencies.patch # Fix spec test suite for new rspec-mocks. # https://github.com/hashicorp/vagrant/pull/12699 Patch2: vagrant-2.2.19-fix-3.1-compatibility.patch +# ruby3.2 removes Object#=~ +# https://github.com/hashicorp/vagrant/pull/13034 (currently under review) +Patch3: vagrant-pr13034-ruby32-object-regex-match-removal.patch +# ruby3.2 removes File.exists +# https://github.com/hashicorp/vagrant/pull/12913 +Patch4: vagrant-pr12913-ruby32-File_exists-removal.patch +# and also one more fix for File.exists-removal +# https://github.com/hashicorp/vagrant/commit/2fe4056a7dcf96dd894875b02032a988777e05d4 +Patch5: vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -125,6 +134,9 @@ Documentation for %{name}. %patch0 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 # TODO: package vagrant_cloud, as it is not in Fedora yet %gemspec_remove_dep -s %{name}.gemspec -g vagrant_cloud @@ -500,6 +512,10 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From d06302793543b2f3667aaafa3182928c0c045342 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 6 Jan 2023 21:38:47 +0900 Subject: [PATCH 03/19] Replace regex match patch with the one by the upstream --- ...43-ruby32-object-regex-match-removal.patch | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename vagrant-pr13034-ruby32-object-regex-match-removal.patch => vagrant-pr13043-ruby32-object-regex-match-removal.patch (62%) diff --git a/vagrant-pr13034-ruby32-object-regex-match-removal.patch b/vagrant-pr13043-ruby32-object-regex-match-removal.patch similarity index 62% rename from vagrant-pr13034-ruby32-object-regex-match-removal.patch rename to vagrant-pr13043-ruby32-object-regex-match-removal.patch index f8af034..a78c2a1 100644 --- a/vagrant-pr13034-ruby32-object-regex-match-removal.patch +++ b/vagrant-pr13043-ruby32-object-regex-match-removal.patch @@ -1,21 +1,19 @@ -From 1dd089fc97e44066982cec62b8264dd03b1df531 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Tue, 20 Dec 2022 23:27:59 +0900 -Subject: [PATCH] ansible/provisioner_test: fix for ruby32 Kernel#=~ removal +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 -Kernel#=~ has done nothing and just has returned nil, and -now with ruby3.2 this deprecated method is removed. +This issue surfaced in the tests after updating to Ruby 3.2.0 where +the =~ operator has been removed. -So for $ bundle exec rake under ruby 3.2, check if variable -really accepts =~ method first. - -Fixes #13028 . +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..15fb3bbdcf1 100644 +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( @@ -23,7 +21,7 @@ index f5828f14340..15fb3bbdcf1 100644 expect(args[2]).to eq("--timeout=30") - inventory_count = args.count { |x| x =~ /^--inventory-file=.+$/ } -+ inventory_count = args.count { |x| x.respond_to?(:=~) && 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") @@ -32,10 +30,12 @@ index f5828f14340..15fb3bbdcf1 100644 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.respond_to?(:=~) && 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.respond_to?(:=~) && 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 + + From 4e823ef39dd50ee7dd2fc34580cf98e73b119a8c Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 6 Jan 2023 21:40:18 +0900 Subject: [PATCH 04/19] add spec file change --- vagrant.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vagrant.spec b/vagrant.spec index ae0be77..49b4694 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -32,8 +32,8 @@ Patch1: vagrant-2.2.9-do-not-load-dependencies.patch # https://github.com/hashicorp/vagrant/pull/12699 Patch2: vagrant-2.2.19-fix-3.1-compatibility.patch # ruby3.2 removes Object#=~ -# https://github.com/hashicorp/vagrant/pull/13034 (currently under review) -Patch3: vagrant-pr13034-ruby32-object-regex-match-removal.patch +# https://github.com/hashicorp/vagrant/pull/13043 , extracted minimum required change +Patch3: vagrant-pr13043-ruby32-object-regex-match-removal.patch # ruby3.2 removes File.exists # https://github.com/hashicorp/vagrant/pull/12913 Patch4: vagrant-pr12913-ruby32-File_exists-removal.patch @@ -512,6 +512,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From fb5d878e411b34d942c7301cbd33a3c740244b57 Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Thu, 15 Dec 2022 15:24:36 +0100 Subject: [PATCH 05/19] Enable rubygem-ed25519 requires. The gem is available in Fedora. Group the bcrypt_pbkdf with ed25519 as the ed25519 implementation depends on that gem. Resolves: rhbz#1962869 --- vagrant.spec | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/vagrant.spec b/vagrant.spec index 49b4694..5f48f7d 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -3,11 +3,11 @@ %global vagrant_spec_commit 03d88fe2467716b072951c2b55d78223130851a6 %bcond_without help2man -%bcond_with ed25519 +%bcond_without ed25519 Name: vagrant Version: 2.2.19 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -67,14 +67,16 @@ 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 @@ -179,9 +181,6 @@ sed -i -e '/required_ruby_version/ s/, "< 3.1"//' %{name}.gemspec %gemspec_remove_dep -s %{name}.gemspec -g net-ssh %gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 7'] -# Remove optional dependencies -%gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf - # 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"' \ @@ -192,10 +191,16 @@ sed -i 's/^if Net::SSH::Version::STRING.*$/if true/' \ lib/vagrant/patches/net-ssh.rb %if %{without ed25519} +# Remove optional dependencies +%gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf + %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 %build @@ -512,6 +517,10 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From b9bccaf626d8ecd519a47f0bb59238cefac690cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:03:56 +0000 Subject: [PATCH 06/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 5f48f7d..459476b 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -517,6 +517,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 5f94d1453b60395f6c31a1912b8c66cd11cc4e1a Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Thu, 16 Mar 2023 18:04:04 +0100 Subject: [PATCH 07/19] Prevent trailing space character on user agent https://github.com/hashicorp/vagrant/pull/12925/ Resolves: rhbz#2177215 --- vagrant-2.3.1-Fix-downloader-user-agent.patch | 21 +++++++++++++++++++ vagrant.spec | 10 ++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 vagrant-2.3.1-Fix-downloader-user-agent.patch diff --git a/vagrant-2.3.1-Fix-downloader-user-agent.patch b/vagrant-2.3.1-Fix-downloader-user-agent.patch new file mode 100644 index 0000000..6085623 --- /dev/null +++ b/vagrant-2.3.1-Fix-downloader-user-agent.patch @@ -0,0 +1,21 @@ +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.spec b/vagrant.spec index 459476b..6e61490 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -40,6 +40,10 @@ Patch4: vagrant-pr12913-ruby32-File_exists-removal.patch # and also one more fix for File.exists-removal # https://github.com/hashicorp/vagrant/commit/2fe4056a7dcf96dd894875b02032a988777e05d4 Patch5: vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch +# Prevent trailing space character on user agent +# https://bugzilla.redhat.com/show_bug.cgi?id=2177215 +# https://github.com/hashicorp/vagrant/pull/12925/ +Patch6: vagrant-2.3.1-Fix-downloader-user-agent.patch # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -139,6 +143,7 @@ Documentation for %{name}. %patch3 -p1 %patch4 -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 @@ -517,6 +522,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 9132acfcfcec68437e957fe3c2b13d5d0df24d3f Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Thu, 29 Sep 2022 22:52:30 +0200 Subject: [PATCH 08/19] Upgrade to Vagrant 2.3.0 also upgrade vagrant-spec to newest commit. --- vagrant-2.2.19-fix-3.1-compatibility.patch | 72 ------------------- ...2.3-Fix-fake_ftp-0.3.x-compatibility.patch | 52 -------------- vagrant.spec | 40 +++-------- 3 files changed, 11 insertions(+), 153 deletions(-) delete mode 100644 vagrant-2.2.19-fix-3.1-compatibility.patch delete mode 100644 vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch diff --git a/vagrant-2.2.19-fix-3.1-compatibility.patch b/vagrant-2.2.19-fix-3.1-compatibility.patch deleted file mode 100644 index 2056f71..0000000 --- a/vagrant-2.2.19-fix-3.1-compatibility.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 2b1c25d247aba492e582a01cff8ecdd33d4d165b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= -Date: Mon, 28 Feb 2022 10:46:17 +0100 -Subject: [PATCH 1/2] Stop using the last argument as kwargs in unit tests - -A few unit tests started failing with Ruby 3.0, because they were relying on -keyword arguments being converted into hashes automatically. This behavior was -deprecated in Ruby 2.7 and results in errors in Ruby 3.0 onward. - -For further details: -https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments ---- - test/unit/plugins/commands/package/command_test.rb | 4 ++-- - .../plugins/providers/hyperv/action/read_guest_ip_test.rb | 2 +- - test/unit/vagrant/ui_test.rb | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/test/unit/plugins/commands/package/command_test.rb b/test/unit/plugins/commands/package/command_test.rb -index 7b289bd1e3a..d0f81393bf6 100644 ---- a/test/unit/plugins/commands/package/command_test.rb -+++ b/test/unit/plugins/commands/package/command_test.rb -@@ -64,7 +64,7 @@ - - it "packages default machine inside specified folder" do - expect(package_command).to receive(:package_vm).with( -- a_machine_named('default'), :output => "package-output-folder/default" -+ a_machine_named('default'), { output: "package-output-folder/default" } - ) - package_command.execute - end -@@ -96,7 +96,7 @@ - let(:argv){ ['--base', 'machine-id'] } - - it "packages vm defined within virtualbox" do -- expect(package_command).to receive(:package_base).with(:base => 'machine-id') -+ expect(package_command).to receive(:package_base).with({ base: 'machine-id' }) - package_command.execute - end - -diff --git a/test/unit/plugins/providers/hyperv/action/read_guest_ip_test.rb b/test/unit/plugins/providers/hyperv/action/read_guest_ip_test.rb -index 5642c6271f1..ecce003a602 100644 ---- a/test/unit/plugins/providers/hyperv/action/read_guest_ip_test.rb -+++ b/test/unit/plugins/providers/hyperv/action/read_guest_ip_test.rb -@@ -31,7 +31,7 @@ - end - - it "should set the host information into the env" do -- expect(env).to receive(:[]=).with(:machine_ssh_info, host: "ADDRESS") -+ expect(env).to receive(:[]=).with(:machine_ssh_info, { host: "ADDRESS" }) - expect(driver).to receive(:read_guest_ip).and_return("ip" => "ADDRESS") - subject.call(env) - end -diff --git a/test/unit/vagrant/ui_test.rb b/test/unit/vagrant/ui_test.rb -index e484b81543b..120b1dda2a6 100644 ---- a/test/unit/vagrant/ui_test.rb -+++ b/test/unit/vagrant/ui_test.rb -@@ -379,12 +379,12 @@ - - describe "#machine" do - it "sets the target option" do -- expect(ui).to receive(:machine).with(:foo, target: prefix) -+ expect(ui).to receive(:machine).with(:foo, { target: prefix }) - subject.machine(:foo) - end - - it "preserves existing options" do -- expect(ui).to receive(:machine).with(:foo, :bar, foo: :bar, target: prefix) -+ expect(ui).to receive(:machine).with(:foo, :bar, { foo: :bar, target: prefix }) - subject.machine(:foo, :bar, foo: :bar) - 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 deleted file mode 100644 index 3b4b484..0000000 --- a/vagrant-2.2.3-Fix-fake_ftp-0.3.x-compatibility.patch +++ /dev/null @@ -1,52 +0,0 @@ -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.spec b/vagrant.spec index 6e61490..834f964 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 03d88fe2467716b072951c2b55d78223130851a6 +%global vagrant_spec_commit a88825f4cb254b703d0f9235667223f02ad5c600 %bcond_without help2man %bcond_without ed25519 Name: vagrant -Version: 2.2.19 -Release: 10%{?dist} +Version: 2.3.0 +Release: 1%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -22,28 +22,9 @@ Source2: https://github.com/hashicorp/%{name}-spec/archive/%{vagrant_spec_commit # 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 -# Fix spec test suite for new rspec-mocks. -# https://github.com/hashicorp/vagrant/pull/12699 -Patch2: vagrant-2.2.19-fix-3.1-compatibility.patch -# ruby3.2 removes Object#=~ -# https://github.com/hashicorp/vagrant/pull/13043 , extracted minimum required change -Patch3: vagrant-pr13043-ruby32-object-regex-match-removal.patch -# ruby3.2 removes File.exists -# https://github.com/hashicorp/vagrant/pull/12913 -Patch4: vagrant-pr12913-ruby32-File_exists-removal.patch -# and also one more fix for File.exists-removal -# https://github.com/hashicorp/vagrant/commit/2fe4056a7dcf96dd894875b02032a988777e05d4 -Patch5: vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch -# Prevent trailing space character on user agent -# https://bugzilla.redhat.com/show_bug.cgi?id=2177215 -# https://github.com/hashicorp/vagrant/pull/12925/ -Patch6: vagrant-2.3.1-Fix-downloader-user-agent.patch # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -138,13 +119,6 @@ Documentation for %{name}. %prep %setup -q -b2 -%patch0 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -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 @@ -186,6 +160,11 @@ sed -i -e '/required_ruby_version/ s/, "< 3.1"//' %{name}.gemspec %gemspec_remove_dep -s %{name}.gemspec -g net-ssh %gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 7'] +# Remove optional dependencies +%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"' \ @@ -522,6 +501,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* Thu Sep 29 2022 Pavel Valena - 2.3.0-1 +- Upgrade to Vagrant 2.3.0. + * Thu Mar 16 2023 Pavel Valena - 2.2.19-10 - Handle URL properly From 8185bb5452c40e7e16fe60a9210bcf2690fc7cb8 Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Tue, 21 Mar 2023 12:57:47 +0100 Subject: [PATCH 09/19] Rebase to 2.3.4 Remove test adjustments. Fixes mentioning GH#{11606,12362,12363} are present. Remove test adjustments for Ruby 2.7 compatibility. There is a much newer Ruby available in Fedora. Newer childprocess is present in Fedora for some time now. We can stop grepping for failures. Remove test adjustment for fake_ftp 0.3.0 compatibility. Not required anymore. Remove obsolete for vagrant-atomic that was retired in F26. Remove the net-ssh patch. It is not present anymore in the new version. And we are going to have net-ssh >= 7. --- sources | 4 +- ...e-loading-of-direct_conversions-file.patch | 41 ++++++ ...not-accessible-if-EROFS-error-occurs.patch | 23 +++ ...k-for-arguments-matching-test-string.patch | 39 ++++++ vagrant-2.3.4-remove_grpc.patch | 70 ++++++++++ vagrant.spec | 131 ++++++++---------- 6 files changed, 233 insertions(+), 75 deletions(-) create mode 100644 vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch create mode 100644 vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch create mode 100644 vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch create mode 100644 vagrant-2.3.4-remove_grpc.patch diff --git a/sources b/sources index 0973e45..b967078 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v2.2.19.tar.gz) = 24a2e5baeac5cf8c45c012cf70dd4132b1dc7a6a5bab19d1046c91cc88e669356e2e5676d96eda6ed7293ff19ada974954969a4a59b9e4a30e2d95de27fa64e4 -SHA512 (vagrant-spec-03d88fe2467716b072951c2b55d78223130851a6.tar.gz) = 3b062cbec04f98355f939c2bf27d35ddcd2bbe0a0734677832d4a656320b44c64b6284e0877dd55e496055e2b969755e1bdc78225010f75ddaafe8f8c8f78a66 +SHA512 (v2.3.4.tar.gz) = 0d47e57c3c190743b4d0484ba1e48e3aad73ced3b356f0a4e54b66649eab2bd5d3fc57a06c62b4cc7d6c8e4617ef18a283c03d01553cc575c0884e464a27b501 +SHA512 (vagrant-spec-a88825f4cb254b703d0f9235667223f02ad5c600.tar.gz) = 50e4e2c9e69ccb0309876d204d8d66f606188e1d11853071a74819fe75126ed65fa3d02a31bdf2f8e29679a81d12fa2daed806eba034532c8150fe53d749fb84 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 new file mode 100644 index 0000000..2d2ee21 --- /dev/null +++ b/vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..2afd734 --- /dev/null +++ b/vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch @@ -0,0 +1,23 @@ +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-Only-check-for-arguments-matching-test-string.patch b/vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch new file mode 100644 index 0000000..50ae417 --- /dev/null +++ b/vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..27c12d6 --- /dev/null +++ b/vagrant-2.3.4-remove_grpc.patch @@ -0,0 +1,70 @@ +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.spec b/vagrant.spec index 834f964..75c286a 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -6,7 +6,7 @@ %bcond_without ed25519 Name: vagrant -Version: 2.3.0 +Version: 2.3.4 Release: 1%{?dist} Summary: Build and distribute virtualized development environments License: MIT @@ -25,6 +25,21 @@ Source4: macros.vagrant # 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 # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -94,11 +109,6 @@ 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. @@ -131,12 +141,12 @@ sed -i '/^\s*command(:login) do$/,/\s*end$/ s/^/#/g' plugins/commands/login/plug # 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.1"//' %{name}.gemspec +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 '~> 3.0' +%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 '~> 3.0.0' +%gemspec_remove_dep -s %{name}.gemspec -g net-scp '~> 4.0' %gemspec_add_dep -s %{name}.gemspec -g net-scp '>= 1.2.0' # We have newer version in Fedora @@ -160,20 +170,17 @@ sed -i -e '/required_ruby_version/ s/, "< 3.1"//' %{name}.gemspec %gemspec_remove_dep -s %{name}.gemspec -g net-ssh %gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 7'] -# Remove optional dependencies +# 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 -# 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} # Remove optional dependencies %gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf @@ -187,6 +194,20 @@ sed -i '/^ require .net\/ssh\/authentication\/ed25519.$/,/^ end$/ s/^/#/' \ %gemspec_add_dep -s %{name}.gemspec -g ed25519 ['>= 1.2.4', '< 1.4'] %endif +# Let's get rid of protobuf related components +%patch2 -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. +%patch5 -p1 + +%patch3 -p1 + + %build gem build %{name}.gemspec @@ -251,6 +272,8 @@ 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 @@ -289,45 +312,26 @@ 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"]')} @@ -350,35 +354,6 @@ export RUBYOPT rake -f tasks/test.rake test:unit \ | tee error.log -# 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 ' -# Note: failures will dissapear when rubygem-childprocess update PR is merged -# https://src.fedoraproject.org/rpms/rubygem-childprocess/pull-request/2/ -grep -E ', (3|0) 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" @@ -455,6 +430,16 @@ 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 @@ -501,8 +486,8 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog -* Thu Sep 29 2022 Pavel Valena - 2.3.0-1 -- Upgrade to Vagrant 2.3.0. +* 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 From da2ecf8f8b192875783f9f374bbfc83ee612aa99 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 3 May 2023 21:56:43 +0200 Subject: [PATCH 10/19] Updated net-ssh version --- vagrant.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vagrant.spec b/vagrant.spec index 75c286a..f6469e1 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -56,7 +56,7 @@ 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) < 7) +Requires: (rubygem(net-ssh) >= 5.2.0 with rubygem(net-ssh) < 8) Requires: rubygem(net-scp) >= 1.2.0 Requires: rubygem(net-sftp) >= 2.1 Requires: rubygem(rest-client) >= 1.6.0 @@ -168,7 +168,7 @@ sed -i -e '/required_ruby_version/ s/, "< 3.2"//' %{name}.gemspec # 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', '< 7'] +%gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 8'] # Remove "optional" dependencies # This seems like prelude for the in-development golang backend. From 3d99b8052b527e37451fe954dcaaaf9c998402cb Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 21 Jun 2023 18:09:37 +0200 Subject: [PATCH 11/19] Added missing dependency on rexml and mime-types --- vagrant.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index f6469e1..1936401 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -62,6 +62,8 @@ 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 @@ -102,6 +104,8 @@ 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 @@ -486,6 +490,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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. From 1965e286b6c151ca19c6413791a6c22fd5b866ef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:22:23 +0000 Subject: [PATCH 12/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 1936401..60cc94b 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -490,6 +490,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From beac2b546acdabb35680b4ef2421aaa8bdc55d04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:25:23 +0000 Subject: [PATCH 13/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 60cc94b..37e68ff 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -490,6 +490,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 2a16199df0093b5775e94a32c3cae890907fd0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 7 Feb 2024 11:14:23 +0100 Subject: [PATCH 14/19] Drop superfluous rest-client dependency. The dependency was dropped in Vagrant 2.2.11 already: https://github.com/hashicorp/vagrant/commit/3ec8d44cf9abaf825bffaf7674829f5006d978f0 https://github.com/hashicorp/vagrant/pull/11916 --- vagrant.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vagrant.spec b/vagrant.spec index 37e68ff..9b7edce 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -59,7 +59,6 @@ Requires: rubygem(log4r) >= 1.1.9 Requires: (rubygem(net-ssh) >= 5.2.0 with rubygem(net-ssh) < 8) 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) @@ -96,7 +95,6 @@ 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) @@ -490,6 +488,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 7dc964d6011521a704cfeb78d886ab8c0391875b Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:47:07 +0200 Subject: [PATCH 15/19] Eliminate use of obsolete %patchN syntax (#2283636) --- vagrant.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vagrant.spec b/vagrant.spec index 9b7edce..7415350 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -197,7 +197,7 @@ sed -i '/^ require .net\/ssh\/authentication\/ed25519.$/,/^ end$/ s/^/#/' \ %endif # Let's get rid of protobuf related components -%patch2 -p16 +%patch 2 -p16 %gemspec_remove_file -s %{name}.gemspec Dir.glob('lib/vagrant/protobufs/**/*.*') # This file contains monkey patching and compatibility for Protobuf serialization. @@ -205,9 +205,9 @@ sed -i '/^ require .net\/ssh\/authentication\/ed25519.$/,/^ end$/ s/^/#/' \ %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. -%patch5 -p1 +%patch 5 -p1 -%patch3 -p1 +%patch 3 -p1 %build From 5f0fa4cc2bebcc8fc3b5fb9033b67c7efca9195f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:31:17 +0000 Subject: [PATCH 16/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 7415350..6f5c5a0 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -488,6 +488,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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. From 28f6e257f9df947e327d693daab09c42aefb0249 Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Thu, 16 Jan 2025 14:16:03 +0100 Subject: [PATCH 17/19] Fix default URL used for pulling boxes. The default URL to pull vagrant boxes changed. Fixing it allows the boxes to be pulled again. Resolves: rhbz#2337302 --- ...efault-vagrant-URL-for-pulling-boxes.patch | 22 +++++++++++++++++++ vagrant.spec | 12 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch 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 new file mode 100644 index 0000000..c181831 --- /dev/null +++ b/vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch @@ -0,0 +1,22 @@ +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.spec b/vagrant.spec index 6f5c5a0..3d8cdea 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -40,6 +40,10 @@ Patch4: vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch # 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 # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -209,6 +213,8 @@ rm -rf plugins/commands/serve/util/direct_conversions.rb %patch 3 -p1 +%patch 6 -p1 + %build gem build %{name}.gemspec @@ -488,6 +494,10 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From 098ed181ad80620c814dce95699f05ea107b8096 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:56:03 +0000 Subject: [PATCH 18/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- vagrant.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index 3d8cdea..ef07b0c 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -494,6 +494,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* 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 From dd512fa319e8f2504180e13d638a7f0f7262e4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 22 Dec 2025 12:51:06 +0100 Subject: [PATCH 19/19] Relax `rubygem(rubyzip)` dependency This is in preparation for getting rubyzip 3.0+ into Fedora. --- vagrant.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vagrant.spec b/vagrant.spec index ef07b0c..224083e 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.3.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -158,6 +158,8 @@ sed -i -e '/required_ruby_version/ s/, "< 3.2"//' %{name}.gemspec # 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' # Remove Windows specific dependencies %gemspec_remove_dep -s %{name}.gemspec -g wdm @@ -494,6 +496,9 @@ 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