vagrant-vbguest 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile +0 -3
- data/Readme.md +11 -0
- data/VERSION +1 -0
- data/lib/vagrant-vbguest.rb +3 -1
- data/lib/vagrant-vbguest/config.rb +7 -2
- data/lib/vagrant-vbguest/installer.rb +20 -4
- data/lib/vagrant-vbguest/installers/base.rb +21 -10
- data/lib/vagrant-vbguest/installers/centos.rb +3 -1
- data/lib/vagrant-vbguest/installers/linux.rb +5 -5
- data/lib/vagrant-vbguest/installers/windows.rb +125 -0
- data/lib/vagrant-vbguest/machine.rb +10 -4
- data/lib/vagrant-vbguest/version.rb +20 -1
- data/locales/en.yml +1 -0
- data/locales/en_windows.yml +4 -0
- data/vagrant-vbguest.gemspec +1 -3
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe9b19c92b1f9e06b0e17defbb0b412cfec21fd0b2bb75c9508f2901e70a972f
|
4
|
+
data.tar.gz: 8e856da6367fcd028b1a98e21a17daf32a7090d627d2d55893b7b17ea6f8b330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1189d19dda9bdb84b82c4fdec404bbc1192429ee7d9ba985a0a63f394099f717ee23bd78a950c62de9bdc5657eb03bf33a05dbc642f122ddaa8b0f867ac200f0
|
7
|
+
data.tar.gz: dd9fce0ae08011b8c58a8588bf4e4fce03e5d0fefc6ad59b591436ac50772fcc76ba9969e380862ab6eec63659e98494433ac3636c7720975be73a48fdad8584
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
## 0.20.0 (2019-09-27)
|
2
|
+
|
3
|
+
- Add Windows support. @thumperward [GH-343]
|
4
|
+
- Add `allow_downgrade` config. Set it to `false` to prevent downgrades. [GH-310]
|
5
|
+
- the gem version is now hold in a plain text file `VERSION` (additionally to the ruby constant `VagrantVbguest::VERSION`)
|
6
|
+
|
1
7
|
## 0.19.0 (2019-07-09)
|
2
8
|
|
3
|
-
- Relax
|
9
|
+
- Relax version pin on micromachine dependency. Allow 2.x to 3.x. @johanneskastl [GH-341]
|
4
10
|
|
5
11
|
## 0.18.0 (2019-05-20)
|
6
12
|
|
data/Gemfile
CHANGED
data/Readme.md
CHANGED
@@ -53,6 +53,7 @@ vbguest will try to autodetect the best option for your system. WTF? see below.
|
|
53
53
|
* `iso_mount_point` (String, default: `/mnt`): Where to mount the VBoxGuestAdditions.iso file on the guest system.
|
54
54
|
* `auto_update` (Boolean, default: `true`) : Whether to check the correct additions version on each start (where start is _not_ resuming a box).
|
55
55
|
* `auto_reboot` (Boolean, default: `true` when running as a middleware, `false` when running as a command) : Whether to reboot the box after GuestAdditions has been installed, but not loaded.
|
56
|
+
* `allow_downgrade` (Boolean, default: `true`) : Allow to install an older version of Guest Additions onto the guest. (Eg. your are running a host with VirtualBox 5 and the box is already on 6).
|
56
57
|
* `no_install` (Boolean, default: `false`) : Whether to check the correct additions version only. This will warn you about version mis-matches, but will not try to install anything.
|
57
58
|
* `no_remote` (Boolean, default: `false`) : Whether to _not_ download the iso file from a remote location. This includes any `http` location!
|
58
59
|
* `installer` (`VagrantVbguest::Installers::Base`, optional) : Reference to a (custom) installer class
|
@@ -259,6 +260,14 @@ If you find yourself copying the same installer in each of your vagrant project,
|
|
259
260
|
|
260
261
|
This project contains a [sample installer gem](https://github.com/dotless-de/vagrant-vbguest/tree/master/testdrive/vagrant-vbguest-unikorn) which might serve as an boilerplate.
|
261
262
|
|
263
|
+
|
264
|
+
## Contributing
|
265
|
+
|
266
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dotless-de/vagrant-vbguest.
|
267
|
+
|
268
|
+
For the forseeable future, no more pull requests will be accepted which add new guest support/installers. Please build your gem as a plugin to vbguest (see "Very Advanced Usage" section of this file). In fact, please open a pull request to remove support for a guest system if feel confident that your sulution is any better.
|
269
|
+
|
270
|
+
|
262
271
|
## Known Issues
|
263
272
|
|
264
273
|
* The installer script, which mounts and runs the GuestAdditions Installer Binary, works on Linux only. Most likely it will run on most Unix-like platforms.
|
@@ -266,3 +275,5 @@ This project contains a [sample installer gem](https://github.com/dotless-de/vag
|
|
266
275
|
* The installer script requires a valid mount point on the guest system. This defaults to `/mnt` but can be overwritten with the `iso_mount_point` option.
|
267
276
|
* On multi vm boxes, the iso file will be downloaded for each vm.
|
268
277
|
* The plugin installation on Windows host systems may not work as expected (using `vagrant gem install vagrant-vbguest`). Try `C:\vagrant\vagrant\embedded\bin\gem.bat install vagrant-vbguest` instead. (See [issue #19](https://github.com/dotless-de/vagrant-vbguest/issues/19#issuecomment-7040304))
|
278
|
+
* The Windows guest additions installer will only properly install virtual drivers (enabling e.g. seamless resizing) if a user is logged in during the install. Automatic login is recommended for Windows Vagrant boxes.
|
279
|
+
* Uploading GuestAdditions into a Windows guest might take longer than expected.
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.20.0
|
data/lib/vagrant-vbguest.rb
CHANGED
@@ -5,9 +5,10 @@ rescue LoadError
|
|
5
5
|
end
|
6
6
|
|
7
7
|
# Add our custom translations to the load path
|
8
|
-
I18n.load_path
|
8
|
+
I18n.load_path += Dir[File.expand_path("../../locales/*.yml", __FILE__)]
|
9
9
|
I18n.reload!
|
10
10
|
|
11
|
+
require "vagrant-vbguest/version"
|
11
12
|
require "vagrant-vbguest/errors"
|
12
13
|
require 'vagrant-vbguest/download'
|
13
14
|
require 'vagrant-vbguest/command'
|
@@ -28,6 +29,7 @@ require 'vagrant-vbguest/installers/fedora'
|
|
28
29
|
require 'vagrant-vbguest/installers/opensuse'
|
29
30
|
require 'vagrant-vbguest/installers/suse'
|
30
31
|
require 'vagrant-vbguest/installers/archlinux'
|
32
|
+
require 'vagrant-vbguest/installers/windows'
|
31
33
|
|
32
34
|
require 'vagrant-vbguest/middleware'
|
33
35
|
|
@@ -4,7 +4,7 @@ module VagrantVbguest
|
|
4
4
|
|
5
5
|
module Attributes
|
6
6
|
attr_accessor :auto_update, :auto_reboot, :no_install, :no_remote,
|
7
|
-
:installer, :installer_arguments,
|
7
|
+
:installer, :installer_arguments, :allow_downgrade,
|
8
8
|
:iso_path, :iso_upload_path, :iso_mount_point, :yes
|
9
9
|
end
|
10
10
|
|
@@ -22,6 +22,8 @@ module VagrantVbguest
|
|
22
22
|
return nil if !@iso_path || @iso_path == :auto
|
23
23
|
@iso_path
|
24
24
|
end
|
25
|
+
|
26
|
+
def allow_downgrade; @allow_downgrade.nil? ? false : @allow_downgrade end
|
25
27
|
end
|
26
28
|
|
27
29
|
include Attributes
|
@@ -38,6 +40,8 @@ module VagrantVbguest
|
|
38
40
|
@iso_path
|
39
41
|
end
|
40
42
|
|
43
|
+
def allow_downgrade; @allow_downgrade.nil? ? self.class.allow_downgrade : @allow_downgrade end
|
44
|
+
|
41
45
|
# explicit hash, to get symbols in hash keys
|
42
46
|
def to_hash
|
43
47
|
{
|
@@ -50,7 +54,8 @@ module VagrantVbguest
|
|
50
54
|
:auto_reboot => auto_reboot,
|
51
55
|
:no_install => no_install,
|
52
56
|
:no_remote => no_remote,
|
53
|
-
:yes => yes
|
57
|
+
:yes => yes,
|
58
|
+
:allow_downgrade => allow_downgrade
|
54
59
|
}
|
55
60
|
end
|
56
61
|
|
@@ -94,7 +94,7 @@ module VagrantVbguest
|
|
94
94
|
def host_version
|
95
95
|
installer = guest_installer
|
96
96
|
raise NoInstallerFoundError, :method => 'check host version of' if !installer
|
97
|
-
installer.
|
97
|
+
installer.host_version
|
98
98
|
end
|
99
99
|
|
100
100
|
def running?
|
@@ -103,16 +103,32 @@ module VagrantVbguest
|
|
103
103
|
installer.running?
|
104
104
|
end
|
105
105
|
|
106
|
+
def reboot_after_install?
|
107
|
+
if (installer = guest_installer)
|
108
|
+
guest_installer.reboot_after_install?
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
106
112
|
# Returns an installer instance for the current vm
|
107
113
|
# This is either the one configured via `installer` option or
|
108
114
|
# detected from all registered installers (see {Installer.detect})
|
109
115
|
#
|
110
116
|
# @return [Installers::Base]
|
111
117
|
def guest_installer
|
112
|
-
@guest_installer
|
113
|
-
|
118
|
+
return @guest_installer if @guest_installer
|
119
|
+
|
120
|
+
if (klass = guest_installer_class)
|
121
|
+
@guest_installer = klass.new(@vm, @options)
|
122
|
+
end
|
123
|
+
|
124
|
+
@guest_installer
|
125
|
+
end
|
126
|
+
|
127
|
+
def guest_installer_class
|
128
|
+
if @options[:installer].is_a?(Class)
|
129
|
+
@options[:installer]
|
114
130
|
else
|
115
|
-
|
131
|
+
Installer.detect(@vm, @options)
|
116
132
|
end
|
117
133
|
end
|
118
134
|
|
@@ -113,7 +113,7 @@ module VagrantVbguest
|
|
113
113
|
|
114
114
|
# Determinates if the GuestAdditions kernel module is loaded.
|
115
115
|
# This method tests if there is a working GuestAdditions
|
116
|
-
# kernel module. If there is none, {#rebuild} is
|
116
|
+
# kernel module. If there is none, {#rebuild} is being called.
|
117
117
|
# If there is no way of telling if there is a working
|
118
118
|
# GuestAddition for a specific system, this method should
|
119
119
|
# return `true`.
|
@@ -124,32 +124,43 @@ module VagrantVbguest
|
|
124
124
|
true
|
125
125
|
end
|
126
126
|
|
127
|
+
# This manipulate the run-list of a the vbguest machine.
|
128
|
+
def reboot_after_install?(opts=nil, &block)
|
129
|
+
false
|
130
|
+
end
|
131
|
+
|
127
132
|
# Determinates the GuestAdditions version installed on the
|
128
133
|
# guest system.
|
129
134
|
#
|
130
135
|
# @param reload [Boolean] Whether to read the value again or use
|
131
|
-
# the cached value form an
|
132
|
-
# @return [
|
136
|
+
# the cached value form an earlier call.
|
137
|
+
# @return [Gem::Version] The version code of the VirtualBox Guest Additions
|
133
138
|
# available on the guest, or `nil` if none installed.
|
134
139
|
def guest_version(reload=false)
|
135
140
|
return @guest_version if @guest_version && !reload
|
136
141
|
|
137
|
-
guest_version = @host.read_guest_additions_version
|
138
|
-
|
142
|
+
@guest_version = VagrantVbguest::Version(@host.read_guest_additions_version)
|
143
|
+
end
|
139
144
|
|
140
|
-
|
145
|
+
# Determinates the host (eg VirtualBox) version
|
146
|
+
# @param reload [Boolean] Whether to read the value again or use
|
147
|
+
# the cached value form an earlier call.
|
148
|
+
# @return [Gem::Version] The version code of the host provider
|
149
|
+
def host_version(reload=false)
|
150
|
+
return @host_version if @host_version && !reload
|
151
|
+
|
152
|
+
@host_version = VagrantVbguest::Version(@host.version)
|
141
153
|
end
|
142
154
|
|
143
155
|
|
144
156
|
# Determinates the version of the GuestAdditions installer in use
|
145
157
|
#
|
146
|
-
# @return [
|
158
|
+
# @return [Gem::Version] The version code of the GuestAdditions installer
|
147
159
|
def installer_version(path_to_installer)
|
148
160
|
version = nil
|
149
161
|
communicate.sudo("#{path_to_installer} --info", :error_check => false) do |type, data|
|
150
|
-
|
151
|
-
|
152
|
-
end
|
162
|
+
v = VagrantVbguest::Version(data, /\AIdentification.*\s(\d+\.\d+.\d+)/i)
|
163
|
+
version = v if v
|
153
164
|
end
|
154
165
|
version
|
155
166
|
end
|
@@ -39,8 +39,10 @@ module VagrantVbguest
|
|
39
39
|
def release_version
|
40
40
|
unless instance_variable_defined?(:@release_version)
|
41
41
|
@release_version = nil
|
42
|
+
version_pattern = /(\d+\.\d+(\.\d+)?)/
|
42
43
|
communicate.sudo('cat /etc/centos-release') do |type, data|
|
43
|
-
|
44
|
+
v = VagrantVbguest::Version(data, version_pattern)
|
45
|
+
@release_version = v if v
|
44
46
|
end
|
45
47
|
end
|
46
48
|
@release_version
|
@@ -88,14 +88,14 @@ module VagrantVbguest
|
|
88
88
|
# additions installed on the host may differ. If this happens, we
|
89
89
|
# assume, that the host binaries are right and yield a warning message.
|
90
90
|
#
|
91
|
-
# @return [
|
92
|
-
#
|
91
|
+
# @return [Gem::Version] The version code of the VirtualBox Guest Additions
|
92
|
+
# available on the guest, or `nil` if none installed.
|
93
93
|
def guest_version(reload = false)
|
94
94
|
return @guest_version if @guest_version && !reload
|
95
|
-
driver_version = super
|
95
|
+
driver_version = VagrantVbguest::Version(super)
|
96
96
|
|
97
97
|
communicate.sudo('VBoxService --version', :error_check => false) do |type, data|
|
98
|
-
service_version = data
|
98
|
+
service_version = VagrantVbguest::Version(data)
|
99
99
|
if service_version
|
100
100
|
if driver_version != service_version
|
101
101
|
@env.ui.warn(I18n.t("vagrant_vbguest.guest_version_reports_differ", :driver => driver_version, :service => service_version))
|
@@ -126,7 +126,7 @@ module VagrantVbguest
|
|
126
126
|
communicate.sudo("#{find_tool('vboxadd')} start", opts, &block)
|
127
127
|
end
|
128
128
|
|
129
|
-
if
|
129
|
+
if guest_version && guest_version >= Gem::Version.new('5.1')
|
130
130
|
if systemd_tool
|
131
131
|
communicate.sudo("#{systemd_tool[:path]} vboxadd-service #{systemd_tool[:up]}", opts, &block)
|
132
132
|
else
|
@@ -0,0 +1,125 @@
|
|
1
|
+
require "vagrant-vbguest/helpers/os_release"
|
2
|
+
|
3
|
+
module VagrantVbguest
|
4
|
+
module Installers
|
5
|
+
|
6
|
+
class Windows < Base
|
7
|
+
def self.match?(vm)
|
8
|
+
raise Error, _key: :do_not_inherit_match_method if self != Windows
|
9
|
+
communicate_to(vm).test("(Get-WMIObject win32_operatingsystem).name")
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.os_release(vm)
|
13
|
+
@@os_release_info ||= {}
|
14
|
+
if !@@os_release_info.has_key?(vm_id(vm)) && communicate_to(vm).test("(Get-WMIObject win32_operatingsystem).Name")
|
15
|
+
communicate.execute("(Get-WMIObject win32_operatingsystem).Name") do |type, data|
|
16
|
+
@@os_release_info[vm_id(vm)] = data
|
17
|
+
end
|
18
|
+
end
|
19
|
+
@@os_release_info[vm_id(vm)]
|
20
|
+
end
|
21
|
+
|
22
|
+
def os_release
|
23
|
+
self.class.os_release(vm)
|
24
|
+
end
|
25
|
+
|
26
|
+
def tmp_path
|
27
|
+
options[:iso_upload_path] || "$env:TEMP/VBoxGuestAdditions.iso"
|
28
|
+
end
|
29
|
+
|
30
|
+
def mount_point
|
31
|
+
communicate.execute(<<-SHELL) do |type, data|
|
32
|
+
(Get-DiskImage -DevicePath (
|
33
|
+
Get-DiskImage -ImagePath #{tmp_path}
|
34
|
+
).DevicePath | Get-Volume).DriveLetter
|
35
|
+
SHELL
|
36
|
+
return data.strip
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def installer_version(path_to_installer)
|
41
|
+
version = nil
|
42
|
+
communicate.execute("(get-item #{path_to_installer}).VersionInfo.ProductVersion") do |type, data|
|
43
|
+
if (v = data.to_s.match(/(\d+\.\d+.\d+)/i))
|
44
|
+
version = v[1]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
version
|
48
|
+
end
|
49
|
+
|
50
|
+
def install(opts = nil, &block)
|
51
|
+
upload(iso_file)
|
52
|
+
mount_iso(opts, &block)
|
53
|
+
execute_installer(opts, &block)
|
54
|
+
unmount_iso(opts, &block) unless options[:no_cleanup]
|
55
|
+
end
|
56
|
+
|
57
|
+
def reboot_after_install?(opts = nil, &block)
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
def running?(opts = nil, &block)
|
62
|
+
communicate.test("'Running' -eq (Get-Service VBoxService)")
|
63
|
+
end
|
64
|
+
|
65
|
+
def guest_version(reload = false)
|
66
|
+
return @guest_version if @guest_version && !reload
|
67
|
+
driver_version = VagrantVbguest::Version(super)
|
68
|
+
|
69
|
+
communicate.execute("VBoxService --version", error_check: false) do |type,data|
|
70
|
+
service_version = VagrantVbguest::Version(data)
|
71
|
+
|
72
|
+
if service_version
|
73
|
+
if driver_version != service_version
|
74
|
+
@env.ui.warn(I18n.t(
|
75
|
+
"vagrant_vbguest.guest_version_reports_differ",
|
76
|
+
driver: driver_version, service: service_version
|
77
|
+
))
|
78
|
+
end
|
79
|
+
@guest_version = service_version
|
80
|
+
end
|
81
|
+
end
|
82
|
+
@guest_version
|
83
|
+
end
|
84
|
+
|
85
|
+
def execute_installer(opts = nil, &block)
|
86
|
+
cert_dir = File.join("#{mount_point}:", 'cert')
|
87
|
+
installer = File.join("#{mount_point}:", "VBoxWindowsAdditions.exe")
|
88
|
+
|
89
|
+
yield_installation_warning(installer)
|
90
|
+
opts = { elevated: true }.merge(opts || {})
|
91
|
+
|
92
|
+
# ignore "CRYPT_E_EXISTS" error when re-installing
|
93
|
+
communicate.execute(<<-SHELL, opts.merge(error_check: false), &block)
|
94
|
+
cd #{cert_dir}; ./VBoxCertUtil.exe add-trusted-publisher *.cer --root *.cer
|
95
|
+
SHELL
|
96
|
+
|
97
|
+
exit_status = communicate.execute(<<-SHELL, opts, &block)
|
98
|
+
cd #{cert_dir}; #{installer} /S
|
99
|
+
SHELL
|
100
|
+
|
101
|
+
yield_installation_error_warning(installer) unless exit_status == 0
|
102
|
+
exit_status
|
103
|
+
end
|
104
|
+
|
105
|
+
def mount_iso(opts = nil, &block)
|
106
|
+
communicate.execute("Mount-DiskImage -ImagePath #{tmp_path}", opts, &block)
|
107
|
+
env.ui.info(I18n.t("vagrant_vbguest.mounting_iso", mount_point: mount_point))
|
108
|
+
end
|
109
|
+
|
110
|
+
def unmount_iso(opts = nil, &block)
|
111
|
+
env.ui.info(I18n.t("vagrant_vbguest.unmounting_iso",mount_point: mount_point))
|
112
|
+
communicate.execute("Dismount-DiskImage -ImagePath #{tmp_path}", opts, &block)
|
113
|
+
communicate.execute("Remove-Item -Path #{tmp_path}", opts, &block)
|
114
|
+
end
|
115
|
+
|
116
|
+
def yield_installation_error_warning(path_to_installer)
|
117
|
+
@env.ui.warn I18n.t(
|
118
|
+
"vagrant_vbguest.windows.install_error",
|
119
|
+
installer_version: installer_version(path_to_installer) || I18n.t("vagrant_vbguest.unknown")
|
120
|
+
)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
VagrantVbguest::Installer.register(VagrantVbguest::Installers::Windows, 2)
|
@@ -13,7 +13,7 @@ module VagrantVbguest
|
|
13
13
|
@logger = Log4r::Logger.new("vagrant::plugins::vbguest-machine")
|
14
14
|
@logger.debug("initialize vbguest machine for VM '#{vm.name}' (#{vm.to_s})")
|
15
15
|
|
16
|
-
@installer = Installer.new
|
16
|
+
@installer = Installer.new(vm, options)
|
17
17
|
end
|
18
18
|
|
19
19
|
def run
|
@@ -55,7 +55,7 @@ module VagrantVbguest
|
|
55
55
|
def steps(state)
|
56
56
|
case state
|
57
57
|
when :clean, :unmatched
|
58
|
-
[:install]
|
58
|
+
[:install].tap { |l| l << :reboot if installer.reboot_after_install? }
|
59
59
|
when :not_running
|
60
60
|
installation_ran? ? [:reboot] : [:start, :rebuild, :reboot]
|
61
61
|
else
|
@@ -69,8 +69,14 @@ module VagrantVbguest
|
|
69
69
|
running = installer.running?
|
70
70
|
@logger.debug("Current states for VM '#{vm.name}' are : guest_version=#{guest_version} : host_version=#{host_version} : running=#{running}")
|
71
71
|
|
72
|
-
return :clean
|
73
|
-
|
72
|
+
return :clean if !guest_version
|
73
|
+
|
74
|
+
if host_version != guest_version
|
75
|
+
return :unmatched if host_version > guest_version || options[:allow_downgrade] || options[:force]
|
76
|
+
return :not_running if !running # still need to check this here, so we don't miss it before running into "skipped_downgrade"
|
77
|
+
return :skipped_downgrade if host_version < guest_version
|
78
|
+
end
|
79
|
+
|
74
80
|
return :not_running if !running
|
75
81
|
return :ok
|
76
82
|
end
|
@@ -1,3 +1,22 @@
|
|
1
|
+
require "delegate"
|
2
|
+
|
1
3
|
module VagrantVbguest
|
2
|
-
VERSION =
|
4
|
+
VERSION = File.read(File.expand_path("../../../VERSION", __FILE__)).chop
|
5
|
+
|
6
|
+
# Helper to create a new Gem::Version by parsing the common version pattern.
|
7
|
+
# When overwriting the pattern, make sure that the matched version string is
|
8
|
+
# the capture `1`
|
9
|
+
#
|
10
|
+
# @param input [String] The text to parse for a version.
|
11
|
+
# @param pattern [Regexp] The optional overwrite of the version string pattern (see +PATTERN+)
|
12
|
+
# @return [nil|Gem::Version] returns `nil` if the input could not been pared
|
13
|
+
def self.Version(input, pattern = /(\d+\.\d+\.\d+)/)
|
14
|
+
if input.nil?
|
15
|
+
nil
|
16
|
+
elsif Gem::Version === input
|
17
|
+
input
|
18
|
+
else
|
19
|
+
Gem::Version.create(input[pattern, 1])
|
20
|
+
end
|
21
|
+
end
|
3
22
|
end
|
data/locales/en.yml
CHANGED
@@ -31,6 +31,7 @@ en:
|
|
31
31
|
unmatched: "[%{vm_name}] GuestAdditions versions on your host (%{host_version}) and guest (%{guest_version}) do not match."
|
32
32
|
not_running: "[%{vm_name}] GuestAdditions seems to be installed (%{guest_version}) correctly, but not running."
|
33
33
|
ok: "[%{vm_name}] GuestAdditions %{guest_version} running --- OK."
|
34
|
+
skipped_downgrade: "GuestAdditions are newer than your host but, downgrades are disabled. Skipping."
|
34
35
|
|
35
36
|
errors:
|
36
37
|
autodetect_iso_path: |-
|
data/vagrant-vbguest.gemspec
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/vagrant-vbguest/version', __FILE__)
|
3
|
-
|
4
2
|
Gem::Specification.new do |s|
|
5
3
|
s.name = "vagrant-vbguest"
|
6
|
-
s.version =
|
4
|
+
s.version = File.read('VERSION').chop
|
7
5
|
s.platform = Gem::Platform::RUBY
|
8
6
|
s.authors = ["Robert Schulze"]
|
9
7
|
s.email = ["robert@dotless.de"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vbguest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Schulze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: micromachine
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- LICENSE
|
74
74
|
- Rakefile
|
75
75
|
- Readme.md
|
76
|
+
- VERSION
|
76
77
|
- lib/vagrant-vbguest.rb
|
77
78
|
- lib/vagrant-vbguest/command.rb
|
78
79
|
- lib/vagrant-vbguest/config.rb
|
@@ -95,10 +96,12 @@ files:
|
|
95
96
|
- lib/vagrant-vbguest/installers/redhat.rb
|
96
97
|
- lib/vagrant-vbguest/installers/suse.rb
|
97
98
|
- lib/vagrant-vbguest/installers/ubuntu.rb
|
99
|
+
- lib/vagrant-vbguest/installers/windows.rb
|
98
100
|
- lib/vagrant-vbguest/machine.rb
|
99
101
|
- lib/vagrant-vbguest/middleware.rb
|
100
102
|
- lib/vagrant-vbguest/version.rb
|
101
103
|
- locales/en.yml
|
104
|
+
- locales/en_windows.yml
|
102
105
|
- vagrant-vbguest.gemspec
|
103
106
|
homepage: https://github.com/dotless-de/vagrant-vbguest
|
104
107
|
licenses:
|