iesd 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/iesd.gemspec +1 -1
- data/lib/iesd/InstallESD/BaseSystem.dmg.rb +1 -1
- data/lib/iesd/InstallESD/Extensions.rb +1 -47
- data/lib/iesd/InstallESD/InstallESD.dmg.rb +2 -2
- data/lib/iesd/utility/kextcache.rb +31 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820dc77a28df65c45333a3f910cbb8fda1eea099
|
4
|
+
data.tar.gz: 8f96482b9edac3ea7dbc570fe516bd634453e950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7312647f7eb5c267f3da22306f4cb0e28c8c8b89daba60151ef4e54cd2ee75ec0de5c4d051d1252b3545d4dbdf3fa973886a59563ed1f1fd9c2c97e524a3c80
|
7
|
+
data.tar.gz: 7b5c2e6b0269c79ca9f0f49eae1e250a233907aecde2ac45959a8f5e63caddcfc5de461563cb75c34cdd2e413f78221a7319b9e8ae97f9accb8045417229ff07
|
data/iesd.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.required_ruby_version = ">= 1.9.2"
|
3
3
|
|
4
4
|
s.name = "iesd"
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.1"
|
6
6
|
s.summary = "Customize OS X InstallESD."
|
7
7
|
s.description = "Modify Extensions, Kextcache and Packages on InstallESD."
|
8
8
|
s.authors = "なつき"
|
@@ -54,7 +54,7 @@ module IESD
|
|
54
54
|
def update extensions
|
55
55
|
remove extensions[:remove]
|
56
56
|
install extensions[:install]
|
57
|
-
|
57
|
+
KextCache.update_volume @volume_root if extensions[:kextcache] or (extensions[:kextcache].nil? and !extensions[:up_to_date])
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
@@ -2,12 +2,11 @@ module IESD
|
|
2
2
|
class Extensions
|
3
3
|
EXTENSIONS = %w{ System Library Extensions }
|
4
4
|
|
5
|
-
attr_reader :volume_root, :url
|
5
|
+
attr_reader :volume_root, :url
|
6
6
|
|
7
7
|
def initialize volume_root
|
8
8
|
@volume_root = volume_root
|
9
9
|
@url = File.join @volume_root, *EXTENSIONS
|
10
|
-
@kextcache = IESD::Extensions::KextCache.new self
|
11
10
|
end
|
12
11
|
|
13
12
|
def remove kexts
|
@@ -29,50 +28,5 @@ module IESD
|
|
29
28
|
}
|
30
29
|
end
|
31
30
|
end
|
32
|
-
|
33
|
-
class KextCache
|
34
|
-
KEXTCACHE_DEFAULT_OPTIONS = %w{ -v 0 -no-authentication }
|
35
|
-
KERNELCACHE = %w{ System Library Caches com.apple.kext.caches Startup kernelcache }
|
36
|
-
MKEXT = %w{ System Library Caches com.apple.kext.caches Startup Extensions.mkext }
|
37
|
-
MKEXT_PPC = %w{ System Library Extensions.mkext }
|
38
|
-
|
39
|
-
attr_reader :volume_root, :url, :type
|
40
|
-
|
41
|
-
def initialize extensions
|
42
|
-
@extensions = extensions
|
43
|
-
@volume_root = extensions.volume_root
|
44
|
-
|
45
|
-
case
|
46
|
-
when (File.exist? (@url = File.join(@volume_root, *KERNELCACHE)))
|
47
|
-
@type = :kernelcache
|
48
|
-
when (File.exist? (@url = File.join(@volume_root, *MKEXT)))
|
49
|
-
@type = :mkext
|
50
|
-
when (File.exist? (@url = File.join(@volume_root, *MKEXT_PPC)))
|
51
|
-
@type = :mkext_ppc
|
52
|
-
else
|
53
|
-
@url = nil
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def update
|
58
|
-
if File.exist? (mach_kernel = File.join(@volume_root, "mach_kernel"))
|
59
|
-
oh1 "Updating Kextcache"
|
60
|
-
case @type
|
61
|
-
when :kernelcache
|
62
|
-
system(Utility::KEXTCACHE, *KEXTCACHE_DEFAULT_OPTIONS, "-prelinked-kernel", @url, "-kernel", mach_kernel, "-volume-root", @volume_root, "--", @extensions.url)
|
63
|
-
when :mkext
|
64
|
-
system(Utility::KEXTCACHE, *KEXTCACHE_DEFAULT_OPTIONS, *%w{ -a i386 -a x86_64 }, "-mkext", @url, "-kernel", mach_kernel, "-volume-root", @volume_root, "--", @extensions.url)
|
65
|
-
if File.exist? (mkext_ppc = File.join(@volume_root, *MKEXT_PPC))
|
66
|
-
system(Utility::DITTO, @url, mkext_ppc)
|
67
|
-
end
|
68
|
-
when :mkext_ppc
|
69
|
-
system(Utility::DITTO, *KEXTCACHE_DEFAULT_OPTIONS, *%w{ -a ppc -a i386 }, "-mkext", @url, "-kernel", mach_kernel, "-volume-root", @volume_root, "--", extensions.url)
|
70
|
-
end
|
71
|
-
puts "Updated: #{@url}"
|
72
|
-
else
|
73
|
-
opoo "kextcache aborted because mach_kernel is not available"
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
31
|
end
|
78
32
|
end
|
@@ -104,11 +104,11 @@ module IESD
|
|
104
104
|
class BaseSystem < IESD::DMG::BaseSystem
|
105
105
|
private
|
106
106
|
|
107
|
-
def
|
107
|
+
def pre_update_extension volume_root, options
|
108
108
|
|
109
109
|
end
|
110
110
|
|
111
|
-
def
|
111
|
+
def post_update_extension volume_root, options
|
112
112
|
if File.exist? (mach_kernel = File.join(volume_root, "mach_kernel"))
|
113
113
|
system(Utility::RM, mach_kernel)
|
114
114
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module KextCache
|
2
|
+
KEXTCACHE_DEFAULT_OPTIONS = %w{ -v 0 -no-authentication }
|
3
|
+
|
4
|
+
EXTENSIONS = %w{ System Library Extensions }
|
5
|
+
KERNELCACHE = %w{ System Library Caches com.apple.kext.caches Startup kernelcache }
|
6
|
+
MKEXT = %w{ System Library Caches com.apple.kext.caches Startup Extensions.mkext }
|
7
|
+
MKEXT_PPC = %w{ System Library Extensions.mkext }
|
8
|
+
|
9
|
+
def self.update_volume volume_root
|
10
|
+
oh1 "Updating Kextcache"
|
11
|
+
if File.exist? (mach_kernel = File.join(volume_root, "mach_kernel"))
|
12
|
+
case
|
13
|
+
when (File.exist? (url = File.join(volume_root, *KERNELCACHE)))
|
14
|
+
system(Utility::KEXTCACHE, *KEXTCACHE_DEFAULT_OPTIONS, "-prelinked-kernel", url, "-kernel", mach_kernel, "-volume-root", volume_root, "--", File.join(volume_root, *EXTENSIONS))
|
15
|
+
when (File.exist? (url = File.join(volume_root, *MKEXT)))
|
16
|
+
system(Utility::KEXTCACHE, *KEXTCACHE_DEFAULT_OPTIONS, *%w{ -a i386 -a x86_64 }, "-mkext", url, "-kernel", mach_kernel, "-volume-root", volume_root, "--", File.join(volume_root, *EXTENSIONS))
|
17
|
+
if File.exist? (mkext_ppc = File.join(volume_root, *MKEXT_PPC))
|
18
|
+
system(Utility::DITTO, url, mkext_ppc)
|
19
|
+
end
|
20
|
+
when (File.exist? (url = File.join(volume_root, *MKEXT_PPC)))
|
21
|
+
system(Utility::DITTO, *KEXTCACHE_DEFAULT_OPTIONS, *%w{ -a ppc -a i386 }, "-mkext", url, "-kernel", mach_kernel, "-volume-root", volume_root, "--", File.join(volume_root, *EXTENSIONS))
|
22
|
+
else
|
23
|
+
puts "kextcache aborted: unknown kernel cache type"
|
24
|
+
return
|
25
|
+
end
|
26
|
+
puts "Updated: #{url}"
|
27
|
+
else
|
28
|
+
opoo "kextcache aborted: mach_kernel not found"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iesd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "なつき"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Modify Extensions, Kextcache and Packages on InstallESD.
|
14
14
|
email: i@ntk.me
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- lib/iesd/InstallESD/Packages/OSUpgrade.pkg.rb
|
36
36
|
- lib/iesd/utility.rb
|
37
37
|
- lib/iesd/utility/hdiutil.rb
|
38
|
+
- lib/iesd/utility/kextcache.rb
|
38
39
|
- lib/iesd/utility/pkgutil.rb
|
39
40
|
- lib/iesd/utility/tty.rb
|
40
41
|
homepage: https://github.com/ntkme/iesd
|