Compare commits

...
Sign in to create a new pull request.

83 commits

Author SHA1 Message Date
Vít Ondruch
dd512fa319 Relax rubygem(rubyzip) dependency
This is in preparation for getting rubyzip 3.0+ into Fedora.
2025-12-22 12:51:10 +01:00
Fedora Release Engineering
098ed181ad Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:56:03 +00:00
Jarek Prokop
28f6e257f9 Fix default URL used for pulling boxes.
The default URL to pull vagrant boxes changed.
Fixing it allows the boxes to be pulled again.

Resolves: rhbz#2337302
2025-01-16 14:16:03 +01:00
Fedora Release Engineering
5f0fa4cc2b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:31:17 +00:00
Software Management Team
7dc964d601 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:47:07 +02:00
Vít Ondruch
2a16199df0 Drop superfluous rest-client dependency.
The dependency was dropped in Vagrant 2.2.11 already:

3ec8d44cf9
https://github.com/hashicorp/vagrant/pull/11916
2024-02-07 11:18:33 +01:00
Fedora Release Engineering
beac2b546a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:25:23 +00:00
Fedora Release Engineering
1965e286b6 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:22:23 +00:00
Zdenek Zambersky
3d99b8052b Added missing dependency on rexml and mime-types 2023-06-21 18:09:37 +02:00
Zdenek Zambersky
da2ecf8f8b Updated net-ssh version 2023-05-09 19:44:45 +02:00
Jarek Prokop
8185bb5452 Rebase to 2.3.4
Remove test adjustments.
Fixes mentioning GH#{11606,12362,12363} are present.

Remove test adjustments for Ruby 2.7 compatibility.
There is a much newer Ruby available in Fedora.

Newer childprocess is present in Fedora for
some time now. We can stop grepping for failures.

Remove test adjustment for fake_ftp 0.3.0 compatibility.
Not required anymore.

Remove obsolete for vagrant-atomic that was retired in F26.

Remove the net-ssh patch.
It is not present anymore in the new version.
And we are going to have net-ssh >= 7.
2023-05-09 19:44:45 +02:00
Pavel Valena
9132acfcfc Upgrade to Vagrant 2.3.0
also upgrade vagrant-spec to newest commit.
2023-05-09 14:30:38 +02:00
Pavel Valena
5f94d1453b Prevent trailing space character on user agent
https://github.com/hashicorp/vagrant/pull/12925/
Resolves: rhbz#2177215
2023-03-16 18:06:40 +01:00
Fedora Release Engineering
b9bccaf626 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 06:03:56 +00:00
Jarek Prokop
fb5d878e41 Enable rubygem-ed25519 requires.
The gem is available in Fedora.
Group the bcrypt_pbkdf with ed25519
as the ed25519 implementation depends on that gem.

Resolves: rhbz#1962869
2023-01-09 10:21:08 +01:00
Mamoru TASAKA
4e823ef39d add spec file change 2023-01-06 21:40:18 +09:00
Mamoru TASAKA
d063027935 Replace regex match patch with the one by the upstream 2023-01-06 21:38:47 +09:00
Mamoru TASAKA
43092b81b6 Backport upstream fix for ruby3.2 File.exists? removal
Apply proposal fix for ruby3.2 Object#=~ removal
2022-12-26 16:49:25 +09:00
Fedora Release Engineering
e781282c4e Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 11:38:12 +00:00
Pavel Valena
61abdd7802 Add missing dependency on bin/ps
Without it:

______________________________________________________

$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
The executable 'ps' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.
______________________________________________________
2022-03-11 01:56:09 +01:00
Jarek Prokop
c0bb4d585a Relax required Ruby version.
Otherwise RubyGems throws confusing error when trying to run vagrant.

Relevant RubyGems issue: https://github.com/rubygems/rubygems/issues/4338
2022-03-03 11:18:51 +01:00
Jarek Prokop
f8a97e75f0 Fix FTBFS for ruby 3.1 due to new rspec-mocks.
BuildRequires for rubygem-rake is needed because rspec dropped the
dependency on the gem in new release.
2022-03-03 11:18:51 +01:00
Fedora Release Engineering
7a08ef5729 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 03:44:53 +00:00
Vít Ondruch
ee96fbd1ba Relax net-ssh dependency.
This will ease update of `rubygem(net-ssh)` in Fedora and therefore
also update to the next version of Vagrant.

Applied: 577ea8bd22
2021-11-30 17:01:08 +01:00
Pavel Valena
c79d075bd6 Add zsh autocompletion. 2021-11-30 17:01:08 +01:00
Philipp Trulson
05d7a608b7 Upgrade to Vagrant 2.2.19
Resolves: rhbz#1980195
2021-11-30 16:31:19 +01:00
Fedora Release Engineering
e282d9ac91 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 20:15:41 +00:00
Pavel Valena
f5db5d840f Fixup .gitignore file. 2021-05-13 00:57:29 +02:00
Pavel Valena
499a8974a9 Temporarily disable 6 tests
due to older childprocess,
and unknown test suite error.
2021-05-13 00:16:04 +02:00
Pavel Valena
01bc73e434 Fix: new RPM compatibility
https://github.com/rpm-software-management/rpm/issues/1669
2021-05-13 00:16:04 +02:00
Pavel Valena
4a3ce0bd38 Update to Vagrant 2.2.16.
Resolves: rhbz#1872307

 - Enhance .spec file.
 - Fix compatibility with Ruby 3.0.
 - Add rexml dependency, as it's no longer a default gem with Ruby 3.0.
 - Apply net-ssh patches apply regardless of net-ssh version.
 - Add bcond_with for ed25519, and also respective (Build)Requires,
   as the dependency is monkey-patched for vagrant use.
2021-05-13 00:16:04 +02:00
Fedora Release Engineering
0da5407f5b - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:52:10 +00:00
Vít Ondruch
259be2b46f Do prep steps in %prep section. 2021-01-21 11:22:11 +01:00
Vít Ondruch
27608d84ce Relax Ruby version restriction.
Resolves: rhbz#1915671
2021-01-21 11:21:34 +01:00
Vít Ondruch
577ea8bd22 Relax net-ssh dependency.
This will ease update of `rubygem(net-ssh)` in Fedora and therefore
also update to the next version of Vagrant.
2021-01-21 10:16:52 +01:00
Vít Ondruch
fd25a55913 Fix Ruby 3.0 and rspec-mock 3.10.1 compatibility. 2021-01-21 10:16:16 +01:00
Vít Ondruch
64073e0d9e Use Erubi instead of Erubis. 2020-08-19 12:57:43 +02:00
Fedora Release Engineering
76a5264efc - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 13:30:37 +00:00
Pavel Valena
02af3e5cd7 Move dependency load map_command_options
for creating @box_extra_download_options to config/vm.rb.

This is needed to be able to run vagrant-libvirt test suite,
f.e.. It resolves usecase when `bin/vagrant` executable is not used directly.

https://github.com/hashicorp/vagrant/pull/11609
2020-05-20 19:42:24 +02:00
Pavel Valena
7e8d943eaf Update to Vagrant 2.2.9.
Added support for podman via docker podman-docker wrapper
(https://github.com/hashicorp/vagrant/pull/11356).
2020-05-12 03:02:49 +02:00
Pavel Valena
5cd1a2c4b4 Fixup man page and add --help check.
Resolves: rhbz#1801305
2020-05-12 03:02:09 +02:00
Vít Ondruch
7ab76a36b4 Relax rubygem-net-ssh dependency.
Resolves: rhbz#1805240
2020-04-21 14:23:45 +02:00
Vít Ondruch
b11cae0121 Fix FTBFS due to Ruby 2.7.
Resolves: rhbz#1800230
2020-04-21 14:23:05 +02:00
Fedora Release Engineering
5f8c0aa908 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 02:52:50 +00:00
Pavel Valena
33a64aee0a Allow higher listen dependency
to work with newer rubygem-listen.
2019-11-20 21:10:09 +01:00
Pavel Valena
958f0e1daa Upgrade to Vagrant 2.2.6
also fix i18n dependency to allow for v1.7.0.
2019-10-23 01:08:02 +02:00
Pavel Valena
f868ebeebf shadow-utils are no longer used in *pre* and thus not BRequired. 2019-10-15 13:17:51 +02:00
Pavel Valena
0bf64cab56 Move man pages to main package
and also ehnance/simplify help2man bcond_with syntax.
2019-10-15 13:17:47 +02:00
Pavel Valena
61dbe09296 Add bcond_without for help2man. 2019-08-19 20:59:48 +02:00
Pavel Valena
a8e30ac277 Update to Vagrant 2.2.5. 2019-08-14 22:06:03 +02:00
Fedora Release Engineering
abc1eca5db - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 02:44:16 +00:00
Vít Ondruch
cfb118b631 Don't create vagrant group anymore.
The group was intedned to alleviate number of password prompts, but it
was never really used (rhbz#1187019). Now, vagrant-libvirt uses QEMU
session by defualt, so it is definitely not needed.
2019-03-15 19:12:08 +01:00
Pavel Valena
0caa3d5743 Update to Vagrant 2.2.4. 2019-03-01 20:03:25 +01:00
Vít Ondruch
1252de5fb2 Fix fake_ftp 0.3.x test suite compatibility. 2019-02-26 13:15:26 +01:00
Vít Ondruch
2270f4fe80 Be more precise about relaxing dependencies.
This helps to ensure we are not doing unnecessary changes in future.
2019-02-15 17:45:25 +01:00
Vít Ondruch
a2925fe2af Disable Vagrant's built-in version check. 2019-02-15 17:22:16 +01:00
Pavel Valena
979a3eb5d4 Update to Vagrant 2.2.3
also enhance .spec file, namely:
 - use macros to edit gemspec instead of patching
 - update `vagrant-spec` commit
 - use with-cxxflags in %%vagrant_plugin_install macro
2019-02-14 09:33:39 +01:00
Fedora Release Engineering
3223e537f5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 11:02:28 +00:00
Igor Gnatenko
28047ef9d7 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:53 +01:00
Pavel Valena
548a38c88e Allow use of newer Childprocess gem
also needs macro from rubygems-devel to edit vagrant.gemspec.
2018-10-24 13:06:44 +02:00
Pavel Valena
76d7f3f923 Fix: add two additional patches for change_host_name logic
* 11b0d58fa0
 * 1797798760

The functionality was not backported fully so vagrant crashed on hostname
change.
https://bugzilla.redhat.com/show_bug.cgi?id=1624068
2018-10-16 12:41:07 +02:00
Pavel Valena
9ab4392602 Update restart logic in redhat change_host_name cap
https://github.com/hashicorp/vagrant/pull/10223
2018-10-02 13:07:48 +02:00
Pavel Valena
6fa066f3b9 Update to Vagrant 2.1.5. 2018-09-24 12:55:09 +02:00
Pavel Valena
9dd8d94baa Fix the change in packaging for nfs in Fedora.
Forwardport https://src.fedoraproject.org/rpms/vagrant/pull-request/11
Resolves: rhbz#1620074
2018-09-18 16:54:34 +02:00
Pavel Valena
e00d21f356 Add manpage generated using man2help. 2018-07-18 19:41:06 +02:00
Pavel Valena
81ee9f1a21 Update to Vagrant 2.1.2. 2018-07-18 19:41:06 +02:00
Fedora Release Engineering
b64db12a10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 08:23:05 +00:00
Pavel Valena
c23d757267 Update to Vagrant 2.1.1. 2018-06-07 14:41:45 +02:00
Pavel Valena
64b439f937 Update to Vagrant 2.0.4. 2018-04-23 18:52:40 +02:00
Pavel Valena
2c4a81fd8a Update to Vagrant 2.0.3. 2018-03-26 18:37:54 +02:00
Pavel Valena
84a0ec282e Allow rubygem-i18n ~> 1.0
as it was updated in Fedora.
https://github.com/hashicorp/vagrant/pull/9496
2018-02-21 16:33:34 +01:00
Pavel Valena
3a4457942f Update to Vagrant 2.0.2.
Update to latest vagrant-spec commit.
2018-02-07 00:27:05 +01:00
Vít Ondruch
b2e9d7d062 Fix Ruby 2.5 compatibilty. 2018-01-09 09:06:33 +01:00
Pavel Valena
f9ac29b028 Use rake to run tests
to resolve issues with requires.
2017-12-20 21:19:55 +01:00
Pavel Valena
c4d6537a3f Update to Vagrant 2.0.1.
Replace vagrant-1.8.1-disable-winrm-tests.patch with sed command.
Update to latest vagrant-spec commit.
Execute test suite properly.
Remove 'Use system certificates' patch - not needed anymore.
Add `ssh` BuildRequire for tests.
Disable tests that require bundler.
2017-12-18 16:08:16 +01:00
Vít Ondruch
99a2bac36f Fix plugin registration issues caused by changes in RPM (rhbz#1523296).
Originally, the transaction file triggers provided just list of
filenames, but that was not intentional and the list now contains also
directory entries. Fortunatelly, these entries can be filtered out if
the path end withi '/'.
2017-12-12 12:32:12 +01:00
Pavel Valena
5953c4abc2 Update dependencies to reflect .gemspec
Except for rubygem(childproccess).
https://bugzilla.redhat.com/show_bug.cgi?id=1427505#c28
2017-09-08 12:13:09 +02:00
Pavel Valena
363de6e1ca Use system certificates- split to standalone patch
Extracted from vagrant-1.9.1-fix-dependencies.patch
at commit 630247626b
2017-09-08 12:13:09 +02:00
Pavel Valena
b2a86b6f73 binstub: set VAGRANT_HOME in better way; use /bin/bash directly 2017-09-08 12:13:08 +02:00
Pavel Valena
dfbe70f6ed Use VAGRANT_PREFERRED_PROVIDERS in binstub instead of VAGRANT_DEFAULT_PROVIDER.
To support docker provider(also enables preset in Vagrantfile).
https://bugzilla.redhat.com/show_bug.cgi?id=1444492
2017-09-06 16:33:25 +02:00
Pavel Valena
9c727af07e Fix typos in binstub. 2017-09-06 16:33:25 +02:00
Pavel Valena
42da19c59a Update to Vagrant 1.9.8.
Remove Nokogiri dependency.
Use current vagrant-spec.
Use unrestricted version for rubygem(rspec) BuildRequire (RSpec 3 as of now).
Add rubygem(rspec-its) BuildRequire.
2017-09-06 16:33:24 +02:00
Fedora Release Engineering
bf688f2182 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 21:08:42 +00:00
18 changed files with 900 additions and 402 deletions

13
.gitignore vendored
View file

@ -1,11 +1,2 @@
/vagrant-1.6.5.tar.gz
/vagrant-spec-c0dafc996165bf1628b672dd533f1858ff66fe4a.tar.gz
/vagrant-1.7.2.tar.gz
/vagrant-1.7.4.tar.gz
/vagrant-spec-f1a18fd3e5387328ca83e016e48373aadb67112a.tar.gz
/vagrant-1.8.1.tar.gz
/vagrant-spec-9bba7e1228379c0a249a06ce76ba8ea7d276afbe.tar.gz
/vagrant-1.8.5.tar.gz
/vagrant-1.8.6.tar.gz
/vagrant-1.8.7.tar.gz
/vagrant-1.9.1.tar.gz
/v*.tar.gz
/vagrant-spec-*.tar.gz

29
binstub
View file

@ -1,11 +1,16 @@
#!/usr/bin/env bash
#!/usr/bin/bash
#
# This is a wrapper to properly execute Vagrant within the embedded
# Vagrant installation directory. This sets up proper environmental variables
# Vagrant installation directory. This sets up proper environment variables
# so that everything loads and compiles to proper directories.
# Load defaults, especially VAGRANT_PREFERRED_PROVIDERS
if [ -r /etc/default/vagrant ]; then
source /etc/default/vagrant
fi
# Export gem paths so that we use the isolated gems.
# TODO: Should be repalced from .spec file.
# TODO: Should be replaced from .spec file.
# ruby -e "print Gem.path.join(':')"
export GEM_PATH="/usr/share/gems:/usr/share/vagrant/gems"
@ -13,16 +18,14 @@ export GEM_PATH="/usr/share/gems:/usr/share/vagrant/gems"
#
# This needs to be set because Bundler includes gem paths
# from RubyGems' Gem.paths.
if [ -z $VAGRANT_HOME ]; then
VAGRANT_HOME=$(eval echo "~/.vagrant.d")
fi
VAGRANT_HOME=${VAGRANT_HOME:-~/.vagrant.d}
export GEM_HOME="$VAGRANT_HOME/gems"
# SSL certs
export SSL_CERT_FILE="${SSL_CERT_FILE:-/etc/pki/tls/cert.pem}"
# Export an enviromental variable to say we're in a Vagrant
# Export an enviroment variable to say we're in a Vagrant
# installer created environment.
export VAGRANT_INSTALLER_ENV=1
# This is currently used only in Vagrant::Plugin::Manager.system_plugins_file
@ -35,17 +38,21 @@ export VAGRANT_INSTALLER_VERSION="2"
# because uname dependencies can conflict on some platforms.
OS=$(uname -s 2>/dev/null)
# Export the OS as an environmental variable that Vagrant can access
# Export the OS as an environment variable that Vagrant can access
# so that it can behave better.
export VAGRANT_DETECTED_OS="${OS}"
# Export the VAGRANT_EXECUTABLE so that pre-rubygems can optimize a bit
export VAGRANT_EXECUTABLE="${VAGRANT_INSTALLER_EMBEDDED_DIR}/gems/bin/vagrant"
# libvirt provider as a default
if [ -z $VAGRANT_DEFAULT_PROVIDER ]; then
export VAGRANT_DEFAULT_PROVIDER=libvirt
# Set providers' preferred order(priority) if not already set
if [ -z ${VAGRANT_PREFERRED_PROVIDERS+empty} ]; then
VAGRANT_PREFERRED_PROVIDERS=libvirt,docker
fi
export VAGRANT_PREFERRED_PROVIDERS
# Disable Vagrant's built-in version check.
export VAGRANT_CHECKPOINT_DISABLE=yes
# Call the actual Vagrant bin with our arguments
exec ruby "${VAGRANT_EXECUTABLE}" "$@"

View file

@ -18,16 +18,21 @@
%vagrant_plugin_conf_link %{vagrant_embedded_dir}/plugins.json
%vagrant_plugin_conf %{vagrant_plugin_conf_dir}/plugins.json
# Install gem into appropriate directory.
# -n<vagrant_plugin_file> Overrides gem file name for installation.
# -d<install_dir> Set installation directory.
# %vagrant_plugin_install - Install vagrant_plugin into appropriate directory.
#
# Usage: %vagrant_plugin_install [options]
#
# -n <gem_file> Overrides gem file name for installation.
# -d <install_dir> Set installation directory.
#
%vagrant_plugin_install(d:n:) \
mkdir -p %{-d*}%{!?-d:.%{vagrant_plugin_dir}} \
\
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
CONFIGURE_ARGS="--with-cflags='%{optflags}' --with-cxxflags='%{optflags}' $CONFIGURE_ARGS" \\\
gem install \\\
-V \\\
--local \\\
--no-user-install \\\
--install-dir %{-d*}%{!?-d:.%{vagrant_plugin_dir}} \\\
--bindir .%{_bindir} \\\
--ignore-dependencies \\\

View file

@ -1,2 +1,2 @@
SHA512 (vagrant-1.9.1.tar.gz) = 07ea6e2d881806ce61395a30abdaa7b4f7c2c39bb909d6c6e0aa14101945a9a26078ed18ebb8e238d97f05ee060564fb290615ac4868b80ee29b64b88a666452
SHA512 (vagrant-spec-9bba7e1228379c0a249a06ce76ba8ea7d276afbe.tar.gz) = eda90b5e05c04c7c690bf4579931a0aa2a418ca6f3f1f9b0c18770e4d09fcea2f081f817604ed73c84cb33c437674e315b0ecbdfa7dc24ca94713bb179cb3544
SHA512 (v2.3.4.tar.gz) = 0d47e57c3c190743b4d0484ba1e48e3aad73ced3b356f0a4e54b66649eab2bd5d3fc57a06c62b4cc7d6c8e4617ef18a283c03d01553cc575c0884e464a27b501
SHA512 (vagrant-spec-a88825f4cb254b703d0f9235667223f02ad5c600.tar.gz) = 50e4e2c9e69ccb0309876d204d8d66f606188e1d11853071a74819fe75126ed65fa3d02a31bdf2f8e29679a81d12fa2daed806eba034532c8150fe53d749fb84

View file

@ -1,63 +0,0 @@
diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
index 31354a7..f2dfd0f 100644
--- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb
+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
@@ -498,55 +498,6 @@ VF
end
end
- context "with winrm communicator" do
-
- let(:iso_winrm_env) do
- env = isolated_environment
- env.vagrantfile <<-VF
-Vagrant.configure("2") do |config|
- config.winrm.username = 'winner'
- config.winrm.password = 'winword'
- config.winrm.transport = :ssl
-
- config.vm.define :machine1 do |machine|
- machine.vm.box = "winbox"
- machine.vm.communicator = :winrm
- end
-end
-VF
- env.create_vagrant_env
- end
-
- let(:machine) { iso_winrm_env.machine(iso_winrm_env.machine_names[0], :dummy) }
-
- it_should_set_arguments_and_environment_variables
-
- it "generates an inventory with winrm connection settings" do
-
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
- expect(config.inventory_path).to be_nil
- expect(File.exists?(generated_inventory_file)).to be_true
- inventory_content = File.read(generated_inventory_file)
-
- expect(inventory_content).to include("machine1 ansible_connection=winrm ansible_ssh_host=127.0.0.1 ansible_ssh_port=55986 ansible_ssh_user='winner' ansible_ssh_pass='winword'\n")
- }
- end
-
- describe "with force_remote_user option disabled" do
- before do
- config.force_remote_user = false
- end
-
- it "doesn't set the ansible remote user in inventory and use '--user' argument with the vagrant ssh username" do
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
- inventory_content = File.read(generated_inventory_file)
-
- expect(inventory_content).to include("machine1 ansible_connection=winrm ansible_ssh_host=127.0.0.1 ansible_ssh_port=55986 ansible_ssh_pass='winword'\n")
- expect(args).to include("--user=testuser")
- }
- end
- end
- end
describe "with inventory_path option" do
before do
--
2.5.0

View file

@ -1,171 +0,0 @@
From 3cdd1d09f9617e6005fc643000b5486ffbe22577 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 14 Feb 2017 10:13:29 +0100
Subject: [PATCH 1/2] Use Integer instead of Fixnum for Ruby 2.4+
compatibility.
---
lib/vagrant/cli.rb | 2 +-
lib/vagrant/plugin/v2/communicator.rb | 2 +-
lib/vagrant/registry.rb | 2 +-
plugins/provisioners/shell/config.rb | 4 ++--
plugins/pushes/local-exec/config.rb | 4 ++--
test/unit/plugins/provisioners/shell/config_test.rb | 6 +++---
test/unit/plugins/pushes/local-exec/config_test.rb | 4 ++--
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/vagrant/cli.rb b/lib/vagrant/cli.rb
index a6e9655f0..cca8c0184 100644
--- a/lib/vagrant/cli.rb
+++ b/lib/vagrant/cli.rb
@@ -45,7 +45,7 @@ module Vagrant
result = 1
end
- result = 0 if !result.is_a?(Fixnum)
+ result = 0 if !result.is_a?(Integer)
return result
end
diff --git a/lib/vagrant/plugin/v2/communicator.rb b/lib/vagrant/plugin/v2/communicator.rb
index 511fb6002..41385f486 100644
--- a/lib/vagrant/plugin/v2/communicator.rb
+++ b/lib/vagrant/plugin/v2/communicator.rb
@@ -50,7 +50,7 @@ module Vagrant
# until then. It will wait up to the given duration or raise an
# exception if something goes wrong.
#
- # @param [Fixnum] duration Timeout in seconds.
+ # @param [Integer] duration Timeout in seconds.
# @return [Boolean] Will return true on successful connection
# or false on timeout.
def wait_for_ready(duration)
diff --git a/lib/vagrant/registry.rb b/lib/vagrant/registry.rb
index d84a745a5..c0c4e1bad 100644
--- a/lib/vagrant/registry.rb
+++ b/lib/vagrant/registry.rb
@@ -52,7 +52,7 @@ module Vagrant
# Return the number of elements in this registry.
#
- # @return [Fixnum]
+ # @return [Integer]
def length
@items.keys.length
end
diff --git a/plugins/provisioners/shell/config.rb b/plugins/provisioners/shell/config.rb
index 049eb15d0..05da320e3 100644
--- a/plugins/provisioners/shell/config.rb
+++ b/plugins/provisioners/shell/config.rb
@@ -106,10 +106,10 @@ module VagrantPlugins
def args_valid?
return true if !args
return true if args.is_a?(String)
- return true if args.is_a?(Fixnum)
+ return true if args.is_a?(Integer)
if args.is_a?(Array)
args.each do |a|
- return false if !a.kind_of?(String) && !a.kind_of?(Fixnum)
+ return false if !a.kind_of?(String) && !a.kind_of?(Integer)
end
return true
diff --git a/plugins/pushes/local-exec/config.rb b/plugins/pushes/local-exec/config.rb
index d62dfa8fa..9ed466088 100644
--- a/plugins/pushes/local-exec/config.rb
+++ b/plugins/pushes/local-exec/config.rb
@@ -63,10 +63,10 @@ module VagrantPlugins
def args_valid?
return true if !args
return true if args.is_a?(String)
- return true if args.is_a?(Fixnum)
+ return true if args.is_a?(Integer)
if args.is_a?(Array)
args.each do |a|
- return false if !a.kind_of?(String) && !a.kind_of?(Fixnum)
+ return false if !a.kind_of?(String) && !a.kind_of?(Integer)
end
return true
diff --git a/test/unit/plugins/provisioners/shell/config_test.rb b/test/unit/plugins/provisioners/shell/config_test.rb
index c4d260b90..905a28b03 100644
--- a/test/unit/plugins/provisioners/shell/config_test.rb
+++ b/test/unit/plugins/provisioners/shell/config_test.rb
@@ -30,7 +30,7 @@ describe "VagrantPlugins::Shell::Config" do
expect(result["shell provisioner"]).to eq([])
end
- it "passes with fixnum args" do
+ it "passes with integer args" do
subject.path = file_that_exists
subject.args = 1
subject.finalize!
@@ -112,7 +112,7 @@ describe "VagrantPlugins::Shell::Config" do
end
describe 'finalize!' do
- it 'changes fixnum args into strings' do
+ it 'changes integer args into strings' do
subject.path = file_that_exists
subject.args = 1
subject.finalize!
@@ -120,7 +120,7 @@ describe "VagrantPlugins::Shell::Config" do
expect(subject.args).to eq '1'
end
- it 'changes fixnum args in arrays into strings' do
+ it 'changes integer args in arrays into strings' do
subject.path = file_that_exists
subject.args = ["string", 1, 2]
subject.finalize!
diff --git a/test/unit/plugins/pushes/local-exec/config_test.rb b/test/unit/plugins/pushes/local-exec/config_test.rb
index 1bde10d98..9442b6420 100644
--- a/test/unit/plugins/pushes/local-exec/config_test.rb
+++ b/test/unit/plugins/pushes/local-exec/config_test.rb
@@ -70,7 +70,7 @@ describe VagrantPlugins::LocalExecPush::Config do
expect(errors).to be_empty
end
- it "passes with fixnum args" do
+ it "passes with integer args" do
subject.args = 1
expect(errors).to be_empty
end
@@ -118,7 +118,7 @@ describe VagrantPlugins::LocalExecPush::Config do
expect(errors).to be_empty
end
- it "passes with fixnum args" do
+ it "passes with integer args" do
subject.args = 1
expect(errors).to be_empty
end
--
2.11.1
From 6d269293e37db86325bec0a17502d68838d28214 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 14 Feb 2017 10:33:58 +0100
Subject: [PATCH 2/2] Do not use deprecated API.
---
lib/vagrant/util/keypair.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vagrant/util/keypair.rb b/lib/vagrant/util/keypair.rb
index 342d3264f..5e3d10ea6 100644
--- a/lib/vagrant/util/keypair.rb
+++ b/lib/vagrant/util/keypair.rb
@@ -26,7 +26,7 @@ module Vagrant
private_key = rsa_key.to_pem
if password
- cipher = OpenSSL::Cipher::Cipher.new('des3')
+ cipher = OpenSSL::Cipher.new('des3')
private_key = rsa_key.to_pem(cipher, password)
end
--
2.11.1

View file

@ -1,70 +0,0 @@
From 8d5d208fbc4a9b87c6f1f9991dbbf65d5cb5bfbb Mon Sep 17 00:00:00 2001
From: Tomas Hrcka <thrcka@redhat.com>
Date: Wed, 27 Jan 2016 10:20:34 +0100
Subject: [PATCH] fix dependencies
---
lib/vagrant/bundler.rb | 2 +-
lib/vagrant/util/downloader.rb | 5 +++--
vagrant.gemspec | 41 ++++++++++++++++++++---------------------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb
index 03e6238..9a02a85 100644
--- a/lib/vagrant/util/downloader.rb
+++ b/lib/vagrant/util/downloader.rb
@@ -297,8 +297,9 @@ module Vagrant
# If we're in Vagrant, then we use the packaged CA bundle
if Vagrant.in_installer?
subprocess_options[:env] ||= {}
- subprocess_options[:env]["CURL_CA_BUNDLE"] =
- File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
+ #Use system certificates.
+ #subprocess_options[:env]["CURL_CA_BUNDLE"] =
+ # File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
end
return [options, subprocess_options]
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 078add3..d1dd7bd 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -22,23 +22,27 @@ Gem::Specification.new do |s|
s.add_dependency "listen", "~> 3.1.5"
s.add_dependency "hashicorp-checkpoint", "~> 0.1.1"
s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
- s.add_dependency "net-ssh", "~> 3.0.1"
+ s.add_dependency "net-ssh", ">= 3.0"
s.add_dependency "net-sftp", "~> 2.1"
- s.add_dependency "net-scp", "~> 1.1.0"
- s.add_dependency "rb-kqueue", "~> 0.2.0"
+ s.add_dependency "net-scp", ">= 1.1.0"
+ # Remove BSD specific dependency.
+ # s.add_dependency "rb-kqueue", "~> 0.2.0"
s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"
- s.add_dependency "wdm", "~> 0.1.0"
- s.add_dependency "winrm", "~> 1.6"
- s.add_dependency "winrm-fs", "~> 0.3.0"
+ # Remove Windows specific dependency.
+ # s.add_dependency "wdm", "~> 0.1.0"
+ # s.add_dependency "winrm", "~> 1.6"
+ # s.add_dependency "winrm-fs", "~> 0.3.0"
# We lock this down to avoid compilation issues.
- s.add_dependency "nokogiri", "= 1.6.7.1"
+ s.add_dependency "nokogiri"
# NOTE: The ruby_dep gem is an implicit dependency from the listen gem. Later versions
# of the ruby_dep gem impose an aggressive constraint on the required ruby version (>= 2.2.5).
# Explicit constraint is defined to provide required dependency to listen without imposing
# tighter restrictions on valid ruby versions
- s.add_dependency "ruby_dep", "<= 1.3.1"
+ #
+ # Do not impose any Ruby version restrictions on Fedora.
+ # s.add_dependency "ruby_dep", "<= 1.3.1"
# Constraint rake to properly handle deprecated method usage
# from within rspec
--
2.5.0

View file

@ -0,0 +1,38 @@
From 2fe4056a7dcf96dd894875b02032a988777e05d4 Mon Sep 17 00:00:00 2001
From: Chris Roberts <croberts@hashicorp.com>
Date: Mon, 14 Nov 2022 10:11:00 -0800
Subject: [PATCH] Fix test using `File.exists?` to use non-deprecated name
---
test/unit/vagrant/util/install_cli_autocomplete_test.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/unit/vagrant/util/install_cli_autocomplete_test.rb b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
index a62c065ddce..330b8b44805 100644
--- a/test/unit/vagrant/util/install_cli_autocomplete_test.rb
+++ b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
@@ -12,7 +12,7 @@
describe "#shell_installed" do
it "should return path to config file if exists" do
- allow(File).to receive(:exists?).with(target_file).and_return(true)
+ allow(File).to receive(:exist?).with(target_file).and_return(true)
expect(subject.shell_installed(home)).to eq(target_file)
end
@@ -36,7 +36,7 @@
describe "#install" do
it "installs autocomplete" do
- allow(File).to receive(:exists?).with(target_file).and_return(true)
+ allow(File).to receive(:exist?).with(target_file).and_return(true)
allow(File).to receive(:foreach).with(target_file).and_yield("nothing")
expect(File).to receive(:open).with(target_file, "a")
subject.install(home)
@@ -67,4 +67,4 @@
expect{ subject.install(["oops"]) }.to raise_error(ArgumentError)
end
end
-end
\ No newline at end of file
+end

View file

@ -0,0 +1,24 @@
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
diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb
index eb2caab..bd9f8a0 100644
--- a/lib/vagrant/bundler.rb
+++ b/lib/vagrant/bundler.rb
@@ -645,12 +645,10 @@ 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
# discover all the gems we have available
list = {}

View file

@ -0,0 +1,21 @@
From c7ef689d86294bcdb8ae5d31ddabcba416e3382d Mon Sep 17 00:00:00 2001
From: Chris Roberts <croberts@hashicorp.com>
Date: Wed, 28 Sep 2022 13:51:54 -0700
Subject: [PATCH] Prevent trailing space character on user agent
---
lib/vagrant/util/downloader.rb | 2 +-
diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb
index eee9744e74f..a7daf9684b7 100644
--- a/lib/vagrant/util/downloader.rb
+++ b/lib/vagrant/util/downloader.rb
@@ -21,7 +21,7 @@ class Downloader
# are properly tracked.
#
# Vagrant/1.7.4 (+https://www.vagrantup.com; ruby2.1.0)
- USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".freeze
+ USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".strip.freeze
# Hosts that do not require notification on redirect
SILENCED_HOSTS = [

View file

@ -0,0 +1,41 @@
From aa62e1be219a129efe09464981bd3ae1f7b31282 Mon Sep 17 00:00:00 2001
From: Jarek Prokop <jprokop@redhat.com>
Date: Tue, 9 May 2023 19:41:28 +0200
Subject: [PATCH] Disable loading of direct_conversions file.
plugins/commands/serve/util/direct_conversions.rb file contains
logic for Protobuf related code. It needs related google/protobuf
dependencies, therefore it is better to remove the file and
prevent loading it until we have google/protobuf components available
in Fedora.
---
plugins/commands/serve/command.rb | 2 +-
plugins/commands/serve/util.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/commands/serve/command.rb b/plugins/commands/serve/command.rb
index 9948f28bd..65d74f5d2 100644
--- a/plugins/commands/serve/command.rb
+++ b/plugins/commands/serve/command.rb
@@ -138,4 +138,4 @@ module VagrantPlugins
end
# Load in our conversions down here so all the autoload stuff is in place
-require Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions.rb").to_s
+#require Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions.rb").to_s
diff --git a/plugins/commands/serve/util.rb b/plugins/commands/serve/util.rb
index a8f963df7..930d023a6 100644
--- a/plugins/commands/serve/util.rb
+++ b/plugins/commands/serve/util.rb
@@ -4,7 +4,7 @@ module VagrantPlugins
autoload :Cacher, Vagrant.source_root.join("plugins/commands/serve/util/cacher").to_s
autoload :ClientSetup, Vagrant.source_root.join("plugins/commands/serve/util/client_setup").to_s
autoload :Connector, Vagrant.source_root.join("plugins/commands/serve/util/connector").to_s
- autoload :DirectConversion, Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions").to_s
+ # autoload :DirectConversion, Vagrant.source_root.join("plugins/commands/serve/util/direct_conversions").to_s
autoload :ExceptionTransformer, Vagrant.source_root.join("plugins/commands/serve/util/exception_transformer").to_s
autoload :FuncSpec, Vagrant.source_root.join("plugins/commands/serve/util/func_spec").to_s
autoload :HasBroker, Vagrant.source_root.join("plugins/commands/serve/util/has_broker").to_s
--
2.40.1

View file

@ -0,0 +1,23 @@
From 7661eba89a5786a1b0826dbb2f45f8827d9a5103 Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com>
Date: Tue, 3 Jan 2023 12:23:37 -0800
Subject: [PATCH] Environment home dir is also not accessible if EROFS error
occurs
---
lib/vagrant/environment.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb
index de99cbf3ba5..8b2531182ca 100644
--- a/lib/vagrant/environment.rb
+++ b/lib/vagrant/environment.rb
@@ -846,7 +846,7 @@ def setup_home_path
begin
@logger.info("Creating: #{dir}")
FileUtils.mkdir_p(dir)
- rescue Errno::EACCES
+ rescue Errno::EACCES, Errno::EROFS
raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s
end
end

View file

@ -0,0 +1,22 @@
From 27440fdd8cebf57882e3672376d409b139cc1e86 Mon Sep 17 00:00:00 2001
From: Jarek Prokop <jprokop@redhat.com>
Date: Thu, 16 Jan 2025 13:36:05 +0100
Subject: [PATCH] Fix the default vagrant URL for pulling boxes.
---
lib/vagrant/shared_helpers.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb
index b07c89a48..3c57cad6d 100644
--- a/lib/vagrant/shared_helpers.rb
+++ b/lib/vagrant/shared_helpers.rb
@@ -10,7 +10,7 @@ module Vagrant
# of Vagrant that may require remote access.
#
# @return [String]
- DEFAULT_SERVER_URL = "https://vagrantcloud.com".freeze
+ DEFAULT_SERVER_URL = "https://vagrantcloud.com/api/v2/vagrant".freeze
# Max number of seconds to wait for joining an active thread.
#

View file

@ -0,0 +1,39 @@
From 9743c857481556838ee417a0033efdee3fb0c7fc Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com>
Date: Tue, 3 Jan 2023 13:20:14 -0800
Subject: [PATCH] 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
---
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 f5828f14340..fdf9aa67eaa 100644
--- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb
+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
@@ -91,7 +91,7 @@ def self.it_should_set_arguments_and_environment_variables(
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 @@ def self.it_should_set_arguments_and_environment_variables(
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

View file

@ -0,0 +1,70 @@
diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb
--- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb 2023-02-16 13:41:49.267357857 +0100
+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/lib/vagrant.rb 2023-03-17 16:47:49.956035219 +0100
@@ -46,19 +46,19 @@
require "vagrant/plugin/manager"
# Update the load path so our protos can be located
-$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs").to_s
-$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s
-$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto/vagrant_plugin_sdk").to_s
+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs").to_s
+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s
+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto/vagrant_plugin_sdk").to_s
# Load our protos so they are available
-require 'vagrant/protobufs/proto/vagrant_server/server_pb'
-require 'vagrant/protobufs/proto/vagrant_server/server_services_pb'
-require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_pb'
-require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_services_pb'
-require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb'
-require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb'
-require 'vagrant/protobufs/proto/plugin/grpc_broker_pb'
-require 'vagrant/protobufs/proto/plugin/grpc_broker_services_pb'
+# require 'vagrant/protobufs/proto/vagrant_server/server_pb'
+# require 'vagrant/protobufs/proto/vagrant_server/server_services_pb'
+# require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_pb'
+# require 'vagrant/protobufs/proto/ruby_vagrant/ruby-server_services_pb'
+# require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb'
+# require 'vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb'
+# require 'vagrant/protobufs/proto/plugin/grpc_broker_pb'
+# require 'vagrant/protobufs/proto/plugin/grpc_broker_services_pb'
# Enable logging if it is requested. We do this before
# anything else so that we can setup the output before
diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb
--- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb 2023-02-16 13:41:49.358357676 +0100
+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/commands/serve/command.rb 2023-03-17 16:57:02.859959067 +0100
@@ -3,9 +3,9 @@
module VagrantPlugins
module CommandServe
# Simple constant aliases to reduce namespace typing
- SDK = Hashicorp::Vagrant::Sdk
- SRV = Hashicorp::Vagrant
- Empty = ::Google::Protobuf::Empty
+ # SDK = Hashicorp::Vagrant::Sdk
+ # SRV = Hashicorp::Vagrant
+ Empty = []
autoload :Broker, Vagrant.source_root.join("plugins/commands/serve/broker").to_s
autoload :Client, Vagrant.source_root.join("plugins/commands/serve/client").to_s
diff '--color=auto' -Naur /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb
--- /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb 2023-02-16 13:41:49.475357444 +0100
+++ /var/lib/mock/vagrant-rebase/root/builddir/build/BUILDROOT/vagrant-2.3.4-1.fc39.x86_64/usr/share/vagrant/gems/gems/vagrant-2.3.4/plugins/kernel_v2/config/vm.rb 2023-03-17 16:48:26.940189713 +0100
@@ -11,11 +11,11 @@
require "vagrant/util/map_command_options"
require "vagrant/util/map_command_options"
-$LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s
-
-require "vagrant/protobufs/proto/protostructure_pb"
-require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb"
-require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb"
+# $LOAD_PATH << Vagrant.source_root.join("lib/vagrant/protobufs/proto").to_s
+#
+# require "vagrant/protobufs/proto/protostructure_pb"
+# require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb"
+# require "vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb"
# Include mappers
require Vagrant.source_root.join("plugins/commands/serve/command").to_s

View file

@ -0,0 +1,110 @@
From 6f9f88e05557d40570a3885b6d3d3a6a24c06090 Mon Sep 17 00:00:00 2001
From: Nicolas St-Laurent <stlaurent.nicolas@gmail.com>
Date: Thu, 22 Sep 2022 08:54:46 -0400
Subject: [PATCH] Replace deprecated File.exists? with File.exist?.
---
lib/vagrant/util/install_cli_autocomplete.rb | 2 +-
plugins/hosts/gentoo/host.rb | 2 +-
plugins/hosts/slackware/host.rb | 2 +-
plugins/provisioners/ansible/provisioner/host.rb | 2 +-
plugins/provisioners/chef/config/chef_zero.rb | 2 +-
test/unit/plugins/provisioners/ansible/provisioner_test.rb | 6 +++---
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/vagrant/util/install_cli_autocomplete.rb b/lib/vagrant/util/install_cli_autocomplete.rb
index 9aaf61a1de2..119749e0f08 100644
--- a/lib/vagrant/util/install_cli_autocomplete.rb
+++ b/lib/vagrant/util/install_cli_autocomplete.rb
@@ -29,7 +29,7 @@ def shell_installed(home)
@logger.info("Searching for config in home #{home}")
@config_paths.each do |path|
config_file = File.join(home, path)
- if File.exists?(config_file)
+ if File.exist?(config_file)
@logger.info("Found config file #{config_file}")
return config_file
end
diff --git a/plugins/hosts/gentoo/host.rb b/plugins/hosts/gentoo/host.rb
index ac7e019d045..6d8b88a6a35 100644
--- a/plugins/hosts/gentoo/host.rb
+++ b/plugins/hosts/gentoo/host.rb
@@ -4,7 +4,7 @@ module VagrantPlugins
module HostGentoo
class Host < Vagrant.plugin("2", :host)
def detect?(env)
- File.exists?("/etc/gentoo-release")
+ File.exist?("/etc/gentoo-release")
end
end
end
diff --git a/plugins/hosts/slackware/host.rb b/plugins/hosts/slackware/host.rb
index ec3503ac02e..bea7cab7476 100644
--- a/plugins/hosts/slackware/host.rb
+++ b/plugins/hosts/slackware/host.rb
@@ -4,7 +4,7 @@ module VagrantPlugins
module HostSlackware
class Host < Vagrant.plugin("2", :host)
def detect?(env)
- return File.exists?("/etc/slackware-version") ||
+ return File.exist?("/etc/slackware-version") ||
!Dir.glob("/usr/lib/setup/Plamo-*").empty?
end
end
diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb
index 3e594b83c11..f2a57133c79 100644
--- a/plugins/provisioners/ansible/provisioner/host.rb
+++ b/plugins/provisioners/ansible/provisioner/host.rb
@@ -185,7 +185,7 @@ def ship_generated_inventory(inventory_content)
inventory_file = Pathname.new(File.join(inventory_path, 'vagrant_ansible_inventory'))
@@lock.synchronize do
- if !File.exists?(inventory_file) or inventory_content != File.read(inventory_file)
+ if !File.exist?(inventory_file) or inventory_content != File.read(inventory_file)
begin
# ansible dir inventory will ignore files starting with '.'
inventory_tmpfile = Tempfile.new('.vagrant_ansible_inventory', inventory_path)
diff --git a/plugins/provisioners/chef/config/chef_zero.rb b/plugins/provisioners/chef/config/chef_zero.rb
index c19485f882e..84ed08cf5b2 100644
--- a/plugins/provisioners/chef/config/chef_zero.rb
+++ b/plugins/provisioners/chef/config/chef_zero.rb
@@ -81,7 +81,7 @@ def validate(machine)
errors << I18n.t("vagrant.config.chef.nodes_path_empty")
else
missing_paths = Array.new
- nodes_path.each { |dir| missing_paths << dir[1] if !File.exists? dir[1] }
+ nodes_path.each { |dir| missing_paths << dir[1] if !File.exist? dir[1] }
# If it exists at least one path on disk it's ok for Chef provisioning
if missing_paths.size == nodes_path.size
errors << I18n.t("vagrant.config.chef.nodes_path_missing", path: missing_paths.to_s)
diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
index 180f26869bb..f5828f14340 100644
--- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb
+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
@@ -181,7 +181,7 @@ def self.it_should_create_and_use_generated_inventory(with_user = true)
it "generates an inventory with all active machines" do
expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args|
expect(config.inventory_path).to be_nil
- expect(File.exists?(generated_inventory_file)).to be(true)
+ expect(File.exist?(generated_inventory_file)).to be(true)
inventory_content = File.read(generated_inventory_file)
_ssh = config.compatibility_mode == VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0 ? "" : "_ssh"
if with_user
@@ -697,7 +697,7 @@ def ensure_that_config_is_valid
it "generates an inventory with winrm connection settings" do
expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args|
expect(config.inventory_path).to be_nil
- expect(File.exists?(generated_inventory_file)).to be(true)
+ expect(File.exist?(generated_inventory_file)).to be(true)
inventory_content = File.read(generated_inventory_file)
expect(inventory_content).to include("machine1 ansible_connection=winrm ansible_ssh_host=127.0.0.1 ansible_ssh_port=55986 ansible_ssh_user='winner' ansible_ssh_pass='winword'\n")
@@ -731,7 +731,7 @@ def ensure_that_config_is_valid
expect(Vagrant::Util::Subprocess).to receive(:execute).with('ansible-playbook', any_args) { |*args|
expect(args).to include("--inventory-file=#{existing_file}")
expect(args).not_to include("--inventory-file=#{generated_inventory_file}")
- expect(File.exists?(generated_inventory_file)).to be(false)
+ expect(File.exist?(generated_inventory_file)).to be(false)
}.and_return(default_execute_result)
end

View file

@ -0,0 +1,41 @@
From 9743c857481556838ee417a0033efdee3fb0c7fc Mon Sep 17 00:00:00 2001
From: sophia <scastellarin95@gmail.com>
Date: Tue, 3 Jan 2023 13:20:14 -0800
Subject: [PATCH 4/5] 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
---
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 f5828f14340..fdf9aa67eaa 100644
--- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb
+++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb
@@ -91,7 +91,7 @@ def self.it_should_set_arguments_and_environment_variables(
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 @@ def self.it_should_set_arguments_and_environment_variables(
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

View file

@ -1,94 +1,120 @@
%global bashcompletion_dir %(pkg-config --variable=completionsdir bash-completion 2> /dev/null || :)
%global vagrant_spec_commit 9bba7e1228379c0a249a06ce76ba8ea7d276afbe
%global vagrant_spec_commit a88825f4cb254b703d0f9235667223f02ad5c600
%bcond_without help2man
%bcond_without ed25519
Name: vagrant
Version: 1.9.1
Release: 2%{?dist}
Version: 2.3.4
Release: 9%{?dist}
Summary: Build and distribute virtualized development environments
Group: Development/Languages
License: MIT
URL: http://vagrantup.com
Source0: https://github.com/mitchellh/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/hashicorp/%{name}/archive/refs/tags/v%{version}.tar.gz
# Upstream binstub with adjusted paths, the offical way how to run vagrant
Source1: binstub
# The library has no official release yet. But since it is just test
# dependency, it should be fine to include the source right here.
# wget https://github.com/mitchellh/vagrant-spec/archive/9bba7e1228379c0a249a06ce76ba8ea7d276afbe/vagrant-spec-9bba7e1228379c0a249a06ce76ba8ea7d276afbe.tar.gz
Source2: https://github.com/mitchellh/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz
# wget https://github.com/hashicorp/vagrant-spec/archive/03d88fe2467716b072951c2b55d78223130851a6/vagrant-spec-03d88fe2467716b072951c2b55d78223130851a6.tar.gz
Source2: https://github.com/hashicorp/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz
# Monkey-patching needed for Vagrant to work until the respective patches
# for RubyGems and Bundler are in place
Source4: macros.vagrant
# Do not load runtime dependencies in %%check if vagrant is not loaded
# https://github.com/hashicorp/vagrant/pull/10945
Patch1: vagrant-2.2.9-do-not-load-dependencies.patch
# Remove GRPC dependencies for Fedora. It seems that it will serve
# for communication with upcoming Golang backend, however
# it is only in tech-preview now and grpc is not simple to package.
# Let's remove it for now and revisit in the future.
Patch2: vagrant-2.3.4-remove_grpc.patch
# Ruby 3.2 compatibility for tests.
# Commits are cherry-picked instead of a whole PR as it also edits .github
# files that we do not care about.
# https://github.com/hashicorp/vagrant/pull/13043
Patch3: vagrant-2.3.4-Environment-home-dir-is-also-not-accessible-if-EROFS-error-occurs.patch
Patch4: vagrant-2.3.4-Only-check-for-arguments-matching-test-string.patch
# Disable loading of direc_conversions.rb in other files.
# The file is removed as it requires protobuf components not yet
# packaged in Fedora.
Patch5: vagrant-2.3.4-Disable-loading-of-direct_conversions-file.patch
# Default URL for pulling boxes seems to have changed.
# This fix allows vagrant to pull boxes again.
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2337302
Patch6: vagrant-2.3.4-Fix-the-default-vagrant-URL-for-pulling-boxes.patch
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras.
%{?load:%{SOURCE4}}
Patch0: vagrant-1.9.1-fix-dependencies.patch
# Disable ansible winrm tests
Patch1: vagrant-1.8.1-disable-winrm-tests.patch
# Use Integer instead of Fixnum for Ruby 2.4+ compatibility.
# https://github.com/mitchellh/vagrant/pull/8284
Patch2: vagrant-1.9.1-Fix-Ruby-2.4-compatibility.patch
%{load:%{SOURCE4}}
Requires: ruby(release)
Requires: ruby(rubygems) >= 1.3.6
# Explicitly specify MRI, since Vagrant does not work with JRuby ATM.
Requires: ruby
Requires: rubygem(hashicorp-checkpoint) >= 0.1.1
Requires: rubygem(hashicorp-checkpoint) < 0.2
Requires: rubygem(hashicorp-checkpoint) >= 0.1.5
Requires: rubygem(childprocess) >= 0.5.0
Requires: rubygem(childprocess) < 0.6
Requires: rubygem(erubis) >= 2.7.0
Requires: rubygem(erubis) < 2.8
Requires: rubygem(i18n) >= 0.6.0
Requires: rubygem(i18n) <= 0.8.0
Requires: rubygem(erubi)
Requires: (rubygem(i18n) >= 1.8 with rubygem(i18n) < 2.0)
Requires: rubygem(json)
Requires: rubygem(listen) >= 3.1.5
Requires: rubygem(listen) < 3.2
Requires: (rubygem(listen) >= 3.2 with rubygem(listen) < 4)
Requires: rubygem(log4r) >= 1.1.9
Requires: rubygem(log4r) < 1.1.11
Requires: rubygem(net-ssh) >= 3.0
Requires: rubygem(net-scp) >= 1.1.0
Requires: rubygem(nokogiri) >= 1.6
Requires: (rubygem(net-ssh) >= 5.2.0 with rubygem(net-ssh) < 8)
Requires: rubygem(net-scp) >= 1.2.0
Requires: rubygem(net-sftp) >= 2.1
Requires: rubygem(net-sftp) < 3
Requires: rubygem(rest-client) < 3.0
Requires: rubygem(rubyzip) >= 1.1.7
Requires: rubygem(net-ftp)
Requires: rubygem(rexml)
Requires: rubygem(mime-types)
Requires: bsdtar
Requires: curl
Requires: %{_bindir}/ps
Recommends: vagrant(vagrant-libvirt)
Recommends: (podman-docker if podman)
Requires(pre): shadow-utils
%if %{with ed25519}
Requires: rubygem(ed25519)
Requires: rubygem(bcrypt_pbkdf)
BuildRequires: rubygem(ed25519)
BuildRequires: rubygem(bcrypt_pbkdf)
%else
Recommends: rubygem(ed25519)
Recommends: rubygem(bcrypt_pbkdf)
%endif
BuildRequires: bsdtar
BuildRequires: ruby
BuildRequires: rubygems-devel
BuildRequires: rubygem(listen)
BuildRequires: rubygem(childprocess)
BuildRequires: rubygem(hashicorp-checkpoint)
BuildRequires: rubygem(log4r)
BuildRequires: rubygem(net-ssh)
BuildRequires: rubygem(net-scp)
BuildRequires: rubygem(nokogiri)
BuildRequires: rubygem(i18n)
BuildRequires: rubygem(json)
BuildRequires: rubygem(erubis)
BuildRequires: rubygem(rspec) < 3
BuildRequires: rubygem(erubi)
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(rspec-its)
BuildRequires: rubygem(net-sftp)
BuildRequires: rubygem(rest-client)
BuildRequires: rubygem(rubyzip)
BuildRequires: rubygem(thor)
BuildRequires: rubygem(webmock)
BuildRequires: rubygem(webrick)
BuildRequires: rubygem(fake_ftp)
BuildRequires: rubygem(rake)
BuildRequires: rubygem(net-ftp)
BuildRequires: rubygem(rexml)
BuildRequires: rubygem(mime-types)
BuildRequires: pkgconfig(bash-completion)
%if %{with help2man}
BuildRequires: help2man
%endif
BuildRequires: %{_bindir}/ssh
BuildArch: noarch
# vagrant-atomic was retired in F26, since it was merged into Vagrant.
# https://github.com/projectatomic/vagrant-atomic/issues/5
# https://github.com/mitchellh/vagrant/pull/5847
Obsoletes: vagrant-atomic <= 0.1.0-4
# Since Vagrant itself is installed on the same place as its plugins
# the vagrant_plugin macros can be reused in the spec file, but the plugin
# name must be specified.
@ -100,7 +126,6 @@ environments.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
@ -110,14 +135,96 @@ Documentation for %{name}.
%prep
%setup -q -b2
%patch0 -p1
%patch1 -p1
%patch2 -p1
# TODO: package vagrant_cloud, as it is not in Fedora yet
%gemspec_remove_dep -s %{name}.gemspec -g vagrant_cloud
# Remove `cloud` command and references to it
%gemspec_remove_file -s %{name}.gemspec Dir.glob('plugins/commands/cloud/**/*.*')
rm -rf ./plugins/commands/cloud/
sed -i '/^\s*I18n\..*$/ s/^/#/g' plugins/commands/login/plugin.rb
sed -i '/^\s*command(:login) do$/,/\s*end$/ s/^/#/g' plugins/commands/login/plugin.rb
# Expand required Ruby compatibility, otherwise RubyGems throws exceptions.
# Relevant rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=2053476#c0
# Relevant RubyGems issue: https://github.com/rubygems/rubygems/issues/4338
sed -i -e '/required_ruby_version/ s/, "< 3.2"//' %{name}.gemspec
# We have older version in Fedora
%gemspec_remove_dep -s %{name}.gemspec -g net-sftp '~> 4.0'
%gemspec_add_dep -s %{name}.gemspec -g net-sftp '>= 2.1.2'
%gemspec_remove_dep -s %{name}.gemspec -g net-scp '~> 4.0'
%gemspec_add_dep -s %{name}.gemspec -g net-scp '>= 1.2.0'
# We have newer version in Fedora
%gemspec_remove_dep -s %{name}.gemspec -g listen
%gemspec_add_dep -s %{name}.gemspec -g listen '>= 3.5.1'
%gemspec_remove_dep -s %{name}.gemspec -g rubyzip '~> 2.0'
%gemspec_add_dep -s %{name}.gemspec -g rubyzip '>= 2.0.0'
# Remove Windows specific dependencies
%gemspec_remove_dep -s %{name}.gemspec -g wdm
%gemspec_remove_dep -s %{name}.gemspec -g winrm
%gemspec_remove_dep -s %{name}.gemspec -g winrm-fs
%gemspec_remove_dep -s %{name}.gemspec -g winrm-elevated
# Remove BSD dependency
%gemspec_remove_dep -s %{name}.gemspec -g rb-kqueue
# Allow older childprocess version
%gemspec_remove_dep -s %{name}.gemspec -g childprocess
%gemspec_add_dep -s %{name}.gemspec -g childprocess '>= 1.0.1'
# Relax net-ssh dependency. We have newer net-ssh in Fedora
%gemspec_remove_dep -s %{name}.gemspec -g net-ssh
%gemspec_add_dep -s %{name}.gemspec -g net-ssh ['>= 5.2.0', '< 8']
# Remove "optional" dependencies
# This seems like prelude for the in-development golang backend.
# Nothing runtime critical.
%gemspec_remove_dep -s %{name}.gemspec -g googleapis-common-protos-types
%gemspec_remove_dep -s %{name}.gemspec -g grpc
%gemspec_remove_dep -s %{name}.gemspec -g rgl
# Load missing dependency Vagrant::Util::MapCommandOptions
# https://github.com/hashicorp/vagrant/pull/11609
sed -i '/^\s*require..vagrant.util.experimental.\s*$/ a\require "vagrant/util/map_command_options"' \
plugins/kernel_v2/config/vm.rb
%if %{without ed25519}
# Remove optional dependencies
%gemspec_remove_dep -s %{name}.gemspec -g bcrypt_pbkdf
%gemspec_remove_dep -s %{name}.gemspec -g ed25519
# Disable patch for ed25519
sed -i '/^ require .net\/ssh\/authentication\/ed25519.$/,/^ end$/ s/^/#/' \
lib/vagrant/patches/net-ssh.rb
%else
%gemspec_remove_dep -s %{name}.gemspec -g ed25519
%gemspec_add_dep -s %{name}.gemspec -g ed25519 ['>= 1.2.4', '< 1.4']
%endif
# Let's get rid of protobuf related components
%patch 2 -p16
%gemspec_remove_file -s %{name}.gemspec Dir.glob('lib/vagrant/protobufs/**/*.*')
# This file contains monkey patching and compatibility for Protobuf serialization.
# We do not need that as we skip protobuf related parts completely.
%gemspec_remove_file -s %{name}.gemspec "plugins/commands/serve/util/direct_conversions.rb"
rm -rf plugins/commands/serve/util/direct_conversions.rb
# Patch out related requires in code.
%patch 5 -p1
%patch 3 -p1
%patch 6 -p1
%build
gem build %{name}.gemspec
gem install -V --local --install-dir .%{vagrant_plugin_dir} \
gem install -V --local \
--no-user-install \
--install-dir .%{vagrant_plugin_dir} \
--bindir .%{vagrant_plugin_dir}/bin \
--ignore-dependencies --force --no-document --backtrace \
%{name}-%{version}.gem
@ -139,6 +246,9 @@ install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/bash/completion
%{buildroot}%{bashcompletion_dir}/%{name}
sed -i '/#!\// d' %{buildroot}%{bashcompletion_dir}/%{name}
install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/zsh/_%{name} \
%{buildroot}%{_datadir}/zsh/site-functions/_%{name}
# Install Vagrant macros
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
@ -158,19 +268,28 @@ install -d -m 755 %{buildroot}%{vagrant_plugin_conf_dir}
touch %{buildroot}%{vagrant_plugin_conf}
ln -s -t %{buildroot}%{vagrant_embedded_dir}/ %{vagrant_plugin_conf}
# !!! Backward compatibility hack, introduced in F26 timeframe !!!
# It allows to (un)register old Vagrant plugins via newer Vagrant.
# This should be possible to remove at F29, when there is chance everybody is
# using more recent versions of Vagrant.
install -d -m 755 %{buildroot}%{vagrant_embedded_dir}/lib/vagrant/plugin
cat > %{buildroot}%{vagrant_embedded_dir}/lib/vagrant/plugin/manager.rb << 'EOF'
$LOAD_PATH.shift
$LOAD_PATH.unshift '%{vagrant_dir}/lib'
require 'vagrant/plugin/manager'
EOF
%if %{with help2man}
# Turn `vagrant --help` into man page.
export GEM_PATH="%{gem_dir}:%{buildroot}/usr/share/vagrant/gems"
# Needed to display help page without a warning.
export VAGRANT_INSTALLER_ENV=1
mkdir -p %{buildroot}%{_mandir}/man1
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
# Ruby 3.2 compatibility fix
cat %{PATCH4} | 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},}
@ -178,8 +297,11 @@ mv ../vagrant-spec{-%{vagrant_spec_commit},}
# Remove the git reference, which is useless in our case.
sed -i '/git/ s/^/#/' ../vagrant-spec/vagrant-spec.gemspec
# Relax the thor dependency, since Fedora ships with newer version.
# Relax the dependencies, since Fedora ships with newer versions.
sed -i '/thor/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec
sed -i '/rspec/ s/~>/>=/' ./vagrant.gemspec
sed -i '/rspec/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec
sed -i '/childprocess/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec
#Insert new test dependencies
sed -i '25 i\ spec.add_dependency "webmock"' ../vagrant-spec/vagrant-spec.gemspec
@ -189,12 +311,66 @@ sed -i '26 i\ spec.add_dependency "fake_ftp"' ../vagrant-spec/vagrant-spec.gems
rm -rf test/unit/plugins/communicators/winrm
sed -i '/it "eager loads WinRM" do/,/^ end$/ s/^/#/' test/unit/vagrant/machine_test.rb
sed -i '/it "should return the specified communicator if given" do/,/^ end$/ s/^/#/' test/unit/vagrant/machine_test.rb
sed -i '/^ context "with winrm communicator" do$/,/^ end$/ s/^/#/' \
test/unit/plugins/provisioners/ansible/provisioner_test.rb
# Test suite must be executed in order.
ruby -I.:lib -e 'Dir.glob("test/unit/**/*_test.rb").sort.each &method(:require)'
# Disable test that requires bundler
# https://github.com/hashicorp/vagrant/issues/9273
mv test/unit/vagrant/util/env_test.rb{,.disable}
%pre
getent group vagrant >/dev/null || groupadd -r vagrant
# vagrant_cloud is not in Fedora yet; login command is deprecated
# in favor of vagrant_cloud
rm -r test/unit/plugins/commands/cloud/
# Disable test that requires network
sed -i '/^ it "generates a network name and configuration" do$/,/^ end/ s/^/#/' \
test/unit/plugins/providers/docker/action/prepare_networks_test.rb
# Remove failing BSD-host tests, as we don't care about those.
rm -rf test/unit/plugins/hosts/bsd
# 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)"
# Disable tests concerning protobuf
mv ./test/unit/plugins/commands/serve/service/guest_service_test.rb{,.disabled}
mv ./test/unit/plugins/commands/serve/service/host_service_test.rb{,.disabled}
mv ./test/unit/plugins/commands/serve/util/exception_transformer_test.rb{,.disabled}
mv ./test/unit/plugins/commands/serve/mappers_test.rb{,.disabled}
sed -i -e '/ it "uses a directory within the home directory by default" do/a\
skip "Requires protobuf"' ./test/unit/vagrant/environment_test.rb
# 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"]')}
RUBYOPT="-I"
for module in \
openssl \
psych
do
for dir in \
%{gem_dir}/gems/$module-*/lib \
%{buildtime_libdir}/gems/ruby/$module-*
do
RUBYOPT="$RUBYOPT:$dir"
done
done
export RUBYOPT
# Rake solves the requires issues for tests
rake -f tasks/test.rake test:unit \
| tee error.log
%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
@ -213,7 +389,7 @@ rescue => e
puts "Vagrant plugin.json is not properly initialized: #{e}"
end
%transfiletriggerin -p %{_bindir}/ruby -- %{dirname:%{vagrant_plugin_spec}}
%transfiletriggerin -p %{_bindir}/ruby -- %{dirname:%{vagrant_plugin_spec}}/
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
@ -232,7 +408,7 @@ rescue => e
puts "Vagrant plugin register error: #{e}"
end
%transfiletriggerun -p %{_bindir}/ruby -- %{dirname:%{vagrant_plugin_spec}}
%transfiletriggerun -p %{_bindir}/ruby -- %{dirname:%{vagrant_plugin_spec}}/
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
@ -250,7 +426,7 @@ begin
rescue => e
puts "Vagrant plugin un-register error: #{e}"
end
%files
# Explicitly include Vagrant plugins directory strucure to avoid accidentally
# packaged content.
@ -264,8 +440,15 @@ end
%dir %{dirname:%{vagrant_plugin_instdir}}
%dir %{dirname:%{vagrant_plugin_spec}}
# Kept for backward compatibility.
%{vagrant_embedded_dir}/lib
%exclude %{vagrant_plugin_instdir}/Makefile
%exclude %{vagrant_plugin_instdir}/Dockerfile
%exclude %{vagrant_plugin_instdir}/flake*
%exclude %{vagrant_plugin_instdir}/go.{mod,sum}
%exclude %{vagrant_plugin_instdir}/gen.go
%exclude %{vagrant_plugin_instdir}/binstubs/vagrant
%exclude %{vagrant_plugin_instdir}/nix/*.nix
%exclude %{vagrant_plugin_instdir}/shell.nix
%exclude %{vagrant_plugin_instdir}/vagrant-config.hcl
%{_bindir}/%{name}
%dir %{vagrant_plugin_instdir}
@ -278,6 +461,7 @@ end
# TODO: Make more use of contribs.
%{vagrant_plugin_instdir}/contrib
%exclude %{vagrant_plugin_instdir}/contrib/bash
%exclude %{vagrant_plugin_instdir}/contrib/zsh/_%{name}
# This is not the original .gemspec.
%exclude %{vagrant_plugin_instdir}/vagrant.gemspec
%{vagrant_plugin_instdir}/keys
@ -295,7 +479,13 @@ end
%dir %{dirname:%{bashcompletion_dir}}
%dir %{bashcompletion_dir}
%{bashcompletion_dir}/%{name}
# By "owning" the site-functions dir, we don't need to Require zsh
%dir %{_datadir}/zsh
%{_datadir}/zsh/site-functions/_%{name}
%{_rpmconfigdir}/macros.d/macros.%{name}
%if %{with help2man}
%{_mandir}/man1/%{name}.1*
%endif
%files doc
%doc %{vagrant_plugin_instdir}/RELEASE.md
@ -303,11 +493,191 @@ end
%{vagrant_plugin_instdir}/Gemfile
%{vagrant_plugin_instdir}/Rakefile
%{vagrant_plugin_instdir}/tasks
%{vagrant_plugin_instdir}/test
%{vagrant_plugin_instdir}/vagrant-spec.config.example.rb
%changelog
* Mon Dec 22 2025 Vít Ondruch <vondruch@redhat.com> - 2.3.4-9
- Relax `rubygem(rubyzip)` dependency
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Jarek Prokop <jprokop@redhat.com> - 2.3.4-7
- Fix default URL used for pulling boxes.
Resolves: rhbz#2337302
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Feb 07 2024 Vít Ondruch <vondruch@redhat.com> - 2.3.4-5
- Drop superfluous rest-client dependency.
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 21 2023 Zdenek Zambersky <zzambers@redhat.com> - 2.3.4-2
- Added missing dependency on rexml and mime-types
* Tue May 09 2023 Jarek Prokop <jprokop@redhat.com> - 2.3.4-1
- Upgrade to Vagrant 2.3.4.
* Thu Mar 16 2023 Pavel Valena <pvalena@redhat.com> - 2.2.19-10
- Handle URL properly
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 09 2023 Jarek Prokop <jprokop@redhat.com> - 2.2.19-8
- Enable rubygem-ed25519 requires.
Resolves: rhbz#1962869
* Fri Jan 6 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.19-7
- Replace regex match patch with the one by the upstream
* Mon Dec 26 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.19-6
- Backport upstream fix for ruby3.2 File.exists? removal
- Apply proposal fix for ruby3.2 Object#=~ removal
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Mar 11 2022 Pavel Valena <pvalena@redhat.com> - 2.2.19-4
- Add missing dependency on bin/ps
* Mon Feb 21 2022 Jarek Prokop <jprokop@redhat.com> - 2.2.19-3
- Fix FTBFS due to new rspec-mocks.
- Relax required ruby version.
Resolves: rhbz#2053476
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Nov 15 2021 Pavel Valena <pvalena@redhat.com> - 2.2.19-1
- Upgrade Vagrant to 2.2.19.
Resolves: rhbz#1980195
- Add zsh autocompletion.
- Relax net-ssh dependency once more.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 16 2021 Pavel Valena <pvalena@redhat.com> - 2.2.16-1
- Update to Vagrant 2.2.16.
Resolves: rhbz#1872307
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 20 2021 Vít Ondruch <vondruch@redhat.com> - 2.2.9-5
- Fix Ruby 3.0 and rspec-mock 3.10.1 compatibility.
- Relax net-ssh dependency.
- Relax Ruby version restriction.
Resolves: rhbz#1915671
* Mon Aug 17 2020 Vít Ondruch <vondruch@redhat.com> - 2.2.9-4
- Use Erubi instead of Erubis.
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed May 20 2020 Pavel Valena <pvalena@redhat.com> - 2.2.9-2
- Move dependency load map_command_options
for creating @box_extra_download_options to config/vm.rb.
https://github.com/hashicorp/vagrant/pull/11609
* 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
- Fix FTBFS due to Ruby 2.7.
Resolves: rhbz#1800230
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Oct 15 2019 Pavel Valena <pvalena@redhat.com> - 2.2.6-1
- Upgrade to Vagrant 2.2.6.
- Move man pages to main package
* Wed Aug 14 2019 Pavel Valena <pvalena@redhat.com> - 2.2.5-1
- Update to Vagrant 2.2.5.
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Mar 15 2019 Vít Ondruch <vondruch@redhat.com> - 2.2.4-2
- Don't create `vagrant` group anymore.
* Fri Mar 01 2019 Pavel Valena <pvalena@redhat.com> - 2.2.4-1
- Update to Vagrant 2.2.4.
* Fri Feb 15 2019 Vít Ondruch <vondruch@redhat.com> - 2.2.3-2
- Disable Vagrant's built-in version check.
* Thu Feb 14 2019 Pavel Valena <pvalena@redhat.com> - 2.2.3-1
- Update to Vagrant 2.2.3.
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Oct 11 2018 Pavel Valena <pvalena@redhat.com> - 2.1.5-2
- Fix: two additional patches for change_host_name logic(rhbz#1624068)
* Wed Sep 19 2018 Pavel Valena <pvalena@redhat.com> - 2.1.5-1
- Update to Vagrant 2.1.5.
- Update restart logic for redhat change_host_name cap(rhbz#1624068)
* Wed Sep 12 2018 Tobias Jungel <tobias.jungel@bisdn.de> - 2.1.2-2
- handle rename of nfs-utils-lib/libnfs-utils in F28 guests (rhbz#1620074).
* Wed Jul 18 2018 Pavel Valena <pvalena@redhat.com> - 2.1.2-1
- Update to Vagrant 2.1.2.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 07 2018 Pavel Valena <pvalena@redhat.com> - 2.1.1-1
- Update to Vagrant 2.1.1.
* Mon Apr 23 2018 Pavel Valena <pvalena@redhat.com> - 2.0.4-1
- Update to Vagrant 2.0.4.
* Mon Mar 26 2018 Pavel Valena <pvalena@redhat.com> - 2.0.3-1
- Update to Vagrant 2.0.3
* Wed Feb 21 2018 Pavel Valena <pvalena@redhat.com> - 2.0.2-2
- Allow rubygem-i18n ~> 1.0
https://github.com/rails/rails/pull/31991
* Wed Jan 31 2018 Pavel Valena <pvalena@redhat.com> - 2.0.2-1
- Update to Vagrant 2.0.2.
* Mon Jan 08 2018 Vít Ondruch <vondruch@redhat.com> - 2.0.1-2
- Fix Ruby 2.5 compatibilty.
* Mon Dec 18 2017 Pavel Valena <pvalena@redhat.com> - 2.0.1-1
- Update to Vagrant 2.0.1.
* Tue Dec 12 2017 Vít Ondruch <vondruch@redhat.com> - 1.9.8-2
- Fix plugin registration issues caused by changes in RPM (rhbz#1523296).
* Thu Aug 24 2017 Pavel Valena <pvalena@redhat.com> - 1.9.8-1
- Update to Vagrant 1.9.8 (rhbz#1427505).
- Remove Nokogiri dependency.
- Use VAGRANT_PREFERRED_PROVIDERS in binstub instead of VAGRANT_DEFAULT_PROVIDER.
- Use only bottom contstraint for Requires.
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Feb 28 2017 Vít Ondruch <vondruch@redhat.com> - 1.9.1-2
- Obsolete vagrant-atomic, since it is now merged in Vagrant.