vagrant-vbguest 0.23.0 → 0.24.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 +7 -0
- data/Gemfile +1 -1
- data/Readme.md +20 -0
- data/VERSION +1 -1
- data/lib/vagrant-vbguest/config.rb +5 -1
- data/lib/vagrant-vbguest/installers/base.rb +4 -0
- data/lib/vagrant-vbguest/installers/centos.rb +32 -3
- data/lib/vagrant-vbguest/installers/debian.rb +1 -1
- data/locales/en_centos.yml +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee59eb428fab8a82265073af563afac3cf1eb44ef7c39d7b295006f296541b28
|
4
|
+
data.tar.gz: 7cbf7aebdef759adaabd66ad72db101cfe777150348809188c6dfa8021a20163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a9d0bdd3d5f8abe459aae553b2074f3222550a14a82df5e774274d5be67c0c3ac16831064e9f1f1a8e1ac86deab89d38944cecd3aebf56fa4ca8c600c54e30
|
7
|
+
data.tar.gz: 28edf44b31602f72df2c2458a51b9f414561af4ea06b1674bd02f2793044b9294512135be8935b7b6461c365633b185e0f9901be6996060b8273faba394a4fa1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.24.0.beta1 (2020-04-28)
|
2
|
+
|
3
|
+
- Add a new configuration `installer_options`, as an optional way to pass options to Installer classes.
|
4
|
+
- Add new `installer_options` for the CentOS Installer. Thanks @pedrofurtado for [GH-373]
|
5
|
+
+ `allow_kernel_upgrade`: Will update the kernel and reboots the box
|
6
|
+
+ `reboot_timeout`: Optionally, set the max amount of seconds to wait after reboot
|
7
|
+
|
1
8
|
## 0.23.0 (2020-01-05)
|
2
9
|
|
3
10
|
- Fix Oracle Linux Installer. Installs `elfutils-libelf-devel`. [GH-364], @fribeiro1 [GH-365]
|
data/Gemfile
CHANGED
data/Readme.md
CHANGED
@@ -58,8 +58,28 @@ vbguest will try to autodetect the best option for your system. WTF? see below.
|
|
58
58
|
* `no_remote` (Boolean, default: `false`) : Whether to _not_ download the iso file from a remote location. This includes any `http` location!
|
59
59
|
* `installer` (`VagrantVbguest::Installers::Base`, optional) : Reference to a (custom) installer class
|
60
60
|
* `installer_arguments` (Array, default: `['--nox11']`) : List of additional arguments to pass to the installer. eg: `%w{--nox11 --force}` would execute `VBoxLinuxAdditions.run install --nox11 --force`
|
61
|
+
* `installer_options` (Hash, default: `{}`) : Configure how a Installer internally works. Should be set on a `vm` level.
|
61
62
|
* `yes` (Boolean or String, default: `true`): Wheter to pipe `yes` to the installer. If `true`, executes `yes | VBoxLinuxAdditions.run install`. With `false`, the command is executed without `yes`. You can also put in a string here for `yes` (e.g. `no` to refuse all messages)
|
62
63
|
|
64
|
+
|
65
|
+
#### Installer Specific Options (`installer_options`)
|
66
|
+
|
67
|
+
Those settings are specific for OS-specific installer. Especially in a multi-box environment, you should put those options on the box configuration like this:
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
Vagrant.configure("2") do |config|
|
71
|
+
config.vm.define "my_cent_os_box" do |c|
|
72
|
+
c.box = "centos/8"
|
73
|
+
c.vbguest.installer_options = { allow_kernel_upgrade: true }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
```
|
77
|
+
|
78
|
+
##### CentOS
|
79
|
+
|
80
|
+
* `: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.
|
81
|
+
* `:reboot_timeout` (default: `300`): Number of seconds to wait for the box to reboot after a kernel upgrade.
|
82
|
+
|
63
83
|
#### Global Configuration
|
64
84
|
|
65
85
|
Using [Vagrantfile Load Order](https://www.vagrantup.com/docs/vagrantfile/#load-order-and-merging) you may change default configuration values.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.24.0.beta1
|
@@ -4,7 +4,8 @@ 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, :installer_options,
|
8
|
+
:allow_downgrade,
|
8
9
|
:iso_path, :iso_upload_path, :iso_mount_point, :yes
|
9
10
|
end
|
10
11
|
|
@@ -16,6 +17,7 @@ module VagrantVbguest
|
|
16
17
|
def no_install; @no_install.nil? ? false : @no_install end
|
17
18
|
def no_remote; @no_remote.nil? ? false : @no_remote end
|
18
19
|
def installer_arguments; @installer_arguments.nil? ? '--nox11' : @installer_arguments end
|
20
|
+
def installer_options; @installer_options ||= {} end
|
19
21
|
def yes; @yes.nil? ? true : @yes end
|
20
22
|
|
21
23
|
def iso_path
|
@@ -33,6 +35,7 @@ module VagrantVbguest
|
|
33
35
|
def no_install; @no_install.nil? ? self.class.no_install : @no_install end
|
34
36
|
def no_remote; @no_remote.nil? ? self.class.no_remote : @no_remote end
|
35
37
|
def installer_arguments; @installer_arguments.nil? ? self.class.installer_arguments : @installer_arguments end
|
38
|
+
def installer_options; @installer_options ||= self.class.installer_options end
|
36
39
|
def yes; @yes.nil? ? self.class.yes : @yes end
|
37
40
|
|
38
41
|
def iso_path
|
@@ -47,6 +50,7 @@ module VagrantVbguest
|
|
47
50
|
{
|
48
51
|
:installer => installer,
|
49
52
|
:installer_arguments => installer_arguments,
|
53
|
+
:installer_options => installer_options,
|
50
54
|
:iso_path => iso_path,
|
51
55
|
:iso_upload_path => iso_upload_path,
|
52
56
|
:iso_mount_point => iso_mount_point,
|
@@ -181,6 +181,10 @@ module VagrantVbguest
|
|
181
181
|
version
|
182
182
|
end
|
183
183
|
|
184
|
+
def installer_options
|
185
|
+
options[:installer_options] || {}
|
186
|
+
end
|
187
|
+
|
184
188
|
# Helper to yield a warning message to the user, that the installation
|
185
189
|
# will start _now_.
|
186
190
|
# The message includes the host and installer version strings.
|
@@ -8,12 +8,27 @@ module VagrantVbguest
|
|
8
8
|
|
9
9
|
# Install missing deps and yield up to regular linux installation
|
10
10
|
def install(opts=nil, &block)
|
11
|
-
|
11
|
+
if upgrade_kernel?
|
12
|
+
upgrade_kernel(opts, &block)
|
13
|
+
else
|
14
|
+
install_kernel_deps(opts, &block)
|
15
|
+
end
|
12
16
|
super
|
13
17
|
end
|
14
18
|
|
19
|
+
def installer_options
|
20
|
+
@installer_options ||= {
|
21
|
+
allow_kernel_upgrade: false,
|
22
|
+
reboot_timeout: 300
|
23
|
+
}.merge!(super)
|
24
|
+
end
|
25
|
+
|
15
26
|
protected
|
16
27
|
|
28
|
+
def upgrade_kernel?
|
29
|
+
installer_options[:allow_kernel_upgrade]
|
30
|
+
end
|
31
|
+
|
17
32
|
def install_kernel_deps(opts=nil, &block)
|
18
33
|
unless has_kernel_devel_info?
|
19
34
|
update_release_repos(opts, &block)
|
@@ -58,12 +73,26 @@ module VagrantVbguest
|
|
58
73
|
communicate.sudo(cmd, opts, &block)
|
59
74
|
end
|
60
75
|
|
76
|
+
def upgrade_kernel(opts=nil, &block)
|
77
|
+
communicate.sudo('yum update -y kernel', opts, &block)
|
78
|
+
communicate.sudo('yum install -y kernel-devel', opts, &block)
|
79
|
+
|
80
|
+
env.ui.info(I18n.t("vagrant_vbguest.centos.rebooting", vm_name: vm.name))
|
81
|
+
communicate.sudo('shutdown -r now', opts, &block)
|
82
|
+
|
83
|
+
sleep_guard = installer_options[:reboot_timeout]
|
84
|
+
begin
|
85
|
+
sleep 10
|
86
|
+
sleep_guard -= 10
|
87
|
+
end while sleep_guard >= 0 && !@vm.communicate.ready?
|
88
|
+
end
|
89
|
+
|
61
90
|
def dependencies
|
62
|
-
if has_kernel_devel_info?
|
91
|
+
if !upgrade_kernel? && has_kernel_devel_info?
|
63
92
|
# keep the original redhat dependencies
|
64
93
|
super
|
65
94
|
else
|
66
|
-
# we should have installed kernel-devel-`uname -r` via install_kernel_devel
|
95
|
+
# we should have installed kernel-devel(-`uname -r`) via install_kernel_devel or upgrade_kernel
|
67
96
|
['gcc', 'binutils', 'make', 'perl', 'bzip2', 'elfutils-libelf-devel'].join(' ')
|
68
97
|
end
|
69
98
|
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.
|
4
|
+
version: 0.24.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: 2020-
|
11
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: micromachine
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/vagrant-vbguest/middleware.rb
|
102
102
|
- lib/vagrant-vbguest/version.rb
|
103
103
|
- locales/en.yml
|
104
|
+
- locales/en_centos.yml
|
104
105
|
- locales/en_windows.yml
|
105
106
|
- vagrant-vbguest.gemspec
|
106
107
|
homepage: https://github.com/dotless-de/vagrant-vbguest
|