forked from pool/vagrant
Accepting request 381084 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/381084 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vagrant?expand=0&rev=1
This commit is contained in:
commit
ae43736fe3
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
71
0002-Disable-Checkpoint.patch
Normal file
71
0002-Disable-Checkpoint.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 16:48:07 -0300
|
||||||
|
Subject: Disable Checkpoint
|
||||||
|
|
||||||
|
We don't want vagrant phoning home all the time
|
||||||
|
---
|
||||||
|
lib/vagrant/environment.rb | 38 ++------------------------------------
|
||||||
|
1 file changed, 2 insertions(+), 36 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/vagrant/environment.rb
|
||||||
|
+++ b/lib/vagrant/environment.rb
|
||||||
|
@@ -4,7 +4,6 @@ require 'pathname'
|
||||||
|
require 'set'
|
||||||
|
require 'thread'
|
||||||
|
|
||||||
|
-require "checkpoint"
|
||||||
|
require 'log4r'
|
||||||
|
|
||||||
|
require 'vagrant/util/file_mode'
|
||||||
|
@@ -128,34 +127,6 @@ module Vagrant
|
||||||
|
# Prepare the directories
|
||||||
|
setup_home_path
|
||||||
|
|
||||||
|
- # Run checkpoint in a background thread on every environment
|
||||||
|
- # initialization. The cache file will cause this to mostly be a no-op
|
||||||
|
- # most of the time.
|
||||||
|
- @checkpoint_thr = Thread.new do
|
||||||
|
- Thread.current[:result] = nil
|
||||||
|
-
|
||||||
|
- # If we disabled checkpoint via env var, don't run this
|
||||||
|
- if ENV["VAGRANT_CHECKPOINT_DISABLE"].to_s != ""
|
||||||
|
- @logger.info("checkpoint: disabled from env var")
|
||||||
|
- next
|
||||||
|
- end
|
||||||
|
-
|
||||||
|
- # If we disabled state and knowing what alerts we've seen, then
|
||||||
|
- # disable the signature file.
|
||||||
|
- signature_file = @data_dir.join("checkpoint_signature")
|
||||||
|
- if ENV["VAGRANT_CHECKPOINT_NO_STATE"].to_s != ""
|
||||||
|
- @logger.info("checkpoint: will not store state")
|
||||||
|
- signature_file = nil
|
||||||
|
- end
|
||||||
|
-
|
||||||
|
- Thread.current[:result] = Checkpoint.check(
|
||||||
|
- product: "vagrant",
|
||||||
|
- version: VERSION,
|
||||||
|
- signature_file: signature_file,
|
||||||
|
- cache_file: @data_dir.join("checkpoint_cache"),
|
||||||
|
- )
|
||||||
|
- end
|
||||||
|
-
|
||||||
|
# Setup the local data directory. If a configuration path is given,
|
||||||
|
# then it is expanded relative to the working directory. Otherwise,
|
||||||
|
# we use the default which is expanded relative to the root path.
|
||||||
|
@@ -283,14 +254,9 @@ module Vagrant
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
- # Checkpoint returns the checkpoint result data. If checkpoint is
|
||||||
|
- # disabled, this will return nil. See the hashicorp-checkpoint gem
|
||||||
|
- # for more documentation on the return value.
|
||||||
|
- #
|
||||||
|
- # @return [Hash]
|
||||||
|
+ # Usage of the checkpoint service is disabled in the Debian package.
|
||||||
|
def checkpoint
|
||||||
|
- @checkpoint_thr.join
|
||||||
|
- return @checkpoint_thr[:result]
|
||||||
|
+ nil
|
||||||
|
end
|
||||||
|
|
||||||
|
# Makes a call to the CLI with the given arguments as if they
|
25
0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch
Normal file
25
0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 16:54:26 -0300
|
||||||
|
Subject: VERSION: fallback to /usr/share/vagrant/version.txt
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/vagrant/version.rb | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/vagrant/version.rb b/lib/vagrant/version.rb
|
||||||
|
index 0640365..dfd91b5 100644
|
||||||
|
--- a/lib/vagrant/version.rb
|
||||||
|
+++ b/lib/vagrant/version.rb
|
||||||
|
@@ -2,6 +2,10 @@ module Vagrant
|
||||||
|
# This will always be up to date with the current version of Vagrant,
|
||||||
|
# since it is used to generate the gemspec and is also the source of
|
||||||
|
# the version for `vagrant -v`
|
||||||
|
- VERSION = File.read(
|
||||||
|
- File.expand_path("../../../version.txt", __FILE__)).chomp
|
||||||
|
+ begin
|
||||||
|
+ VERSION = File.read(
|
||||||
|
+ File.expand_path("../../../version.txt", __FILE__)).chomp
|
||||||
|
+ rescue Errno::ENOENT
|
||||||
|
+ VERSION = File.read('/usr/share/vagrant/version.txt').strip
|
||||||
|
+ end
|
||||||
|
end
|
24
0004-bin-vagrant-silence-warning-about-installer.patch
Normal file
24
0004-bin-vagrant-silence-warning-about-installer.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 16:54:58 -0300
|
||||||
|
Subject: bin/vagrant: silence warning about installer
|
||||||
|
|
||||||
|
---
|
||||||
|
bin/vagrant | 5 -----
|
||||||
|
1 file changed, 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bin/vagrant b/bin/vagrant
|
||||||
|
index fce68c8..452ace8 100755
|
||||||
|
--- a/bin/vagrant
|
||||||
|
+++ b/bin/vagrant
|
||||||
|
@@ -164,11 +164,6 @@ begin
|
||||||
|
logger.debug("Creating Vagrant environment")
|
||||||
|
env = Vagrant::Environment.new(opts)
|
||||||
|
|
||||||
|
- 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
|
||||||
|
-
|
||||||
|
begin
|
||||||
|
# Execute the CLI interface, and exit with the proper error code
|
||||||
|
exit_status = env.cli(argv)
|
31
0005-Read-data-from-usr-share-vagrant.patch
Normal file
31
0005-Read-data-from-usr-share-vagrant.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 16:55:21 -0300
|
||||||
|
Subject: Read data from /usr/share/vagrant
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/vagrant/shared_helpers.rb | 12 +++++++++++-
|
||||||
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb
|
||||||
|
index fe11401..edf21ea 100644
|
||||||
|
--- a/lib/vagrant/shared_helpers.rb
|
||||||
|
+++ b/lib/vagrant/shared_helpers.rb
|
||||||
|
@@ -72,7 +72,17 @@ module Vagrant
|
||||||
|
#
|
||||||
|
# @return [Pathname]
|
||||||
|
def self.source_root
|
||||||
|
- @source_root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
||||||
|
+ @source_root ||=
|
||||||
|
+ begin
|
||||||
|
+ source = Pathname.new(File.expand_path('../../../', __FILE__))
|
||||||
|
+ if source.join('debian/control').exist?
|
||||||
|
+ # working inside source package
|
||||||
|
+ source
|
||||||
|
+ else
|
||||||
|
+ # installed
|
||||||
|
+ Pathname.new('/usr/share/vagrant')
|
||||||
|
+ end
|
||||||
|
+ end
|
||||||
|
end
|
||||||
|
|
||||||
|
# This returns the path to the ~/.vagrant.d folder where Vagrant's
|
@ -0,0 +1,27 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 17:17:52 -0300
|
||||||
|
Subject: Look up vagrant/pre-rubygems.rb from the installed package
|
||||||
|
|
||||||
|
---
|
||||||
|
bin/vagrant | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/bin/vagrant b/bin/vagrant
|
||||||
|
index 452ace8..db0aa2f 100755
|
||||||
|
--- a/bin/vagrant
|
||||||
|
+++ b/bin/vagrant
|
||||||
|
@@ -50,9 +50,13 @@ end
|
||||||
|
if !ENV["VAGRANT_INTERNAL_BUNDLERIZED"]
|
||||||
|
require "rbconfig"
|
||||||
|
ruby_path = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])
|
||||||
|
+ pre_rubygems = File.expand_path("../../lib/vagrant/pre-rubygems.rb", __FILE__)
|
||||||
|
+ unless File.exists?(pre_rubygems)
|
||||||
|
+ pre_rubygems = '/usr/lib/ruby/vendor_ruby/vagrant/pre-rubygems.rb'
|
||||||
|
+ end
|
||||||
|
Kernel.exec(
|
||||||
|
ruby_path,
|
||||||
|
- File.expand_path("../../lib/vagrant/pre-rubygems.rb", __FILE__),
|
||||||
|
+ pre_rubygems,
|
||||||
|
*ARGV)
|
||||||
|
raise "Fatal error: this line should never be reached"
|
||||||
|
end
|
@ -0,0 +1,51 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sat, 11 Oct 2014 17:58:50 -0300
|
||||||
|
Subject: Make Bundler also lookup into rubygems-integration paths
|
||||||
|
|
||||||
|
This applies both when loading plugins, and when installing plugins (so
|
||||||
|
that e.g. vagrant will re-use Debian packages instead of reinstalling
|
||||||
|
stuff that was already via dpkg)
|
||||||
|
---
|
||||||
|
lib/vagrant/bundler.rb | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/vagrant/bundler.rb
|
||||||
|
+++ b/lib/vagrant/bundler.rb
|
||||||
|
@@ -19,13 +19,13 @@ module Vagrant
|
||||||
|
end
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
- @enabled = true if ENV["VAGRANT_INSTALLER_ENV"] ||
|
||||||
|
- ENV["VAGRANT_FORCE_BUNDLER"]
|
||||||
|
+ @enabled = true
|
||||||
|
@enabled = !::Bundler::SharedHelpers.in_bundle? if !@enabled
|
||||||
|
@monitor = Monitor.new
|
||||||
|
|
||||||
|
@gem_home = ENV["GEM_HOME"]
|
||||||
|
@gem_path = ENV["GEM_PATH"]
|
||||||
|
+ @default_gem_path = Gem.default_path.join(::File::PATH_SEPARATOR)
|
||||||
|
|
||||||
|
# Set the Bundler UI to be a silent UI. We have to add the
|
||||||
|
# `silence` method to it because Bundler UI doesn't have it.
|
||||||
|
@@ -75,8 +75,11 @@ module Vagrant
|
||||||
|
env["BUNDLE_CONFIG"] = @configfile.path
|
||||||
|
env["BUNDLE_GEMFILE"] = @gemfile.path
|
||||||
|
env["BUNDLE_RETRY"] = "3"
|
||||||
|
- env["GEM_PATH"] =
|
||||||
|
- "#{bundle_path}#{::File::PATH_SEPARATOR}#{@gem_path}"
|
||||||
|
+ ENV["GEM_PATH"] = [
|
||||||
|
+ bundle_path,
|
||||||
|
+ @gem_path,
|
||||||
|
+ @default_gem_path
|
||||||
|
+ ].compact.join(::File::PATH_SEPARATOR)
|
||||||
|
end
|
||||||
|
|
||||||
|
Gem.clear_paths
|
||||||
|
@@ -259,6 +262,7 @@ module Vagrant
|
||||||
|
|
||||||
|
# Set the GEM_HOME so gems are installed only to our local gem dir
|
||||||
|
ENV["GEM_HOME"] = Vagrant.user_data_path.join("gems").to_s
|
||||||
|
+ ENV["GEM_PATH"] = [@gem_path, @default_gem_path].compact.join(::File::PATH_SEPARATOR)
|
||||||
|
|
||||||
|
# Clear paths so that it reads the new GEM_HOME setting
|
||||||
|
Gem.paths = ENV
|
125
0008-Use-a-private-temporary-dir.patch
Normal file
125
0008-Use-a-private-temporary-dir.patch
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Wed, 22 Oct 2014 09:40:14 -0200
|
||||||
|
Subject: Use a private temporary dir
|
||||||
|
|
||||||
|
Without this vagrant will clutter $TMPDIR with dozens of even hundreds
|
||||||
|
of temporary files (~4 per vagrant invocation).
|
||||||
|
---
|
||||||
|
lib/vagrant/box.rb | 3 ++-
|
||||||
|
lib/vagrant/bundler.rb | 9 ++++++---
|
||||||
|
lib/vagrant/util.rb | 1 +
|
||||||
|
lib/vagrant/util/tempfile.rb | 15 +++++++++++++++
|
||||||
|
4 files changed, 24 insertions(+), 4 deletions(-)
|
||||||
|
create mode 100644 lib/vagrant/util/tempfile.rb
|
||||||
|
|
||||||
|
--- 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
|
||||||
|
@@ -118,7 +119,7 @@ module Vagrant
|
||||||
|
# @param [Hash] download_options Options to pass to the downloader.
|
||||||
|
# @return [BoxMetadata]
|
||||||
|
def load_metadata(**download_options)
|
||||||
|
- tf = Tempfile.new("vagrant")
|
||||||
|
+ tf = Util::Tempfile.new("box")
|
||||||
|
tf.close
|
||||||
|
|
||||||
|
url = @metadata_url
|
||||||
|
--- a/lib/vagrant/bundler.rb
|
||||||
|
+++ b/lib/vagrant/bundler.rb
|
||||||
|
@@ -9,6 +9,8 @@ require_relative "shared_helpers"
|
||||||
|
require_relative "version"
|
||||||
|
require_relative "util/safe_env"
|
||||||
|
|
||||||
|
+require 'vagrant/util/tempfile'
|
||||||
|
+
|
||||||
|
module Vagrant
|
||||||
|
# This class manages Vagrant's interaction with Bundler. Vagrant uses
|
||||||
|
# Bundler as a way to properly resolve all dependencies of Vagrant and
|
||||||
|
@@ -55,13 +57,13 @@ module Vagrant
|
||||||
|
|
||||||
|
# Setup the "local" Bundler configuration. We need to set BUNDLE_PATH
|
||||||
|
# because the existence of this actually suppresses `sudo`.
|
||||||
|
- @appconfigpath = Dir.mktmpdir
|
||||||
|
+ @appconfigpath = Util::Tempfile.private_tmpdir
|
||||||
|
File.open(File.join(@appconfigpath, "config"), "w+") do |f|
|
||||||
|
f.write("BUNDLE_PATH: \"#{bundle_path}\"")
|
||||||
|
end
|
||||||
|
|
||||||
|
# Setup the Bundler configuration
|
||||||
|
- @configfile = File.open(Tempfile.new("vagrant").path + "1", "w+")
|
||||||
|
+ @configfile = File.open(Util::Tempfile.new("vagrant").path + "1", "w+")
|
||||||
|
@configfile.close
|
||||||
|
|
||||||
|
# Build up the Gemfile for our Bundler context. We make sure to
|
||||||
|
@@ -184,7 +186,8 @@ module Vagrant
|
||||||
|
def build_gemfile(plugins)
|
||||||
|
sources = plugins.values.map { |p| p["sources"] }.flatten.compact.uniq
|
||||||
|
|
||||||
|
- f = File.open(Tempfile.new("vagrant").path + "2", "w+")
|
||||||
|
+
|
||||||
|
+ f = File.open(Util::Tempfile.new("vagrant").path, "w+")
|
||||||
|
f.tap do |gemfile|
|
||||||
|
sources.each do |source|
|
||||||
|
next if source == ""
|
||||||
|
@@ -257,7 +260,7 @@ module Vagrant
|
||||||
|
# native extensions because it causes all sorts of problems.
|
||||||
|
old_rubyopt = ENV["RUBYOPT"]
|
||||||
|
old_gemfile = ENV["BUNDLE_GEMFILE"]
|
||||||
|
- ENV["BUNDLE_GEMFILE"] = Tempfile.new("vagrant-gemfile").path
|
||||||
|
+ ENV["BUNDLE_GEMFILE"] = Util::Tempfile.new("vagrant-gemfile").path
|
||||||
|
ENV["RUBYOPT"] = (ENV["RUBYOPT"] || "").gsub(/-rbundler\/setup\s*/, "")
|
||||||
|
|
||||||
|
# Set the GEM_HOME so gems are installed only to our local gem dir
|
||||||
|
--- a/lib/vagrant/util.rb
|
||||||
|
+++ b/lib/vagrant/util.rb
|
||||||
|
@@ -8,6 +8,7 @@ module Vagrant
|
||||||
|
autoload :Retryable, 'vagrant/util/retryable'
|
||||||
|
autoload :SafeExec, 'vagrant/util/safe_exec'
|
||||||
|
autoload :StackedProcRunner, 'vagrant/util/stacked_proc_runner'
|
||||||
|
+ autoload :Tempfile, 'vagrant/util/tempfile'
|
||||||
|
autoload :TemplateRenderer, 'vagrant/util/template_renderer'
|
||||||
|
autoload :Subprocess, 'vagrant/util/subprocess'
|
||||||
|
end
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/lib/vagrant/util/tempfile.rb
|
||||||
|
@@ -0,0 +1,33 @@
|
||||||
|
+require 'fileutils'
|
||||||
|
+
|
||||||
|
+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
|
||||||
|
+
|
||||||
|
+ end
|
||||||
|
+ end
|
||||||
|
+end
|
||||||
|
+
|
||||||
|
+at_exit do
|
||||||
|
+ FileUtils.rm_rf(Vagrant::Util::Tempfile.private_tmpdir)
|
||||||
|
+end
|
@ -0,0 +1,24 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@softwarelivre.org>
|
||||||
|
Date: Tue, 3 Feb 2015 10:35:17 -0200
|
||||||
|
Subject: linux/cap/halt: don't wait for `shutdown -h now` to finish
|
||||||
|
|
||||||
|
When running a Debian 8 lxc guest (with the vagrant-lxc plugin), which
|
||||||
|
has systemd as init system, `vagrant halt` will hang waiting for
|
||||||
|
`shutdown -h now` to return.
|
||||||
|
---
|
||||||
|
plugins/guests/linux/cap/halt.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/guests/linux/cap/halt.rb b/plugins/guests/linux/cap/halt.rb
|
||||||
|
index 6125a20..8baa0d2 100644
|
||||||
|
--- a/plugins/guests/linux/cap/halt.rb
|
||||||
|
+++ b/plugins/guests/linux/cap/halt.rb
|
||||||
|
@@ -4,7 +4,7 @@ module VagrantPlugins
|
||||||
|
class Halt
|
||||||
|
def self.halt(machine)
|
||||||
|
begin
|
||||||
|
- machine.communicate.sudo("shutdown -h now")
|
||||||
|
+ machine.communicate.sudo("shutdown -h now &")
|
||||||
|
rescue IOError
|
||||||
|
# Do nothing, because it probably means the machine shut down
|
||||||
|
# and SSH connection was lost.
|
63
0011-Relax-dependency-resolution.patch
Normal file
63
0011-Relax-dependency-resolution.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Sun, 16 Aug 2015 10:45:47 +0200
|
||||||
|
Subject: Relax dependency resolution
|
||||||
|
|
||||||
|
---
|
||||||
|
Gemfile | 6 ------
|
||||||
|
vagrant.gemspec | 34 +++++++++++-----------------------
|
||||||
|
2 files changed, 11 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
--- a/Gemfile
|
||||||
|
+++ b/Gemfile
|
||||||
|
@@ -1,9 +1,3 @@
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gemspec
|
||||||
|
-
|
||||||
|
-if File.exist?(File.expand_path("../../vagrant-spec", __FILE__))
|
||||||
|
- gem 'vagrant-spec', path: "../vagrant-spec"
|
||||||
|
-else
|
||||||
|
- gem 'vagrant-spec', git: "https://github.com/mitchellh/vagrant-spec.git"
|
||||||
|
-end
|
||||||
|
--- a/vagrant.gemspec
|
||||||
|
+++ b/vagrant.gemspec
|
||||||
|
@@ -15,29 +15,17 @@ Gem::Specification.new do |s|
|
||||||
|
s.required_rubygems_version = ">= 1.3.6"
|
||||||
|
s.rubyforge_project = "vagrant"
|
||||||
|
|
||||||
|
- s.add_dependency "bundler", ">= 1.5.2", "<= 1.10.6"
|
||||||
|
- s.add_dependency "childprocess", "~> 0.5.0"
|
||||||
|
- s.add_dependency "erubis", "~> 2.7.0"
|
||||||
|
- s.add_dependency "i18n", ">= 0.6.0", "<= 0.8.0"
|
||||||
|
- s.add_dependency "listen", "~> 3.0.2"
|
||||||
|
- 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-sftp", "~> 2.1"
|
||||||
|
- s.add_dependency "net-scp", "~> 1.1.0"
|
||||||
|
- s.add_dependency "rb-kqueue", "~> 0.2.0"
|
||||||
|
+ s.add_dependency "bundler"
|
||||||
|
+ s.add_dependency "childprocess"
|
||||||
|
+ s.add_dependency "erubis"
|
||||||
|
+ s.add_dependency "i18n"
|
||||||
|
+ s.add_dependency "listen"
|
||||||
|
+ s.add_dependency "log4r"
|
||||||
|
+ s.add_dependency "net-ssh"
|
||||||
|
+ s.add_dependency "net-sftp"
|
||||||
|
+ s.add_dependency "net-scp"
|
||||||
|
s.add_dependency "rest-client", ">= 1.6.0", "< 2.0"
|
||||||
|
- s.add_dependency "wdm", "~> 0.1.0"
|
||||||
|
- s.add_dependency "winrm", "~> 1.3"
|
||||||
|
- s.add_dependency "winrm-fs", "~> 0.2.2"
|
||||||
|
-
|
||||||
|
- # We lock this down to avoid compilation issues.
|
||||||
|
- s.add_dependency "nokogiri", "= 1.6.3.1"
|
||||||
|
-
|
||||||
|
- s.add_development_dependency "rake"
|
||||||
|
- s.add_development_dependency "rspec", "~> 2.14.0"
|
||||||
|
- s.add_development_dependency "webmock", "~> 1.20"
|
||||||
|
- s.add_development_dependency "fake_ftp", "~> 0.1"
|
||||||
|
+ s.add_dependency "nokogiri"
|
||||||
|
|
||||||
|
# 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
|
98
0011-Support-system-installed-plugins.patch
Normal file
98
0011-Support-system-installed-plugins.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Wed, 27 May 2015 09:36:17 -0300
|
||||||
|
Subject: Support system-installed plugins
|
||||||
|
|
||||||
|
Plugins must be installed as regular Ruby libraries, and they must
|
||||||
|
contain /usr/share/vagrant-plugins/plugins.d/$PLUGINNAME.json with the
|
||||||
|
following content:
|
||||||
|
|
||||||
|
{
|
||||||
|
"${PLUGINNAME}": {
|
||||||
|
"ruby_version":"$(ruby -e 'puts RUBY_VERSION')",
|
||||||
|
"vagrant_version":"$(cat /usr/share/vagrant/version.txt)",
|
||||||
|
"gem_version":"",
|
||||||
|
"require":"",
|
||||||
|
"sources":[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
---
|
||||||
|
lib/vagrant/plugin/manager.rb | 4 ++--
|
||||||
|
lib/vagrant/plugin/state_file.rb | 28 +++++++++++++++++++++++++---
|
||||||
|
2 files changed, 27 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/vagrant/plugin/manager.rb b/lib/vagrant/plugin/manager.rb
|
||||||
|
index dfaab2e..35122e0 100644
|
||||||
|
--- a/lib/vagrant/plugin/manager.rb
|
||||||
|
+++ b/lib/vagrant/plugin/manager.rb
|
||||||
|
@@ -18,7 +18,7 @@ module Vagrant
|
||||||
|
|
||||||
|
# Returns the path to the [StateFile] for system plugins.
|
||||||
|
def self.system_plugins_file
|
||||||
|
- dir = Vagrant.installer_embedded_dir
|
||||||
|
+ dir = '/usr/share/vagrant-plugins'
|
||||||
|
return nil if !dir
|
||||||
|
Pathname.new(dir).join("plugins.json")
|
||||||
|
end
|
||||||
|
@@ -33,7 +33,7 @@ module Vagrant
|
||||||
|
|
||||||
|
system_path = self.class.system_plugins_file
|
||||||
|
@system_file = nil
|
||||||
|
- @system_file = StateFile.new(system_path) if system_path && system_path.file?
|
||||||
|
+ @system_file = StateFile.new(system_path, true) if system_path && system_path.file?
|
||||||
|
end
|
||||||
|
|
||||||
|
# Installs another plugin into our gem directory.
|
||||||
|
diff --git a/lib/vagrant/plugin/state_file.rb b/lib/vagrant/plugin/state_file.rb
|
||||||
|
index f41da1b..717b353 100644
|
||||||
|
--- a/lib/vagrant/plugin/state_file.rb
|
||||||
|
+++ b/lib/vagrant/plugin/state_file.rb
|
||||||
|
@@ -5,8 +5,9 @@ module Vagrant
|
||||||
|
# This is a helper to deal with the plugin state file that Vagrant
|
||||||
|
# uses to track what plugins are installed and activated and such.
|
||||||
|
class StateFile
|
||||||
|
- def initialize(path)
|
||||||
|
+ def initialize(path, system = false)
|
||||||
|
@path = path
|
||||||
|
+ @system = system
|
||||||
|
|
||||||
|
@data = {}
|
||||||
|
if @path.exist?
|
||||||
|
@@ -22,6 +23,21 @@ module Vagrant
|
||||||
|
|
||||||
|
@data["version"] ||= "1"
|
||||||
|
@data["installed"] ||= {}
|
||||||
|
+ load_extra_plugins
|
||||||
|
+ end
|
||||||
|
+
|
||||||
|
+ def load_extra_plugins
|
||||||
|
+ extra_plugins = Dir.glob(@path.dirname.join('plugins.d', '*.json'))
|
||||||
|
+ extra_plugins.each do |filename|
|
||||||
|
+ json = File.read(filename)
|
||||||
|
+ begin
|
||||||
|
+ plugin_data = JSON.parse(json)
|
||||||
|
+ @data["installed"].merge!(plugin_data)
|
||||||
|
+ rescue JSON::ParserError => e
|
||||||
|
+ raise Vagrant::Errors::PluginStateFileParseError,
|
||||||
|
+ path: filename, message: e.message
|
||||||
|
+ end
|
||||||
|
+ end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add a plugin that is installed to the state file.
|
||||||
|
@@ -91,8 +107,14 @@ module Vagrant
|
||||||
|
|
||||||
|
# This saves the state back into the state file.
|
||||||
|
def save!
|
||||||
|
- @path.open("w+") do |f|
|
||||||
|
- f.write(JSON.dump(@data))
|
||||||
|
+ begin
|
||||||
|
+ @path.open("w+") do |f|
|
||||||
|
+ f.write(JSON.dump(@data))
|
||||||
|
+ end
|
||||||
|
+ rescue Errno::EACCES
|
||||||
|
+ # Ignore permission denied against system-installed plugins; regular
|
||||||
|
+ # users are not supposed to write there.
|
||||||
|
+ raise unless @system
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
21
0012-require-vagrant-version-from-system.patch
Normal file
21
0012-require-vagrant-version-from-system.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From: Antonio Terceiro <terceiro@debian.org>
|
||||||
|
Date: Fri, 12 Jun 2015 11:21:08 -0300
|
||||||
|
Subject: require vagrant/version from system
|
||||||
|
|
||||||
|
---
|
||||||
|
bin/vagrant | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/bin/vagrant b/bin/vagrant
|
||||||
|
index db0aa2f..52ec451 100755
|
||||||
|
--- a/bin/vagrant
|
||||||
|
+++ b/bin/vagrant
|
||||||
|
@@ -15,7 +15,7 @@ end
|
||||||
|
|
||||||
|
# Fast path the version of Vagrant
|
||||||
|
if argv.include?("-v") || argv.include?("--version")
|
||||||
|
- require_relative "../lib/vagrant/version"
|
||||||
|
+ require "vagrant/version"
|
||||||
|
puts "Vagrant #{Vagrant::VERSION}"
|
||||||
|
exit 0
|
||||||
|
end
|
20
README.SUSE
Normal file
20
README.SUSE
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Packaging Vagrant plugins
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
This convention is based on the Debian vagrant package by Antonio Terceiro.
|
||||||
|
|
||||||
|
Vagrant plugins must be packaged as regular Ruby libraries, with one extra
|
||||||
|
detail: they must contain a file at
|
||||||
|
/usr/share/vagrant-plugins/plugins.d/$PLUGINNAME.json with the following
|
||||||
|
content:
|
||||||
|
|
||||||
|
{
|
||||||
|
"${PLUGINNAME}": {
|
||||||
|
"ruby_version":"$(ruby -e 'puts RUBY_VERSION')",
|
||||||
|
"vagrant_version":"$(cat /usr/share/vagrant/version.txt)",
|
||||||
|
"gem_version":"",
|
||||||
|
"require":"",
|
||||||
|
"sources":[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
3
vagrant-1.8.1.tar.gz
Normal file
3
vagrant-1.8.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:12cfa43eb82399d3dd1c3fd24691797fa30187fc142474580c72e5c9f83b9dfd
|
||||||
|
size 2873082
|
15
vagrant-rpmlintrc
Normal file
15
vagrant-rpmlintrc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# man page is supposedly coming: https://github.com/mitchellh/vagrant/pull/2013
|
||||||
|
addFilter("no-manual-page-for-binary vagrant")
|
||||||
|
|
||||||
|
# These are (very) arguably worth keeping in the package.
|
||||||
|
addFilter("hidden-file-or-dir .*/\.(vimrc|yardopts)$")
|
||||||
|
|
||||||
|
# Standard spurious warnings from *.ri files, only needed for <= 12.3
|
||||||
|
addFilter("unexpanded-macro /usr/lib[^/]*/ruby/gems/[0-9.]+/doc/.+/ri/.*\.ri %[0-9a-f]{2}$")
|
||||||
|
addFilter("wrong-file-end-of-line-encoding /usr/lib[^/]*/ruby/gems/[0-9.]+/doc/.+/ri/.*\.ri$")
|
||||||
|
|
||||||
|
# It makes sense for bash completion functions to have a shebang line
|
||||||
|
# (e.g. since this indicates to editors that it's a shell-script file)
|
||||||
|
# but the file should not be executable.
|
||||||
|
addFilter("sourced-script-with-shebang /etc/bash_completion.d/vagrant.sh /bin/bash$")
|
||||||
|
addFilter("non-executable-script /usr/lib64/ruby/gems/[0-9.]+/gems/vagrant-[0-9.]+/contrib/bash/completion.sh 0644L /bin/bash")
|
68
vagrant.1
Normal file
68
vagrant.1
Normal 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
|
45
vagrant.changes
Normal file
45
vagrant.changes
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 4 19:29:15 UTC 2016 - dmacvicar@suse.de
|
||||||
|
|
||||||
|
- sync with 1.8.1
|
||||||
|
https://packages.debian.org/sid/main/vagrant
|
||||||
|
- remove
|
||||||
|
0001-SUSE-flavored-systems-uses-STARTMODE-and-not-ONBOOT.patch
|
||||||
|
(already upstream in 1.8.1)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 23 08:29:47 UTC 2015 - dmacvicar@suse.de
|
||||||
|
|
||||||
|
- add Provides/Obsoletes
|
||||||
|
- install manpage
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 8 15:19:11 UTC 2015 - dmacvicar@suse.de
|
||||||
|
|
||||||
|
- add 0001-SUSE-flavored-systems-uses-STARTMODE-and-not-ONBOOT.patch
|
||||||
|
to fix reboot with dhcp
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 8 12:19:03 UTC 2015 - dmacvicar@suse.de
|
||||||
|
|
||||||
|
- split out vim, emacs and bash files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 8 01:14:40 UTC 2015 - dmacvicar@suse.de
|
||||||
|
|
||||||
|
- follow plugin convention from Debian package by Antonio Terceiro
|
||||||
|
and Laurent Bigonville
|
||||||
|
- use patches from https://packages.debian.org/sid/main/vagrant
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 1 16:57:52 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- sync BR with gemspec
|
||||||
|
- make sure we notice when the gemspec isnt working anymore
|
||||||
|
by running bundle exec bin/vagrant --version
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 1 15:27:22 UTC 2015 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- 1.7.4
|
||||||
|
|
212
vagrant.spec
Normal file
212
vagrant.spec
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
#
|
||||||
|
# spec file for package vagrant
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
# 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 http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define mod_name vagrant
|
||||||
|
%define mod_full_name %{mod_name}-%{version}
|
||||||
|
%{!?vim_data_dir:%global vim_data_dir /usr/share/vim/%(readlink /usr/share/vim/current)}
|
||||||
|
|
||||||
|
Name: vagrant
|
||||||
|
Version: 1.8.1
|
||||||
|
Release: 0
|
||||||
|
Summary: Build and distribute virtualized development environments
|
||||||
|
License: MIT
|
||||||
|
Group: Development/Languages/Ruby
|
||||||
|
Url: https://github.com/mitchellh/vagrant
|
||||||
|
Source0: https://github.com/mitchellh/vagrant/archive/v%{version}/%{mod_name}-%{version}.tar.gz
|
||||||
|
Source2: vagrant.1
|
||||||
|
Source3: README.SUSE
|
||||||
|
Source99: %{name}-rpmlintrc
|
||||||
|
Provides: rubygem-vagrant = %{version}
|
||||||
|
Obsoletes: rubygem-vagrant < %{version}
|
||||||
|
Recommends: vagrant-libvirt
|
||||||
|
#
|
||||||
|
Patch2: 0002-Disable-Checkpoint.patch
|
||||||
|
Patch3: 0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch
|
||||||
|
Patch4: 0004-bin-vagrant-silence-warning-about-installer.patch
|
||||||
|
Patch5: 0005-Read-data-from-usr-share-vagrant.patch
|
||||||
|
Patch6: 0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch
|
||||||
|
Patch7: 0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch
|
||||||
|
Patch8: 0008-Use-a-private-temporary-dir.patch
|
||||||
|
Patch9: 0009-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch
|
||||||
|
Patch11: 0011-Support-system-installed-plugins.patch
|
||||||
|
Patch12: 0012-require-vagrant-version-from-system.patch
|
||||||
|
Patch13: 0011-Relax-dependency-resolution.patch
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
# force only one ruby version
|
||||||
|
%define rb_build_versions %rb_default_ruby
|
||||||
|
%define rb_build_abi %rb_default_ruby_abi
|
||||||
|
#
|
||||||
|
BuildRequires: %{ruby >= 2.0.0}
|
||||||
|
BuildRequires: %{rubygem bundler}
|
||||||
|
BuildRequires: %{rubygem childprocess >= 0.3.7}
|
||||||
|
BuildRequires: %{rubygem erubis >= 2.7.0}
|
||||||
|
BuildRequires: %{rubygem i18n >= 0.6.0}
|
||||||
|
BuildRequires: %{rubygem listen}
|
||||||
|
BuildRequires: %{rubygem log4r >= 1.1.9}
|
||||||
|
BuildRequires: %{rubygem mime-types:1}
|
||||||
|
BuildRequires: %{rubygem net-scp:1.1 >= 1.1.0}
|
||||||
|
BuildRequires: %{rubygem net-sftp >= 1.1.0}
|
||||||
|
BuildRequires: %{rubygem net-ssh >= 2.6.6}
|
||||||
|
BuildRequires: %{rubygem nokogiri}
|
||||||
|
BuildRequires: ruby-macros >= 5
|
||||||
|
# inotify should go here
|
||||||
|
# BuildRequires: % {rubygem rb-kqueue:0.2 >= 0.2.0}
|
||||||
|
BuildRequires: %{rubygem rest-client}
|
||||||
|
#
|
||||||
|
Requires: %{rubygem bundler}
|
||||||
|
Requires: %{rubygem childprocess >= 0.3.7}
|
||||||
|
Requires: %{rubygem erubis >= 2.7.0}
|
||||||
|
Requires: %{rubygem i18n >= 0.6.0}
|
||||||
|
Requires: %{rubygem listen}
|
||||||
|
Requires: %{rubygem log4r >= 1.1.9}
|
||||||
|
Requires: %{rubygem mime-types:1}
|
||||||
|
Requires: %{rubygem net-scp:1.1 >= 1.1.0}
|
||||||
|
Requires: %{rubygem net-sftp >= 1.1.0}
|
||||||
|
Requires: %{rubygem net-ssh >= 2.6.6}
|
||||||
|
Requires: %{rubygem nokogiri}
|
||||||
|
# inotify should go here
|
||||||
|
# Requires: % {rubygem rb-kqueue:0.2 >= 0.2.0}
|
||||||
|
Requires: %{rubygem rest-client}
|
||||||
|
#
|
||||||
|
Requires: bsdtar
|
||||||
|
Requires: curl
|
||||||
|
Requires: openssh
|
||||||
|
#
|
||||||
|
%description
|
||||||
|
Vagrant is a tool for building and distributing virtualized development
|
||||||
|
environments.
|
||||||
|
|
||||||
|
%package vim
|
||||||
|
Summary: Vagrantfile syntax files for the vim editor
|
||||||
|
Group: Development/Languages/Ruby
|
||||||
|
Supplements: packageand(vagrant:vim)
|
||||||
|
BuildRequires: vim
|
||||||
|
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: packageand(vagrant:emacs_program)
|
||||||
|
BuildRequires: emacs-nox
|
||||||
|
Requires: emacs_program
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description emacs
|
||||||
|
Optional dependency offering emacs syntax files for Vagrantfile
|
||||||
|
|
||||||
|
%package bash-completion
|
||||||
|
Summary: Vagrant bash autocompletion
|
||||||
|
Group: Development/Languages/Ruby
|
||||||
|
Supplements: packageand(vagrant:bash)
|
||||||
|
Requires: bash
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description bash-completion
|
||||||
|
Optional dependency offering bash completion for vagrant
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{mod_full_name}
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
%patch12 -p1
|
||||||
|
%patch13 -p1
|
||||||
|
|
||||||
|
cp %{SOURCE3} .
|
||||||
|
|
||||||
|
%build
|
||||||
|
mv %{mod_name}.gemspec %{mod_full_name}.gemspec
|
||||||
|
%gem_build
|
||||||
|
mv %{mod_full_name}.gem %{_sourcedir}
|
||||||
|
bundle exec bin/vagrant --version
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if %suse_version > 1315
|
||||||
|
%gem_install -f --no-symlink-binaries
|
||||||
|
%else
|
||||||
|
%gem_install -f
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%{__mkdir_p} %{buildroot}%{_mandir}/man1
|
||||||
|
install -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/vagrant.1
|
||||||
|
|
||||||
|
install -D -d -m 0755 \
|
||||||
|
%{buildroot}%{_sysconfdir}/bash_completion.d/ \
|
||||||
|
%{buildroot}%{vim_data_dir}/plugin/ \
|
||||||
|
%{buildroot}%{_datadir}/emacs/site-lisp/
|
||||||
|
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/bash/completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/%{mod_name}.sh
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/vim/vagrantfile.vim %{buildroot}%{vim_data_dir}/plugin/%{mod_name}.vim
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/emacs/vagrant.el %{buildroot}%{_datadir}/emacs/site-lisp/%{mod_name}.el
|
||||||
|
|
||||||
|
%if %suse_version > 1315
|
||||||
|
mv -v %{buildroot}%{_bindir}/vagrant.%{rb_default_ruby_suffix} %{buildroot}%{_bindir}/vagrant
|
||||||
|
%endif
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/keys %{buildroot}%{_datadir}/%{name}/keys
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/plugins %{buildroot}%{_datadir}/%{name}/plugins
|
||||||
|
mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/templates %{buildroot}%{_datadir}/%{name}/templates
|
||||||
|
chmod -x %{buildroot}%{_datadir}/%{name}/templates/locales/en.yml
|
||||||
|
install -m 644 version.txt %{buildroot}%{_datadir}/%{name}
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/%{name}-plugins/plugins.d
|
||||||
|
echo "{}" > %{buildroot}%{_datadir}/%{name}-plugins/plugins.json
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/.travis.yml
|
||||||
|
rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/.gitignore
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc CHANGELOG.md LICENSE README.SUSE
|
||||||
|
%{_bindir}/vagrant
|
||||||
|
%{gem_base}/cache/%{mod_full_name}.gem
|
||||||
|
%{gem_base}/doc/%{mod_full_name}/
|
||||||
|
%{gem_base}/gems/%{mod_full_name}/
|
||||||
|
%{gem_base}/specifications/%{mod_full_name}.gemspec
|
||||||
|
%{_datadir}/%{name}
|
||||||
|
%dir %{_datadir}/%{name}-plugins
|
||||||
|
%dir %{_datadir}/%{name}-plugins/plugins.d
|
||||||
|
%{_datadir}/%{name}-plugins/plugins.json
|
||||||
|
%{_mandir}/man1/vagrant.*
|
||||||
|
|
||||||
|
%files vim
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{vim_data_dir}/plugin/%{mod_name}.vim
|
||||||
|
|
||||||
|
%files emacs
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_datadir}/emacs/site-lisp/%{mod_name}.el
|
||||||
|
|
||||||
|
%files bash-completion
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%config %{_sysconfdir}/bash_completion.d/%{mod_name}.sh
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user