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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fd766b875cf2bb9c92e850a046011649eec465d
4
- data.tar.gz: 4bdc188ae83862280e34e76462c729b1cac1ed4a
3
+ metadata.gz: 80654f414135674846613d27f808377827f213d2
4
+ data.tar.gz: 790b992fc39851b8989b4ad6563f0e757f8a4cff
5
5
  SHA512:
6
- metadata.gz: deb10ef9bbc91075af6b2518543fd091d41c2973f25386fdaa1ab15f88f31c5e91c73592525bd2b589d888668e00af57e4b40c8552d81ecb5e9a89c87ca4e1d9
7
- data.tar.gz: 63227c7e469f706b242c7ea4d91b66ba6b82d9e2d1f1468dbda5a7582dbe1372c88feea70e5c92802c29b0c31fb1c3e2bb6cfe243e40765e2da5693abbdb6c23
6
+ metadata.gz: 2da8eb1062acd3f6a230d98d17a2a8806a4923fccd785ef4dee6d756d7fbcf489a5b47149b217369201fe75e3a77702c79c5aebe88945ed8978443e51dca2096
7
+ data.tar.gz: b2859f70a4ba83fb2271b5a06d285bf5b5720e0833f4d13d6b1a01490cfa3128b7ca39a333845d08b7759bc3b193d38919776e3b612dfffad2b8819fb4092236
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- ## 0.15.02 (2018-05-22)
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
 
@@ -20,6 +20,9 @@ module VagrantVbguest
20
20
  @version ||= driver.version
21
21
  end
22
22
 
23
+ def read_guest_additions_version
24
+ driver.read_guest_additions_version
25
+ end
23
26
 
24
27
  # Additions-file-detection-magig.
25
28
  #
@@ -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 = driver.read_guest_additions_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
@@ -1,3 +1,3 @@
1
1
  module VagrantVbguest
2
- VERSION = "0.15.2"
2
+ VERSION = "0.16.0.beta1"
3
3
  end
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.15.2
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-05-22 00:00:00.000000000 Z
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