teleport 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/teleport/infer.rb +14 -13
- data/lib/teleport/mirror.rb +1 -0
- data/lib/teleport/run.sh +1 -1
- data/lib/teleport/version.rb +1 -1
- metadata +4 -4
data/lib/teleport/infer.rb
CHANGED
@@ -38,7 +38,7 @@ module Teleport
|
|
38
38
|
# official policies, either expressed or implied, of DevStructure.
|
39
39
|
#
|
40
40
|
# (for MD5SUMS)
|
41
|
-
|
41
|
+
|
42
42
|
MD5SUMS = {
|
43
43
|
'/etc/adduser.conf' => ['/usr/share/adduser/adduser.conf'],
|
44
44
|
'/etc/apparmor.d/tunables/home.d/ubuntu' =>
|
@@ -99,19 +99,19 @@ module Teleport
|
|
99
99
|
|
100
100
|
NEW_FILES_WITHIN = %w(cron.d logrotate.d rsyslog.d init)
|
101
101
|
CHECKSUM_FILES = %w(bash.bashrc environment inputrc rc.local ssh/ssh_config ssh/sshd_config)
|
102
|
-
|
102
|
+
|
103
103
|
def initialize
|
104
104
|
@telfile = []
|
105
105
|
|
106
106
|
if fails?("grep -q Ubuntu /etc/lsb-release")
|
107
107
|
fatal "Sorry, --infer can only run on an Ubuntu machine."
|
108
108
|
end
|
109
|
-
|
109
|
+
|
110
110
|
append "#" * 72
|
111
111
|
append "# Telfile inferred from #{`hostname`.strip} at #{Time.now}"
|
112
112
|
append "#" * 72
|
113
113
|
append
|
114
|
-
|
114
|
+
|
115
115
|
user
|
116
116
|
ruby
|
117
117
|
apt
|
@@ -138,14 +138,15 @@ module Teleport
|
|
138
138
|
when /Ruby Enterprise Edition/ then ruby = "REE"
|
139
139
|
when /1\.8\.7/ then ruby = "1.8.7"
|
140
140
|
when /1\.9\.2/ then ruby = "1.9.2"
|
141
|
-
when /1\.9\.3/ then ruby = "1.9.3"
|
141
|
+
when /1\.9\.3/ then ruby = "1.9.3"
|
142
142
|
end
|
143
143
|
append "ruby #{ruby.inspect}" if ruby
|
144
144
|
end
|
145
145
|
|
146
146
|
def apt
|
147
147
|
banner "Calculating apt sources and keys..."
|
148
|
-
list =
|
148
|
+
list = Dir["/etc/apt/sources.list.d/*.list"].sort
|
149
|
+
list = run_capture_lines("cat /etc/apt/sources.list #{list.join(" ")}")
|
149
150
|
list = list.grep(/^deb /).sort
|
150
151
|
list.each do |line|
|
151
152
|
if line =~ /^deb http:\/\/(\S+)\s+(\S+)/
|
@@ -163,7 +164,7 @@ module Teleport
|
|
163
164
|
end
|
164
165
|
|
165
166
|
def packages
|
166
|
-
banner "Looking for interesting packages..."
|
167
|
+
banner "Looking for interesting packages..."
|
167
168
|
@packages = Apt.new.added
|
168
169
|
if !@packages.empty?
|
169
170
|
append
|
@@ -175,7 +176,7 @@ module Teleport
|
|
175
176
|
end
|
176
177
|
|
177
178
|
def files
|
178
|
-
banner "Looking for interesting files..."
|
179
|
+
banner "Looking for interesting files..."
|
179
180
|
files = []
|
180
181
|
|
181
182
|
# read checksums from dpkg status
|
@@ -205,7 +206,7 @@ module Teleport
|
|
205
206
|
list = list.select { |i| fails?("dpkg -S #{i}") }
|
206
207
|
files += list
|
207
208
|
end
|
208
|
-
|
209
|
+
|
209
210
|
# now look for changed files from CHECKSUM_FILES
|
210
211
|
scan = CHECKSUM_FILES.map { |i| "/etc/#{i}" }
|
211
212
|
scan = scan.select { |i| File.file?(i) }
|
@@ -241,7 +242,7 @@ module Teleport
|
|
241
242
|
include Util
|
242
243
|
|
243
244
|
BLACKLIST = /^(linux-|grub-|cloud-init)/
|
244
|
-
|
245
|
+
|
245
246
|
Package = Struct.new(:name, :status, :deps, :base, :parents)
|
246
247
|
|
247
248
|
def initialize
|
@@ -276,7 +277,7 @@ module Teleport
|
|
276
277
|
pkg.parents = pkg.parents.sort.uniq
|
277
278
|
end
|
278
279
|
end
|
279
|
-
|
280
|
+
|
280
281
|
@packages
|
281
282
|
end
|
282
283
|
|
@@ -289,7 +290,7 @@ module Teleport
|
|
289
290
|
end
|
290
291
|
|
291
292
|
def base_packages
|
292
|
-
packages.select { |i| i.base }.map(&:name)
|
293
|
+
packages.select { |i| i.base }.map(&:name)
|
293
294
|
end
|
294
295
|
|
295
296
|
def ignored_packages
|
@@ -342,7 +343,7 @@ module Teleport
|
|
342
343
|
|
343
344
|
# blacklist
|
344
345
|
roots = roots.reject { |i| i =~ BLACKLIST }
|
345
|
-
|
346
|
+
|
346
347
|
roots.sort
|
347
348
|
end
|
348
349
|
end
|
data/lib/teleport/mirror.rb
CHANGED
data/lib/teleport/run.sh
CHANGED
data/lib/teleport/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teleport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: amazon-ec2
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: 1578862102269065251
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash:
|
148
|
+
hash: 1578862102269065251
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project: teleport
|
151
151
|
rubygems_version: 1.8.24
|