crash-watch 1.1.5 → 1.1.8
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.
- data.tar.gz.asc +7 -7
- data/LICENSE.txt +1 -1
- data/README.markdown +22 -4
- data/Rakefile +420 -4
- data/bin/crash-watch +7 -1
- data/crash-watch.gemspec +2 -10
- data/lib/crash_watch/packaging.rb +14 -0
- data/lib/crash_watch/version.rb +1 -1
- metadata +3 -2
- metadata.gz.asc +7 -7
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJRnnRBAAoJECrHRaUKISqMN28H/3ScjJga1Aqi/5EONbkGd9p0
|
6
|
+
LN43oEbYL5Y1dhSfVK+bV9a5oGKFStTPmHcWkUontQjzHJMoT/LlcXd7QLYnfYga
|
7
|
+
7wWC/wv5ro9tybNQm20T2RLcGijkH2UHo5Cod8nolPcBf13IBlcuL2JjOsbS63Z5
|
8
|
+
spGky9E43K0nVG61zHN5DVX8R1XhtI7yVZ9B77y3hNezpM0jac5LfVSUL/5+cz9O
|
9
|
+
lpe3roWqAzSV8h2kKvm9297qMb0v8rVwxO4nqsgp9xsz3YiDppjLq1w6qdy/CZvc
|
10
|
+
N78ijnXnJum7pG0muNoexTD/5Yvwa7Df8fLjEAj5GO9vJ7v31lMfaW9ZEar+XLE=
|
11
|
+
=QiiL
|
12
12
|
-----END PGP SIGNATURE-----
|
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
@@ -7,7 +7,9 @@
|
|
7
7
|
|
8
8
|
`crash-watch` to the rescue! This little program will monitor a specified process and wait until it crashes. It will then print useful information such as its exit status, what signal caused it to abort, and its backtrace.
|
9
9
|
|
10
|
-
## Installation
|
10
|
+
## Installation with RubyGems
|
11
|
+
|
12
|
+
Run:
|
11
13
|
|
12
14
|
gem install crash-watch
|
13
15
|
|
@@ -16,12 +18,28 @@ You must also have GDB installed. Mac OS X already has it by default. If you're
|
|
16
18
|
apt-get install gdb
|
17
19
|
yum install gdb
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
Our gem is signed using PGP with the [Phusion Software Signing key](http://www.phusion.nl/about/gpg). That key in turn is signed by [the rubygems-openpgp Certificate Authority](http://www.rubygems-openpgp-ca.org/).
|
21
|
+
This gem is signed using PGP with the [Phusion Software Signing key](http://www.phusion.nl/about/gpg). That key in turn is signed by [the rubygems-openpgp Certificate Authority](http://www.rubygems-openpgp-ca.org/).
|
22
22
|
|
23
23
|
You can verify the authenticity of the gem by following [The Complete Guide to Verifying Gems with rubygems-openpgp](http://www.rubygems-openpgp-ca.org/blog/the-complete-guide-to-verifying-gems-with-rubygems-openpgp.html).
|
24
24
|
|
25
|
+
## Installation on Ubuntu
|
26
|
+
|
27
|
+
Use our [PPA](https://launchpad.net/~phusion.nl/+archive/misc):
|
28
|
+
|
29
|
+
sudo add-apt-repository ppa:phusion.nl/misc
|
30
|
+
sudo apt-get update
|
31
|
+
sudo apt-get install crash-watch
|
32
|
+
|
33
|
+
## Installation on Debian
|
34
|
+
|
35
|
+
Our Ubuntu Lucid packages are compatible with Debian 6.
|
36
|
+
|
37
|
+
sudo sh -c 'echo deb http://ppa.launchpad.net/phusion.nl/misc/ubuntu lucid main > /etc/apt/sources.list.d/phusion-misc.list'
|
38
|
+
sudo sh -c 'echo deb-src http://ppa.launchpad.net/phusion.nl/misc/ubuntu lucid main >> /etc/apt/sources.list.d/phusion-misc.list'
|
39
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2AC745A50A212A8C
|
40
|
+
sudo apt-get update
|
41
|
+
sudo apt-get install crash-watch
|
42
|
+
|
25
43
|
## Sample usage
|
26
44
|
|
27
45
|
$ crash-watch <PID>
|
data/Rakefile
CHANGED
@@ -1,15 +1,431 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/lib"))
|
2
2
|
require 'crash_watch/version'
|
3
3
|
|
4
|
+
PACKAGE_NAME = "crash-watch"
|
5
|
+
PACKAGE_VERSION = CrashWatch::VERSION_STRING
|
6
|
+
PACKAGE_SIGNING_KEY = "0x0A212A8C"
|
7
|
+
MAINTAINER_NAME = "Hongli Lai"
|
8
|
+
MAINTAINER_EMAIL = "hongli@phusion.nl"
|
9
|
+
|
10
|
+
desc "Run unit tests"
|
11
|
+
task :test do
|
12
|
+
ruby "-S spec -f s -c test/*_spec.rb"
|
13
|
+
end
|
14
|
+
|
4
15
|
desc "Build, sign & upload gem"
|
5
16
|
task 'package:release' do
|
6
|
-
sh "git tag -s release-#{
|
7
|
-
sh "gem build
|
17
|
+
sh "git tag -s release-#{PACKAGE_VERSION}"
|
18
|
+
sh "gem build #{PACKAGE_NAME}.gemspec --sign --key #{PACKAGE_SIGNING_KEY}"
|
8
19
|
puts "Proceed with pushing tag to Github and uploading the gem? [y/n]"
|
9
20
|
if STDIN.readline == "y\n"
|
10
|
-
sh "git push origin release-#{
|
11
|
-
sh "gem push
|
21
|
+
sh "git push origin release-#{PACKAGE_VERSION}"
|
22
|
+
sh "gem push #{PACKAGE_NAME}-#{PACKAGE_VERSION}.gem"
|
12
23
|
else
|
13
24
|
puts "Did not upload the gem."
|
14
25
|
end
|
15
26
|
end
|
27
|
+
|
28
|
+
|
29
|
+
##### Utilities #####
|
30
|
+
|
31
|
+
def string_option(name, default_value = nil)
|
32
|
+
value = ENV[name]
|
33
|
+
if value.nil? || value.empty?
|
34
|
+
return default_value
|
35
|
+
else
|
36
|
+
return value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def boolean_option(name, default_value = false)
|
41
|
+
value = ENV[name]
|
42
|
+
if value.nil? || value.empty?
|
43
|
+
return default_value
|
44
|
+
else
|
45
|
+
return value == "yes" || value == "on" || value == "true" || value == "1"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
##### Debian packaging support #####
|
51
|
+
|
52
|
+
PKG_DIR = string_option('PKG_DIR', "pkg")
|
53
|
+
DEBIAN_NAME = PACKAGE_NAME
|
54
|
+
ALL_DISTRIBUTIONS = ["raring", "precise", "lucid"]
|
55
|
+
ORIG_TARBALL_FILES = lambda do
|
56
|
+
require 'crash_watch/packaging'
|
57
|
+
Dir[*CRASH_WATCH_FILES] - Dir[*CRASH_WATCH_EXCLUDE_FILES]
|
58
|
+
end
|
59
|
+
|
60
|
+
# Implements a simple preprocessor language:
|
61
|
+
#
|
62
|
+
# Today
|
63
|
+
# #if @today == :fine
|
64
|
+
# is a fine day.
|
65
|
+
# #elif @today == :good
|
66
|
+
# is a good day.
|
67
|
+
# #else
|
68
|
+
# is a sad day.
|
69
|
+
# #endif
|
70
|
+
# Let's go walking.
|
71
|
+
#
|
72
|
+
# When run with...
|
73
|
+
#
|
74
|
+
# Preprocessor.new.start('input.txt', 'output.txt', :today => :fine)
|
75
|
+
#
|
76
|
+
# ...will produce:
|
77
|
+
#
|
78
|
+
# Today
|
79
|
+
# is a fine day.
|
80
|
+
# Let's go walking.
|
81
|
+
#
|
82
|
+
# Highlights:
|
83
|
+
#
|
84
|
+
# * #if blocks can be nested.
|
85
|
+
# * Expressions are Ruby expressions, evaluated within the binding of a
|
86
|
+
# Preprocessor::Evaluator object.
|
87
|
+
# * Text inside #if/#elif/#else are automatically unindented.
|
88
|
+
class Preprocessor
|
89
|
+
def initialize
|
90
|
+
@indentation_size = 4
|
91
|
+
@debug = boolean_option('DEBUG')
|
92
|
+
end
|
93
|
+
|
94
|
+
def start(filename, output_filename, variables = {})
|
95
|
+
if output_filename
|
96
|
+
temp_output_filename = "#{output_filename}._new"
|
97
|
+
output = File.open(temp_output_filename, 'w')
|
98
|
+
else
|
99
|
+
output = STDOUT
|
100
|
+
end
|
101
|
+
the_binding = create_binding(variables)
|
102
|
+
context = []
|
103
|
+
@lineno = 1
|
104
|
+
@indentation = 0
|
105
|
+
|
106
|
+
each_line(filename) do |line|
|
107
|
+
debug("context=#{context.inspect}, line=#{line.inspect}")
|
108
|
+
|
109
|
+
name, args_string, cmd_indentation = recognize_command(line)
|
110
|
+
case name
|
111
|
+
when "if"
|
112
|
+
case context.last
|
113
|
+
when nil, :if_true, :else_true
|
114
|
+
check_indentation(cmd_indentation)
|
115
|
+
result = the_binding.eval(args_string, filename, @lineno)
|
116
|
+
context.push(result ? :if_true : :if_false)
|
117
|
+
inc_indentation
|
118
|
+
when :if_false, :else_false, :if_ignore
|
119
|
+
check_indentation(cmd_indentation)
|
120
|
+
inc_indentation
|
121
|
+
context.push(:if_ignore)
|
122
|
+
else
|
123
|
+
terminate "#if is not allowed in this context"
|
124
|
+
end
|
125
|
+
when "elif"
|
126
|
+
case context.last
|
127
|
+
when :if_true
|
128
|
+
dec_indentation
|
129
|
+
check_indentation(cmd_indentation)
|
130
|
+
inc_indentation
|
131
|
+
context[-1] = :if_false
|
132
|
+
when :if_false
|
133
|
+
dec_indentation
|
134
|
+
check_indentation(cmd_indentation)
|
135
|
+
inc_indentation
|
136
|
+
result = the_binding.eval(args_string, filename, @lineno)
|
137
|
+
context[-1] = result ? :if_true : :if_false
|
138
|
+
when :else_true, :else_false
|
139
|
+
terminate "#elif is not allowed after #else"
|
140
|
+
when :if_ignore
|
141
|
+
dec_indentation
|
142
|
+
check_indentation(cmd_indentation)
|
143
|
+
inc_indentation
|
144
|
+
else
|
145
|
+
terminate "#elif is not allowed outside #if block"
|
146
|
+
end
|
147
|
+
when "else"
|
148
|
+
case context.last
|
149
|
+
when :if_true
|
150
|
+
dec_indentation
|
151
|
+
check_indentation(cmd_indentation)
|
152
|
+
inc_indentation
|
153
|
+
context[-1] = :else_false
|
154
|
+
when :if_false
|
155
|
+
dec_indentation
|
156
|
+
check_indentation(cmd_indentation)
|
157
|
+
inc_indentation
|
158
|
+
context[-1] = :else_true
|
159
|
+
when :else_true, :else_false
|
160
|
+
terminate "it is not allowed to have multiple #else clauses in one #if block"
|
161
|
+
when :if_ignore
|
162
|
+
dec_indentation
|
163
|
+
check_indentation(cmd_indentation)
|
164
|
+
inc_indentation
|
165
|
+
else
|
166
|
+
terminate "#else is not allowed outside #if block"
|
167
|
+
end
|
168
|
+
when "endif"
|
169
|
+
case context.last
|
170
|
+
when :if_true, :if_false, :else_true, :else_false, :if_ignore
|
171
|
+
dec_indentation
|
172
|
+
check_indentation(cmd_indentation)
|
173
|
+
context.pop
|
174
|
+
else
|
175
|
+
terminate "#endif is not allowed outside #if block"
|
176
|
+
end
|
177
|
+
when "", nil
|
178
|
+
# Either a comment or not a preprocessor command.
|
179
|
+
case context.last
|
180
|
+
when nil, :if_true, :else_true
|
181
|
+
output.puts(unindent(line))
|
182
|
+
else
|
183
|
+
# Check indentation but do not output.
|
184
|
+
unindent(line)
|
185
|
+
end
|
186
|
+
else
|
187
|
+
terminate "Unrecognized preprocessor command ##{name.inspect}"
|
188
|
+
end
|
189
|
+
|
190
|
+
@lineno += 1
|
191
|
+
end
|
192
|
+
ensure
|
193
|
+
if output_filename && output
|
194
|
+
output.close
|
195
|
+
stat = File.stat(filename)
|
196
|
+
File.chmod(stat.mode, temp_output_filename)
|
197
|
+
File.chown(stat.uid, stat.gid, temp_output_filename) rescue nil
|
198
|
+
File.rename(temp_output_filename, output_filename)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
private
|
203
|
+
UBUNTU_DISTRIBUTIONS = {
|
204
|
+
"lucid" => "10.04",
|
205
|
+
"maverick" => "10.10",
|
206
|
+
"natty" => "11.04",
|
207
|
+
"oneiric" => "11.10",
|
208
|
+
"precise" => "12.04",
|
209
|
+
"quantal" => "12.10",
|
210
|
+
"raring" => "13.04",
|
211
|
+
"saucy" => "13.10"
|
212
|
+
}
|
213
|
+
|
214
|
+
# Provides the DSL that's accessible within.
|
215
|
+
class Evaluator
|
216
|
+
def _infer_distro_table(name)
|
217
|
+
if UBUNTU_DISTRIBUTIONS.has_key?(name)
|
218
|
+
return UBUNTU_DISTRIBUTIONS
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
def is_distribution?(expr)
|
223
|
+
if @distribution.nil?
|
224
|
+
raise "The :distribution variable must be set"
|
225
|
+
else
|
226
|
+
if expr =~ /^(>=|>|<=|<|==|\!=)[\s]*(.+)/
|
227
|
+
comparator = $1
|
228
|
+
name = $2
|
229
|
+
else
|
230
|
+
raise "Invalid expression #{expr.inspect}"
|
231
|
+
end
|
232
|
+
|
233
|
+
table1 = _infer_distro_table(@distribution)
|
234
|
+
table2 = _infer_distro_table(name)
|
235
|
+
raise "Distribution name #{@distribution.inspect} not recognized" if !table1
|
236
|
+
raise "Distribution name #{name.inspect} not recognized" if !table2
|
237
|
+
v1 = table1[@distribution]
|
238
|
+
v2 = table2[name]
|
239
|
+
|
240
|
+
case comparator
|
241
|
+
when ">"
|
242
|
+
return v1 > v2
|
243
|
+
when ">="
|
244
|
+
return v1 >= v2
|
245
|
+
when "<"
|
246
|
+
return v1 < v2
|
247
|
+
when "<="
|
248
|
+
return v1 <= v2
|
249
|
+
when "=="
|
250
|
+
return v1 == v2
|
251
|
+
when "!="
|
252
|
+
return v1 != v2
|
253
|
+
else
|
254
|
+
raise "BUG"
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
def each_line(filename)
|
261
|
+
File.open(filename, 'r') do |f|
|
262
|
+
while true
|
263
|
+
begin
|
264
|
+
line = f.readline.chomp
|
265
|
+
rescue EOFError
|
266
|
+
break
|
267
|
+
end
|
268
|
+
yield line
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
def recognize_command(line)
|
274
|
+
if line =~ /^([\s\t]*)#(.+)/
|
275
|
+
indentation_str = $1
|
276
|
+
command = $2
|
277
|
+
name = command.scan(/^\w+/).first
|
278
|
+
args_string = command.sub(/^#{Regexp.escape(name)}[\s\t]*/, '')
|
279
|
+
return [name, args_string, indentation_str.to_s.size]
|
280
|
+
else
|
281
|
+
return nil
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
def create_binding(variables)
|
286
|
+
object = Evaluator.new
|
287
|
+
variables.each_pair do |key, val|
|
288
|
+
object.send(:instance_variable_set, "@#{key}", val)
|
289
|
+
end
|
290
|
+
return object.instance_eval do
|
291
|
+
binding
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
def inc_indentation
|
296
|
+
@indentation += @indentation_size
|
297
|
+
end
|
298
|
+
|
299
|
+
def dec_indentation
|
300
|
+
@indentation -= @indentation_size
|
301
|
+
end
|
302
|
+
|
303
|
+
def check_indentation(expected)
|
304
|
+
if expected != @indentation
|
305
|
+
terminate "wrong indentation: found #{expected} characters, should be #{@indentation}"
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
def unindent(line)
|
310
|
+
line =~ /^([\s\t]*)/
|
311
|
+
found = $1.to_s.size
|
312
|
+
if found >= @indentation
|
313
|
+
return line[@indentation .. -1]
|
314
|
+
else
|
315
|
+
terminate "wrong indentation: found #{found} characters, should be at least #{@indentation}"
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
def debug(message)
|
320
|
+
puts "DEBUG:#{@lineno}: #{message}" if @debug
|
321
|
+
end
|
322
|
+
|
323
|
+
def terminate(message)
|
324
|
+
abort "*** ERROR: line #{@lineno}: #{message}"
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
def recursive_copy_files(files, destination_dir, preprocess = false, variables = {})
|
329
|
+
require 'fileutils' if !defined?(FileUtils)
|
330
|
+
files.each_with_index do |filename, i|
|
331
|
+
dir = File.dirname(filename)
|
332
|
+
if !File.exist?("#{destination_dir}/#{dir}")
|
333
|
+
FileUtils.mkdir_p("#{destination_dir}/#{dir}")
|
334
|
+
end
|
335
|
+
if !File.directory?(filename)
|
336
|
+
if preprocess && filename =~ /\.template$/
|
337
|
+
real_filename = filename.sub(/\.template$/, '')
|
338
|
+
FileUtils.install(filename, "#{destination_dir}/#{real_filename}")
|
339
|
+
Preprocessor.new.start(filename, "#{destination_dir}/#{real_filename}",
|
340
|
+
variables)
|
341
|
+
else
|
342
|
+
FileUtils.install(filename, "#{destination_dir}/#{filename}")
|
343
|
+
end
|
344
|
+
end
|
345
|
+
printf "\r[%5d/%5d] [%3.0f%%] Copying files...", i + 1, files.size, i * 100.0 / files.size
|
346
|
+
STDOUT.flush
|
347
|
+
end
|
348
|
+
printf "\r[%5d/%5d] [%3.0f%%] Copying files...\n", files.size, files.size, 100
|
349
|
+
end
|
350
|
+
|
351
|
+
def create_debian_package_dir(distribution)
|
352
|
+
require 'time'
|
353
|
+
|
354
|
+
variables = {
|
355
|
+
:distribution => distribution
|
356
|
+
}
|
357
|
+
|
358
|
+
root = "#{PKG_DIR}/#{distribution}"
|
359
|
+
sh "rm -rf #{root}"
|
360
|
+
sh "mkdir -p #{root}"
|
361
|
+
recursive_copy_files(ORIG_TARBALL_FILES.call, root)
|
362
|
+
recursive_copy_files(Dir["debian.template/**/*"], root,
|
363
|
+
true, variables)
|
364
|
+
sh "mv #{root}/debian.template #{root}/debian"
|
365
|
+
changelog = File.read("#{root}/debian/changelog")
|
366
|
+
changelog =
|
367
|
+
"#{DEBIAN_NAME} (#{PACKAGE_VERSION}-1~#{distribution}1) #{distribution}; urgency=low\n" +
|
368
|
+
"\n" +
|
369
|
+
" * Package built.\n" +
|
370
|
+
"\n" +
|
371
|
+
" -- #{MAINTAINER_NAME} <#{MAINTAINER_EMAIL}> #{Time.now.rfc2822}\n\n" +
|
372
|
+
changelog
|
373
|
+
File.open("#{root}/debian/changelog", "w") do |f|
|
374
|
+
f.write(changelog)
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
task 'debian:orig_tarball' do
|
379
|
+
if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}.orig.tar.gz")
|
380
|
+
puts "Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists."
|
381
|
+
else
|
382
|
+
sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
383
|
+
sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
384
|
+
recursive_copy_files(ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
|
385
|
+
sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
desc "Build Debian source and binary package(s) for local testing"
|
390
|
+
task 'debian:dev' do
|
391
|
+
sh "rm -f #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
392
|
+
Rake::Task["debian:clean"].invoke
|
393
|
+
Rake::Task["debian:orig_tarball"].invoke
|
394
|
+
case distro = string_option('DISTRO', 'current')
|
395
|
+
when 'current'
|
396
|
+
distributions = [File.read("/etc/lsb-release").scan(/^DISTRIB_CODENAME=(.+)/).first.first]
|
397
|
+
when 'all'
|
398
|
+
distributions = ALL_DISTRIBUTIONS
|
399
|
+
else
|
400
|
+
distributions = distro.split(',')
|
401
|
+
end
|
402
|
+
distributions.each do |distribution|
|
403
|
+
create_debian_package_dir(distribution)
|
404
|
+
sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
|
405
|
+
end
|
406
|
+
distributions.each do |distribution|
|
407
|
+
sh "cd #{PKG_DIR}/#{distribution} && debuild -F -us -uc"
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
desc "Build Debian source packages to be uploaded to repositories"
|
412
|
+
task 'debian:production' => 'debian:orig_tarball' do
|
413
|
+
ALL_DISTRIBUTIONS.each do |distribution|
|
414
|
+
create_debian_package_dir(distribution)
|
415
|
+
sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
|
416
|
+
end
|
417
|
+
ALL_DISTRIBUTIONS.each do |distribution|
|
418
|
+
sh "cd #{PKG_DIR}/#{distribution} && debuild -S -sa -k#{PACKAGE_SIGNING_KEY}"
|
419
|
+
end
|
420
|
+
end
|
421
|
+
|
422
|
+
desc "Clean Debian packaging products, except for orig tarball"
|
423
|
+
task 'debian:clean' do
|
424
|
+
files = Dir["#{PKG_DIR}/*.{changes,build,deb,dsc,upload}"]
|
425
|
+
sh "rm -f #{files.join(' ')}"
|
426
|
+
sh "rm -rf #{PKG_DIR}/dev"
|
427
|
+
ALL_DISTRIBUTIONS.each do |distribution|
|
428
|
+
sh "rm -rf #{PKG_DIR}/#{distribution}"
|
429
|
+
end
|
430
|
+
sh "rm -rf #{PKG_DIR}/*.debian.tar.gz"
|
431
|
+
end
|
data/bin/crash-watch
CHANGED
@@ -75,7 +75,13 @@ begin
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
else
|
78
|
-
puts "Cannot attach to process."
|
78
|
+
puts "ERROR: Cannot attach to process."
|
79
|
+
if File.exist?("/proc/sys/kernel/yama/ptrace_scope")
|
80
|
+
puts
|
81
|
+
puts "This may be the result of kernel ptrace() hardening. Try disabling it with:"
|
82
|
+
puts " sudo sh -c 'echo 0 > /proc/sys/kernel/yama/ptrace_scope'"
|
83
|
+
puts "See http://askubuntu.com/questions/41629/after-upgrade-gdb-wont-attach-to-process for more information."
|
84
|
+
end
|
79
85
|
exit 2
|
80
86
|
end
|
81
87
|
ensure
|
data/crash-watch.gemspec
CHANGED
@@ -1,22 +1,14 @@
|
|
1
1
|
require File.expand_path('lib/crash_watch/version', File.dirname(__FILE__))
|
2
|
+
require File.expand_path('lib/crash_watch/packaging', File.dirname(__FILE__))
|
2
3
|
|
3
4
|
Gem::Specification.new do |s|
|
4
5
|
s.name = "crash-watch"
|
5
6
|
s.version = CrashWatch::VERSION_STRING
|
6
7
|
s.authors = ["Hongli Lai"]
|
7
|
-
s.date = "2013-03-17"
|
8
8
|
s.description = "Monitor processes and display useful information when they crash."
|
9
9
|
s.summary = "Monitor processes and display useful information when they crash"
|
10
10
|
s.email = "software-signing@phusion.nl"
|
11
|
-
s.files = Dir[
|
12
|
-
"README.markdown",
|
13
|
-
"LICENSE.txt",
|
14
|
-
"Rakefile",
|
15
|
-
"crash-watch.gemspec",
|
16
|
-
"bin/**/*",
|
17
|
-
"lib/**/*",
|
18
|
-
"test/**/*"
|
19
|
-
]
|
11
|
+
s.files = Dir[*CRASH_WATCH_FILES]
|
20
12
|
s.homepage = "https://github.com/FooBarWidget/crash-watch"
|
21
13
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
14
|
s.executables = ["crash-watch"]
|
data/lib/crash_watch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crash-watch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
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: 2013-
|
12
|
+
date: 2013-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- crash-watch.gemspec
|
57
57
|
- bin/crash-watch
|
58
58
|
- lib/crash_watch/gdb_controller.rb
|
59
|
+
- lib/crash_watch/packaging.rb
|
59
60
|
- lib/crash_watch/version.rb
|
60
61
|
- test/gdb_controller_spec.rb
|
61
62
|
homepage: https://github.com/FooBarWidget/crash-watch
|
metadata.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJRnnRBAAoJECrHRaUKISqM2kAIAJuFG1kFUVcJ4e34c+lshduf
|
6
|
+
Ntb3Urm5ygDBYUGM8BaW/9W9ncpIyrlB2QFZl/T4RHTCaseQ/gYAQ37xOKoN9aZf
|
7
|
+
8FIpmpL980nbixThjZmEVnMQDCM8GICW8loHtSDmY++vcnyxmMeSTZQMSIis+8SR
|
8
|
+
ko5HoG2bAoyVaqFlkDvw871Qyz9yDqvVX5OQ5cqgzdfi6tGszwB9FvEOwK2W6Wkt
|
9
|
+
D95hfBqrH6JQrRD3+9nZjcnNcHvCnEhvGZtRQyrUs9gk4mRtZXXPOWmQuoalbiL5
|
10
|
+
m1uEy7eyF8qM2e/PCsiJgTwgVSl+MG+NVixsDkcBx14HuwzWaBCAMDrA2is8OG8=
|
11
|
+
=R2yM
|
12
12
|
-----END PGP SIGNATURE-----
|