#22 Update to Vagrant 2.2.9
Merged 3 years ago by pvalena. Opened 4 years ago by pvalena.
rpms/ pvalena/vagrant rebase  into  master

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

- SHA512 (vagrant-2.2.6.tar.gz) = 6d8b5b1d4e5cc482404cf4c59e1b7cf9502a9819569b5098e44874733cee706f26adb4ac7994abe7e3307ca69d3003e2604dc859ce460c53d766d78b8d9fe22a

+ SHA512 (vagrant-2.2.9.tar.gz) = 15e230bcf336615f0d49a2c40db36f7f26a9f0f6fd42d2ce801f28afc663aadded4fa373e33f9102b21ee70d98563fc68e2b24ffa6c3eec321f58b2c42b0d260

  SHA512 (vagrant-spec-abfc34474d122235d56e4c6b6fb5d3e35bedfa90.tar.gz) = cbb60d661d34b37bc5d414da0b2a31f39e2910c11251e334da5efbd8f010b5bd428bc1ae476fcb9b42ec4e8f8c6265292ba3f8f543625178ecb85aad06e8856f

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

- From 38a48ea0dd01532b3ad17e9ed10c15598bc6ce32 Mon Sep 17 00:00:00 2001

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

- Date: Mon, 1 Jul 2019 17:44:54 +0200

- Subject: [PATCH] Do not list / load dependencies if `vagrant` spec is not

-  loaded

- 

- in `vagrant_internal_specs` as this fails, due to `find` returning `nil`.

- ---

-  lib/vagrant/bundler.rb | 5 +++--

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

- 

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

- index 7ba48435fa..c0fabdcead 100644

- --- a/lib/vagrant/bundler.rb

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

- @@ -421,8 +421,9 @@ def generate_vagrant_set

-      def vagrant_internal_specs

-        # activate any dependencies up front so we can always

-        # pin them when resolving

- -      Gem::Specification.find { |s| s.name == "vagrant" && s.activated? }.

- -        runtime_dependencies.each { |d| gem d.name, *d.requirement.as_list }

- +      if (vs = Gem::Specification.find { |s| s.name == "vagrant" && s.activated? })

- +        vs.runtime_dependencies.each { |d| gem d.name, *d.requirement.as_list }

- +      end

-        # discover all the gems we have available

-        list = {}

-        directories = [Gem::Specification.default_specifications_dir]

@@ -0,0 +1,35 @@ 

+ From 068df794f81fb7ec410595d85ca9b4841a6034ec Mon Sep 17 00:00:00 2001

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

+ Date: Thu, 7 May 2020 22:40:54 +0200

+ Subject: [PATCH] Do not activate gems if gemspec is not found

+ 

+ ---

+  lib/vagrant/bundler.rb | 8 ++++----

+  1 file changed, 4 insertions(+), 4 deletions(-)

+ 

+ diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb

+ index 92ee53a..cf92ff7 100644

+ --- a/lib/vagrant/bundler.rb

+ +++ b/lib/vagrant/bundler.rb

+ @@ -622,14 +622,14 @@ module Vagrant

+        if !self_spec

+          @logger.warn("Failed to locate activated vagrant specification. Activating...")

+          self_spec = Gem::Specification.find { |s| s.name == "vagrant" }

+ -        if !self_spec

+ -          @logger.error("Failed to locate Vagrant RubyGem specification")

+ -          raise Vagrant::Errors::SourceSpecNotFound

+ -        end

+ +        if self_spec

+          self_spec.activate

+          @logger.info("Activated vagrant specification version - #{self_spec.version}")

+ +        end

+        end

+ +      if self_spec

+        self_spec.runtime_dependencies.each { |d| gem d.name, *d.requirement.as_list }

+ +      end

+        # discover all the gems we have available

+        list = {}

+        directories = [Gem::Specification.default_specifications_dir]

+ -- 

+ 2.25.0

+ 

file modified
+52 -24
@@ -5,8 +5,8 @@ 

  %bcond_without help2man

  

  Name: vagrant

- Version: 2.2.6

- Release: 4%{?dist}

+ Version: 2.2.9

+ Release: 1%{?dist}

  Summary: Build and distribute virtualized development environments

  License: MIT

  URL: http://vagrantup.com
@@ -24,9 +24,9 @@ 

  # 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 if vagrant is not loaded

+ # Do not load runtime dependencies in %%check if vagrant is not loaded

  # https://github.com/hashicorp/vagrant/pull/10945

- Patch1: vagrant-2.2.5-do-not-load-dependencies.patch

+ Patch1: vagrant-2.2.9-do-not-load-dependencies.patch

  

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

  # fails on older Fedoras.
@@ -39,11 +39,11 @@ 

  Requires: rubygem(hashicorp-checkpoint) >= 0.1.5

  Requires: rubygem(childprocess) >= 0.5.0

  Requires: rubygem(erubis) >= 2.7.0

- Requires: (rubygem(i18n) >= 1.1.1 with rubygem(i18n) < 2.0)

+ 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.1.0

+ Requires: rubygem(net-ssh) >= 5.2.0

  Requires: rubygem(net-scp) >= 1.2.0

  Requires: rubygem(net-sftp) >= 2.1

  Requires: rubygem(rest-client) >= 1.6.0
@@ -54,6 +54,7 @@ 

  Recommends: vagrant(vagrant-libvirt)

  Recommends: rubygem(bcrypt_pbkdf)

  Recommends: rubygem(ed25519)

+ Recommends: (podman-docker if podman)

  

  BuildRequires: bsdtar

  BuildRequires: ruby
@@ -108,7 +109,6 @@ 

  %setup -q -b2

  

  %patch0 -p1

- %patch1 -p1

  

  %build

  # TODO: package vagrant_cloud, as it is not in Fedora yet
@@ -121,10 +121,8 @@ 

  sed -i '/^\s*command(:login) do$/,/\s*end$/ s/^/#/g' plugins/commands/login/plugin.rb

  

  # We have newer versions in Fedora

- %gemspec_remove_dep -s %{name}.gemspec -g childprocess '~> 0.6.0'

- %gemspec_add_dep -s %{name}.gemspec -g childprocess '>= 0.5.0'

- %gemspec_remove_dep -s %{name}.gemspec -g net-ssh '~> 5.1.0'

- %gemspec_add_dep -s %{name}.gemspec -g net-ssh '>= 5.2.0'

+ %gemspec_remove_dep -s %{name}.gemspec -g net-scp '~> 1.2.0'

+ %gemspec_add_dep -s %{name}.gemspec -g net-scp '>= 1.2.0'

  

  # Remove Windows specific dependencies

  %gemspec_remove_dep -s %{name}.gemspec -g wdm
@@ -138,26 +136,24 @@ 

  # Do not impose any Ruby version restrictions on Fedora.

  %gemspec_remove_dep -s %{name}.gemspec -g ruby_dep

  

- # Allow older rubyzip version

- # TODO: remove

- # https://src.fedoraproject.org/rpms/rubygem-rubyzip/pull-request/1

- %gemspec_remove_dep -s %{name}.gemspec -g rubyzip '~> 1.2.2'

- %gemspec_add_dep -s %{name}.gemspec -g rubyzip

- 

- # Allow newer i18n version

- # https://github.com/hashicorp/vagrant/pull/11146

- %gemspec_remove_dep -s %{name}.gemspec -g i18n '~> 1.1.1'

- %gemspec_add_dep -s %{name}.gemspec -g i18n

- 

  # Allow newer listen version

  # https://github.com/hashicorp/vagrant/pull/11208

  %gemspec_remove_dep -s %{name}.gemspec -g listen '~> 3.1.5'

- %gemspec_add_dep -s %{name}.gemspec -g listen ['~> 3.2']

+ %gemspec_add_dep -s %{name}.gemspec -g listen '>= 3.1.5'

+ 

+ # Allow older childprocess version

+ %gemspec_remove_dep -s %{name}.gemspec -g childprocess

+ %gemspec_add_dep -s %{name}.gemspec -g childprocess '>= 1.0.1'

  

  # Remove optional dependencies

  %gemspec_remove_dep -s %{name}.gemspec -g ed25519

  %gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf

  

+ # Load missing dependency Vagrant::Util::MapCommandOptions

+ # https://github.com/hashicorp/vagrant/pull/11609

+ sed -i "/^  require 'vagrant\/util\/experimental'$/ a\  require 'vagrant/util/map_command_options'" \

+   bin/vagrant

+ 

  gem build %{name}.gemspec

  

  gem install -V --local \
@@ -210,11 +206,20 @@ 

  # Needed to display help page without a warning.

  export VAGRANT_INSTALLER_ENV=1

  mkdir -p %{buildroot}%{_mandir}/man1

- help2man --no-discard-stderr -N -s1 -o %{buildroot}%{_mandir}/man1/%{name}.1 \

+ help2man -N -s1 -o %{buildroot}%{_mandir}/man1/%{name}.1 \

+     %{buildroot}/usr/share/%{name}/gems/gems/%{name}-%{version}/bin/%{name} || \

      %{buildroot}/usr/share/%{name}/gems/gems/%{name}-%{version}/bin/%{name}

  %endif

  

  %check

+ # Do not load dependencies from gemspec

+ cat %{PATCH1} | patch -p1

+ 

+ sed -i '/^\s*context "when vagrant specification is not found" do$/,/^    end$/ s/^/#/' \

+   test/unit/vagrant/bundler_test.rb

+ sed -i '/^\s*it "should init the bundler instance with plugins" do$/,/^    end$/ s/^/#/' \

+   test/unit/vagrant/plugin/manager_test.rb

+ 

  # Adjust the vagrant-spec directory name.

  rm -rf ../vagrant-spec

  mv ../vagrant-spec{-%{vagrant_spec_commit},}
@@ -266,6 +271,16 @@ 

  # 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

+ 

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

+ 

  # 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"]')}
@@ -287,6 +302,13 @@ 

  # Rake solves the requires issues for tests

  rake -f tasks/test.rake test:unit

  

+ %if %{with help2man}

+ # Check `--help` output, using which man page is created

+ export GEM_PATH="%{gem_dir}:%{buildroot}/usr/share/vagrant/gems"

+ export VAGRANT_INSTALLER_ENV=1

+ %{buildroot}/usr/share/%{name}/gems/gems/%{name}-%{version}/bin/%{name} --help 2>/dev/null \

+   | grep -q '^Usage: vagrant '

+ %endif

  

  %post -p %{_bindir}/ruby

  begin
@@ -398,6 +420,12 @@ 

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

  

  %changelog

+ * Mon May 11 2020 Pavel Valena <pvalena@redhat.com> - 2.2.9-1

+ - Update to Vagrant 2.2.9.

+   Resolves: rhbz#1795460

+ - Added support for podman via docker podman-docker wrapper

+   (https://github.com/hashicorp/vagrant/pull/11356).

+ 

  * Tue Apr 21 2020 Vít Ondruch <vondruch@redhat.com> - 2.2.6-4

  - Relax rubygem-net-ssh dependency.

    Resolves: rhbz#1805240

This was reported as separate ticket, wasn't it? Therefore it would be good if that is separate commit.

Also because Bodhi has grown feature to autoclose Rawhide bugs, it would be probably good idea to reference the bug IDs in change and commit logs.

And there is already Vagrant 2.2.8 available.

Ok, let me address all of those. Thanks for review!

rebased onto 7efd18548747d5801f5dda908ddb25aaccf7dce5

3 years ago

There is already Vagrant 2.2.9. So better to finish the update to 2.2.7 first and then look at the new releases ...

There is already Vagrant 2.2.9. So better to finish the update to 2.2.7 first and then look at the new releases ...

Well, is it maybe because 2.2.8 was broken? I built it, it passed, but then when I've installed it. I got a load/runtime error.

➜  vagrant git:(rebase) vagrant
Traceback (most recent call last):
        14: from /usr/share/vagrant/gems/bin/vagrant:23:in `<main>'
        13: from /usr/share/vagrant/gems/bin/vagrant:23:in `load'
        12: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/bin/vagrant:168:in `<top (required)>'
        11: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/bin/vagrant:168:in `new'
        10: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/environment.rb:178:in `initialize'
         9: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/environment.rb:973:in `process_configured_plugins'
         8: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/environment.rb:792:in `vagrantfile'
         7: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/environment.rb:792:in `new'
         6: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/vagrantfile.rb:29:in `initialize'
         5: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/config/loader.rb:200:in `load'
         4: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/config/v2/loader.rb:21:in `finalize'
         3: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/config/v2/root.rb:51:in `finalize!'
         2: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/config/v2/root.rb:51:in `each'
         1: from /usr/share/vagrant/gems/gems/vagrant-2.2.8/lib/vagrant/config/v2/root.rb:52:in `block in finalize!'
/usr/share/vagrant/gems/gems/vagrant-2.2.8/plugins/kernel_v2/config/vm.rb:475:in `finalize!': uninitialized constant Vagrant::Util::MapCommandOptions (NameError)

rebased onto 5cd1a2c

3 years ago

I think I did find the fix (quite easily), and it's pushed now.

What is still failing on scratch-builds is the help2man conversion (builds in Comment 0).

Note that in my/from COPR it builds/installs/runs fine- hence the smoke test/man page.

What is still failing on scratch-builds is the help2man conversion (builds in Comment 0).

Not sure I understand this. What precisely is failing? Checking the simple-koji-ci, the man pages looks OK.

What is still failing on scratch-builds is the help2man conversion (builds in Comment 0).

Not sure I understand this. What precisely is failing? Checking the simple-koji-ci, the man pages looks OK.

Well, afterwards I've realized that in my COPR the dependencies are different (childsupport is 3.0.0), so it's fixed now. Building.

Pull-Request has been merged by pvalena

3 years ago