diff --git a/0001-bin-vagrant-silence-warning-about-installer.patch b/0001-bin-vagrant-silence-warning-about-installer.patch index 9aa9c51..68a6bd7 100644 --- a/0001-bin-vagrant-silence-warning-about-installer.patch +++ b/0001-bin-vagrant-silence-warning-about-installer.patch @@ -1,7 +1,7 @@ From 4e68a53d0053b1b8b6d18c0a7d86776d8cb800f7 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro 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 --- diff --git a/0002-Use-a-private-temporary-dir.patch b/0002-Use-a-private-temporary-dir.patch index 6946d38..b363364 100644 --- a/0002-Use-a-private-temporary-dir.patch +++ b/0002-Use-a-private-temporary-dir.patch @@ -1,7 +1,7 @@ From 2840391e027becd1be47e174e9848d23fa4199fb Mon Sep 17 00:00:00 2001 From: Antonio Terceiro 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 of temporary files (~4 per vagrant invocation). diff --git a/0003-plugins-don-t-abuse-require_relative.patch.patch b/0003-plugins-don-t-abuse-require_relative.patch.patch index d915f4d..e47bcb0 100644 --- a/0003-plugins-don-t-abuse-require_relative.patch.patch +++ b/0003-plugins-don-t-abuse-require_relative.patch.patch @@ -1,7 +1,7 @@ From 8a9eccce115d46e0dbcab3a71c6ced612e7606cd Mon Sep 17 00:00:00 2001 From: Johannes Kastl 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 --- diff --git a/0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch b/0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch index 962ac20..4583086 100644 --- a/0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch +++ b/0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch @@ -1,7 +1,7 @@ From 8ecfa63a112f0b83dc29c226dc0b2ad91953d602 Mon Sep 17 00:00:00 2001 From: Johannes Kastl 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 Signed-off-by: Johannes Kastl diff --git a/0005-do-not-depend-on-wdm.patch b/0005-do-not-depend-on-wdm.patch index d48aa9a..8505799 100644 --- a/0005-do-not-depend-on-wdm.patch +++ b/0005-do-not-depend-on-wdm.patch @@ -1,7 +1,7 @@ From 591ec0a8f1f65a836cc893f403afa3c971ed05dd Mon Sep 17 00:00:00 2001 From: Johannes Kastl 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 --- diff --git a/0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch b/0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch index 852551a..9990c7f 100644 --- a/0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch +++ b/0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch @@ -1,7 +1,7 @@ From 5b273a2b85a188c161eb2ed991eba3dd1f4a6520 Mon Sep 17 00:00:00 2001 From: Johannes Kastl 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 Signed-off-by: Johannes Kastl diff --git a/0007-Don-t-abuse-relative-paths-in-plugins.patch b/0007-Don-t-abuse-relative-paths-in-plugins.patch index 00954a9..0c1aae0 100644 --- a/0007-Don-t-abuse-relative-paths-in-plugins.patch +++ b/0007-Don-t-abuse-relative-paths-in-plugins.patch @@ -1,7 +1,7 @@ From e8b073c8216a63bbbbdd9ce316e86e58b393d3c4 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 07/11] Don't abuse relative paths in plugins +Subject: [PATCH 07/12] 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/0008-Skip-failing-tests.patch b/0008-Skip-failing-tests.patch index d4ddd7a..8f71f38 100644 --- a/0008-Skip-failing-tests.patch +++ b/0008-Skip-failing-tests.patch @@ -1,7 +1,7 @@ From 24f24303433d8fd4ccc374244c7bef576501d24a 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 08/11] Skip failing tests +Subject: [PATCH 08/12] Skip failing tests --- test/unit/bin/vagrant_test.rb | 4 ++-- diff --git a/0009-Disable-Subprocess-unit-test.patch b/0009-Disable-Subprocess-unit-test.patch index bc8e5cc..e60097b 100644 --- a/0009-Disable-Subprocess-unit-test.patch +++ b/0009-Disable-Subprocess-unit-test.patch @@ -1,7 +1,7 @@ From ccf376b72ddc48130bba3d6dfeb732dc7f9f2f67 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 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 failures. These are probably caused by worker being under high load and then diff --git a/0010-Remove-dependency-on-grpc-tools.patch b/0010-Remove-dependency-on-grpc-tools.patch index 8a2e811..89e9616 100644 --- a/0010-Remove-dependency-on-grpc-tools.patch +++ b/0010-Remove-dependency-on-grpc-tools.patch @@ -1,7 +1,7 @@ From fa0e7bc761285ce8a929e55b7038fecaf8491a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= 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 moment. diff --git a/0011-Bump-Ruby-version-to-3.x.patch b/0011-Bump-Ruby-version-to-3.x.patch index a6b246d..76d84f7 100644 --- a/0011-Bump-Ruby-version-to-3.x.patch +++ b/0011-Bump-Ruby-version-to-3.x.patch @@ -1,7 +1,7 @@ From 9aea52ee59c4d75375c380cada552c441e0c7008 Mon Sep 17 00:00:00 2001 From: sophia 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) --- diff --git a/0012-Only-check-for-arguments-matching-test-string-if-the.patch b/0012-Only-check-for-arguments-matching-test-string-if-the.patch new file mode 100644 index 0000000..7d3c292 --- /dev/null +++ b/0012-Only-check-for-arguments-matching-test-string-if-the.patch @@ -0,0 +1,43 @@ +From 1d3054c09b44c25608c073c225f63808b104f2b0 Mon Sep 17 00:00:00 2001 +From: sophia +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 + diff --git a/vagrant.changes b/vagrant.changes index a820fa1..f9bec37 100644 --- a/vagrant.changes +++ b/vagrant.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Tue Jan 17 12:52:05 UTC 2023 - Dan Čermák + +- 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 diff --git a/vagrant.spec b/vagrant.spec index 6108d72..bf972f2 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -59,6 +59,7 @@ Patch8: 0008-Skip-failing-tests.patch Patch9: 0009-Disable-Subprocess-unit-test.patch Patch10: 0010-Remove-dependency-on-grpc-tools.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 # CAUTION: if you change this, then you *must* also change the sed calls which