SHA256
1
0
forked from pool/vagrant

Accepting request 834215 from Virtualization:vagrant

OBS-URL: https://build.opensuse.org/request/show/834215
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vagrant?expand=0&rev=26
This commit is contained in:
Dominique Leuenberger 2020-09-14 10:32:32 +00:00 committed by Git OBS Bridge
commit ce452a8916
16 changed files with 265 additions and 147 deletions

View File

@ -1,7 +1,7 @@
From f80fd64dacd27ad51f459f12301c3c16bed76554 Mon Sep 17 00:00:00 2001
From 0f5435df3ef882c3da9f098ec83cac1f394a7b4e Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org>
Date: Sat, 11 Oct 2014 16:54:58 -0300
Subject: [PATCH 01/11] bin/vagrant: silence warning about installer
Subject: [PATCH 01/10] bin/vagrant: silence warning about installer
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
@ -36,5 +36,5 @@ index ba7e40076..8272e839e 100755
#
# Unset - Disables experimental features
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From 51acfce0e08b62dc559aa2432892134d0e6d51bc Mon Sep 17 00:00:00 2001
From 103a3765b331a69b615e47d0e1647e4e42fe9a6a Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org>
Date: Wed, 22 Oct 2014 09:40:14 -0200
Subject: [PATCH 02/11] Use a private temporary dir
Subject: [PATCH 02/10] Use a private temporary dir
Without this vagrant will clutter $TMPDIR with dozens of even hundreds
of temporary files (~4 per vagrant invocation).
@ -15,7 +15,7 @@ Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
create mode 100644 lib/vagrant/util/tempfile.rb
diff --git a/lib/vagrant/box.rb b/lib/vagrant/box.rb
index 2f12775f5..af35043ee 100644
index 0ee5d29f3..2da6f886f 100644
--- a/lib/vagrant/box.rb
+++ b/lib/vagrant/box.rb
@@ -9,6 +9,7 @@ require "vagrant/util/downloader"
@ -26,10 +26,10 @@ index 2f12775f5..af35043ee 100644
module Vagrant
# Represents a "box," which is a package Vagrant environment that is used
@@ -121,7 +122,7 @@ module Vagrant
@@ -122,7 +123,7 @@ module Vagrant
# @param [Hash] download_options Options to pass to the downloader.
# @return [BoxMetadata]
def load_metadata(**download_options)
def load_metadata(download_options={})
- tf = Tempfile.new("vagrant-load-metadata")
+ tf = Util::Tempfile.new("vagrant-load-metadata")
tf.close
@ -94,5 +94,5 @@ index 000000000..0cbbb53ac
+ FileUtils.rm_rf(Vagrant::Util::Tempfile.private_tmpdir)
+end
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From b8e4cea474ed366499515f7eb4b33f3e80028680 Mon Sep 17 00:00:00 2001
From 4b3743997f569f268047917a41562831eb09bd1e Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Wed, 17 May 2017 09:09:57 +0200
Subject: [PATCH 03/11] plugins-don-t-abuse-require_relative.patch
Subject: [PATCH 03/10] plugins-don-t-abuse-require_relative.patch
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
@ -19,7 +19,7 @@ Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/plugins/guests/arch/cap/configure_networks.rb b/plugins/guests/arch/cap/configure_networks.rb
index 0ef71d55f..df0bd0f8f 100644
index 79f14213a..d8966b171 100644
--- a/plugins/guests/arch/cap/configure_networks.rb
+++ b/plugins/guests/arch/cap/configure_networks.rb
@@ -2,7 +2,7 @@ require "ipaddr"
@ -154,5 +154,5 @@ index 2dd140230..e6dd96f08 100644
module VagrantPlugins
module GuestSUSE
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From fe235bc5fa4f124422beac2d9343df004ae75d22 Mon Sep 17 00:00:00 2001
From d08f0985884ab4ef45ce9f8f37de1c033283eb2f Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:12:43 +0100
Subject: [PATCH 04/11] fix vbox package boo#1044087, added by
Subject: [PATCH 04/10] fix vbox package boo#1044087, added by
robert.munteanu@gmail.com on Sun Aug 13 19:07:06 UTC 2017
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
@ -33,5 +33,5 @@ index a0baf516f..867fe2bf8 100644
module VagrantPlugins
module ProviderVirtualBox
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From e2cc039d85b5131d52bb30755431e202ee92aa63 Mon Sep 17 00:00:00 2001
From 5dc228c3811d429e1d9640bbf4a7a21030b388de Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Mon, 4 Jun 2018 09:18:23 +0200
Subject: [PATCH 05/11] do not depend on wdm
Subject: [PATCH 05/10] do not depend on wdm
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
@ -9,17 +9,17 @@ Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
1 file changed, 1 deletion(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 8667a36d4..49fdf2e8e 100644
index 465b12805..dd4e48867 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -29,7 +29,6 @@ Gem::Specification.new do |s|
s.add_dependency "rb-kqueue", "~> 0.2.0"
@@ -31,7 +31,6 @@ Gem::Specification.new do |s|
s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"
s.add_dependency "rubyzip", "~> 2.0"
s.add_dependency "vagrant_cloud", "~> 2.0.3"
- s.add_dependency "wdm", "~> 0.1.0"
s.add_dependency "winrm", ">= 2.3.4", "< 3.0"
s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From eca8f299f0b4f5d913f714500cbaa7515e85cc70 Mon Sep 17 00:00:00 2001
From ac94bb00341797429f61f6b63377523216217d7e Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:14:46 +0100
Subject: [PATCH 06/11] do not abuse relative paths in docker plugin to make
Subject: [PATCH 06/10] do not abuse relative paths in docker plugin to make
docker work, added by tmkn@tmkn.uk on Thu Oct 26 19:42:46 UTC 2017
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
@ -22,5 +22,5 @@ index 07c4e5333..e8142df8b 100644
module VagrantPlugins
module DockerProvider
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From 0927b55a502c8c4103c8dbe3176ef99852f1d222 Mon Sep 17 00:00:00 2001
From e5f0f5ee48d7975cf0073a3998a8a11d9e97d797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Fri, 11 Jan 2019 12:32:28 +0100
Subject: [PATCH 07/11] Don't abuse relative paths in plugins
Subject: [PATCH 07/10] Don't abuse relative paths in plugins
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -64,5 +64,5 @@ index 7bc8ceca0..e938305e7 100644
require_relative "../installer"
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From 7181dea528cfa24a9952fb5a5f3297e0b2b1e53c Mon Sep 17 00:00:00 2001
From 4ae304867d0e714254cd4130a9a56eb1560da354 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 1 Apr 2019 17:28:31 +0200
Subject: [PATCH 08/11] Skip failing tests
Subject: [PATCH 08/10] Skip failing tests
---
test/unit/bin/vagrant_test.rb | 4 ++--
@ -30,5 +30,5 @@ index bc11309aa..4d329151a 100644
end
end
--
2.26.2
2.28.0

View File

@ -1,7 +1,7 @@
From 94768cd2af7eecbcf01ef1efa66469f77bf6fbec Mon Sep 17 00:00:00 2001
From 5dc6903fbc40884c5811a71ad43700f7357f7836 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Wed, 28 Aug 2019 13:39:58 +0200
Subject: [PATCH 09/11] Disable Subprocess unit test
Subject: [PATCH 09/10] Disable Subprocess unit test
This unit test is *very* flaky on OBS' workers and causes random build
failures. These are probably caused by worker being under high load and then
@ -11,27 +11,27 @@ scheduling oddly.
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/vagrant/util/subprocess_test.rb b/test/unit/vagrant/util/subprocess_test.rb
index 81da0e635..a2a2270a0 100644
index 0ff5835c8..757d8ef8a 100644
--- a/test/unit/vagrant/util/subprocess_test.rb
+++ b/test/unit/vagrant/util/subprocess_test.rb
@@ -116,7 +116,7 @@ describe Vagrant::Util::Subprocess do
@@ -124,7 +124,7 @@ describe Vagrant::Util::Subprocess do
end
end
context "when subprocess is running" do
- it "should return true" do
+ xit "should return true" do
sp = described_class.new("sleep", "5")
- it "should return true when subprocess is running" do
+ xit "should return true when subprocess is running" do
sleep_test_commands.each do |sp|
thread = Thread.new{ sp.execute }
sleep(0.3)
@@ -145,7 +145,7 @@ describe Vagrant::Util::Subprocess do
@@ -155,7 +155,7 @@ describe Vagrant::Util::Subprocess do
end
context "when subprocess is running" do
let(:sp){ described_class.new("sleep", "1") }
- it "should return true" do
+ xit "should return true" do
thread = Thread.new{ sp.execute }
sleep(0.1)
expect(sp.stop).to be(true)
sleep_test_commands.each do |sp|
thread = Thread.new{ sp.execute }
sleep(0.1)
--
2.26.2
2.28.0

View File

@ -0,0 +1,82 @@
From 75d617e2fe8d626cf23ac77f1c47cf0be4a1938b Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com>
Date: Thu, 10 Sep 2020 09:50:13 -0500
Subject: [PATCH 10/10] Add check for /etc/fstab
(cherry picked from commit 2297b86790227b6b89a6de6a7a786a726cf56a62)
---
.../guests/linux/cap/persist_mount_shared_folder.rb | 12 ++++++++++++
.../linux/cap/persist_mount_shared_folder_test.rb | 13 +++++++++++++
2 files changed, 25 insertions(+)
diff --git a/plugins/guests/linux/cap/persist_mount_shared_folder.rb b/plugins/guests/linux/cap/persist_mount_shared_folder.rb
index 338d62e07..e0ad08d42 100644
--- a/plugins/guests/linux/cap/persist_mount_shared_folder.rb
+++ b/plugins/guests/linux/cap/persist_mount_shared_folder.rb
@@ -8,6 +8,8 @@ module VagrantPlugins
class PersistMountSharedFolder
extend SyncedFolder::UnixMountHelpers
+ @@logger = Log4r::Logger.new("vagrant::guest::linux::persist_mount_shared_folders")
+
# Inserts fstab entry for a set of synced folders. Will fully replace
# the currently managed group of Vagrant managed entries. Note, passing
# empty list of folders will just remove entries
@@ -15,7 +17,13 @@ module VagrantPlugins
# @param [Machine] machine The machine to run the action on
# @param [Map<String, Map>] A map of folders to add to fstab
def self.persist_mount_shared_folder(machine, folders)
+ unless fstab_exists?(machine)
+ @@logger.info("no fstab file found, not modifying /etc/fstab")
+ return
+ end
+
if folders.nil?
+ @@logger.info("clearing /etc/fstab")
self.remove_vagrant_managed_fstab(machine)
return
end
@@ -53,6 +61,10 @@ module VagrantPlugins
private
+ def self.fstab_exists?(machine)
+ machine.communicate.test("stat /etc/fstab")
+ end
+
def self.remove_vagrant_managed_fstab(machine)
machine.communicate.sudo("sed -i '/\#VAGRANT-BEGIN/,/\#VAGRANT-END/d' /etc/fstab")
end
diff --git a/test/unit/plugins/guests/linux/cap/persist_mount_shared_folder_test.rb b/test/unit/plugins/guests/linux/cap/persist_mount_shared_folder_test.rb
index aa65b38b7..31f7ae764 100644
--- a/test/unit/plugins/guests/linux/cap/persist_mount_shared_folder_test.rb
+++ b/test/unit/plugins/guests/linux/cap/persist_mount_shared_folder_test.rb
@@ -37,6 +37,7 @@ describe "VagrantPlugins::GuestLinux::Cap::PersistMountSharedFolder" do
allow(folder_plugin).to receive(:capability).with(:mount_options, any_args).
and_return(["uid=#{options_uid},gid=#{options_gid}", options_uid, options_gid])
allow(folder_plugin).to receive(:capability).with(:mount_type).and_return("vboxsf")
+ allow(cap).to receive(:fstab_exists?).and_return(true)
end
after do
@@ -78,5 +79,17 @@ describe "VagrantPlugins::GuestLinux::Cap::PersistMountSharedFolder" do
cap.persist_mount_shared_folder(machine, folders)
end
end
+
+ context "fstab does not exist" do
+ before do
+ allow(cap).to receive(:fstab_exists?).and_return(false)
+ end
+
+ it "does not modify /etc/fstab" do
+ expect(cap).not_to receive(:remove_vagrant_managed_fstab)
+ expect(comm).not_to receive(:sudo).with(/echo '' >> \/etc\/fstab/)
+ cap.persist_mount_shared_folder(machine, folders)
+ end
+ end
end
end
--
2.28.0

View File

@ -1,28 +0,0 @@
From 51af48f8f2ae39ef682d4310970c87b17bb72780 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 11 May 2020 11:32:01 +0200
Subject: [PATCH 10/11] Bump version of net-ssh to ~> 6.0 and net-sftp to ~>
3.0
---
vagrant.gemspec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 49fdf2e8e..78bb2b8b5 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -23,8 +23,8 @@ Gem::Specification.new do |s|
s.add_dependency "listen", "~> 3.1.5"
s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
- s.add_dependency "net-ssh", "~> 5.2.0"
- s.add_dependency "net-sftp", "~> 2.1"
+ s.add_dependency "net-ssh", "~> 6.0"
+ s.add_dependency "net-sftp", "~> 3.0"
s.add_dependency "net-scp", "~> 1.2.0"
s.add_dependency "rb-kqueue", "~> 0.2.0"
s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"
--
2.26.2

View File

@ -1,39 +0,0 @@
From e4b3e72c9a267097e803db8b1b936523ee84ce0b Mon Sep 17 00:00:00 2001
From: Brian Cain <bcain@hashicorp.com>
Date: Mon, 11 May 2020 08:01:29 -0700
Subject: [PATCH 11/11] Fixes #11606: Mock out guest capabilities instead of
running them
This commit fixes a test that only fails on certain users machines where
Vagrant ends up trying to run real guest capabilities to test if the
docker provisioner raises an error if the provisioner install failed. It
fixes it by mocking out the expected return values for those
capabilities rather than relying on them actually running for this
specific unit test.
(cherry picked from commit 3934a26c2974a1795f25db31e98300386a71881d)
---
test/unit/plugins/provisioners/docker/installer_test.rb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/unit/plugins/provisioners/docker/installer_test.rb b/test/unit/plugins/provisioners/docker/installer_test.rb
index c21654b63..e8cd8fb3f 100644
--- a/test/unit/plugins/provisioners/docker/installer_test.rb
+++ b/test/unit/plugins/provisioners/docker/installer_test.rb
@@ -36,9 +36,10 @@ describe VagrantPlugins::DockerProvisioner::Installer do
end
it "installs docker if not present" do
- expect(communicator).to receive(:test).with(/docker/, {:sudo=>true}).and_return(false).at_least(:twice)
- # Will execute sudo commands to install
- expect(communicator).to receive(:sudo).at_least(:once)
+ allow(machine).to receive_message_chain(:guest, :capability?).with(:docker_installed).and_return(true)
+ allow(machine).to receive_message_chain(:guest, :capability).with(:docker_install).and_return(false)
+ allow(machine).to receive_message_chain(:guest, :capability).with(:docker_installed).and_return(false)
+
# Expect to raise error since we are mocking out the test for docker install to return false
expect {subject.ensure_installed()}.to raise_error(VagrantPlugins::DockerProvisioner::DockerError)
end
--
2.26.2

3
vagrant-2.2.10.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:722db22b431c68030e046c7c6c90629763d86a2473caa0fe8834d5742a91941f
size 2511592

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b8e541a00285b0aa8e79aab0832c664f2c53ee4af40e382f1b5c452ae5647139
size 2215868

View File

@ -1,3 +1,104 @@
-------------------------------------------------------------------
Wed Sep 9 12:47:45 UTC 2020 - Dan Čermák <dcermak@suse.com>
- Switch back to using transfiletriggerin/un
- Increase required version of the addressable gem
- Allow to skip tests during development via bcond_without
- Add fix for boxes that don't have a /etc/fstab
Added patch:
* 0010-Add-check-for-etc-fstab.patch
rebased patches:
* 0001-bin-vagrant-silence-warning-about-installer.patch
* 0002-Use-a-private-temporary-dir.patch
* 0003-plugins-don-t-abuse-require_relative.patch.patch
* 0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch
* 0005-do-not-depend-on-wdm.patch
* 0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch
* 0007-Don-t-abuse-relative-paths-in-plugins.patch
* 0008-Skip-failing-tests.patch
* 0009-Disable-Subprocess-unit-test.patch
-------------------------------------------------------------------
Wed Aug 26 15:01:59 UTC 2020 - Dan Čermák <dcermak@suse.com>
- New upstream release 2.2.10
* add rsync to BuildRequires
* run fdupes after installation
Remove patches (merged upstream):
* 0010-Bump-version-of-net-ssh-to-6.0-and-net-sftp-to-3.0.patch
* 0011-Fixes-11606-Mock-out-guest-capabilities-instead-of-r.patch
Rebased patches:
* 0001-bin-vagrant-silence-warning-about-installer.patch
* 0002-Use-a-private-temporary-dir.patch
* 0003-plugins-don-t-abuse-require_relative.patch.patch
* 0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch
* 0005-do-not-depend-on-wdm.patch
* 0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch
* 0007-Don-t-abuse-relative-paths-in-plugins.patch
* 0008-Skip-failing-tests.patch
* 0009-Disable-Subprocess-unit-test.patch
FEATURES:
- hyperv/disks: Add ability to manage virtual disks for guests [GH-11541]
IMPROVEMENTS:
- core: Allow provisioners to be run when a communicator is not available [GH-11579]
- core: Add `autocomplete` command that allows for install of bash or zsh autocomplete scripts [GH-11523]
- core: Update to childprocess gem to 4.0.0 [GH-11717]
- core: Add action to wait for cloud-init to finish running [GH-11773]
- core: Update to net-ssh to 6.0 and net-sftp to 3.0 [GH-11621]
- core: Optimize port in use check for faster validation [GH-11810]
- core: Support for Ruby 2.7 [GH-11814]
- core: Add synced folder capabilities for mount options and default fstab modification behavior [GH-11797]
- guest/arch: Use systemd-networkd to configure networking for guests [GH-11400]
- guest/haiku: Rsync install for rsync synced folders [GH-11614]
- guest/solaris11: Add guest capability shell_expand_guest_path [GH-11759]
- host/darwin: Add ability to build ISO [GH-11694]
- hosts/linux: Add ability to build ISO [GH-11750]
- hosts/windows: Add ability to build ISO [GH-11750]
- providers/hyperv: Add support for SecureBootTemplate setting on import [GH-11756]
- providers/hyperv: Add support for EnhancedSessionTransportType [GH-11014]
- virtualbox/disks: Add ability to manage virtual dvds for guests [GH-11613]
BUG FIXES:
- core: Ensure MapCommandOptions class is required [GH-11629]
- core: Fix `:all` special value on triggers [GH-11688]
- core: Ensure network addresses have a valid netmask [GH-11679]
- core: Recover local machine metadata in global index [GH-11656]
- core: Print CLI help message is ambiguous option provided [GH-11746]
- core: Update how `/etc/hosts` gets updated for darwin, freebsd and openbsd [GH-11719]
- core: Capture `[3J` escape sequence [GH-11807]
- core: Treat empty box value as invalid [GH-11618]
- core: Allow forwarding ports to unknown addresses [GH-11810]
- core: Scrub credentials as whole words [GH-11837]
- commands/destroy: Add gracefull option to switch beween gracefully or forcefully shutting down a vm [GH-11628]
- communicator/ssh: Raise an error for a nil exit status [GH-11721]
- communicator/winrm: Check for nil return from querying for forwarded ports [GH-11831]
- config/vm: Add option `allow_hosts_modification` to allow/disable Vagrant editing the guests `/etc/hosts` file [GH-11565]
- config/vm: Add config option `hostname` to `config.vm.network` [GH-11566]
- config/vm: Don't ignore NFS synced folders on Windows hosts [GH-11631]
- host: Use regular port check for loopback addresses [GH-11654]
- host: Allow windows and linux hosts to detach from rdp process [GH-11732]
- host/windows: Properly register SMB password validation capability [GH-11795]
- guests: Allow setting of hostname according to `hostname` option for multiple guests [GH-11704]
- guest/alpine: Allow setting of hostname according to `hostname` option [GH-11718]
- guest/esxi: Be more permissive with permissions of ssh directory [GH-11587]
- guest/linux: Add virtual box shared folders to guest fstab [GH-11570]
- guest/suse: Allow setting of hostname according to `hostname` option [GH-11567]
- providers/docker: Ensure new containers don't grab existing bound ports [GH-11602]
- providers/hyperv: Fix check for secure boot [GH-11809]
- providers/virtualbox: Fix inability to create disk with same name across multiple guests [GH-11767]
- provisioners/docker: Allow to specify docker image version using the `run` option [GH-11806]
- provisioners/file: Allow creating empty folders [GH-11805]
- provisioners/shell: Ensure Windows shell provisioner gets the correct file extension [GH-11644]
- util/powershell: Use correct powershell executable for privileged commands [GH-11787]
-------------------------------------------------------------------
Tue Aug 18 11:19:38 UTC 2020 - Dan Čermák <dcermak@suse.com>

View File

@ -17,6 +17,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# disable tests if you want to just run a quick build
%{bcond_without tests}
%global mod_name vagrant
%global mod_full_name %{mod_name}-%{version}
@ -24,7 +26,7 @@
Name: vagrant
Version: 2.2.9
Version: 2.2.10
Release: 0
Summary: Tool for building and distributing virtualized development environments
License: MIT
@ -55,26 +57,16 @@ Patch6: 0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch
Patch7: 0007-Don-t-abuse-relative-paths-in-plugins.patch
Patch8: 0008-Skip-failing-tests.patch
Patch9: 0009-Disable-Subprocess-unit-test.patch
Patch10: 0010-Bump-version-of-net-ssh-to-6.0-and-net-sftp-to-3.0.patch
# Drop this on the next upstream release after 2.2.9
# upstream fix from https://github.com/hashicorp/vagrant/pull/11607
Patch11: 0011-Fixes-11606-Mock-out-guest-capabilities-instead-of-r.patch
Patch10: 0010-Add-check-for-etc-fstab.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# force only one ruby version
# CAUTION: if you change this, then you *must* also change the sed calls which
# fix these values in macros.vagrant
# FIXME: for now vagrant does not support Ruby 2.7
%if 0%{?suse_version} > 1500
%global rb_build_versions ruby26
%global rb_build_abi ruby:2.6.0
%global rb_ruby_suffix ruby2.6
%else
%global rb_build_versions %rb_default_ruby
%global rb_build_abi %rb_default_ruby_abi
%global rb_ruby_suffix %rb_default_ruby_suffix
%endif
# we use the rpm macros in this spec
# need to load them *after* defining the rb_* macros
@ -87,34 +79,34 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Build dependencies
#===============================================================================
# s.required_ruby_version = "~> 2.4", "< 2.7"
BuildRequires: %{ruby:2 < 2.7}
BuildRequires: %{ruby:2 >= 2.4}
# s.required_ruby_version = "~> 2.5", "< 2.8"
BuildRequires: %{ruby:2 < 2.8}
BuildRequires: %{ruby:2 >= 2.5}
#
#
#
BuildRequires: %{rubygem bundler}
# s.add_dependency "bcrypt_pbkdf", "~> 1.0.0"
BuildRequires: %{rubygem bcrypt_pbkdf:1.0 }
# s.add_dependency "childprocess", "~> 3.0.0"
BuildRequires: %{rubygem childprocess:3.0 }
# s.add_dependency "childprocess", "~> 4.0.0"
BuildRequires: %{rubygem childprocess:4.0 }
# s.add_dependency "ed25519", "~> 1.2.4"
BuildRequires: %{rubygem ed25519:1.2 >= 1.2.4 }
# s.add_dependency "erubis", "~> 2.7.0"
BuildRequires: %{rubygem erubis:2.7 }
# s.add_dependency "i18n", "~> 1.8"
BuildRequires: %{rubygem i18n:1 >= 1.8 }
# s.add_dependency "listen", "~> 3.1.5"
BuildRequires: %{rubygem listen:3.1 >= 3.1.5 }
# s.add_dependency "listen", "~> 3.1"
BuildRequires: %{rubygem listen:3 >= 3.1 }
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
BuildRequires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5 }
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
BuildRequires: %{rubygem log4r:1.1 >= 1.1.9 }
BuildConflicts: %{rubygem log4r:1.1 >= 1.1.11 }
# PATCHED
# s.add_dependency "mime", "~> 0.4.4"
BuildRequires: %{rubygem mime:0.4 >= 0.4.4}
# s.add_dependency "net-ssh", "~> 6.0"
BuildRequires: %{rubygem net-ssh:6 }
# PATCHED
# s.add_dependency "net-sftp", "~> 3.0"
BuildRequires: %{rubygem net-sftp:3 }
# s.add_dependency "net-scp", "~> 1.2.0"
@ -151,6 +143,8 @@ BuildRequires: %{rubygem webmock:2.3 >= 2.3.1 }
# s.add_development_dependency "fake_ftp", "~> 0.1.1"
BuildRequires: %{rubygem fake_ftp:0.1 >= 0.1.1 }
# Prevent have choice for rubygem(ruby:2.7.0:listen:3) >= 3.1
BuildRequires: %{rubygem listen:3.1}
# Prevent have choice for rubygem(ruby:2.6.0:mime-types) >= 2
BuildRequires: %{rubygem mime-types:3 }
# Prevent have choice for rubygem(ruby:2.6.0:builder) >= 2.1.2
@ -160,7 +154,7 @@ BuildRequires: %{rubygem ffi >= 1.9 }
# Prevent have choice for rubygem(ruby:2.5.0:thor:0) >= 0.18
BuildRequires: %{rubygem thor:0.19}
# Prevent have choice for rubygem(ruby:2.5.0:addressable) >= 2.3.6
BuildRequires: %{rubygem addressable >= 2.6}
BuildRequires: %{rubygem addressable >= 2.7}
# Prevent have choice for rubygem(ruby:2.5.0:public_suffix) >= 2.0.2
BuildRequires: %{rubygem public_suffix:4}
@ -170,11 +164,15 @@ BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
# for the test
%if %{with tests}
BuildRequires: openssh
BuildRequires: curl
BuildRequires: bsdtar
BuildRequires: %{rubygem vagrant-spec}
BuildRequires: rsync
%endif
BuildRequires: fdupes
#===============================================================================
# Runtime dependencies
@ -184,25 +182,25 @@ BuildRequires: %{rubygem vagrant-spec}
#
# s.add_dependency "bcrypt_pbkdf", "~> 1.0.0"
Requires: %{rubygem bcrypt_pbkdf:1.0 }
# s.add_dependency "childprocess", "~> 3.0.0"
Requires: %{rubygem childprocess:3.0}
# s.add_dependency "childprocess", "~> 4.0.0"
Requires: %{rubygem childprocess:4.0}
# s.add_dependency "ed25519", "~> 1.2.4"
Requires: %{rubygem ed25519:1.2 >= 1.2.4}
# s.add_dependency "erubis", "~> 2.7.0"
Requires: %{rubygem erubis:2.7}
# s.add_dependency "i18n", "~> 1.8"
Requires: %{rubygem i18n:1 >= 1.8}
# s.add_dependency "listen", "~> 3.1.5"
Requires: %{rubygem listen:3.1 >= 3.1.5}
# s.add_dependency "listen", "~> 3.1"
Requires: %{rubygem listen:3 >= 3.1}
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
Requires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5}
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
Requires: %{rubygem log4r:1.1 >= 1.1.9 }
Requires: %{rubygem log4r:1.1 < 1.1.11 }
# PATCHED
# s.add_dependency "mime", "~> 0.4.4"
Requires: %{rubygem mime:0.4 >= 0.4.4}
# s.add_dependency "net-ssh", "~> 6.0"
Requires: %{rubygem net-ssh:6}
# PATCHED
# s.add_dependency "net-sftp", "~> 3.0"
Requires: %{rubygem net-sftp:3 }
# s.add_dependency "net-scp", "~> 1.2.0"
@ -382,14 +380,19 @@ rm -f %{buildroot}%{vagrant_dir}/lib/vagrant/util.rb.orig
# remove build script from vagrant
rm -f %{buildroot}%{vagrant_dir}/.runner.sh
%fdupes %{buildroot}%{dirname:%vagrant_plugin_dir}
%check
%if %{with tests}
# remove the git reference to vagrant-spec
# -> don't have to cleanup, the Gemfile is excluded anyway
sed -i "s|gem 'vagrant-spec', git.*$|gem 'vagrant-spec'|" Gemfile
export GEM_PATH=%{buildroot}%{vagrant_plugin_dir}:$(ruby.%{rb_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')")
bundle exec rake test:unit
%endif
# with tests
%pre
getent group vagrant >/dev/null || groupadd -r vagrant
@ -397,11 +400,10 @@ getent group vagrant >/dev/null || groupadd -r vagrant
%post
%{post_rb}
#FIXME: use %%transfiletriggerin/-un once boo#1041742 gets resolved
%filetriggerin -- %{dirname:%{vagrant_plugin_spec}}/
%transfiletriggerin -- %{dirname:%{vagrant_plugin_spec}}/
%{transfiletriggerin_rb}
%filetriggerun -- %{dirname:%{vagrant_plugin_spec}}/
%transfiletriggerun -- %{dirname:%{vagrant_plugin_spec}}/
%{transfiletriggerun_rb}
%files