- Combined dependency patches into a common dependency.patch:

* 0005-do-not-depend-on-wdm.patch
  * 0010-Remove-dependency-on-grpc-tools.patch
  * 0011-Remove-vagrant-ssl-extension.patch
  * 0012-Bump-rgl-dependency-to-0.6.6.patch
  * 0013-Bump-webrick-dependency-to-1.8.0.patch
  * 0014-Bump-vagrant_cloud_dependency.patch
  * childprocess-5.0.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=92
This commit is contained in:
Илья Индиго 2024-09-04 17:43:36 +00:00 committed by Git OBS Bridge
commit 411a888ee6
29 changed files with 3846 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,29 @@
From 17dca9eb3e51d8f98c80ce100ad52ac8ea6c3c5b Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org>
Date: Sat, 11 Oct 2014 16:54:58 -0300
Subject: [PATCH 01/13] bin/vagrant: silence warning about installer
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
bin/vagrant | 5 -----
1 file changed, 5 deletions(-)
diff --git a/bin/vagrant b/bin/vagrant
index 7ca30b391..d3f4ea61a 100755
--- a/bin/vagrant
+++ b/bin/vagrant
@@ -221,11 +221,6 @@ begin
end
end
- if !Vagrant.in_installer? && !Vagrant.very_quiet?
- # If we're not in the installer, warn.
- env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false)
- end
-
# Acceptable experimental flag values include:
#
# Unset - Disables experimental features
--
2.41.0

View File

@ -0,0 +1,98 @@
From 1f229c3d60e0b4c31fbbbbc5dc0906719f2e53a0 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@debian.org>
Date: Wed, 22 Oct 2014 09:40:14 -0200
Subject: [PATCH 02/13] Use a private temporary dir
Without this vagrant will clutter $TMPDIR with dozens of even hundreds
of temporary files (~4 per vagrant invocation).
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
lib/vagrant/box.rb | 3 ++-
lib/vagrant/util.rb | 2 ++
lib/vagrant/util/tempfile.rb | 39 ++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 lib/vagrant/util/tempfile.rb
diff --git a/lib/vagrant/box.rb b/lib/vagrant/box.rb
index 90dc69d38..4ee79b988 100644
--- a/lib/vagrant/box.rb
+++ b/lib/vagrant/box.rb
@@ -9,6 +9,7 @@ require "vagrant/util/downloader"
require "vagrant/util/platform"
require "vagrant/util/safe_chdir"
require "vagrant/util/subprocess"
+require "vagrant/util/tempfile"
module Vagrant
# Represents a "box," which is a package Vagrant environment that is used
@@ -142,7 +143,7 @@ module Vagrant
# @param [Hash] download_options Options to pass to the downloader.
# @return [BoxMetadata]
def load_metadata(download_options={})
- tf = Tempfile.new("vagrant-load-metadata")
+ tf = Util::Tempfile.new("vagrant-load-metadata")
tf.close
url = @metadata_url
diff --git a/lib/vagrant/util.rb b/lib/vagrant/util.rb
index 8e3cbd2af..84df146f0 100644
--- a/lib/vagrant/util.rb
+++ b/lib/vagrant/util.rb
@@ -54,6 +54,8 @@ module Vagrant
autoload :SilenceWarnings, 'vagrant/util/silence_warnings'
autoload :SSH, 'vagrant/util/ssh'
autoload :StackedProcRunner, 'vagrant/util/stacked_proc_runner'
+ autoload :Tempfile, 'vagrant/util/tempfile'
+ autoload :TemplateRenderer, 'vagrant/util/template_renderer'
autoload :StringBlockEditor, 'vagrant/util/string_block_editor'
autoload :Subprocess, 'vagrant/util/subprocess'
autoload :TemplateRenderer, 'vagrant/util/template_renderer'
diff --git a/lib/vagrant/util/tempfile.rb b/lib/vagrant/util/tempfile.rb
new file mode 100644
index 000000000..0cbbb53ac
--- /dev/null
+++ b/lib/vagrant/util/tempfile.rb
@@ -0,0 +1,39 @@
+require 'fileutils'
+require 'tmpdir'
+
+module Vagrant
+ module Util
+ class Tempfile < ::Tempfile
+
+ def initialize(basename)
+ super(basename, private_tmpdir)
+ end
+
+ def private_tmpdir
+ self.class.private_tmpdir
+ end
+
+ def self.private_tmpdir
+ @private_tmpdir ||=
+ begin
+ user = Etc.getpwuid.name
+ pid = Process.pid
+ tmpdir = File.join(Dir.tmpdir, "vagrant-#{user}-#{pid}")
+ FileUtils.mkdir_p(tmpdir)
+ FileUtils.chmod(0700, tmpdir)
+ tmpdir
+ end
+ end
+
+ def self.mktmpdir(prefix_suffix)
+ Dir.mktmpdir(prefix_suffix, private_tmpdir)
+ end
+
+
+ end
+ end
+end
+
+at_exit do
+ FileUtils.rm_rf(Vagrant::Util::Tempfile.private_tmpdir)
+end
--
2.41.0

View File

@ -0,0 +1,158 @@
From 38cfae4a7ab162d04732a7bec576413c83e8d9b2 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Wed, 17 May 2017 09:09:57 +0200
Subject: [PATCH 03/13] plugins-don-t-abuse-require_relative.patch
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
plugins/guests/arch/cap/configure_networks.rb | 2 +-
plugins/guests/debian/cap/configure_networks.rb | 2 +-
plugins/guests/freebsd/cap/configure_networks.rb | 2 +-
plugins/guests/funtoo/cap/configure_networks.rb | 2 +-
plugins/guests/gentoo/cap/configure_networks.rb | 2 +-
plugins/guests/netbsd/cap/configure_networks.rb | 2 +-
plugins/guests/nixos/cap/configure_networks.rb | 2 +-
plugins/guests/openbsd/cap/configure_networks.rb | 2 +-
plugins/guests/redhat/cap/configure_networks.rb | 2 +-
plugins/guests/slackware/cap/configure_networks.rb | 2 +-
plugins/guests/suse/cap/configure_networks.rb | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/plugins/guests/arch/cap/configure_networks.rb b/plugins/guests/arch/cap/configure_networks.rb
index 79f14213a..d8966b171 100644
--- a/plugins/guests/arch/cap/configure_networks.rb
+++ b/plugins/guests/arch/cap/configure_networks.rb
@@ -2,7 +2,7 @@ require "ipaddr"
require "socket"
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestArch
diff --git a/plugins/guests/debian/cap/configure_networks.rb b/plugins/guests/debian/cap/configure_networks.rb
index bb1ff69f9..1e29d57ab 100644
--- a/plugins/guests/debian/cap/configure_networks.rb
+++ b/plugins/guests/debian/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestDebian
diff --git a/plugins/guests/freebsd/cap/configure_networks.rb b/plugins/guests/freebsd/cap/configure_networks.rb
index 5020eebe8..1778f94c4 100644
--- a/plugins/guests/freebsd/cap/configure_networks.rb
+++ b/plugins/guests/freebsd/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestFreeBSD
diff --git a/plugins/guests/funtoo/cap/configure_networks.rb b/plugins/guests/funtoo/cap/configure_networks.rb
index 6e20dc237..1b41340c1 100644
--- a/plugins/guests/funtoo/cap/configure_networks.rb
+++ b/plugins/guests/funtoo/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestFuntoo
diff --git a/plugins/guests/gentoo/cap/configure_networks.rb b/plugins/guests/gentoo/cap/configure_networks.rb
index f7464432c..002271b71 100644
--- a/plugins/guests/gentoo/cap/configure_networks.rb
+++ b/plugins/guests/gentoo/cap/configure_networks.rb
@@ -1,7 +1,7 @@
require "tempfile"
require "ipaddr"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestGentoo
diff --git a/plugins/guests/netbsd/cap/configure_networks.rb b/plugins/guests/netbsd/cap/configure_networks.rb
index d53b6c6e4..922edfdab 100644
--- a/plugins/guests/netbsd/cap/configure_networks.rb
+++ b/plugins/guests/netbsd/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestNetBSD
diff --git a/plugins/guests/nixos/cap/configure_networks.rb b/plugins/guests/nixos/cap/configure_networks.rb
index 96458622f..ed371765e 100644
--- a/plugins/guests/nixos/cap/configure_networks.rb
+++ b/plugins/guests/nixos/cap/configure_networks.rb
@@ -1,7 +1,7 @@
require "ipaddr"
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestNixos
diff --git a/plugins/guests/openbsd/cap/configure_networks.rb b/plugins/guests/openbsd/cap/configure_networks.rb
index fefc05b9e..a3bfcaf48 100644
--- a/plugins/guests/openbsd/cap/configure_networks.rb
+++ b/plugins/guests/openbsd/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestOpenBSD
diff --git a/plugins/guests/redhat/cap/configure_networks.rb b/plugins/guests/redhat/cap/configure_networks.rb
index c618c8e53..31ba4f315 100644
--- a/plugins/guests/redhat/cap/configure_networks.rb
+++ b/plugins/guests/redhat/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestRedHat
diff --git a/plugins/guests/slackware/cap/configure_networks.rb b/plugins/guests/slackware/cap/configure_networks.rb
index b11b93e98..0f180275f 100644
--- a/plugins/guests/slackware/cap/configure_networks.rb
+++ b/plugins/guests/slackware/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestSlackware
diff --git a/plugins/guests/suse/cap/configure_networks.rb b/plugins/guests/suse/cap/configure_networks.rb
index 2dd140230..e6dd96f08 100644
--- a/plugins/guests/suse/cap/configure_networks.rb
+++ b/plugins/guests/suse/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestSUSE
--
2.41.0

View File

@ -0,0 +1,37 @@
From ea9f1609c470b03c39d3a83d31dbc780360898c9 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:12:43 +0100
Subject: [PATCH 04/13] fix vbox package boo#1044087, added by
robert.munteanu@gmail.com on Sun Aug 13 19:07:06 UTC 2017
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
plugins/providers/virtualbox/action/package.rb | 2 +-
plugins/providers/virtualbox/action/package_setup_folders.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/providers/virtualbox/action/package.rb b/plugins/providers/virtualbox/action/package.rb
index fb5ebdabf..c03c1c373 100644
--- a/plugins/providers/virtualbox/action/package.rb
+++ b/plugins/providers/virtualbox/action/package.rb
@@ -1,4 +1,4 @@
-require_relative "../../../../lib/vagrant/action/general/package"
+require "vagrant/action/general/package"
module VagrantPlugins
module ProviderVirtualBox
diff --git a/plugins/providers/virtualbox/action/package_setup_folders.rb b/plugins/providers/virtualbox/action/package_setup_folders.rb
index a0baf516f..867fe2bf8 100644
--- a/plugins/providers/virtualbox/action/package_setup_folders.rb
+++ b/plugins/providers/virtualbox/action/package_setup_folders.rb
@@ -1,6 +1,6 @@
require "fileutils"
-require_relative "../../../../lib/vagrant/action/general/package_setup_folders"
+require "vagrant/action/general/package"
module VagrantPlugins
module ProviderVirtualBox
--
2.41.0

View File

@ -0,0 +1,25 @@
From c0a7db63b7cde09913c395737fabf02e6619d8e2 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Mon, 4 Jun 2018 09:18:23 +0200
Subject: [PATCH 05/13] do not depend on wdm
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
vagrant.gemspec | 1 -
1 file changed, 1 deletion(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 2a740089a..7d417b019 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -35,7 +35,6 @@ Gem::Specification.new do |s|
s.add_dependency "rgl", "~> 0.5.10"
s.add_dependency "rubyzip", "~> 2.3.2"
s.add_dependency "vagrant_cloud", "~> 3.0.5"
- s.add_dependency "wdm", "~> 0.1.1"
s.add_dependency "winrm", ">= 2.3.6", "< 3.0"
s.add_dependency "winrm-elevated", ">= 1.2.3", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.5", "< 2.0"
--
2.41.0

View File

@ -0,0 +1,26 @@
From 61d71451dbc739889c488ac4281d696cbce756e4 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <kastl@b1-systems.de>
Date: Fri, 16 Nov 2018 21:14:46 +0100
Subject: [PATCH 06/13] do not abuse relative paths in docker plugin to make
docker work, added by tmkn@tmkn.uk on Thu Oct 26 19:42:46 UTC 2017
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
---
plugins/providers/docker/config.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/providers/docker/config.rb b/plugins/providers/docker/config.rb
index 07c4e5333..e8142df8b 100644
--- a/plugins/providers/docker/config.rb
+++ b/plugins/providers/docker/config.rb
@@ -1,6 +1,6 @@
require "pathname"
-require_relative "../../../lib/vagrant/util/platform"
+require "vagrant/util/platform"
module VagrantPlugins
module DockerProvider
--
2.41.0

View File

@ -0,0 +1,69 @@
From 2412e4fca92e78afe840ed442498bbe17289d636 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Fri, 11 Jan 2019 12:32:28 +0100
Subject: [PATCH 07/13] Don't abuse relative paths in plugins
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dan Čermák <dcermak@suse.com>
---
plugins/guests/alt/cap/configure_networks.rb | 2 +-
plugins/guests/coreos/cap/configure_networks.rb | 2 +-
plugins/guests/nixos/cap/change_host_name.rb | 2 +-
plugins/provisioners/chef/provisioner/base.rb | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/guests/alt/cap/configure_networks.rb b/plugins/guests/alt/cap/configure_networks.rb
index e9f64a940..9236c1b2b 100644
--- a/plugins/guests/alt/cap/configure_networks.rb
+++ b/plugins/guests/alt/cap/configure_networks.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestALT
diff --git a/plugins/guests/coreos/cap/configure_networks.rb b/plugins/guests/coreos/cap/configure_networks.rb
index 5ccd23e80..3d6086c06 100644
--- a/plugins/guests/coreos/cap/configure_networks.rb
+++ b/plugins/guests/coreos/cap/configure_networks.rb
@@ -1,7 +1,7 @@
require "tempfile"
require "yaml"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestCoreOS
diff --git a/plugins/guests/nixos/cap/change_host_name.rb b/plugins/guests/nixos/cap/change_host_name.rb
index 340eddeab..bacae1f0d 100644
--- a/plugins/guests/nixos/cap/change_host_name.rb
+++ b/plugins/guests/nixos/cap/change_host_name.rb
@@ -1,6 +1,6 @@
require "tempfile"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
module VagrantPlugins
module GuestNixos
diff --git a/plugins/provisioners/chef/provisioner/base.rb b/plugins/provisioners/chef/provisioner/base.rb
index 7bc8ceca0..e938305e7 100644
--- a/plugins/provisioners/chef/provisioner/base.rb
+++ b/plugins/provisioners/chef/provisioner/base.rb
@@ -1,7 +1,7 @@
require "tempfile"
require_relative "../../../../lib/vagrant/util/presence"
-require_relative "../../../../lib/vagrant/util/template_renderer"
+require "vagrant/util/template_renderer"
require_relative "../installer"
--
2.41.0

View File

@ -0,0 +1,34 @@
From d8bccbad4e211a6612995225712151e5dea2bcc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 1 Apr 2019 17:28:31 +0200
Subject: [PATCH 08/13] Skip failing tests
---
test/unit/bin/vagrant_test.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/bin/vagrant_test.rb b/test/unit/bin/vagrant_test.rb
index dbbd52112..4481e4c09 100644
--- a/test/unit/bin/vagrant_test.rb
+++ b/test/unit/bin/vagrant_test.rb
@@ -135,7 +135,7 @@ describe "vagrant bin" do
context "when vagrant is not very quiet" do
before { expect(Vagrant).to receive(:very_quiet?).and_return(false) }
- it "should output a warning" do
+ xit "should output a warning" do
expect(env.ui).to receive(:warn).with(/#{warning}/, any_args)
end
end
@@ -143,7 +143,7 @@ describe "vagrant bin" do
context "when vagrant is very quiet" do
before { expect(Vagrant).to receive(:very_quiet?).and_return(true) }
- it "should not output a warning" do
+ xit "should not output a warning" do
expect(env.ui).not_to receive(:warn).with(/#{warning}/, any_args)
end
end
--
2.41.0

View File

@ -0,0 +1,37 @@
From d43fe3d5c06949412ca1d798723a173bc14b9ce2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Wed, 28 Aug 2019 13:39:58 +0200
Subject: [PATCH 09/13] 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
scheduling oddly.
---
test/unit/vagrant/util/subprocess_test.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/vagrant/util/subprocess_test.rb b/test/unit/vagrant/util/subprocess_test.rb
index 0ff5835c8..757d8ef8a 100644
--- a/test/unit/vagrant/util/subprocess_test.rb
+++ b/test/unit/vagrant/util/subprocess_test.rb
@@ -124,7 +124,7 @@ describe Vagrant::Util::Subprocess do
end
end
- it "should return true when subprocess is running" do
+ xit "should return true when subprocess is running" do
sleep_test_commands.each do |sp|
thread = Thread.new{ sp.execute }
sleep(0.3)
@@ -155,7 +155,7 @@ describe Vagrant::Util::Subprocess do
end
context "when subprocess is running" do
- it "should return true" do
+ xit "should return true" do
sleep_test_commands.each do |sp|
thread = Thread.new{ sp.execute }
sleep(0.1)
--
2.41.0

View File

@ -0,0 +1,28 @@
From 5a8e538a994d8850333de713dc13f9c9f2416caa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Tue, 23 Aug 2022 16:19:11 +0200
Subject: [PATCH 10/13] Remove dependency on grpc-tools
This package is only needed to build the go plugins, which we do not use at the
moment.
---
vagrant.gemspec | 3 ---
1 file changed, 3 deletions(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 7d417b019..809500649 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -39,9 +39,6 @@ Gem::Specification.new do |s|
s.add_dependency "winrm-elevated", ">= 1.2.3", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.5", "< 2.0"
- # Needed for go generate to use grpc_tools_ruby_protoc
- s.add_development_dependency "grpc-tools", "~> 1.41"
-
# required to include https://github.com/ruby/ipaddr/issues/35
s.add_dependency "ipaddr", ">= 1.2.4"
--
2.41.0

View File

@ -0,0 +1,53 @@
From 2b2a008af38fcd713c7e6b6a3ba6f3c2ad1fccc8 Mon Sep 17 00:00:00 2001
From: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
Date: Thu, 16 Nov 2023 13:50:07 +0100
Subject: [PATCH 11/13] Remove vagrant ssl extension
---
Rakefile | 5 -----
vagrant.gemspec | 2 --
2 files changed, 7 deletions(-)
diff --git a/Rakefile b/Rakefile
index 34ce6386e..2af398a1e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,16 +1,11 @@
require 'rubygems'
require 'bundler/setup'
-require "rake/extensiontask"
# Immediately sync all stdout so that tools like buildbot can
# immediately load in the output.
$stdout.sync = true
$stderr.sync = true
-Rake::ExtensionTask.new "vagrant_ssl" do |ext|
- ext.lib_dir = "lib/vagrant"
-end
-
# Load all the rake tasks from the "tasks" folder. This folder
# allows us to nicely separate rake tasks into individual files
# based on their role, which makes development and debugging easier
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 809500649..64bc2ceb4 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -45,7 +45,6 @@ Gem::Specification.new do |s|
# Constraint rake to properly handle deprecated method usage
# from within rspec
s.add_development_dependency "rake", "~> 13.0"
- s.add_development_dependency "rake-compiler"
s.add_development_dependency "rspec", "~> 3.11"
s.add_development_dependency "rspec-its", "~> 1.3.0"
s.add_development_dependency "fake_ftp", "~> 0.3.0"
@@ -101,6 +100,5 @@ Gem::Specification.new do |s|
s.files = unignored_files
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
- s.extensions = ["ext/vagrant_ssl/extconf.rb"]
s.require_path = 'lib'
end
--
2.41.0

View File

@ -0,0 +1,25 @@
From d4963623e8580d99f1c9db79005f89b629d616f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>
Date: Thu, 16 Nov 2023 13:50:52 +0100
Subject: [PATCH 12/13] Bump rgl dependency to ~> 0.6.6
---
vagrant.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 64bc2ceb4..980ae4743 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
s.add_dependency "net-scp", "~> 4.0"
s.add_dependency "rb-kqueue", "~> 0.2.0"
s.add_dependency "rexml", "~> 3.2"
- s.add_dependency "rgl", "~> 0.5.10"
+ s.add_dependency "rgl", "~> 0.6.6"
s.add_dependency "rubyzip", "~> 2.3.2"
s.add_dependency "vagrant_cloud", "~> 3.0.5"
s.add_dependency "winrm", ">= 2.3.6", "< 3.0"
--
2.41.0

View File

@ -0,0 +1,25 @@
From 316df3ff8e3aac46ada7fa878a90b544b829c5b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>
Date: Thu, 16 Nov 2023 14:34:36 +0100
Subject: [PATCH 13/13] Bump webrick dependency to ~> 1.8.0
---
vagrant.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 980ae4743..ef388b699 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec", "~> 3.11"
s.add_development_dependency "rspec-its", "~> 1.3.0"
s.add_development_dependency "fake_ftp", "~> 0.3.0"
- s.add_development_dependency "webrick", "~> 1.7.0"
+ s.add_development_dependency "webrick", "~> 1.8.0"
# The following block of code determines the files that should be included
# in the gem. It does this by reading all the files in the directory where
--
2.41.0

View File

@ -0,0 +1,26 @@
From 430bd45e3df6a42c2b8a45bf43036e17a210f74d Mon Sep 17 00:00:00 2001
From: Johannes Kastl <git@johannes-kastl.de>
Date: Mon, 12 Feb 2024 06:40:48 +0100
Subject: [PATCH] vagrant.gemspec: vagrant_cloud ~> 3.0
Signed-off-by: Johannes Kastl <git@johannes-kastl.de>
---
vagrant.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vagrant.gemspec b/vagrant.gemspec
index ef388b699..82280c1fe 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_dependency "rexml", "~> 3.2"
s.add_dependency "rgl", "~> 0.6.6"
s.add_dependency "rubyzip", "~> 2.3.2"
- s.add_dependency "vagrant_cloud", "~> 3.0.5"
+ s.add_dependency "vagrant_cloud", "~> 3.0"
s.add_dependency "winrm", ">= 2.3.6", "< 3.0"
s.add_dependency "winrm-elevated", ">= 1.2.3", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.5", "< 2.0"
--
2.43.0

63
README.SUSE Normal file
View File

@ -0,0 +1,63 @@
Packaging Vagrant plugins
-------------------------
This convention is based on the Fedora vagrant package.
Vagrant plugins are ordinary rubygems, but they should not be packaged as
these. First off all, we don't need to build the plugin with a ruby version
other then the ruby version with which vagrant was built. Furthermore, vagrant
will _only_ recognize gems inside its own directory structure as plugins and not
arbitrary rubygems.
Note that we *must* explicitly specify the macros `rb_build_versions` and
`rb_build_abi` (and cannot use macros here!). Usually we can simply use the
default ruby here, but in case vagrant is incompatible with the default ruby, we
must override this in each plugin.
An example specfile for a vagrant plugin looks like this:
``` spec
%global rb_build_versions ruby26
%global rb_build_abi ruby:2.6.0
%global rb_ruby_suffix ruby2.6
Name: vagrant-MYPLUGIN
Version: $VERSION
Release: 0
%define mod_name %{name}
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
BuildRequires: vagrant
BuildArch: noarch
Url: $URL
Source: $SRC
Source1: gem2rpm.yml
Summary: $SUMMARY
License: $LICENSE
%description
$DESCRIPTION
%global vagrant_plugin_name %{name}
%prep
%gem_unpack
%build
%gem_build
%install
%vagrant_plugin_install
%files
%{vagrant_plugin_instdir}
%{vagrant_plugin_cache}
%{vagrant_plugin_spec}
%changelog
```

60
binstub Normal file
View File

@ -0,0 +1,60 @@
#!/bin/bash
#
# This is a wrapper to properly execute Vagrant within the embedded
# 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.
export GEM_PATH="@ruby_vagrant_gem_path@"
# Export GEM_HOME based on VAGRANT_HOME
#
# This needs to be set because Bundler includes gem paths
# from RubyGems' Gem.paths.
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 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
# to locate plugins configuration file.
export VAGRANT_INSTALLER_EMBEDDED_DIR="@vagrant_embedded_dir@"
export VAGRANT_INSTALLER_VERSION="2"
# Determine the OS that we're on, which is used in some later checks.
# It is very important we do this _before_ setting the PATH below
# because uname dependencies can conflict on some platforms.
OS=$(uname -s 2>/dev/null)
# 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"
# 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
# Don't allow symlink in shared folders by default, the user can override it if
# they really want to (this is a security risk)
if [ -z "$VAGRANT_DISABLE_VBOXSYMLINKCREATE" ]; then
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
fi
export VAGRANT_DISABLE_VBOXSYMLINKCREATE
# Call the actual Vagrant bin with our arguments
exec /usr/bin/ruby.@vagrant_rb_ruby_suffix@ "${VAGRANT_EXECUTABLE}" "$@"

12
childprocess-5.0.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Pdpru vagrant-2.3.7.orig/vagrant.gemspec vagrant-2.3.7/vagrant.gemspec
--- vagrant-2.3.7.orig/vagrant.gemspec 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/vagrant.gemspec 2024-02-27 22:06:34.169040881 +0300
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.add_dependency "bcrypt_pbkdf", "~> 1.1"
- s.add_dependency "childprocess", "~> 4.1.0"
+ s.add_dependency "childprocess", "~> 5.0.0"
s.add_dependency "ed25519", "~> 1.3.0"
s.add_dependency "erubi"
s.add_dependency 'googleapis-common-protos-types', '~> 1.3'

71
dependency.patch Normal file
View File

@ -0,0 +1,71 @@
diff -Pdpru vagrant-2.3.7.orig/Rakefile vagrant-2.3.7/Rakefile
--- vagrant-2.3.7.orig/Rakefile 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/Rakefile 2024-09-04 19:08:07.179627994 +0300
@@ -1,16 +1,11 @@
require 'rubygems'
require 'bundler/setup'
-require "rake/extensiontask"
# Immediately sync all stdout so that tools like buildbot can
# immediately load in the output.
$stdout.sync = true
$stderr.sync = true
-Rake::ExtensionTask.new "vagrant_ssl" do |ext|
- ext.lib_dir = "lib/vagrant"
-end
-
# Load all the rake tasks from the "tasks" folder. This folder
# allows us to nicely separate rake tasks into individual files
# based on their role, which makes development and debugging easier
diff -Pdpru vagrant-2.3.7.orig/vagrant.gemspec vagrant-2.3.7/vagrant.gemspec
--- vagrant-2.3.7.orig/vagrant.gemspec 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/vagrant.gemspec 2024-09-04 20:41:17.907561815 +0300
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.add_dependency "bcrypt_pbkdf", "~> 1.1"
- s.add_dependency "childprocess", "~> 4.1.0"
+ s.add_dependency "childprocess", "~> 5.0"
s.add_dependency "ed25519", "~> 1.3.0"
s.add_dependency "erubi"
s.add_dependency 'googleapis-common-protos-types', '~> 1.3'
@@ -32,28 +32,23 @@ Gem::Specification.new do |s|
s.add_dependency "net-scp", "~> 4.0"
s.add_dependency "rb-kqueue", "~> 0.2.0"
s.add_dependency "rexml", "~> 3.2"
- s.add_dependency "rgl", "~> 0.5.10"
+ s.add_dependency "rgl", "~> 0.6"
s.add_dependency "rubyzip", "~> 2.3.2"
- s.add_dependency "vagrant_cloud", "~> 3.0.5"
- s.add_dependency "wdm", "~> 0.1.1"
+ s.add_dependency "vagrant_cloud", "~> 3.0"
s.add_dependency "winrm", ">= 2.3.6", "< 3.0"
s.add_dependency "winrm-elevated", ">= 1.2.3", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.5", "< 2.0"
- # Needed for go generate to use grpc_tools_ruby_protoc
- s.add_development_dependency "grpc-tools", "~> 1.41"
-
# required to include https://github.com/ruby/ipaddr/issues/35
s.add_dependency "ipaddr", ">= 1.2.4"
# Constraint rake to properly handle deprecated method usage
# from within rspec
s.add_development_dependency "rake", "~> 13.0"
- s.add_development_dependency "rake-compiler"
s.add_development_dependency "rspec", "~> 3.11"
s.add_development_dependency "rspec-its", "~> 1.3.0"
s.add_development_dependency "fake_ftp", "~> 0.3.0"
- s.add_development_dependency "webrick", "~> 1.7.0"
+ s.add_development_dependency "webrick", "~> 1.8"
# The following block of code determines the files that should be included
# in the gem. It does this by reading all the files in the directory where
@@ -105,6 +100,5 @@ Gem::Specification.new do |s|
s.files = unignored_files
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
- s.extensions = ["ext/vagrant_ssl/extconf.rb"]
s.require_path = 'lib'
end

44
macros.vagrant Normal file
View File

@ -0,0 +1,44 @@
# stolen from Fedora's package
%vagrant_embedded_dir %{_datadir}/%{name}
%vagrant_dir %{vagrant_embedded_dir}/gems/gems/%{name}-%{version}
# Common locations for Vagrant plugin gems
%vagrant_plugin_dir %{vagrant_embedded_dir}/gems
%vagrant_plugin_instdir %{vagrant_plugin_dir}/gems/%{vagrant_plugin_name}-%{version}
%vagrant_plugin_libdir %{vagrant_plugin_instdir}/lib
%vagrant_plugin_cache %{vagrant_plugin_dir}/cache/%{vagrant_plugin_name}-%{version}.gem
%vagrant_plugin_spec %{vagrant_plugin_dir}/specifications/%{vagrant_plugin_name}-%{version}.gemspec
%vagrant_plugin_docdir %{vagrant_plugin_dir}/doc/%{vagrant_plugin_name}-%{version}
%vagrant_plugin_conf %{vagrant_embedded_dir}/plugins.json
# specify the gem binary in case we are building with a non-default ruby version
%gem_binary %{_bindir}/gem.%{rb_ruby_suffix}
# Install gem into appropriate directory.
# -n<vagrant_plugin_file> Overrides gem file name for installation.
# -d<install_dir> Set installation directory.
%vagrant_plugin_install(d:n:) \
if [ "%{expand:%rb_build_versions}" != "%vagrant_rb_build_versions" ]; then \
echo "Vagrant ruby version does not match %{vagrant_plugin_name}'s ruby version" \
exit 1 \
fi \
mkdir -p %{-d*}%{!?-d:%{buildroot}%{vagrant_plugin_dir}} \
\
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
%gem_binary install \\\
-V \\\
--local \\\
--no-user-install \\\
--install-dir %{-d*}%{!?-d:%{buildroot}%{vagrant_plugin_dir}} \\\
--bindir %{buildroot}%{_bindir} \\\
--ignore-dependencies \\\
--force \\\
--document=rdoc,ri \\\
--backtrace \\\
%{-n*}%{!?-n:%{vagrant_plugin_name}-%{version}/%{vagrant_plugin_name}-%{version}.gem} \
%{nil}
%vagrant_rb_build_versions %{rb_build_versions}
%vagrant_rb_build_abi %{rb_build_abi}
%vagrant_rb_ruby_suffix %{rb_ruby_suffix}

84
ruby-3.3.patch Normal file
View File

@ -0,0 +1,84 @@
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/go-spectest-skipped.yml vagrant-2.3.7/.github/workflows/go-spectest-skipped.yml
--- vagrant-2.3.7.orig/.github/workflows/go-spectest-skipped.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/go-spectest-skipped.yml 2024-01-19 02:27:59.974880099 +0300
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ['3.0', '3.1', '3.2']
+ ruby: ['3.0', '3.1', '3.2', '3.3']
name: Vagrant acceptance tests (Ruby ${{ matrix.ruby }})
steps:
- name: Stubbed for skip
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/go-spectest.yml vagrant-2.3.7/.github/workflows/go-spectest.yml
--- vagrant-2.3.7.orig/.github/workflows/go-spectest.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/go-spectest.yml 2024-01-19 02:28:23.911891525 +0300
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ['3.0', '3.1', '3.2']
+ ruby: ['3.0', '3.1', '3.2', '3.3']
name: Vagrant acceptance tests (Ruby ${{ matrix.ruby }})
steps:
- name: Code Checkout
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/go-testing-skipped.yml vagrant-2.3.7/.github/workflows/go-testing-skipped.yml
--- vagrant-2.3.7.orig/.github/workflows/go-testing-skipped.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/go-testing-skipped.yml 2024-01-19 02:28:43.102167235 +0300
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ['3.0', '3.1', '3.2']
+ ruby: ['3.0', '3.1', '3.2', '3.3']
name: Vagrant unit tests on Go (Ruby ${{ matrix.ruby }})
steps:
- name: Stubbed for skip
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/go-testing.yml vagrant-2.3.7/.github/workflows/go-testing.yml
--- vagrant-2.3.7.orig/.github/workflows/go-testing.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/go-testing.yml 2024-01-19 02:29:05.385820685 +0300
@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby: ['3.0', '3.1', '3.2']
+ ruby: ['3.0', '3.1', '3.2', '3.3']
name: Vagrant unit tests on Go (Ruby ${{ matrix.ruby }})
steps:
- name: Code Checkout
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/testing-skipped.yml vagrant-2.3.7/.github/workflows/testing-skipped.yml
--- vagrant-2.3.7.orig/.github/workflows/testing-skipped.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/testing-skipped.yml 2024-01-19 02:31:50.474858960 +0300
@@ -19,7 +19,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
- ruby: [ '3.0', '3.1', '3.2' ]
+ ruby: [ '3.0', '3.1', '3.2', '3.3' ]
name: Vagrant unit tests on Ruby ${{ matrix.ruby }}
steps:
- name: Stubbed for skip
diff -Pdpru vagrant-2.3.7.orig/.github/workflows/testing.yml vagrant-2.3.7/.github/workflows/testing.yml
--- vagrant-2.3.7.orig/.github/workflows/testing.yml 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/.github/workflows/testing.yml 2024-01-19 02:32:17.978587414 +0300
@@ -32,7 +32,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
- ruby: [ '3.0', '3.1', '3.2' ]
+ ruby: [ '3.0', '3.1', '3.2', '3.3' ]
name: Vagrant unit tests on Ruby ${{ matrix.ruby }}
steps:
- name: Code Checkout
diff -Pdpru vagrant-2.3.7.orig/vagrant.gemspec vagrant-2.3.7/vagrant.gemspec
--- vagrant-2.3.7.orig/vagrant.gemspec 2023-06-15 23:40:35.000000000 +0300
+++ vagrant-2.3.7/vagrant.gemspec 2024-01-19 02:33:37.299726955 +0300
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.summary = "Build and distribute virtualized development environments."
s.description = "Vagrant is a tool for building and distributing virtualized development environments."
- s.required_ruby_version = ">= 3.0", "< 3.3"
+ s.required_ruby_version = ">= 3.0", "< 3.4"
s.required_rubygems_version = ">= 1.3.6"
s.add_dependency "bcrypt_pbkdf", "~> 1.1"

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

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

68
vagrant.1 Normal file
View File

@ -0,0 +1,68 @@
.TH VAGRANT "1" "January 2014" "Vagrant 1.4.3" "User Commands"
.SH NAME
Vagrant \- Tool for building and distributing virtualized development environments.
.SH SYNOPSIS
.B vagrant
[\fI-v\fR] [\fI-h\fR] \fIcommand \fR[\fI<args>\fR]
.SH DESCRIPTION
Vagrant is a tool for building and distributing virtualized development environments.
Vagrant provides the framework and configuration format to create and manage complete portable development environments. These development environments can live on your computer or in the cloud, and are portable between Windows, Mac OS X, and Linux.
.SH OPTIONS
.TP
\fB\-v\fR, \fB\-\-version\fR
Print the version and exit.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this help.
.SS "Available subcommands:"
.TP
\fIbox\fR
manages boxes: installation, removal, etc.
.TP
\fIdestroy\fR
stops and deletes all traces of the vagrant machine
.TP
\fIhalt\fR
stops the vagrant machine
.TP
\fIhelp\fR
shows the help for a subcommand
.TP
\fIinit\fR
initializes a new Vagrant environment by creating a Vagrantfile
.TP
\fIpackage\fR
packages a running vagrant environment into a box
.TP
\fIplugin\fR
manages plugins: \fBinstall\fR, \fBuninstall\fR, \fBupdate\fR, etc.
.TP
\fIprovision\fR
provisions the vagrant machine
.TP
\fIreload\fR
restarts vagrant machine, loads new Vagrantfile configuration
.TP
\fIresume\fR
resume a suspended vagrant machine
.TP
\fIssh\fR
connects to machine via SSH
.TP
\fIssh\-config\fR
outputs OpenSSH valid configuration to connect to the machine
.TP
\fIstatus\fR
outputs status of the vagrant machine
.TP
\fIsuspend\fR
suspends the machine
.TP
\fIup\fR
starts and provisions the vagrant environment
.PP
.SH AUTHOR
Mitchell Hashimoto <mitchell.hashimoto@gmail.com>
.SH "SEE ALSO"
For help on any individual command run \fBvagrant \fICOMMAND \fB\-h\fR

2198
vagrant.changes Normal file

File diff suppressed because it is too large Load Diff

494
vagrant.spec Normal file
View File

@ -0,0 +1,494 @@
#
# spec file for package vagrant
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2012 Laurent Bigonville <bigon@debian.org>, License GPL-2.0+
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{bcond_without tests}
%global rb_build_versions %rb_default_ruby
%global rb_build_abi %rb_default_ruby_abi
%global rb_ruby_suffix %rb_default_ruby_suffix
#
%global mod_name vagrant
%global mod_full_name %{mod_name}-%{version}
%global vim_data_dir %{_datadir}/vim/site/plugin/
Name: vagrant
Version: 2.3.7
Release: 0
Summary: Tool for building and distributing virtualized development environments
License: MIT
Group: Development/Languages/Ruby
URL: https://github.com/hashicorp/vagrant
Source0: https://github.com/hashicorp/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
Source11: vagrant.1
Source93: vagrant_transfiletriggerin.rb
Source94: vagrant_transfiletriggerun.rb
Source95: vagrant_post.rb
Source96: binstub
Source97: macros.vagrant
Source98: README.SUSE
Provides: rubygem-vagrant = %{version}
Obsoletes: rubygem-vagrant < %{version}
Recommends: vagrant-libvirt
#
# Patches are maintained in the opensuse_package branch in the
# https://github.com/dcermak/vagrant.git repository.
# On every new release of vagrant, rebase them on top of the latest tag.
#
Patch0: ruby-3.3.patch
Patch1: 0001-bin-vagrant-silence-warning-about-installer.patch
Patch2: 0002-Use-a-private-temporary-dir.patch
Patch3: 0003-plugins-don-t-abuse-require_relative.patch.patch
Patch4: 0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch
Patch5: dependency.patch
Patch6: 0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch
Patch7: 0007-Don-t-abuse-relative-paths-in-plugins.patch
Patch8: 0008-Skip-failing-tests.patch
Patch9: 0009-Disable-Subprocess-unit-test.patch
# force only one ruby version
# CAUTION: if you change this, then you *must* also change the sed calls which
# fix these values in macros.vagrant
%global rb_build_versions %rb_default_ruby
%global rb_build_abi %rb_default_ruby_abi
%global rb_ruby_suffix %rb_default_ruby_suffix
# we use the rpm macros in this spec
# need to load them *after* defining the rb_* macros
%{load:%{SOURCE97}}
%global vagrant_plugin_name vagrant
#===============================================================================
# Build dependencies
#===============================================================================
BuildRequires: %{rubygem bundler}
BuildRequires: %{ruby} >= 3.0, %{ruby} < 3.4
# s.add_dependency "bcrypt_pbkdf", "~> 1.1"
BuildRequires: %{rubygem bcrypt_pbkdf:1 >= 1.1 }
# s.add_dependency "childprocess", "~> 5.0"
BuildRequires: %{rubygem childprocess:5.0 }
# s.add_dependency "ed25519", "~> 1.3.0"
BuildRequires: %{rubygem ed25519:1.3 >= 1.3.0 }
# s.add_dependency "erubi"
BuildRequires: %{rubygem erubi }
# s.add_dependency 'googleapis-common-protos-types', '~> 1.3'
BuildRequires: %{rubygem googleapis-common-protos-types:1 >= 1.3}
# s.add_dependency "grpc"
BuildRequires: %{rubygem grpc}
# s.add_dependency "i18n", "~> 1.8"
BuildRequires: %{rubygem i18n:1 >= 1.8 }
# s.add_dependency "listen", "~> 3.6"
BuildRequires: %{rubygem listen:3 >= 3.6 }
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
BuildRequires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5 }
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
BuildRequires: %{rubygem log4r:1.1 >= 1.1.9 }
BuildConflicts: %{rubygem log4r:1.1 >= 1.1.11 }
# s.add_dependency "mime-types", "~> 3.3"
BuildRequires: %{rubygem mime-types:3 >= 3.3 }
# s.add_dependency "net-ftp", "~> 0.1"
BuildRequires: %{rubygem net-ftp:0 >= 0.1 }
# s.add_dependency "net-ssh", "~> 7.0"
BuildRequires: %{rubygem net-ssh:7 }
# s.add_dependency "net-sftp", "~> 4.0"
BuildRequires: %{rubygem net-sftp:4 }
# s.add_dependency "net-scp", "~> 4.0"
BuildRequires: %{rubygem net-scp:4 }
# s.add_dependency "rb-kqueue", "~> 0.2.0"
BuildRequires: %{rubygem rb-kqueue:0.2 }
# s.add_dependency "rexml", "~> 3.2"
BuildRequires: %{rubygem rexml:3 >= 3.2 }
# PATCHED
# s.add_dependency "rgl", "~> 0.6.6"
BuildRequires: %{rubygem rgl:0.6 >= 0.6.6}
# s.add_dependency "rubyzip", "~> 2.0"
BuildRequires: %{rubygem rubyzip:2}
# Intentionally removed, wdm only works on Windows
# BuildRequires: %%{rubygem wdm }
# s.add_dependency "winrm", ">= 2.3.4", "< 3.0"
BuildRequires: %{rubygem winrm:2 >= 2.3.4 }
# s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
BuildRequires: %{rubygem winrm-fs:1 >= 1.3.4 }
# s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0"
BuildRequires: %{rubygem winrm-elevated:1 >= 1.2.1 }
# Patched in 0014-Bump-vagrant_cloud_dependency.patch
# s.add_dependency "vagrant_cloud", "~> 3.0"
BuildRequires: %{rubygem vagrant_cloud:3 >= 3.0 }
# PATCHED -> removed
# s.add_development_dependency "grpc-tools", "~> 1.41.1"
# BuildRequires: %%{rubygem grpc-tools:1.41 >= 1.41.1}
# devel dependencies:
# s.add_development_dependency "rake", "~> 13.0"
BuildRequires: %{rubygem rake:13 }
# s.add_development_dependency "rspec", "~> 3.11"
BuildRequires: %{rubygem rspec:3 >= 3.11 }
# s.add_development_dependency "rspec-its", "~> 1.3.0"
BuildRequires: %{rubygem rspec-its:1.3 }
# s.add_development_dependency "fake_ftp", "~> 0.3.0"
BuildRequires: %{rubygem fake_ftp:0.3 >= 0.3.0 }
# PATCHED
# s.add_development_dependency "webrick", "~> 1.8"
BuildRequires: %{rubygem webrick:1.8 }
# Prevent have choice for rubygem(ruby:2.6.0:mime-types) >= 2
BuildRequires: %{rubygem mime-types:3 }
# Prevent have choice for rubygem(ruby:2.6.0:builder) >= 2.1.2
BuildRequires: %{rubygem builder:3.3 }
# Prevent have choice for rubygem(ruby:2.6.0:ffi:1) >= 1
BuildRequires: %{rubygem ffi >= 1.9 }
# Prevent have choice for rubygem(ruby:2.5.0:addressable) >= 2.3.6
BuildRequires: %{rubygem addressable >= 2.7}
# gem2rpm *must* be included as a direct dependency when building with a
# non-default ruby version
BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
# for the test
%if %{with tests}
BuildRequires: %{rubygem vagrant-spec}
BuildRequires: bsdtar
BuildRequires: curl
BuildRequires: openssh
%endif
BuildRequires: fdupes
#===============================================================================
# Runtime dependencies
#===============================================================================
# s.add_dependency "bcrypt_pbkdf", "~> 1.1"
Requires: %{rubygem bcrypt_pbkdf:1 >= 1.1 }
# s.add_dependency "childprocess", "~> 5.0"
Requires: %{rubygem childprocess:5.0}
# s.add_dependency "ed25519", "~> 1.3.0"
Requires: %{rubygem ed25519:1.3 >= 1.3.0}
# s.add_dependency "erubi"
Requires: %{rubygem erubi}
# s.add_dependency 'googleapis-common-protos-types', '~> 1.3'
Requires: %{rubygem googleapis-common-protos-types:1 >= 1.3}
# s.add_dependency "grpc"
Requires: %{rubygem grpc}
# s.add_dependency "i18n", "~> 1.8"
Requires: %{rubygem i18n:1 >= 1.8}
# s.add_dependency "listen", "~> 3.6"
Requires: %{rubygem listen:3 >= 3.6}
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
Requires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5}
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
Requires: %{rubygem log4r:1.1 >= 1.1.9 }
Requires: %{rubygem log4r:1.1 < 1.1.11 }
# s.add_dependency "mime-types", "~> 3.3"
Requires: %{rubygem mime-types:3 >= 3.3}
# s.add_dependency "net-ftp", "~> 0.1"
BuildRequires: %{rubygem net-ftp:0 >= 0.1 }
# s.add_dependency "net-ssh", "~> 7.0"
Requires: %{rubygem net-ssh:7 }
# s.add_dependency "net-sftp", "~> 4.0"
Requires: %{rubygem net-sftp:4 }
# s.add_dependency "net-scp", "~> 4.0"
Requires: %{rubygem net-scp:4 }
# s.add_dependency "rb-kqueue", "~> 0.2.0"
Requires: %{rubygem rb-kqueue:0.2}
# s.add_dependency "rexml", "~> 3.2"
Requires: %{rubygem rexml:3 >= 3.2 }
# PATCHED
# s.add_dependency "rgl", "~> 0.6.6"
Requires: %{rubygem rgl:0.6 >= 0.6.6}
# s.add_dependency "rubyzip", "~> 2.0"
Requires: %{rubygem rubyzip:2}
# s.add_dependency "wdm", "~> 0.1.0"
# skip wdm, Windows only
# s.add_dependency "winrm", ">= 2.3.4", "< 3.0"
Requires: %{rubygem winrm:2 >= 2.3.4}
# s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
Requires: %{rubygem winrm-fs:1 >= 1.3.4}
# s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0"
Requires: %{rubygem winrm-elevated:1 >= 1.2.1}
# Patched in 0014-Bump-vagrant_cloud_dependency.patch
# s.add_dependency "vagrant_cloud", "~> 3.0"
Requires: %{rubygem vagrant_cloud:3 >= 3.0}
Requires: bsdtar
Requires: curl
Requires: openssh
# for groupadd
Requires(pre): shadow
BuildArch: noarch
%description
Vagrant is a tool for building and distributing virtualized development
environments.
%package doc
Summary: Documentation for Vagrant
Group: Documentation/HTML
BuildArch: noarch
%description doc
This package contains the documentation for vagrant.
%package vim
Summary: Vagrantfile syntax files for the vim editor
Group: Development/Languages/Ruby
Supplements: (vagrant and vim)
BuildRequires: vim
Requires: vagrant = %{version}
Requires: vim
BuildArch: noarch
%description vim
Optional dependency offering vim syntax files for Vagrantfile
%package emacs
Summary: Vagrantfile syntax files for the emacs editor
Group: Development/Languages/Ruby
Supplements: (vagrant and emacs_program)
BuildRequires: emacs-nox
Requires: emacs_program
Requires: vagrant = %{version}
BuildArch: noarch
%description emacs
Optional dependency offering emacs syntax files for Vagrantfile
%package bash-completion
Summary: Vagrant bash autocompletion
Group: Development/Languages/Ruby
Supplements: (vagrant and bash)
BuildRequires: bash
BuildRequires: bash-completion
Requires: bash
Requires: bash-completion
Requires: vagrant = %{version}
BuildArch: noarch
%description bash-completion
Optional dependency offering bash completion for vagrant
%prep
%autosetup -p1 -n %{mod_full_name}
cp %{SOURCE98} .
%build
mv %{mod_name}.gemspec %{mod_full_name}.gemspec
%gem_build
mv %{mod_full_name}.gem %{_sourcedir}
%install
# cannot use %%vagrant_plugin_install here, as we provide a different --bindir
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS"
%gem_binary install -V -f --local --no-user-install \
--ignore-dependencies --no-document --backtrace \
--document=rdoc,ri \
--install-dir %{buildroot}%{vagrant_plugin_dir} \
--bindir %{buildroot}%{vagrant_plugin_dir}/bin %{_sourcedir}/%{mod_full_name}.gem
# the actual vagrant binary generated from the binstub
install -D -m 755 %{SOURCE96} %{buildroot}%{_bindir}/vagrant
gem_path=$(ruby.%{rb_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')")
sed -i -e "s|@vagrant_embedded_dir@|%{vagrant_embedded_dir}|" \
-e "s|@ruby_vagrant_gem_path@|$gem_path:%{vagrant_plugin_dir}|" \
-e "s|@vagrant_rb_ruby_suffix@|%{vagrant_rb_ruby_suffix}|" \
%{buildroot}%{_bindir}/%{name}
# install the rpm macros & expand the name, name-version and vagrant_rb_* macros
%global macros_vagrant %{_rpmconfigdir}/macros.d/macros.%{name}
install -D -m 0644 %{SOURCE97} %{buildroot}%{macros_vagrant}
sed -i -e "s|%%{name}|%{name}|" \
-e "s|%{name}-%%{version}|%{name}-%{version}|" \
-e "s|%%{rb_build_versions}|%{rb_build_versions}|" \
-e "s|%%{rb_build_abi}|%{rb_build_abi}|" \
-e "s|%%{rb_ruby_suffix}|%{rb_ruby_suffix}|" \
%{buildroot}%{macros_vagrant}
# install post, transfiletrigerin & transfiletriggerun scriptlets
%global post_rb %{vagrant_embedded_dir}/bin/vagrant_post.rb
%global transfiletriggerin_rb %{vagrant_embedded_dir}/bin/vagrant_transfiletriggerin.rb
%global transfiletriggerun_rb %{vagrant_embedded_dir}/bin/vagrant_transfiletriggerun.rb
install -D -m 0755 %{SOURCE93} %{buildroot}%{transfiletriggerin_rb}
install -D -m 0755 %{SOURCE94} %{buildroot}%{transfiletriggerun_rb}
install -D -m 0755 %{SOURCE95} %{buildroot}%{post_rb}
# expand macros in scriptlets
for file in %{post_rb} %{transfiletriggerin_rb} %{transfiletriggerun_rb}; do
sed -i "s|%%{vagrant_dir}|%{vagrant_dir}|" %{buildroot}$file
sed -i "s|%%{vagrant_plugin_conf}|%{vagrant_plugin_conf}|" %{buildroot}$file
sed -i "s|%%{name}|%{name}|" %{buildroot}$file
sed -i "s|%%{version}|%{version}|" %{buildroot}$file
sed -i "s|%%{rb_ruby_suffix}|%{rb_ruby_suffix}|" %{buildroot}$file
done
# man page
install -D -m 644 %{SOURCE11} %{buildroot}%{_mandir}/man1/vagrant.1
# Bash completion: install it without the .sh ending, otherwise completion is broken
# and remove the shebang line in it
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/bash/completion.sh \
%{buildroot}%{_datadir}/bash-completion/completions/%{mod_name}
sed -i '1d' %{buildroot}%{_datadir}/bash-completion/completions/%{mod_name}
# Vim & Emacs syntax highlighting
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/vim/vagrantfile.vim \
%{buildroot}%{vim_data_dir}/%{mod_name}.vim
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/emacs/vagrant.el \
%{buildroot}%{_datadir}/emacs/site-lisp/%{mod_name}.el
chmod -x %{buildroot}%{vagrant_dir}/templates/locales/en.yml
# directories for vagrant plugins
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_cache}}
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_spec}}
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_docdir}}
# fix shebang in %%{vagrant_dir}/bin/%%{name}
sed -i 's|^\#\!/usr/bin/env.*|\#\!/usr/bin/ruby\.%{rb_ruby_suffix}|' \
%{buildroot}%{vagrant_dir}/bin/%{name}
# remove versioned name from %%{vagrant_plugin_dir}/bin/%%{name}
# (aka /usr/share/vagrant/gems/bin/vagrant)
mv %{buildroot}%{vagrant_plugin_dir}/bin/%{name}.%{rb_ruby_suffix} \
%{buildroot}%{vagrant_plugin_dir}/bin/%{name}
# Garbage collection
rm -f %{buildroot}%{vagrant_dir}/test/vagrant-spec/boxes/.keep
rm -f %{buildroot}%{vagrant_dir}/bin/vagrant.orig
rm -f %{buildroot}%{_bindir}/vagrant.orig.%{rb_ruby_suffix}
rm -f %{buildroot}%{vagrant_plugin_dir}/bin/vagrant.orig.%{rb_ruby_suffix}
rm -f %{buildroot}%{vagrant_dir}/lib/vagrant/util.rb.orig
# remove build scripts & nix stuff & go stuff
rm -rf %{buildroot}%{vagrant_dir}/{.runner.sh,Dockerfile,Makefile,go.mod,go.sum,shell.nix,nix,gen.go,flake.lock,flake.nix,vagrant-config.hcl}
# we use our own binstub
rm -rf %{buildroot}%{vagrant_dir}/binstubs/
# some compatibility helper for winrm which we do not use (https://github.com/hashicorp/vagrant/pull/13178)
rm -r %{buildroot}%{vagrant_dir}/ext/vagrant_ssl
%fdupes %{buildroot}%{dirname:%vagrant_plugin_dir}
%check
%if %{with tests}
# remove the git reference to vagrant-spec
# -> don't have to cleanup, the Gemfile is excluded anyway
sed -i "s|gem 'vagrant-spec', git.*$|gem 'vagrant-spec'|" Gemfile
export GEM_PATH=%{buildroot}%{vagrant_plugin_dir}:$(ruby.%{rb_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')")
bundle exec rake test:unit
%endif
# with tests
%pre
getent group vagrant >/dev/null || groupadd -r vagrant
%post
%{post_rb}
%transfiletriggerin -- %{dirname:%{vagrant_plugin_spec}}/
%{transfiletriggerin_rb}
%transfiletriggerun -- %{dirname:%{vagrant_plugin_spec}}/
%{transfiletriggerun_rb}
%files
%doc %{vagrant_dir}/CHANGELOG.md
%doc %{vagrant_dir}/README.md
%doc %{vagrant_dir}/README.SUSE
%license %{vagrant_dir}/LICENSE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.*
%{macros_vagrant}
# scriptlets
%dir %{dirname: %{post_rb}}
%{post_rb}
%{transfiletriggerin_rb}
%{transfiletriggerun_rb}
%dir %{vagrant_embedded_dir}
%ghost %{vagrant_plugin_conf}
# plugin directories
%dir %{vagrant_plugin_dir}
%dir %{vagrant_plugin_dir}/gems
%dir %{vagrant_plugin_dir}/bin
%dir %{dirname:%{vagrant_plugin_cache}}
%dir %{dirname:%{vagrant_plugin_spec}}
%dir %{dirname:%{vagrant_plugin_docdir}}
# vagrant's own files & directories
%{vagrant_plugin_cache}
%{vagrant_plugin_spec}
%{vagrant_plugin_dir}/bin/%{name}
%dir %{vagrant_dir}
%dir %{vagrant_dir}/bin
%dir %{vagrant_dir}/keys
%dir %{vagrant_dir}/lib
%dir %{vagrant_dir}/plugins
%dir %{vagrant_dir}/templates
%{vagrant_dir}/version.txt
%{vagrant_dir}/%{mod_full_name}.gemspec
%{vagrant_dir}/bin/%{name}
%{vagrant_dir}/keys/*
%{vagrant_dir}/lib/*
%{vagrant_dir}/plugins/*
%{vagrant_dir}/templates/*
%{vagrant_dir}/tools.go
# these are scripts for Hashicorp
%exclude %{vagrant_dir}/scripts/*
# either packaged in -vim -emacs subpackages or not relevant
%exclude %{vagrant_dir}/contrib
# various dotfiles we don't care about (.travis.yml et.al.)
%exclude %{vagrant_dir}/.*
# Development files
%exclude %{vagrant_dir}/Vagrantfile
%exclude %{vagrant_dir}/Rakefile
%exclude %{vagrant_dir}/Gemfile
%exclude %{vagrant_dir}/RELEASE.md
%exclude %{vagrant_dir}/tasks/*
# ruby configuration for acceptance tests
%exclude %{vagrant_dir}/vagrant-spec.config.example.rb
%files doc
%dir %{vagrant_plugin_docdir}
%doc %{vagrant_plugin_docdir}/rdoc
%doc %{vagrant_plugin_docdir}/ri
%files vim
%{vim_data_dir}/%{mod_name}.vim
%files emacs
%{_datadir}/emacs/site-lisp/%{mod_name}.el
%files bash-completion
%{_datadir}/bash-completion/completions/%{mod_name}
%changelog

17
vagrant_post.rb Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/ruby.%{rb_ruby_suffix}
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
require "vagrant/plugin/manager"
rescue LoadError => e
raise
end;
unless File.exist?("%{vagrant_plugin_conf}")
Vagrant::Plugin::StateFile.new(Pathname.new(File.expand_path "%{vagrant_plugin_conf}")).save!
# File.symlink "%{vagrant_plugin_conf}", "%{vagrant_plugin_conf_link}"
end
rescue => e
puts "Vagrant plugin.json is not properly initialized: #{e}"
end

View File

@ -0,0 +1,19 @@
#!/usr/bin/ruby.%{rb_ruby_suffix}
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
require "vagrant/plugin/manager"
rescue LoadError => e
raise
end
$stdin.each_line do |gemspec_file|
next if gemspec_file =~ /\/%{name}-%{version}.gemspec$/
spec = Gem::Specification.load(gemspec_file.strip)
Vagrant::Plugin::StateFile.new(Pathname.new(File.expand_path "%{vagrant_plugin_conf}")).add_plugin spec.name
end
rescue => e
puts "Vagrant plugin register error: #{e}"
end

View File

@ -0,0 +1,19 @@
#!/usr/bin/ruby.%{rb_ruby_suffix}
begin
$LOAD_PATH.unshift "%{vagrant_dir}/lib"
begin
require "vagrant/plugin/manager"
rescue LoadError => e
raise
end
$stdin.each_line do |gemspec_file|
next if gemspec_file =~ /\/%{name}-%{version}.gemspec$/
spec = Gem::Specification.load(gemspec_file.strip)
Vagrant::Plugin::StateFile.new(Pathname.new(File.expand_path "%{vagrant_plugin_conf}")).remove_plugin spec.name
end
rescue => e
puts "Vagrant plugin un-register error: #{e}"
end