From da1d49dc9468680e44f768464718acf003bf777c3858bb04cd8ffafefef33573 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Thu, 19 Dec 2019 13:57:41 +0000 Subject: [PATCH] Accepting request 758158 from home:dancermak:branches:Virtualization:vagrant Add fix for failing unit test OBS-URL: https://build.opensuse.org/request/show/758158 OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=38 --- ...rant-silence-warning-about-installer.patch | 2 +- 0002-Use-a-private-temporary-dir.patch | 2 +- ...on-t-wait-for-shutdown-h-now-to-fini.patch | 2 +- ...s-don-t-abuse-require_relative.patch.patch | 2 +- ...-boo-1044087-added-by-robert.muntean.patch | 2 +- 0006-do-not-depend-on-wdm.patch | 2 +- ...ative-paths-in-docker-plugin-to-make.patch | 2 +- ...on-t-abuse-relative-paths-in-plugins.patch | 2 +- ...x-unit-tests-for-GuestLinux-Cap-Halt.patch | 2 +- 0010-Skip-failing-tests.patch | 2 +- 0011-Bump-rspec-its-dependency.patch | 2 +- ...-dependencies-if-vagrant-spec-is-not.patch | 2 +- ...nterfaces-error-in-docker-prepare_ne.patch | 2 +- ...ubyzip-version-to-fix-CVE-2019-16892.patch | 2 +- ...RM-only-Disable-Subprocess-unit-test.patch | 2 +- ...sd-call-is-mocked-up-in-BSD-NFS-test.patch | 26 +++++++++++++++++++ vagrant.changes | 25 ++++++++++++++++++ vagrant.spec | 3 +++ 18 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch diff --git a/0001-bin-vagrant-silence-warning-about-installer.patch b/0001-bin-vagrant-silence-warning-about-installer.patch index 83705cd..91ededc 100644 --- a/0001-bin-vagrant-silence-warning-about-installer.patch +++ b/0001-bin-vagrant-silence-warning-about-installer.patch @@ -1,7 +1,7 @@ From e1a0054ceecffce9b3ef389d5b4b9bf85f309351 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sat, 11 Oct 2014 16:54:58 -0300 -Subject: [PATCH 01/15] bin/vagrant: silence warning about installer +Subject: [PATCH 01/16] bin/vagrant: silence warning about installer Signed-off-by: Johannes Kastl --- diff --git a/0002-Use-a-private-temporary-dir.patch b/0002-Use-a-private-temporary-dir.patch index 5daaa45..3b1ec18 100644 --- a/0002-Use-a-private-temporary-dir.patch +++ b/0002-Use-a-private-temporary-dir.patch @@ -1,7 +1,7 @@ From 2e3ac8696235e4239977c10e78474de1b1cbccd8 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 22 Oct 2014 09:40:14 -0200 -Subject: [PATCH 02/15] Use a private temporary dir +Subject: [PATCH 02/16] Use a private temporary dir Without this vagrant will clutter $TMPDIR with dozens of even hundreds of temporary files (~4 per vagrant invocation). diff --git a/0003-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch b/0003-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch index 3624647..ec42b24 100644 --- a/0003-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch +++ b/0003-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch @@ -1,7 +1,7 @@ From 5323b2746d765bee3fd9aa739bf3d0e120eb1874 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 3 Feb 2015 10:35:17 -0200 -Subject: [PATCH 03/15] linux/cap/halt: don't wait for `shutdown -h now` to +Subject: [PATCH 03/16] linux/cap/halt: don't wait for `shutdown -h now` to finish When running a Debian 8 lxc guest (with the vagrant-lxc plugin), which diff --git a/0004-plugins-don-t-abuse-require_relative.patch.patch b/0004-plugins-don-t-abuse-require_relative.patch.patch index b5e6fc6..d11c36f 100644 --- a/0004-plugins-don-t-abuse-require_relative.patch.patch +++ b/0004-plugins-don-t-abuse-require_relative.patch.patch @@ -1,7 +1,7 @@ From 399ed85dc12e70156c6fa40a49e35110ad6fcff4 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Wed, 17 May 2017 09:09:57 +0200 -Subject: [PATCH 04/15] plugins-don-t-abuse-require_relative.patch +Subject: [PATCH 04/16] plugins-don-t-abuse-require_relative.patch Signed-off-by: Johannes Kastl --- diff --git a/0005-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch b/0005-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch index 0612655..0fd3ef6 100644 --- a/0005-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch +++ b/0005-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch @@ -1,7 +1,7 @@ From ccaab429a383ff048400a866f3aa77409ae4976d Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 16 Nov 2018 21:12:43 +0100 -Subject: [PATCH 05/15] fix vbox package boo#1044087, added by +Subject: [PATCH 05/16] 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 diff --git a/0006-do-not-depend-on-wdm.patch b/0006-do-not-depend-on-wdm.patch index da5973e..cabdfcd 100644 --- a/0006-do-not-depend-on-wdm.patch +++ b/0006-do-not-depend-on-wdm.patch @@ -1,7 +1,7 @@ From 98c990b8b57849464a4e1773689635a2328da89e Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Mon, 4 Jun 2018 09:18:23 +0200 -Subject: [PATCH 06/15] do not depend on wdm +Subject: [PATCH 06/16] do not depend on wdm Signed-off-by: Johannes Kastl --- diff --git a/0007-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch b/0007-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch index 86014b9..541a004 100644 --- a/0007-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch +++ b/0007-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch @@ -1,7 +1,7 @@ From 63325a25be5349141e628f4d8738cd66cf2eff69 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 16 Nov 2018 21:14:46 +0100 -Subject: [PATCH 07/15] do not abuse relative paths in docker plugin to make +Subject: [PATCH 07/16] 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 diff --git a/0008-Don-t-abuse-relative-paths-in-plugins.patch b/0008-Don-t-abuse-relative-paths-in-plugins.patch index 31de856..437f94c 100644 --- a/0008-Don-t-abuse-relative-paths-in-plugins.patch +++ b/0008-Don-t-abuse-relative-paths-in-plugins.patch @@ -1,7 +1,7 @@ From 6cabd408fd06b60b0b0c74c93da9fea05e8b0339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Fri, 11 Jan 2019 12:32:28 +0100 -Subject: [PATCH 08/15] Don't abuse relative paths in plugins +Subject: [PATCH 08/16] Don't abuse relative paths in plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0009-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch b/0009-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch index eb78e0e..63144b5 100644 --- a/0009-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch +++ b/0009-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch @@ -1,7 +1,7 @@ From e1eaa4583e58d802f0c2339c959b5becb6a2c49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 14 Mar 2019 00:25:05 +0100 -Subject: [PATCH 09/15] Fix unit tests for GuestLinux::Cap::Halt +Subject: [PATCH 09/16] Fix unit tests for GuestLinux::Cap::Halt This test fails since we patch `shutdown -h now` to be `shutdown -h now &` instead. diff --git a/0010-Skip-failing-tests.patch b/0010-Skip-failing-tests.patch index e88a28c..8423454 100644 --- a/0010-Skip-failing-tests.patch +++ b/0010-Skip-failing-tests.patch @@ -1,7 +1,7 @@ From 85808a200ea1a95f00edc2af816ae3f124dc1962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Mon, 1 Apr 2019 17:28:31 +0200 -Subject: [PATCH 10/15] Skip failing tests +Subject: [PATCH 10/16] Skip failing tests --- test/unit/bin/vagrant_test.rb | 4 ++-- diff --git a/0011-Bump-rspec-its-dependency.patch b/0011-Bump-rspec-its-dependency.patch index 7f7159a..a16da81 100644 --- a/0011-Bump-rspec-its-dependency.patch +++ b/0011-Bump-rspec-its-dependency.patch @@ -1,7 +1,7 @@ From 79bdf20d3c293293730548f20e329f3c726f5091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 17 Jul 2019 10:59:07 +0200 -Subject: [PATCH 11/15] Bump rspec-its dependency +Subject: [PATCH 11/16] Bump rspec-its dependency --- vagrant.gemspec | 2 +- diff --git a/0012-Do-not-list-load-dependencies-if-vagrant-spec-is-not.patch b/0012-Do-not-list-load-dependencies-if-vagrant-spec-is-not.patch index 4e54f48..8ada583 100644 --- a/0012-Do-not-list-load-dependencies-if-vagrant-spec-is-not.patch +++ b/0012-Do-not-list-load-dependencies-if-vagrant-spec-is-not.patch @@ -1,7 +1,7 @@ From 7784ec13f12752f5b73ddec371cb73b6dd97615a Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mon, 1 Jul 2019 17:44:54 +0200 -Subject: [PATCH 12/15] Do not list / load dependencies if `vagrant` spec is +Subject: [PATCH 12/16] Do not list / load dependencies if `vagrant` spec is not loaded in `vagrant_internal_specs` as this fails, due to `find` returning `nil`. diff --git a/0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch b/0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch index 4e393be..4411f22 100644 --- a/0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch +++ b/0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch @@ -1,7 +1,7 @@ From bc275fb74fbb6948246427549f04f0a4323a1747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 24 Oct 2019 12:29:43 +0200 -Subject: [PATCH 13/15] Catch NetworkNoInterfaces error in docker +Subject: [PATCH 13/16] Catch NetworkNoInterfaces error in docker prepare_networks_test The test "generates a network name and configuration" calls at the end diff --git a/0014-Bump-rubyzip-version-to-fix-CVE-2019-16892.patch b/0014-Bump-rubyzip-version-to-fix-CVE-2019-16892.patch index 00a7a96..31337a7 100644 --- a/0014-Bump-rubyzip-version-to-fix-CVE-2019-16892.patch +++ b/0014-Bump-rubyzip-version-to-fix-CVE-2019-16892.patch @@ -1,7 +1,7 @@ From e8c23f99c5097199b7d955268e1c97314d25480b Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Wed, 6 Nov 2019 20:37:56 -0800 -Subject: [PATCH 14/15] Bump rubyzip version to fix CVE-2019-16892. +Subject: [PATCH 14/16] Bump rubyzip version to fix CVE-2019-16892. --- vagrant.gemspec | 2 +- diff --git a/0015-ARM-only-Disable-Subprocess-unit-test.patch b/0015-ARM-only-Disable-Subprocess-unit-test.patch index 2f50df8..b89c5ca 100644 --- a/0015-ARM-only-Disable-Subprocess-unit-test.patch +++ b/0015-ARM-only-Disable-Subprocess-unit-test.patch @@ -1,7 +1,7 @@ From 75b7fca0c98396ee755c329f002c8e2afa18dae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 28 Aug 2019 13:39:58 +0200 -Subject: [PATCH 15/15] [ARM only] Disable Subprocess unit test +Subject: [PATCH 15/16] [ARM only] Disable Subprocess unit test This unit test is *very* flaky on OBS' ARM workers and causes random build failures. These are probably caused by worker being under high load and then diff --git a/0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch b/0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch new file mode 100644 index 0000000..77893c1 --- /dev/null +++ b/0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch @@ -0,0 +1,26 @@ +From fc3450130149046e30c618508bf9019a7272b783 Mon Sep 17 00:00:00 2001 +From: Brian Cain +Date: Fri, 25 Oct 2019 09:02:30 -0700 +Subject: [PATCH 16/16] Ensure nfsd call is mocked up in BSD NFS test + +--- + test/unit/plugins/hosts/bsd/cap/nfs_test.rb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test/unit/plugins/hosts/bsd/cap/nfs_test.rb b/test/unit/plugins/hosts/bsd/cap/nfs_test.rb +index 51c125484..d3745c6e6 100644 +--- a/test/unit/plugins/hosts/bsd/cap/nfs_test.rb ++++ b/test/unit/plugins/hosts/bsd/cap/nfs_test.rb +@@ -21,6 +21,9 @@ describe VagrantPlugins::HostBSD::Cap::NFS do + allow(described_class).to receive(:system) + allow(File).to receive(:writable?).with("/etc/exports") + allow(ui).to receive(:info) ++ ++ allow(Vagrant::Util::Subprocess).to receive(:execute).with("nfsd", "checkexports"). ++ and_return(Vagrant::Util::Subprocess::Result.new(0, "", "")) + end + + it "should execute successfully when no folders are defined" do +-- +2.24.0 + diff --git a/vagrant.changes b/vagrant.changes index b09e969..4f8ad30 100644 --- a/vagrant.changes +++ b/vagrant.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Thu Dec 19 11:22:33 UTC 2019 - Dan Čermák + +- Add fix for failing unit test + + Added patch from upstream (https://github.com/hashicorp/vagrant/pull/11155): + - 0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch + + Rebased patches: + + - 0001-bin-vagrant-silence-warning-about-installer.patch + - 0002-Use-a-private-temporary-dir.patch + - 0003-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch + - 0004-plugins-don-t-abuse-require_relative.patch.patch + - 0005-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch + - 0006-do-not-depend-on-wdm.patch + - 0007-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch + - 0008-Don-t-abuse-relative-paths-in-plugins.patch + - 0009-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch + - 0010-Skip-failing-tests.patch + - 0011-Bump-rspec-its-dependency.patch + - 0012-Do-not-list-load-dependencies-if-vagrant-spec-is-not.patch + - 0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch + - 0015-ARM-only-Disable-Subprocess-unit-test.patch + ------------------------------------------------------------------- Wed Nov 13 10:18:47 UTC 2019 - Dan Čermák diff --git a/vagrant.spec b/vagrant.spec index ccbef27..c6d3a2e 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -68,6 +68,8 @@ Patch13: 0013-Catch-NetworkNoInterfaces-error-in-docker-prepare_ne.patch # FIXME: upstream fix, drop at next release after v2.2.6 Patch14: 0014-Bump-rubyzip-version-to-fix-CVE-2019-16892.patch Patch15: 0015-ARM-only-Disable-Subprocess-unit-test.patch +# FIXME: upstream fix, drop at the next release after v2.2.6 +Patch16: 0016-Ensure-nfsd-call-is-mocked-up-in-BSD-NFS-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -298,6 +300,7 @@ Optional dependency offering bash completion for vagrant %ifarch %{arm} aarch64 %patch15 -p 1 %endif +%patch16 -p 1 cp %{SOURCE98} .