#4 Forwards master onto F27 - Update to Vagrant 2.0.1
Merged 6 years ago by pvalena. Opened 6 years ago by pvalena.
rpms/ pvalena/vagrant rebase-f27  into  f27

file modified
+2 -2
@@ -1,2 +1,2 @@ 

- SHA512 (vagrant-1.9.8.tar.gz) = d22cc0a6800aa5ef84085c750f5ec8729f7b3adefd9a5df1a1fcaf60d1219e781869ede4f57ce4fdeb269224603dfc3a8024545a0250ebd9e144745ce9aa670b

- SHA512 (vagrant-spec-e623a5694912c539ac2657e38a372d5e8c93441d.tar.gz) = dd480f06b3be740f368354a3d15bf4bba2982d72c6368c10b72596e8263c2c2fb5179c07f8aea8d9e77e9e2b7792e6f8562a9abb3c2e8861969effb5825a908c

+ SHA512 (vagrant-2.0.1.tar.gz) = 4458fd819cfcbf732dcbb5e334986afc986e3da4f4ea883260ed9b7ff8dd90ef9b0078c067a1bf7fbf51562f235ab447234762a38aa0ac539974f6205f6d9cfd

+ SHA512 (vagrant-spec-7ac8b4191de578e345b29acaf62ecc72c8e73be1.tar.gz) = 49482df5a17f0a01b6e1645b2f9fbc1bac2c7e04d7c41f00284b52336513ef1876845e09ba21af3de196b196faa29809ac00655fe61d4ab4d800b8d83df8c6cc

@@ -1,63 +0,0 @@ 

- diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb

- index 31354a7..f2dfd0f 100644

- --- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb

- +++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb

- @@ -497,55 +497,6 @@ VF

-        end

-      end

-  

- -    context "with winrm communicator" do

- -

- -      let(:iso_winrm_env) do

- -        env = isolated_environment

- -        env.vagrantfile <<-VF

- -Vagrant.configure("2") do |config|

- -  config.winrm.username = 'winner'

- -  config.winrm.password = 'winword'

- -  config.winrm.transport = :ssl

- -

- -  config.vm.define :machine1 do |machine|

- -    machine.vm.box = "winbox"

- -    machine.vm.communicator = :winrm

- -  end

- -end

- -VF

- -        env.create_vagrant_env

- -      end

- -

- -      let(:machine) { iso_winrm_env.machine(iso_winrm_env.machine_names[0], :dummy) }

- -

- -      it_should_set_arguments_and_environment_variables

- -

- -      it "generates an inventory with winrm connection settings" do

- -

- -        expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|

- -          expect(config.inventory_path).to be_nil

- -          expect(File.exists?(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")

- -        }.and_return(default_execute_result)

- -      end

- -

- -      describe "with force_remote_user option disabled" do

- -        before do

- -          config.force_remote_user = false

- -        end

- -

- -        it "doesn't set the ansible remote user in inventory and use '--user' argument with the vagrant ssh username" do

- -          expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|

- -            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_pass='winword'\n")

- -            expect(args).to include("--user=testuser")

- -          }.and_return(default_execute_result)

- -        end

- -      end

- -    end

-  

-      describe "with inventory_path option" do

-        before do

- -- 

- 2.5.0

- 

@@ -1,171 +0,0 @@ 

- From 3cdd1d09f9617e6005fc643000b5486ffbe22577 Mon Sep 17 00:00:00 2001

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

- Date: Tue, 14 Feb 2017 10:13:29 +0100

- Subject: [PATCH 1/2] Use Integer instead of Fixnum for Ruby 2.4+

-  compatibility.

- 

- ---

-  lib/vagrant/cli.rb                                  | 2 +-

-  lib/vagrant/plugin/v2/communicator.rb               | 2 +-

-  lib/vagrant/registry.rb                             | 2 +-

-  plugins/provisioners/shell/config.rb                | 4 ++--

-  plugins/pushes/local-exec/config.rb                 | 4 ++--

-  test/unit/plugins/provisioners/shell/config_test.rb | 6 +++---

-  test/unit/plugins/pushes/local-exec/config_test.rb  | 4 ++--

-  7 files changed, 12 insertions(+), 12 deletions(-)

- 

- diff --git a/lib/vagrant/cli.rb b/lib/vagrant/cli.rb

- index a6e9655f0..cca8c0184 100644

- --- a/lib/vagrant/cli.rb

- +++ b/lib/vagrant/cli.rb

- @@ -45,7 +45,7 @@ module Vagrant

-          result = 1

-        end

-  

- -      result = 0 if !result.is_a?(Fixnum)

- +      result = 0 if !result.is_a?(Integer)

-        return result

-      end

-  

- diff --git a/lib/vagrant/plugin/v2/communicator.rb b/lib/vagrant/plugin/v2/communicator.rb

- index 511fb6002..41385f486 100644

- --- a/lib/vagrant/plugin/v2/communicator.rb

- +++ b/lib/vagrant/plugin/v2/communicator.rb

- @@ -50,7 +50,7 @@ module Vagrant

-          # until then. It will wait up to the given duration or raise an

-          # exception if something goes wrong.

-          #

- -        # @param [Fixnum] duration Timeout in seconds.

- +        # @param [Integer] duration Timeout in seconds.

-          # @return [Boolean] Will return true on successful connection

-          #   or false on timeout.

-          def wait_for_ready(duration)

- diff --git a/lib/vagrant/registry.rb b/lib/vagrant/registry.rb

- index d84a745a5..c0c4e1bad 100644

- --- a/lib/vagrant/registry.rb

- +++ b/lib/vagrant/registry.rb

- @@ -52,7 +52,7 @@ module Vagrant

-  

-      # Return the number of elements in this registry.

-      #

- -    # @return [Fixnum]

- +    # @return [Integer]

-      def length

-        @items.keys.length

-      end

- diff --git a/plugins/provisioners/shell/config.rb b/plugins/provisioners/shell/config.rb

- index 049eb15d0..05da320e3 100644

- --- a/plugins/provisioners/shell/config.rb

- +++ b/plugins/provisioners/shell/config.rb

- @@ -106,10 +106,10 @@ module VagrantPlugins

-        def args_valid?

-          return true if !args

-          return true if args.is_a?(String)

- -        return true if args.is_a?(Fixnum)

- +        return true if args.is_a?(Integer)

-          if args.is_a?(Array)

-            args.each do |a|

- -            return false if !a.kind_of?(String) && !a.kind_of?(Fixnum)

- +            return false if !a.kind_of?(String) && !a.kind_of?(Integer)

-            end

-  

-            return true

- diff --git a/plugins/pushes/local-exec/config.rb b/plugins/pushes/local-exec/config.rb

- index d62dfa8fa..9ed466088 100644

- --- a/plugins/pushes/local-exec/config.rb

- +++ b/plugins/pushes/local-exec/config.rb

- @@ -63,10 +63,10 @@ module VagrantPlugins

-        def args_valid?

-          return true if !args

-          return true if args.is_a?(String)

- -        return true if args.is_a?(Fixnum)

- +        return true if args.is_a?(Integer)

-          if args.is_a?(Array)

-            args.each do |a|

- -            return false if !a.kind_of?(String) && !a.kind_of?(Fixnum)

- +            return false if !a.kind_of?(String) && !a.kind_of?(Integer)

-            end

-  

-            return true

- diff --git a/test/unit/plugins/provisioners/shell/config_test.rb b/test/unit/plugins/provisioners/shell/config_test.rb

- index c4d260b90..905a28b03 100644

- --- a/test/unit/plugins/provisioners/shell/config_test.rb

- +++ b/test/unit/plugins/provisioners/shell/config_test.rb

- @@ -30,7 +30,7 @@ describe "VagrantPlugins::Shell::Config" do

-        expect(result["shell provisioner"]).to eq([])

-      end

-  

- -    it "passes with fixnum args" do

- +    it "passes with integer args" do

-        subject.path = file_that_exists

-        subject.args = 1

-        subject.finalize!

- @@ -112,7 +112,7 @@ describe "VagrantPlugins::Shell::Config" do

-    end

-  

-    describe 'finalize!' do

- -    it 'changes fixnum args into strings' do

- +    it 'changes integer args into strings' do

-        subject.path = file_that_exists

-        subject.args = 1

-        subject.finalize!

- @@ -120,7 +120,7 @@ describe "VagrantPlugins::Shell::Config" do

-        expect(subject.args).to eq '1'

-      end

-  

- -    it 'changes fixnum args in arrays into strings' do

- +    it 'changes integer args in arrays into strings' do

-        subject.path = file_that_exists

-        subject.args = ["string", 1, 2]

-        subject.finalize!

- diff --git a/test/unit/plugins/pushes/local-exec/config_test.rb b/test/unit/plugins/pushes/local-exec/config_test.rb

- index 1bde10d98..9442b6420 100644

- --- a/test/unit/plugins/pushes/local-exec/config_test.rb

- +++ b/test/unit/plugins/pushes/local-exec/config_test.rb

- @@ -70,7 +70,7 @@ describe VagrantPlugins::LocalExecPush::Config do

-            expect(errors).to be_empty

-          end

-  

- -        it "passes with fixnum args" do

- +        it "passes with integer args" do

-            subject.args = 1

-            expect(errors).to be_empty

-          end

- @@ -118,7 +118,7 @@ describe VagrantPlugins::LocalExecPush::Config do

-            expect(errors).to be_empty

-          end

-  

- -        it "passes with fixnum args" do

- +        it "passes with integer args" do

-            subject.args = 1

-            expect(errors).to be_empty

-          end

- -- 

- 2.11.1

- 

- 

- From 6d269293e37db86325bec0a17502d68838d28214 Mon Sep 17 00:00:00 2001

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

- Date: Tue, 14 Feb 2017 10:33:58 +0100

- Subject: [PATCH 2/2] Do not use deprecated API.

- 

- ---

-  lib/vagrant/util/keypair.rb | 2 +-

-  1 file changed, 1 insertion(+), 1 deletion(-)

- 

- diff --git a/lib/vagrant/util/keypair.rb b/lib/vagrant/util/keypair.rb

- index 342d3264f..5e3d10ea6 100644

- --- a/lib/vagrant/util/keypair.rb

- +++ b/lib/vagrant/util/keypair.rb

- @@ -26,7 +26,7 @@ module Vagrant

-          private_key = rsa_key.to_pem

-  

-          if password

- -          cipher      = OpenSSL::Cipher::Cipher.new('des3')

- +          cipher      = OpenSSL::Cipher.new('des3')

-            private_key = rsa_key.to_pem(cipher, password)

-          end

-  

- -- 

- 2.11.1

- 

@@ -1,27 +0,0 @@ 

- From 7486aa2ce950f55a4be9049d514c412d7e45ddef Mon Sep 17 00:00:00 2001

- From: Pavel Valena <pvalena@redhat.com>

- Date: Thu, 20 Jul 2017 15:01:06 +0200

- Subject: [PATCH] Use system certificates

- 

- ---

-  lib/vagrant/util/downloader.rb |  5 +++--

-  1 files changed, 3 insertions(+), 2 deletions(-)

- 

- diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb

- index 03e6238..9a02a85 100644

- --- a/lib/vagrant/util/downloader.rb

- +++ b/lib/vagrant/util/downloader.rb

- @@ -297,8 +297,9 @@ module Vagrant

-          # If we're in Vagrant, then we use the packaged CA bundle

-          if Vagrant.in_installer?

-            subprocess_options[:env] ||= {}

- -          subprocess_options[:env]["CURL_CA_BUNDLE"] =

- -            File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])

- +	  #Use system certificates.

- +          #subprocess_options[:env]["CURL_CA_BUNDLE"] =

- +          #  File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])

-          end

-  

-          return [options, subprocess_options]

- -- 

- 2.5.0

vagrant-2.0.1-fix-dependencies.patch vagrant-1.9.8-fix-dependencies.patch
file renamed
+11 -7
@@ -1,21 +1,21 @@ 

  From 7486aa2ce950f55a4be9049d514c412d7e45ddef Mon Sep 17 00:00:00 2001

  From: Pavel Valena <pvalena@redhat.com>

  Date: Thu, 20 Jul 2017 15:01:06 +0200

- Subject: [PATCH] Fix dependencies for Vagrant 1.9.7.

+ Subject: [PATCH] Fix dependencies for Vagrant 2.0.1.

  

  ---

-  vagrant.gemspec |   23 +++++++++++++----------

-  1 file changed, 13 insertions(+), 10 deletions(-)

+  vagrant.gemspec |   25 ++++++++++++++-----------

+  1 file changed, 14 insertions(+), 11 deletions(-)

  

  diff --git a/vagrant.gemspec b/vagrant.gemspec

  index c92ca17..aeee52f 100644

  --- a/vagrant.gemspec

  +++ b/vagrant.gemspec

- @@ -12,31 +12,34 @@ Gem::Specification.new do |s|

+ @@ -12,35 +12,38 @@ Gem::Specification.new do |s|

     s.summary       = "Build and distribute virtualized development environments."

     s.description   = "Vagrant is a tool for building and distributing virtualized development environments."

   

- -  s.required_ruby_version     = "~> 2.2", "< 2.4"

+ -  s.required_ruby_version     = "~> 2.2", "< 2.5"

  +  s.required_ruby_version     = "~> 2.2"

     s.required_rubygems_version = ">= 1.3.6"

     s.rubyforge_project         = "vagrant"
@@ -56,6 +56,10 @@ 

   

     # Constraint rake to properly handle deprecated method usage

     # from within rspec

+ -  s.add_development_dependency "rake", "~> 12.0.0"

+ +  s.add_development_dependency "rake", "~> 12.2.0"

+    s.add_development_dependency "rspec", "~> 3.5.0"

+    s.add_development_dependency "rspec-its", "~> 1.2.0"

+    s.add_development_dependency "webmock", "~> 2.3.1"

  -- 

- 2.7.5

- 

+ 2.13.6

file modified
+23 -21
@@ -1,10 +1,10 @@ 

  %global bashcompletion_dir %(pkg-config --variable=completionsdir bash-completion 2> /dev/null || :)

  

- %global vagrant_spec_commit e623a5694912c539ac2657e38a372d5e8c93441d

+ %global vagrant_spec_commit 7ac8b4191de578e345b29acaf62ecc72c8e73be1

  

  Name: vagrant

- Version: 1.9.8

- Release: 2%{?dist}

+ Version: 2.0.1

+ Release: 1%{?dist}

  Summary: Build and distribute virtualized development environments

  Group: Development/Languages

  License: MIT
@@ -14,7 +14,7 @@ 

  Source1: binstub

  # The library has no official release yet. But since it is just test

  # dependency, it should be fine to include the source right here.

- # wget https://github.com/mitchellh/vagrant-spec/archive/2f0fb10862b2d19861c584be9d728080ba1f5d33/vagrant-spec-2f0fb10862b2d19861c584be9d728080ba1f5d33.tar.gz

+ # wget https://github.com/mitchellh/vagrant-spec/archive/7ac8b4191de578e345b29acaf62ecc72c8e73be1/vagrant-spec-7ac8b4191de578e345b29acaf62ecc72c8e73be1.tar.gz

  Source2: https://github.com/mitchellh/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz

  # Monkey-patching needed for Vagrant to work until the respective patches

  # for RubyGems and Bundler are in place
@@ -24,17 +24,7 @@ 

  # fails on older Fedoras.

  %{?load:%{SOURCE4}}

  

- Patch0: vagrant-1.9.8-fix-dependencies.patch

- 

- # Disable ansible winrm tests 

- Patch1: vagrant-1.8.1-disable-winrm-tests.patch

- 

- # Use Integer instead of Fixnum for Ruby 2.4+ compatibility.

- # https://github.com/mitchellh/vagrant/pull/8284

- Patch2: vagrant-1.9.1-Fix-Ruby-2.4-compatibility.patch

- 

- # Use system certificates(split to standalone patch)

- Patch3: vagrant-1.9.8-use-system-certificates.patch

+ Patch0: vagrant-2.0.1-fix-dependencies.patch

  

  Requires: ruby(release)

  Requires: ruby(rubygems) >= 1.3.6
@@ -77,6 +67,7 @@ 

  BuildRequires: rubygem(webmock)

  BuildRequires: rubygem(fake_ftp)

  BuildRequires: pkgconfig(bash-completion)

+ BuildRequires: %{_bindir}/ssh

  BuildArch: noarch

  

  # vagrant-atomic was retired in F26, since it was merged into Vagrant.
@@ -106,9 +97,6 @@ 

  %setup -q -b2

  

  %patch0 -p1

- %patch1 -p1

- %patch2 -p1

- %patch3 -p1

  

  %build

  gem build %{name}.gemspec
@@ -174,8 +162,12 @@ 

  # Remove the git reference, which is useless in our case.

  sed -i '/git/ s/^/#/' ../vagrant-spec/vagrant-spec.gemspec

  

- # Relax the thor dependency, since Fedora ships with newer version.

+ # Relax the dependencies, since Fedora ships with newer versions.

  sed -i '/thor/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec

+ sed -i '/rspec/ s/~>/>=/' ./vagrant.gemspec

+ sed -i '/rspec/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec

+ # TODO: package newer childproccess

+ sed -i '/childprocess/ s/~>/<=/' ../vagrant-spec/vagrant-spec.gemspec

  

  #Insert new test dependencies

  sed -i '25 i\  spec.add_dependency "webmock"' ../vagrant-spec/vagrant-spec.gemspec
@@ -185,9 +177,16 @@ 

  rm -rf test/unit/plugins/communicators/winrm

  sed -i '/it "eager loads WinRM" do/,/^      end$/ s/^/#/' test/unit/vagrant/machine_test.rb

  sed -i '/it "should return the specified communicator if given" do/,/^    end$/ s/^/#/' test/unit/vagrant/machine_test.rb

+ sed -i '/^    context "with winrm communicator" do$/,/^    end$/ s/^/#/' \

+   test/unit/plugins/provisioners/ansible/provisioner_test.rb

+ 

+ # Disable test that requires bundler

+ # https://github.com/hashicorp/vagrant/issues/9273

+ mv test/unit/vagrant/util/env_test.rb{,.disable}

+ 

+ # Rake solves the requires issues for tests

+ rake -f tasks/test.rake test:unit

  

- # Test suite must be executed in order.

- ruby -I.:lib -e 'Dir.glob("test/unit/**/*_test.rb").sort.each &method(:require)'

  

  %pre

  getent group vagrant >/dev/null || groupadd -r vagrant
@@ -304,6 +303,9 @@ 

  

  

  %changelog

+ * Mon Dec 18 2017 Pavel Valena <pvalena@redhat.com> - 2.0.1-1

+ - Update to Vagrant 2.0.1.

+ 

  * Tue Dec 12 2017 Vít Ondruch <vondruch@redhat.com> - 1.9.8-2

  - Fix plugin registration issues caused by changes in RPM (rhbz#1523296).

  

Joined in one commit, as other one is just fix.

I built this in mock, installed on Fedora 27 and it's working very well. Good job!

Thanks for checking!

I'll properly test and build it later this week.

Pull-Request has been merged by pvalena

6 years ago

Pushed to testing. To try:
dnf update --enablerepo updates-testing vagrant

Hi, currently using the build for MongDB University M036, everything working fine.