SHA256
1
0
forked from pool/vagrant

Accepting request 1058910 from home:dancermak:branches:Virtualization:vagrant

Add 0012-Only-check-for-arguments-matching-test-string-if-the.patch to fix test failures with Ruby 3.2

OBS-URL: https://build.opensuse.org/request/show/1058910
OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=74
This commit is contained in:
Dan Čermák 2023-01-17 13:51:02 +00:00 committed by Git OBS Bridge
parent 3877cf5467
commit bc1ca51d31
14 changed files with 78 additions and 11 deletions

View File

@ -1,7 +1,7 @@
From 4e68a53d0053b1b8b6d18c0a7d86776d8cb800f7 Mon Sep 17 00:00:00 2001 From 4e68a53d0053b1b8b6d18c0a7d86776d8cb800f7 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org> From: Antonio Terceiro <terceiro@debian.org>
Date: Sat, 11 Oct 2014 16:54:58 -0300 Date: Sat, 11 Oct 2014 16:54:58 -0300
Subject: [PATCH 01/11] bin/vagrant: silence warning about installer Subject: [PATCH 01/12] bin/vagrant: silence warning about installer
Signed-off-by: Johannes Kastl <kastl@b1-systems.de> Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
--- ---

View File

@ -1,7 +1,7 @@
From 2840391e027becd1be47e174e9848d23fa4199fb Mon Sep 17 00:00:00 2001 From 2840391e027becd1be47e174e9848d23fa4199fb Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org> From: Antonio Terceiro <terceiro@debian.org>
Date: Wed, 22 Oct 2014 09:40:14 -0200 Date: Wed, 22 Oct 2014 09:40:14 -0200
Subject: [PATCH 02/11] Use a private temporary dir Subject: [PATCH 02/12] Use a private temporary dir
Without this vagrant will clutter $TMPDIR with dozens of even hundreds Without this vagrant will clutter $TMPDIR with dozens of even hundreds
of temporary files (~4 per vagrant invocation). of temporary files (~4 per vagrant invocation).

View File

@ -1,7 +1,7 @@
From 8a9eccce115d46e0dbcab3a71c6ced612e7606cd Mon Sep 17 00:00:00 2001 From 8a9eccce115d46e0dbcab3a71c6ced612e7606cd Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de> From: Johannes Kastl <kastl@b1-systems.de>
Date: Wed, 17 May 2017 09:09:57 +0200 Date: Wed, 17 May 2017 09:09:57 +0200
Subject: [PATCH 03/11] plugins-don-t-abuse-require_relative.patch Subject: [PATCH 03/12] plugins-don-t-abuse-require_relative.patch
Signed-off-by: Johannes Kastl <kastl@b1-systems.de> Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
--- ---

View File

@ -1,7 +1,7 @@
From 8ecfa63a112f0b83dc29c226dc0b2ad91953d602 Mon Sep 17 00:00:00 2001 From 8ecfa63a112f0b83dc29c226dc0b2ad91953d602 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de> From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:12:43 +0100 Date: Fri, 16 Nov 2018 21:12:43 +0100
Subject: [PATCH 04/11] fix vbox package boo#1044087, added by Subject: [PATCH 04/12] fix vbox package boo#1044087, added by
robert.munteanu@gmail.com on Sun Aug 13 19:07:06 UTC 2017 robert.munteanu@gmail.com on Sun Aug 13 19:07:06 UTC 2017
Signed-off-by: Johannes Kastl <kastl@b1-systems.de> Signed-off-by: Johannes Kastl <kastl@b1-systems.de>

View File

@ -1,7 +1,7 @@
From 591ec0a8f1f65a836cc893f403afa3c971ed05dd Mon Sep 17 00:00:00 2001 From 591ec0a8f1f65a836cc893f403afa3c971ed05dd Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de> From: Johannes Kastl <kastl@b1-systems.de>
Date: Mon, 4 Jun 2018 09:18:23 +0200 Date: Mon, 4 Jun 2018 09:18:23 +0200
Subject: [PATCH 05/11] do not depend on wdm Subject: [PATCH 05/12] do not depend on wdm
Signed-off-by: Johannes Kastl <kastl@b1-systems.de> Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
--- ---

View File

@ -1,7 +1,7 @@
From 5b273a2b85a188c161eb2ed991eba3dd1f4a6520 Mon Sep 17 00:00:00 2001 From 5b273a2b85a188c161eb2ed991eba3dd1f4a6520 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de> From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:14:46 +0100 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/12] 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 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> Signed-off-by: Johannes Kastl <kastl@b1-systems.de>

View File

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

View File

@ -1,7 +1,7 @@
From 24f24303433d8fd4ccc374244c7bef576501d24a Mon Sep 17 00:00:00 2001 From 24f24303433d8fd4ccc374244c7bef576501d24a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com> From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 1 Apr 2019 17:28:31 +0200 Date: Mon, 1 Apr 2019 17:28:31 +0200
Subject: [PATCH 08/11] Skip failing tests Subject: [PATCH 08/12] Skip failing tests
--- ---
test/unit/bin/vagrant_test.rb | 4 ++-- test/unit/bin/vagrant_test.rb | 4 ++--

View File

@ -1,7 +1,7 @@
From ccf376b72ddc48130bba3d6dfeb732dc7f9f2f67 Mon Sep 17 00:00:00 2001 From ccf376b72ddc48130bba3d6dfeb732dc7f9f2f67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com> From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Wed, 28 Aug 2019 13:39:58 +0200 Date: Wed, 28 Aug 2019 13:39:58 +0200
Subject: [PATCH 09/11] Disable Subprocess unit test Subject: [PATCH 09/12] Disable Subprocess unit test
This unit test is *very* flaky on OBS' workers and causes random build 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 failures. These are probably caused by worker being under high load and then

View File

@ -1,7 +1,7 @@
From fa0e7bc761285ce8a929e55b7038fecaf8491a2e Mon Sep 17 00:00:00 2001 From fa0e7bc761285ce8a929e55b7038fecaf8491a2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com> From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Tue, 23 Aug 2022 16:19:11 +0200 Date: Tue, 23 Aug 2022 16:19:11 +0200
Subject: [PATCH 10/11] Remove dependency on grpc-tools Subject: [PATCH 10/12] Remove dependency on grpc-tools
This package is only needed to build the go plugins, which we do not use at the This package is only needed to build the go plugins, which we do not use at the
moment. moment.

View File

@ -1,7 +1,7 @@
From 9aea52ee59c4d75375c380cada552c441e0c7008 Mon Sep 17 00:00:00 2001 From 9aea52ee59c4d75375c380cada552c441e0c7008 Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com> From: sophia <scastellarin95@gmail.com>
Date: Tue, 3 Jan 2023 10:41:54 -0800 Date: Tue, 3 Jan 2023 10:41:54 -0800
Subject: [PATCH 11/11] Bump Ruby version to 3.x Subject: [PATCH 11/12] Bump Ruby version to 3.x
(cherry picked from commit d69287f8500dd69a7318c608cd63adc9d7922653) (cherry picked from commit d69287f8500dd69a7318c608cd63adc9d7922653)
--- ---

View File

@ -0,0 +1,43 @@
From 1d3054c09b44c25608c073c225f63808b104f2b0 Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com>
Date: Tue, 3 Jan 2023 13:20:14 -0800
Subject: [PATCH 12/12] 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
(cherry picked from commit 9743c857481556838ee417a0033efdee3fb0c7fc)
---
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 f5828f143..fdf9aa67e 100644
--- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb
+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
@@ -91,7 +91,7 @@ VF
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 @@ VF
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
--
2.39.0

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Jan 17 12:52:05 UTC 2023 - Dan Čermák <dcermak@suse.com>
- Add 0012-Only-check-for-arguments-matching-test-string-if-the.patch to fix
test failures with Ruby 3.2
Rebase 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
* 0010-Remove-dependency-on-grpc-tools.patch
* 0011-Bump-Ruby-version-to-3.x.patch
Added patch:
* 0012-Only-check-for-arguments-matching-test-string-if-the.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 10 09:23:16 UTC 2023 - Dan Čermák <dcermak@suse.com> Tue Jan 10 09:23:16 UTC 2023 - Dan Čermák <dcermak@suse.com>

View File

@ -59,6 +59,7 @@ Patch8: 0008-Skip-failing-tests.patch
Patch9: 0009-Disable-Subprocess-unit-test.patch Patch9: 0009-Disable-Subprocess-unit-test.patch
Patch10: 0010-Remove-dependency-on-grpc-tools.patch Patch10: 0010-Remove-dependency-on-grpc-tools.patch
Patch11: 0011-Bump-Ruby-version-to-3.x.patch Patch11: 0011-Bump-Ruby-version-to-3.x.patch
Patch12: 0012-Only-check-for-arguments-matching-test-string-if-the.patch
# force only one ruby version # force only one ruby version
# CAUTION: if you change this, then you *must* also change the sed calls which # CAUTION: if you change this, then you *must* also change the sed calls which