vagrant-vbguest 0.28.0 → 0.29.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 +5 -0
- data/Readme.md +9 -0
- data/VERSION +1 -1
- data/lib/vagrant-vbguest/installers/centos.rb +22 -3
- data/lib/vagrant-vbguest/installers/linux.rb +20 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b06593adf78b594ec9a8cd373156ce66b65c2c9636d5ce18b491031b1f42cea
|
4
|
+
data.tar.gz: 801da70b4ae593718792ea976f43f7cc3a5feaa16d342680a33d1cf9f3fe406d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccebf9ed8b4ded67948a85d08fdf69021c46b9aff7dbd12d025a1516f4858f06b2102537efd484e715c5893e38d5fb4242cb123496abdd6ea7d2bb1b3ee8e81f
|
7
|
+
data.tar.gz: c872bcdb579253435983228ceb7cefe68aa7af4988a99d451b5ead39939e03061c2b6358b0b0919d23973ab4ef412e3aca868f8fd5e38ba320d0ca4c16e6f2e5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 0.29.0 (2021-01-03)
|
2
|
+
|
3
|
+
- Add installer_option :enablerepo for CentOS. [GH-402], Fixes [GH-398]
|
4
|
+
- Add installer_option :running_kernel_modules for all Linux installers. [GH-403], Fixes [GH-396]
|
5
|
+
|
1
6
|
## 0.28.0 (2020-11-20)
|
2
7
|
|
3
8
|
- Work around a bug in vagrant 2.2.11 to 2.2.13, which would not load the vbguest middleware. [GH-394], Fixes [GH-391]
|
data/Readme.md
CHANGED
@@ -98,12 +98,21 @@ Vagrant.configure("2") do |config|
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
```
|
101
|
+
##### Linux
|
101
102
|
|
103
|
+
This option is available on all Linux type installers.
|
104
|
+
|
105
|
+
* `:running_kernel_modules` (default: `["vboxguest", "vboxsf"]`) The list used to check for the "running" state. Each of these modules need to appear at the beginning of a line in `/proc/modules`.
|
102
106
|
|
103
107
|
##### CentOS
|
104
108
|
|
105
109
|
* `:allow_kernel_upgrade` (default: `false`): If `true`, instead of trying to find matching the matching kernel-devel package to the installed kernel version, the kernel will be updated and the (now matching) up-to-date kernel-devel will be installed. __NOTE__: This will trigger a reboot of the box.
|
106
110
|
* `:reboot_timeout` (default: `300`): Maximum number of seconds to wait for the box to reboot after a kernel upgrade.
|
111
|
+
* `:enablerepo`: (default: `false`) Configure `yum --enablerepo` settings. Possible values are:
|
112
|
+
- Single String: `"C*-base"` converts to `--enablerepo=C*-base`
|
113
|
+
- Array of Strings: `['C*-base', 'C*-updates']` converts to `--enablerepo=C*-base --enablerepo=C*-updates`
|
114
|
+
- `true`: Enables `C${release_version}-base` and `C${release_version}-updates` with release_version read from `/etc/centos-release` if the repo exists, otherwise `*`.
|
115
|
+
- `false`: Does not set any `--enablerepo`
|
107
116
|
|
108
117
|
#### Global Configuration
|
109
118
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.29.0
|
@@ -29,6 +29,26 @@ module VagrantVbguest
|
|
29
29
|
installer_options[:allow_kernel_upgrade]
|
30
30
|
end
|
31
31
|
|
32
|
+
# parse the installer_option :enablerepo
|
33
|
+
def enablerepo
|
34
|
+
unless instance_variable_defined?(:@enablerepo)
|
35
|
+
enablerepo = installer_options.fetch(:enablerepo, false)
|
36
|
+
@enablerepo =
|
37
|
+
case enablerepo
|
38
|
+
when String
|
39
|
+
"--enablerepo=#{enablerepo}"
|
40
|
+
when Array
|
41
|
+
enablerepo.map { |e| "--enablerepo=#{e}" }.join(" ")
|
42
|
+
when true
|
43
|
+
rel = has_rel_repo? ? release_version : '*'
|
44
|
+
"--enablerepo=C#{rel}-base --enablerepo=C#{rel}-updates"
|
45
|
+
else
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
@enablerepo
|
50
|
+
end
|
51
|
+
|
32
52
|
def install_kernel_deps(opts=nil, &block)
|
33
53
|
unless has_kernel_devel_info?
|
34
54
|
update_release_repos(opts, &block)
|
@@ -46,7 +66,7 @@ module VagrantVbguest
|
|
46
66
|
def has_rel_repo?
|
47
67
|
unless instance_variable_defined?(:@has_rel_repo)
|
48
68
|
rel = release_version
|
49
|
-
@has_rel_repo = communicate.test(
|
69
|
+
@has_rel_repo = communicate.test("yum repolist --enablerepo=C#{rel}-base --enablerepo=C#{rel}-updates")
|
50
70
|
end
|
51
71
|
@has_rel_repo
|
52
72
|
end
|
@@ -68,8 +88,7 @@ module VagrantVbguest
|
|
68
88
|
end
|
69
89
|
|
70
90
|
def install_kernel_devel(opts=nil, &block)
|
71
|
-
|
72
|
-
cmd = 'yum install -y kernel-devel-`uname -r`'
|
91
|
+
cmd = "yum install -y kernel-devel-`uname -r` #{enablerepo}"
|
73
92
|
communicate.sudo(cmd, opts, &block)
|
74
93
|
end
|
75
94
|
|
@@ -74,10 +74,20 @@ module VagrantVbguest
|
|
74
74
|
# @yieldparam [String] type Type of the output, `:stdout`, `:stderr`, etc.
|
75
75
|
# @yieldparam [String] data Data for the given output.
|
76
76
|
def running?(opts=nil, &block)
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
kmods = nil
|
78
|
+
communicate.sudo('cat /proc/modules', opts) do |type, data|
|
79
|
+
block.call(type, data) if block
|
80
|
+
kmods = data if type == :stdout && data
|
81
|
+
end
|
82
|
+
|
83
|
+
unless kmods
|
84
|
+
env.ui.warn "Could not read /proc/modules"
|
85
|
+
return true
|
86
|
+
end
|
87
|
+
|
88
|
+
Array(installer_options[:running_kernel_modules]).all? do |mod|
|
89
|
+
/^#{mod}\b/i.match(kmods)
|
90
|
+
end
|
81
91
|
end
|
82
92
|
|
83
93
|
# This overrides {VagrantVbguest::Installers::Base#guest_version}
|
@@ -232,6 +242,12 @@ module VagrantVbguest
|
|
232
242
|
@installer_arguments ||= Array(options[:installer_arguments]).join " "
|
233
243
|
end
|
234
244
|
|
245
|
+
def installer_options
|
246
|
+
@installer_options ||= {
|
247
|
+
running_kernel_modules: ["vboxguest", "vboxsf"]
|
248
|
+
}.merge!(super)
|
249
|
+
end
|
250
|
+
|
235
251
|
# Determine if yes needs to be called or not
|
236
252
|
def yes
|
237
253
|
value = @options[:yes]
|
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.29.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:
|
11
|
+
date: 2021-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: micromachine
|