vagrant-vbguest 0.15.2 → 0.16.0.beta1
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 +8 -1
- data/lib/vagrant-vbguest/hosts/base.rb +3 -0
- data/lib/vagrant-vbguest/hosts/virtualbox.rb +28 -0
- data/lib/vagrant-vbguest/installers/base.rb +2 -3
- data/lib/vagrant-vbguest/installers/redhat.rb +1 -1
- data/lib/vagrant-vbguest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80654f414135674846613d27f808377827f213d2
|
4
|
+
data.tar.gz: 790b992fc39851b8989b4ad6563f0e757f8a4cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2da8eb1062acd3f6a230d98d17a2a8806a4923fccd785ef4dee6d756d7fbcf489a5b47149b217369201fe75e3a77702c79c5aebe88945ed8978443e51dca2096
|
7
|
+
data.tar.gz: b2859f70a4ba83fb2271b5a06d285bf5b5720e0833f4d13d6b1a01490cfa3128b7ca39a333845d08b7759bc3b193d38919776e3b612dfffad2b8819fb4092236
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.16.0.beta1 (2018-08-29)
|
2
|
+
|
3
|
+
- Refactoring of reading the GuestAdditions version. For VirtualBox >= 4.2, we'll try `VBoxManage showvminfo` first, and use Vagrant as a fallback.
|
4
|
+
This should fix a lot of those "Got different reports about installed GuestAdditions version" error messages.
|
5
|
+
See discussion in [GH-300]. Thanks @cbj4074 for asking the right questions.
|
6
|
+
- Add support for Amazon 2. Thanks @ghoneycutt [GH-304], [GH-303]
|
7
|
+
|
8
|
+
## 0.15.2 (2018-05-22)
|
2
9
|
|
3
10
|
- On RedHad based guest, the installer will now try to install the 'kernel-devel' package additionally to 'kernel-devel-`uname -r`' Thanks @ghoneycutt [GH-299]
|
4
11
|
|
@@ -2,6 +2,34 @@ module VagrantVbguest
|
|
2
2
|
module Hosts
|
3
3
|
class VirtualBox < Base
|
4
4
|
|
5
|
+
def read_guest_additions_version
|
6
|
+
# this way of checking for the GuestAdditionsVersion is taken from Vagrant's
|
7
|
+
# `read_guest_additions_version` method introduced via
|
8
|
+
# https://github.com/hashicorp/vagrant/commit/d8ff2cb5adca25d7eba2bdd334919770316c91be
|
9
|
+
# for VirtualBox 4.2 and carries on for later versons until now
|
10
|
+
# We are vendoring it here, since Vagrant uses it is only a fallback
|
11
|
+
# for when `guestproperty` won't work. But `guestproperty` seems to be prone
|
12
|
+
# to return incorrect values.
|
13
|
+
if Gem::Requirement.new(">= 4.2").satisfied_by? Gem::Version.new(version)
|
14
|
+
uuid = self.class.vm_id(vm)
|
15
|
+
begin
|
16
|
+
info = driver.execute("showvminfo", uuid, "--machinereadable", retryable: true)
|
17
|
+
info.split("\n").each do |line|
|
18
|
+
return $1.to_s if line =~ /^GuestAdditionsVersion="(.+?)"$/
|
19
|
+
end
|
20
|
+
rescue Vagrant::Errors::VBoxManageError => e
|
21
|
+
if e.message =~ /Invalid command.*showvminfo/i
|
22
|
+
vm.env.ui.warn("Cannot read GuestAdditionsVersion using 'showvminfo'")
|
23
|
+
vm.env.ui.debug(e.message)
|
24
|
+
else
|
25
|
+
raise e
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
5
33
|
protected
|
6
34
|
|
7
35
|
# Default web URI, where GuestAdditions iso file can be downloaded.
|
@@ -31,7 +31,7 @@ module VagrantVbguest
|
|
31
31
|
# to check.
|
32
32
|
#
|
33
33
|
# @see {Vagrant::Guest::Linux#distro_dispatch}
|
34
|
-
# @return [Symbol] One of `:debian`, `:ubuntu`, `:gentoo`, `:fedora`, `:redhat`, `:suse`, `:arch`, `:windows`
|
34
|
+
# @return [Symbol] One of `:debian`, `:ubuntu`, `:gentoo`, `:fedora`, `:redhat`, `:suse`, `:arch`, `:windows`, `:amazon`
|
35
35
|
def self.distro(vm)
|
36
36
|
@@distro ||= {}
|
37
37
|
@@distro[ vm_id(vm) ] ||= distro_name vm
|
@@ -132,7 +132,7 @@ module VagrantVbguest
|
|
132
132
|
def guest_version(reload=false)
|
133
133
|
return @guest_version if @guest_version && !reload
|
134
134
|
|
135
|
-
guest_version =
|
135
|
+
guest_version = @host.read_guest_additions_version
|
136
136
|
guest_version = !guest_version ? nil : guest_version[/\d+\.\d+\.\d+/]
|
137
137
|
|
138
138
|
@guest_version = guest_version
|
@@ -211,7 +211,6 @@ module VagrantVbguest
|
|
211
211
|
end
|
212
212
|
end
|
213
213
|
end
|
214
|
-
|
215
214
|
end
|
216
215
|
end
|
217
216
|
end
|
@@ -5,7 +5,7 @@ module VagrantVbguest
|
|
5
5
|
# fortunately they're probably both similar enough to RHEL
|
6
6
|
# (RedHat Enterprise Linux) not to matter.
|
7
7
|
def self.match?(vm)
|
8
|
-
/\A(redhat|centos)\d*\Z/ =~ self.distro(vm)
|
8
|
+
/\A(redhat|centos|amazon)\d*\Z/ =~ self.distro(vm)
|
9
9
|
end
|
10
10
|
|
11
11
|
# Install missing deps and yield up to regular linux installation
|
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.16.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Schulze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: micromachine
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: 1.3.6
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.6.14
|
134
|
+
rubygems_version: 2.6.14.1
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: A Vagrant plugin to install the VirtualBoxAdditions into the guest VM
|