macinbox 3.4.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36a4f3b181302a8a5d4efdf5e23d97add1b2f7424c1b981d0fa8467f4317a398
4
- data.tar.gz: cbab11b8a79ee6eb57db5e164ac34867a3e892f97b166afe3176d1ed9f629657
3
+ metadata.gz: e40b892a4d63ec18488766757893eddf3898a0695a525580aabdc402f155be34
4
+ data.tar.gz: b35b4e53f984f36556ab5ad6b65f196e20e3dd34c88c69b6471d686b7e750638
5
5
  SHA512:
6
- metadata.gz: 706f282c101a01f8077f3b5e826441610263aee40c19e7b3ffea6480be6c50252f0e38070c4160153abb094a898dddd5b4195fb5d75ae9ecd1c69f1002c54a6c
7
- data.tar.gz: 65c34dc426dc8a155319a781d0225920208e02c5eeaf74d3c61791fe9cfa0c85a6e8fe79021f1713653c9bd17f14cba039472954182264b7e268b7f80992a687
6
+ metadata.gz: 0130a5bc6662282a236118d5cb81a45d49e17190338eb5a1bfffcc577b477911f66a73ab14738cc9617da97369b24ef802e04d0854383165d609c304f8772bc7
7
+ data.tar.gz: b91da886b38a12928bcb4e115351c8c07e79138af73aecd369c79485377770b665be160dcda5f4bafea37b2336ef566465f7c366db9a4596aa85d92a70a422e6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 4.0.0 (November 12, 2019)
2
+
3
+ FEATURES:
4
+
5
+ - Prevent incompatible host and guest OS versions from being used together. [GH-24]
6
+
7
+ BREAKING CHANGES:
8
+
9
+ - Use the Catalina installer app by default.
10
+ - Skip installation of VMware Tools on Catalina because it is not working properly.
11
+
1
12
  ## 3.4.0 (November 12, 2019)
2
13
 
3
14
  FEATURES:
data/Gemfile.lock CHANGED
@@ -1,20 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- macinbox (3.4.0)
4
+ macinbox (4.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- rake (10.5.0)
10
9
 
11
10
  PLATFORMS
12
11
  ruby
13
12
 
14
13
  DEPENDENCIES
15
- bundler (~> 1.16)
16
14
  macinbox!
17
- rake (~> 10.0)
18
15
 
19
16
  BUNDLED WITH
20
17
  1.17.2
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # macinbox
2
2
 
3
- Puts macOS Mojave in a Vagrant box.
3
+ Puts macOS Catalina in a Vagrant box.
4
4
 
5
5
  <p align=center>
6
6
  <img src="https://raw.githubusercontent.com/bacongravy/macinbox/demo/demo.gif">
@@ -11,7 +11,7 @@ Supports creating boxes in either the 'vmware_fusion', 'vmware_desktop', 'parall
11
11
 
12
12
  ## System Requirements
13
13
 
14
- * macOS 10.14 Mojave host operating system
14
+ * macOS 10.15 Catalina host operating system
15
15
  * At least 8 GB RAM (16 GB recommended)
16
16
  * At least 2 cores (4 recommended)
17
17
  * At least 100 GB of available disk space
@@ -28,11 +28,17 @@ To boot a box created by `macinbox` you will need Vagrant:
28
28
 
29
29
  ### macOS Installer
30
30
 
31
- To create a box you will need a macOS installer application:
31
+ To create a box you will need a macOS installer application. If you are using a Catalina host you must use a Catalina installer:
32
+
33
+ * [macOS Catalina installer application](http://appstore.com/mac/macoscatalina) Tested with 10.15, 10.15.1
34
+
35
+ Catalina hosts cannot use earlier (e.g. macOS 10.14 Mojave) installers, and Mojave hosts cannot use Catalina installers.
36
+
37
+ If you are using a Mojave host you should use a Mojave installer:
32
38
 
33
39
  * [macOS Mojave installer application](http://appstore.com/mac/macosmojave) Tested with 10.14.3, 10.14.4, 10.14.5, 10.14.6
34
40
 
35
- Previous versions of the macOS installer (e.g. High Sierra) may also work.
41
+ It is recommended that you use the same version for the host and the installer, but previous versions of the macOS installer (e.g. macOS 10.13 High Sierra) may also work with Mojave hosts, and vice-versa.
36
42
 
37
43
  **NOTE:** If you have questions about the permissibility of virtualizing macOS you may want to review the documentation for the virtualization software you are using and the [software license agreement](https://www.apple.com/legal/sla/) for macOS.
38
44
 
@@ -158,7 +164,7 @@ This tool performs the following actions:
158
164
  1. Wraps the installer app in a disk image
159
165
  1. Creates a new blank disk image
160
166
  1. Installs macOS
161
- 1. Installs the VMware or Parallels tools
167
+ 1. Installs the VMware or Parallels tools (Note: VMware Tools installation is skipped on Catalina because it is not working)
162
168
  1. (VMware only) Updates the SystemPolicyConfiguration KextPolicy to allow the VMware tools kernel extension to load automatically
163
169
  1. Adds an .InstallerConfiguration file to automate the Setup Assistant app and create a user account on first boot
164
170
  1. Enables password-less sudo
@@ -25,6 +25,15 @@ module Macinbox
25
25
  host_os_version = Macinbox::OSVersion.new(Task.backtick %W[ /usr/bin/sw_vers -productVersion ])
26
26
  Logger.info "Host macOS version detected: #{host_os_version}" if $verbose
27
27
 
28
+ unless installer_os_version.is_sierra_or_later?
29
+ raise Macinbox::Error.new("Installer macOS version is not supported: #{installer_os_version}")
30
+ end
31
+
32
+ if (host_os_version.is_catalina_or_later? && installer_os_version.is_mojave_or_earlier?) ||
33
+ (host_os_version.is_mojave_or_earlier? && installer_os_version.is_catalina_or_later?)
34
+ raise Macinbox::Error.new("macOS #{host_os_version} cannot install macOS #{installer_os_version}")
35
+ end
36
+
28
37
  if installer_os_version.major != host_os_version.major || installer_os_version.minor != host_os_version.minor
29
38
  Logger.error "Warning: host OS version (#{host_os_version}) and installer OS version (#{installer_os_version}) do not match"
30
39
  end
@@ -25,6 +25,8 @@ module Macinbox
25
25
  @fullscreen = opts[:fullscreen]
26
26
  @hidpi = opts[:hidpi]
27
27
 
28
+ @macos_version = opts[:macos_version] or raise ArgumentError.new(":macos_version not specified")
29
+
28
30
  @collector = opts[:collector] or raise ArgumentError.new(":collector not specified")
29
31
 
30
32
  raise Macinbox::Error.new("VMDK not found") unless File.exist? @input_vmdk
@@ -41,12 +43,19 @@ module Macinbox
41
43
 
42
44
  FileUtils.mkdir @box_dir
43
45
 
46
+ virtual_hw_version = 16
47
+ if @macos_version.is_mojave_or_earlier?
48
+ virtual_hw_version = 14
49
+ end
50
+
51
+ guest_os = "darwin#{@macos_version.darwin_major}-64"
52
+
44
53
  File.open "#{@box_dir}/macinbox.vmx", 'w' do |file|
45
54
 
46
55
  file.write <<~EOF
47
56
  .encoding = "UTF-8"
48
57
  config.version = "8"
49
- virtualHW.version = "14"
58
+ virtualHW.version = "#{virtual_hw_version}"
50
59
  numvcpus = "#{@cpu_count}"
51
60
  memsize = "#{@memory_size}"
52
61
  sata0.present = "TRUE"
@@ -90,7 +99,7 @@ module Macinbox
90
99
  board-id.reflectHost = "TRUE"
91
100
  firmware = "efi"
92
101
  displayName = "#{@box_name}"
93
- guestOS = "darwin17-64"
102
+ guestOS = "#{guest_os}"
94
103
  nvram = "macinbox.nvram"
95
104
  virtualHW.productCompatibility = "hosted"
96
105
  keyboardAndMouseProfile = "macProfile"
@@ -15,12 +15,14 @@ module Macinbox
15
15
  class CreateVMDKFromImage
16
16
 
17
17
  def initialize(opts)
18
- @input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified")
19
- @output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified")
20
- @vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified")
18
+ @input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified")
19
+ @output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified")
20
+ @vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified")
21
21
  @use_qemu = opts[:use_qemu]
22
22
 
23
- @collector = opts[:collector] or raise ArgumentError.new(":collector not specified")
23
+ @macos_version = opts[:macos_version] or raise ArgumentError.new(":macos_version not specified")
24
+
25
+ @collector = opts[:collector] or raise ArgumentError.new(":collector not specified")
24
26
 
25
27
  raise Macinbox::Error.new("input image not found") unless File.exist? @input_image
26
28
  raise Macinbox::Error.new("VMware Fusion not found") unless File.exist? @vmware_fusion_app
@@ -34,8 +36,10 @@ module Macinbox
34
36
  create_temp_dir
35
37
  copy_input_image
36
38
  attach_image
37
- install_vmware_tools
38
- set_spc_kextpolicy
39
+ if @macos_version.is_mojave_or_earlier?
40
+ install_vmware_tools
41
+ set_spc_kextpolicy
42
+ end
39
43
  eject_image
40
44
  convert_image
41
45
  save_image
@@ -14,7 +14,7 @@ module Macinbox
14
14
  :memory_size => 2048,
15
15
  :cpu_count => 2,
16
16
  :short_name => "vagrant",
17
- :installer_path => "/Applications/Install macOS Mojave.app",
17
+ :installer_path => "/Applications/Install macOS Catalina.app",
18
18
  :vmware_path => "/Applications/VMware Fusion.app",
19
19
  :parallels_path => "/Applications/Parallels Desktop.app",
20
20
  :vmware_tools => true,
@@ -1,3 +1,3 @@
1
1
  module Macinbox
2
- VERSION = "3.4.0"
2
+ VERSION = "4.0.0"
3
3
  end
data/macinbox.gemspec CHANGED
@@ -18,14 +18,4 @@ Gem::Specification.new do |s|
18
18
  s.bindir = "exe"
19
19
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
-
22
- s.add_development_dependency "bundler", "~> 1.16"
23
- s.add_development_dependency "rake", "~> 10.0"
24
-
25
- s.required_ruby_version = '~> 2.3'
26
-
27
- s.requirements << "macOS Mojave"
28
- s.requirements << "macOS Mojave installer app"
29
- s.requirements << "Vagrant"
30
-
31
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macinbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Kramer
@@ -9,35 +9,7 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2019-11-13 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
12
+ dependencies: []
41
13
  description:
42
14
  email:
43
15
  - bacongravy@icloud.com
@@ -91,18 +63,15 @@ require_paths:
91
63
  - lib
92
64
  required_ruby_version: !ruby/object:Gem::Requirement
93
65
  requirements:
94
- - - "~>"
66
+ - - ">="
95
67
  - !ruby/object:Gem::Version
96
- version: '2.3'
68
+ version: '0'
97
69
  required_rubygems_version: !ruby/object:Gem::Requirement
98
70
  requirements:
99
71
  - - ">="
100
72
  - !ruby/object:Gem::Version
101
73
  version: '0'
102
- requirements:
103
- - macOS Mojave
104
- - macOS Mojave installer app
105
- - Vagrant
74
+ requirements: []
106
75
  rubygems_version: 3.0.3
107
76
  signing_key:
108
77
  specification_version: 4