#35 Update to vagrant 2.3.4 (rebased)
Closed a year ago by jackorp. Opened a year ago by zzambers.
rpms/ zzambers/vagrant vagrant-2.3.4  into  rawhide

file modified
+2 -2
@@ -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

@@ -1,72 +0,0 @@ 

- From 2b1c25d247aba492e582a01cff8ecdd33d4d165b Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>

- 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

- 

@@ -1,52 +0,0 @@ 

- From 60214f4f66ef4fb864aa535c6dccfe5a8b197de8 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>

- 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

- 

@@ -0,0 +1,23 @@ 

+ From 7661eba89a5786a1b0826dbb2f45f8827d9a5103 Mon Sep 17 00:00:00 2001

+ From: sophia <scastellarin95@gmail.com>

+ 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

@@ -0,0 +1,39 @@ 

+ From 9743c857481556838ee417a0033efdee3fb0c7fc Mon Sep 17 00:00:00 2001

+ From: sophia <scastellarin95@gmail.com>

+ 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

@@ -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

file modified
+60 -100
@@ -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.4

+ Release: 1%{?dist}

  Summary: Build and distribute virtualized development environments

  License: MIT

  URL: http://vagrantup.com
@@ -22,28 +22,20 @@ 

  # 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

+ # 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

  

  # The load directive is supported since RPM 4.12, i.e. F21+. The build process

  # fails on older Fedoras.
@@ -60,7 +52,7 @@ 

  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
@@ -113,11 +105,6 @@ 

  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.
@@ -138,13 +125,6 @@ 

  %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

  
@@ -157,12 +137,12 @@ 

  # 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
@@ -184,17 +164,19 @@ 

  

  # 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.

+ # 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
@@ -208,6 +190,18 @@ 

  %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.

+ # Instead of removing the file and patching out any require statements, just make the file empty

+ echo "" > plugins/commands/serve/util/direct_conversions.rb

+ 

+ %patch3 -p1

+ 

+ 

  %build

  gem build %{name}.gemspec

  
@@ -272,6 +266,8 @@ 

  %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
@@ -310,45 +306,25 @@ 

  # 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"]')}
@@ -371,35 +347,6 @@ 

  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 <top (required)>'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:120:in `each'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:120:in `block (3 levels) in <top (required)>'

- #    # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

- # 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 <top (required)>'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:149:in `each'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:149:in `block (4 levels) in <top (required)>'

- #    # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

- # 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 <top (required)>'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:168:in `each'

- #    # ./test/unit/vagrant/util/subprocess_test.rb:168:in `block (4 levels) in <top (required)>'

- #    # /usr/share/gems/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

- # 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"
@@ -476,6 +423,16 @@ 

  %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
@@ -522,6 +479,9 @@ 

  %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb

  

  %changelog

+ * Wed May 03 2023 Zdenek Zambersky <zzambers@redhat.com> - 2.3.0-1

+ - Upgrade to Vagrant 2.3.0.

+ 

  * Thu Mar 16 2023 Pavel Valena <pvalena@redhat.com> - 2.2.19-10

  - Handle URL properly

  

Vagrant updated to 2.3.4. Contains rebased changes from other PR [1], updated net-ssh dependency in spec to accept 7.x.x.

Updated vagrant was tested together with updated net-ssh, net-scp and net-sftp rpms (see my other PRs [2][3][4]). Testing was done in configuration we use, together with vagrant-libvirt, vagrant-sshfs plugins:
- tested basic commands (vagrant --version, vagrant plugin list, vagrant box list, vagrant status, vagrant global-status, vagrant plugin list).
- tested starting and than sshing (using RSA key) to various libvirt (qemu) guests rhel-7, rhel-8, rhel-9 (non-fips and fips), fedora rawhide, worked

Everything worked for me

(btw. I have also done quick testing with existing net-ssh, net-scp and net-sftp rpms package versions, worked OK, just rhel-9+fips did not work (ssh connection did not work), but that was expected, caused by old net-ssh not supporting rsa+sha2)

[1] https://src.fedoraproject.org/rpms/vagrant/pull-request/33
[2] https://src.fedoraproject.org/rpms/rubygem-net-ssh/pull-request/14
[3] https://src.fedoraproject.org/rpms/rubygem-net-scp/pull-request/4
[4] https://src.fedoraproject.org/rpms/rubygem-net-sftp/pull-request/3

The changes across components are mostly LGTM.

The only thing with net-* packages is I'd prefer leaving the archive format as-is, the .tar.xz is enough IMO and I don't see a reason to change it.

Thanks for testing it all out.

Would you mind if I cherry-pick your commit on top of PR#33? I'd like to squash my part of that commit history.

The changes across components are mostly LGTM.

The only thing with net-* packages is I'd prefer leaving the archive format as-is, the .tar.xz is enough IMO and I don't see a reason to change it.

Reason I have changed archive format in some packages was, that .tar.xz does not work out of box using git archive (.tar.gz does). In case of .tar.xz, command (from comment) silently produces plain tar with .tar.xz extension, unless additional configuration of git is done. See my comment:
https://src.fedoraproject.org/rpms/rubygem-net-scp/pull-request/4#comment-139498

If .tar.xz is used, I would at least update comment to explicitly request --format=tar.xz in git archive command, so it would fail, if not configured and not to produce plain tar with wrong extension.

Thanks for testing it all out.

No problem :)

Would you mind if I cherry-pick your commit on top of PR#33? I'd like to squash my part of that commit history.

I wouldn't mind at all, fee free to cherry-pick any changes by me and to do some additional changes in other PRs, if you want.

Thanks, I'll close this PR now, your commit had been included in PR#33

I'll try to review the rest of dependencies and get them into mergeable state this week.

If .tar.xz is used, I would at least update comment to explicitly request --format=tar.xz in git archive command, so it would fail, if not configured and not to produce plain tar with wrong extension.

I like the additional --format. I have never came across an environment where xz archives would be unsupported/fail quietly, but I welcome this kind of enhancement.

I wouldn't mind at all, fee free to cherry-pick any changes by me and to do some additional changes in other PRs, if you want.

Thanks, cuts down time for me on going back and forth on PRs. :)

Pull-Request has been closed by jackorp

a year ago

If .tar.xz is used, I would at least update comment to explicitly request --format=tar.xz in git archive command, so it would fail, if not configured and not to produce plain tar with wrong extension.

I like the additional --format. I have never came across an environment where xz archives would be unsupported/fail quietly, but I welcome this kind of enhancement.

I have seen this on my Fedora 36. (generated tar.xz file was actually plain tar)

Also git-archive man page says that possible values are tar, zip, tar.gz, tgz (other ones need to be configured). Without --format git tries to infer format from filename with fallback to plain tar. From git-archive man page:

   --format=<fmt>
       Format of the resulting archive. Possible values are tar, zip,
       tar.gz, tgz, and any format defined using the configuration option
       tar.<format>.command. If --format is not given, and the output file
       is specified, the format is inferred from the filename if possible
       (e.g. writing to foo.zip makes the output to be in the zip format).
       Otherwise the output format is tar.

This corresponds with behavior, I saw. Explicit --format makes it fail, if format is unsupported/ not configured.

Man page also says how to configure "tar.xz" format in "EXAMPLES" section:

   git config tar.tar.xz.command "xz -c"
       Configure a "tar.xz" format for making LZMA-compressed tarfiles.
       You can use it specifying --format=tar.xz, or by creating an output
       file like -o foo.tar.xz.

I wouldn't mind at all, fee free to cherry-pick any changes by me and to do some additional changes in other PRs, if you want.

Thanks, cuts down time for me on going back and forth on PRs. :)