macinbox 1.0.1 → 1.0.2
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/Gemfile.lock +1 -1
- data/lib/macinbox/actions/create_box_from_vmdk.rb +1 -0
- data/lib/macinbox/actions/create_image_from_installer.rb +2 -2
- data/lib/macinbox/actions/create_vmdk_from_image.rb +3 -7
- data/lib/macinbox/actions/install_box.rb +1 -1
- data/lib/macinbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99b011adb0f62501e0bbbf6fe41b354c4c698f11
|
|
4
|
+
data.tar.gz: f91366d4caa707cfda00119d5fa32d85841fb0d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f4756269191d2d7211ee52d946d8c97d4c42ae42fd6814d3e73f21d200aa18ce0a4d4f65e8629129520ac8b221a8ee4acfc6639c839ee558a0f096fe2d35ed9
|
|
7
|
+
data.tar.gz: 1ffe9d0be48525b0076603161bb017181263377dcf73ab3cbde19ff69f4b378b7b96baed595099d289a8e5d828d85222b7031fffed55d0a4f6e17d12ee43418d
|
data/Gemfile.lock
CHANGED
|
@@ -121,6 +121,7 @@ module Macinbox
|
|
|
121
121
|
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: true
|
|
122
122
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
123
123
|
config.vm.provider "vmware_fusion" do |v|
|
|
124
|
+
v.vmx["ethernet0.virtualDev"] = "e1000e"
|
|
124
125
|
v.gui = #{@gui}
|
|
125
126
|
end
|
|
126
127
|
end
|
|
@@ -114,9 +114,9 @@ module Macinbox
|
|
|
114
114
|
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ]
|
|
115
115
|
darwin_iso_url = "http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/#{bundle_short_version}/#{bundle_version}/packages/com.vmware.fusion.tools.darwin.zip.tar"
|
|
116
116
|
Dir.chdir(@temp_dir) do
|
|
117
|
-
Task.run %W[ curl
|
|
117
|
+
Task.run %W[ curl #{darwin_iso_url} -O ] + (@debug ? [] : %W[ -s -S ])
|
|
118
118
|
Task.run %W[ tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ]
|
|
119
|
-
Task.run %W[ unzip com.vmware.fusion.tools.darwin.zip payload/darwin.iso ]
|
|
119
|
+
Task.run %W[ unzip ] + (@debug ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ]
|
|
120
120
|
end
|
|
121
121
|
tools_image = "#{@temp_dir}/payload/darwin.iso"
|
|
122
122
|
end
|
|
@@ -30,16 +30,11 @@ module Macinbox
|
|
|
30
30
|
Logger.info "Mounting the image..." do
|
|
31
31
|
|
|
32
32
|
@collector.on_cleanup do
|
|
33
|
-
%x( hdiutil detach -quiet -force #{@mountpoint.shellescape} > /dev/null 2>&1 ) if @mountpoint
|
|
34
33
|
%x( diskutil eject #{@device.shellescape} > /dev/null 2>&1 ) if @device
|
|
35
34
|
end
|
|
36
35
|
|
|
37
|
-
@mountpoint = "#{@temp_dir}/image_mountpoint"
|
|
38
|
-
|
|
39
|
-
FileUtils.mkdir @mountpoint
|
|
40
|
-
|
|
41
36
|
@device = %x(
|
|
42
|
-
hdiutil attach #{@input_image.shellescape} -
|
|
37
|
+
hdiutil attach #{@input_image.shellescape} -nomount |
|
|
43
38
|
grep _partition_scheme |
|
|
44
39
|
cut -f1 |
|
|
45
40
|
tr -d [:space:]
|
|
@@ -55,7 +50,8 @@ module Macinbox
|
|
|
55
50
|
Task.run %W[ #{rawdiskCreator} create #{@device} fullDevice rawdisk lsilogic ]
|
|
56
51
|
Task.run %W[ #{vdiskmanager} -t 0 -r rawdisk.vmdk macinbox.vmdk ]
|
|
57
52
|
end
|
|
58
|
-
%
|
|
53
|
+
Task.run %W[ diskutil eject #{@device.shellescape} ]
|
|
54
|
+
@device = nil
|
|
59
55
|
end
|
|
60
56
|
|
|
61
57
|
Logger.info "Moving the VMDK to the destination..." do
|
|
@@ -21,7 +21,7 @@ module Macinbox
|
|
|
21
21
|
vagrant_boxes_dir = File.expand_path "~/.vagrant.d/boxes"
|
|
22
22
|
raise Macinbox::Error.new("~/.vagrant.d/boxes not found") unless File.exist? vagrant_boxes_dir
|
|
23
23
|
box_name = @box_name
|
|
24
|
-
box_version = Dir["#{vagrant_boxes_dir}/#{box_name}
|
|
24
|
+
box_version = Dir["#{vagrant_boxes_dir}/#{box_name}/*/*"].map { |o| o.split('/')[-2].to_i }.sort.last.next rescue 0
|
|
25
25
|
box_provider = "vmware_fusion"
|
|
26
26
|
target_box_dir = "#{vagrant_boxes_dir}/#{box_name}/#{box_version}/#{box_provider}"
|
|
27
27
|
raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir
|
data/lib/macinbox/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: macinbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Kramer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|