crash-watch 1.1.11 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.asc +7 -7
- data/README.markdown +17 -0
- data/Rakefile +112 -4
- data/lib/crash_watch/packaging.rb +2 -1
- data/lib/crash_watch/version.rb +1 -1
- metadata +11 -5
- metadata.gz.asc +7 -7
- checksums.yaml +0 -15
- checksums.yaml.gz.asc +0 -12
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
|
+
iQEcBAABAgAGBQJSquFeAAoJECrHRaUKISqMjVAH/3vmRFJcHZ46nJxbEYA7G/oA
|
6
|
+
E+5pfLBk56jGN8aZG2Sbpcs8hlFv1f2wZY58rJc3NgzcFNci4nW/Ej9EkYqIKTz4
|
7
|
+
9Q1ucCNH1muiyMMMhxcVnkYFXibWM+0h3Fu62LuCmHl80IdMB4xVpR+TBvUN3yBE
|
8
|
+
lLFhQjISPBg6pTwAa6YYt0YASmBGIjg1064EHXfsEUKkCYp+SZS69GJThNyFrBdb
|
9
|
+
ydzEmoelWA7R7h4EAS1dDZVwpUk2S2P6Lw8WNCx/JnRZXI8V5b3XRxLmrE0LUICy
|
10
|
+
uCUlIqRa7tRMDpM8wVXrLY+9pVX505aCIiPeeGFHphg8/qlEAUHE4CPElwo1JbA=
|
11
|
+
=BJQc
|
12
12
|
-----END PGP SIGNATURE-----
|
data/README.markdown
CHANGED
@@ -40,6 +40,23 @@ Our Ubuntu Lucid packages are compatible with Debian 6.
|
|
40
40
|
sudo apt-get update
|
41
41
|
sudo apt-get install crash-watch
|
42
42
|
|
43
|
+
## Installation on RHEL, CentOS and Amazon Linux
|
44
|
+
|
45
|
+
1. Enable EPEL: [RHEL](https://fedoraproject.org/wiki/EPEL), [CentOS](http://www.centosblog.com/enable-epel-repo-on-centos-5-and-centos-6/), [Amazon Linux](http://aws.amazon.com/amazon-linux-ami/faqs/#epel).
|
46
|
+
2. Enable our YUM repository:
|
47
|
+
|
48
|
+
# RHEL 6, CentOS 6
|
49
|
+
curl -L https://oss-binaries.phusionpassenger.com/yumgems/phusion-misc/el.repo | \
|
50
|
+
sudo tee /etc/yum.repos.d/phusion-misc.repo
|
51
|
+
|
52
|
+
# Amazon Linux
|
53
|
+
curl -L https://oss-binaries.phusionpassenger.com/yumgems/phusion-misc/amazon.repo | \
|
54
|
+
sudo tee /etc/yum.repos.d/phusion-misc.repo
|
55
|
+
|
56
|
+
3. Install our package:
|
57
|
+
|
58
|
+
sudo yum install rubygem-crash-watch
|
59
|
+
|
43
60
|
## Sample usage
|
44
61
|
|
45
62
|
$ crash-watch <PID>
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/lib"))
|
2
2
|
require 'crash_watch/version'
|
3
|
+
require 'tmpdir'
|
3
4
|
|
4
5
|
PACKAGE_NAME = "crash-watch"
|
5
6
|
PACKAGE_VERSION = CrashWatch::VERSION_STRING
|
@@ -51,13 +52,15 @@ end
|
|
51
52
|
|
52
53
|
PKG_DIR = string_option('PKG_DIR', "pkg")
|
53
54
|
DEBIAN_NAME = PACKAGE_NAME
|
54
|
-
|
55
|
+
DEBIAN_PACKAGE_REVISION = 2
|
56
|
+
ALL_DISTRIBUTIONS = string_option('DEBIAN_DISTROS', 'saucy precise lucid').split(/[ ,]/)
|
55
57
|
ORIG_TARBALL_FILES = lambda do
|
56
58
|
require 'crash_watch/packaging'
|
57
59
|
Dir[*CRASH_WATCH_FILES] - Dir[*CRASH_WATCH_EXCLUDE_FILES]
|
58
60
|
end
|
59
61
|
|
60
|
-
# Implements a simple preprocessor language
|
62
|
+
# Implements a simple preprocessor language which combines elements in the C
|
63
|
+
# preprocessor with ERB:
|
61
64
|
#
|
62
65
|
# Today
|
63
66
|
# #if @today == :fine
|
@@ -68,6 +71,7 @@ end
|
|
68
71
|
# is a sad day.
|
69
72
|
# #endif
|
70
73
|
# Let's go walking.
|
74
|
+
# Today is <%= Time.now %>.
|
71
75
|
#
|
72
76
|
# When run with...
|
73
77
|
#
|
@@ -78,6 +82,7 @@ end
|
|
78
82
|
# Today
|
79
83
|
# is a fine day.
|
80
84
|
# Let's go walking.
|
85
|
+
# Today is 2013-08-11 22:37:06 +0200.
|
81
86
|
#
|
82
87
|
# Highlights:
|
83
88
|
#
|
@@ -85,6 +90,7 @@ end
|
|
85
90
|
# * Expressions are Ruby expressions, evaluated within the binding of a
|
86
91
|
# Preprocessor::Evaluator object.
|
87
92
|
# * Text inside #if/#elif/#else are automatically unindented.
|
93
|
+
# * ERB compatible.
|
88
94
|
class Preprocessor
|
89
95
|
def initialize
|
90
96
|
require 'erb' if !defined?(ERB)
|
@@ -219,6 +225,12 @@ private
|
|
219
225
|
"squeeze" => "20110206",
|
220
226
|
"wheezy" => "20130504"
|
221
227
|
}
|
228
|
+
REDHAT_ENTERPRISE_DISTRIBUTIONS = {
|
229
|
+
"el6" => "el6.0"
|
230
|
+
}
|
231
|
+
AMAZON_DISTRIBUTIONS = {
|
232
|
+
"amazon" => "amazon"
|
233
|
+
}
|
222
234
|
|
223
235
|
# Provides the DSL that's accessible within.
|
224
236
|
class Evaluator
|
@@ -227,6 +239,10 @@ private
|
|
227
239
|
return UBUNTU_DISTRIBUTIONS
|
228
240
|
elsif DEBIAN_DISTRIBUTIONS.has_key?(name)
|
229
241
|
return DEBIAN_DISTRIBUTIONS
|
242
|
+
elsif REDHAT_ENTERPRISE_DISTRIBUTIONS.has_key?(name)
|
243
|
+
return REDHAT_ENTERPRISE_DISTRIBUTIONS
|
244
|
+
elsif AMAZON_DISTRIBUTIONS.has_key?(name)
|
245
|
+
return AMAZON_DISTRIBUTIONS
|
230
246
|
end
|
231
247
|
end
|
232
248
|
|
@@ -397,7 +413,7 @@ def create_debian_package_dir(distribution)
|
|
397
413
|
sh "mv #{root}/debian.template #{root}/debian"
|
398
414
|
changelog = File.read("#{root}/debian/changelog")
|
399
415
|
changelog =
|
400
|
-
"#{DEBIAN_NAME} (#{PACKAGE_VERSION}
|
416
|
+
"#{DEBIAN_NAME} (#{PACKAGE_VERSION}-#{DEBIAN_PACKAGE_REVISION}~#{distribution}1) #{distribution}; urgency=low\n" +
|
401
417
|
"\n" +
|
402
418
|
" * Package built.\n" +
|
403
419
|
"\n" +
|
@@ -415,7 +431,8 @@ task 'debian:orig_tarball' do
|
|
415
431
|
sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
416
432
|
sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
417
433
|
recursive_copy_files(ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
|
418
|
-
sh "cd #{PKG_DIR} &&
|
434
|
+
sh "cd #{PKG_DIR} && find #{DEBIAN_NAME}_#{PACKAGE_VERSION} -print0 | xargs -0 touch -d '2013-10-27 00:00:00 UTC'"
|
435
|
+
sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --no-name --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
419
436
|
end
|
420
437
|
end
|
421
438
|
|
@@ -472,3 +489,94 @@ task 'debian:clean' do
|
|
472
489
|
end
|
473
490
|
sh "rm -rf #{PKG_DIR}/*.debian.tar.gz"
|
474
491
|
end
|
492
|
+
|
493
|
+
|
494
|
+
##### RPM packaging support #####
|
495
|
+
|
496
|
+
RPM_NAME = "rubygem-crash-watch"
|
497
|
+
RPM_PACKAGE_REVISION = 1
|
498
|
+
RPMBUILD_ROOT = File.expand_path("~/rpmbuild")
|
499
|
+
MOCK_OFFLINE = boolean_option('MOCK_OFFLINE', false)
|
500
|
+
ALL_RPM_DISTROS = {
|
501
|
+
"el6" => { :mock_chroot_name => "epel-6", :distro_name => "Enterprise Linux 6" },
|
502
|
+
"amazon" => { :mock_chroot_name => "epel-6", :distro_name => "Amazon Linux" }
|
503
|
+
}
|
504
|
+
|
505
|
+
desc "Build gem for use in RPM building"
|
506
|
+
task 'rpm:gem' do
|
507
|
+
rpm_source_dir = "#{RPMBUILD_ROOT}/SOURCES"
|
508
|
+
sh "gem build #{PACKAGE_NAME}.gemspec"
|
509
|
+
sh "cp #{PACKAGE_NAME}-#{PACKAGE_VERSION}.gem #{rpm_source_dir}/"
|
510
|
+
end
|
511
|
+
|
512
|
+
desc "Build RPM for local machine"
|
513
|
+
task 'rpm:local' => 'rpm:gem' do
|
514
|
+
distro_id = `./rpm/get_distro_id.py`.strip
|
515
|
+
rpm_spec_dir = "#{RPMBUILD_ROOT}/SPECS"
|
516
|
+
spec_target_dir = "#{rpm_spec_dir}/#{distro_id}"
|
517
|
+
spec_target_file = "#{spec_target_dir}/#{RPM_NAME}.spec"
|
518
|
+
|
519
|
+
sh "mkdir -p #{spec_target_dir}"
|
520
|
+
puts "Generating #{spec_target_file}"
|
521
|
+
Preprocessor.new.start("rpm/#{RPM_NAME}.spec.template",
|
522
|
+
spec_target_file,
|
523
|
+
:distribution => distro_id)
|
524
|
+
|
525
|
+
sh "rpmbuild -ba #{spec_target_file}"
|
526
|
+
end
|
527
|
+
|
528
|
+
def create_rpm_build_task(distro_id, mock_chroot_name, distro_name)
|
529
|
+
desc "Build RPM for #{distro_name}"
|
530
|
+
task "rpm:#{distro_id}" => 'rpm:gem' do
|
531
|
+
rpm_spec_dir = "#{RPMBUILD_ROOT}/SPECS"
|
532
|
+
spec_target_dir = "#{rpm_spec_dir}/#{distro_id}"
|
533
|
+
spec_target_file = "#{spec_target_dir}/#{RPM_NAME}.spec"
|
534
|
+
maybe_offline = MOCK_OFFLINE ? "--offline" : nil
|
535
|
+
|
536
|
+
sh "mkdir -p #{spec_target_dir}"
|
537
|
+
puts "Generating #{spec_target_file}"
|
538
|
+
Preprocessor.new.start("rpm/#{RPM_NAME}.spec.template",
|
539
|
+
spec_target_file,
|
540
|
+
:distribution => distro_id)
|
541
|
+
|
542
|
+
sh "rpmbuild -bs #{spec_target_file}"
|
543
|
+
sh "mock --verbose #{maybe_offline} " +
|
544
|
+
"-r #{mock_chroot_name}-x86_64 " +
|
545
|
+
"--resultdir '#{PKG_DIR}/#{distro_id}' " +
|
546
|
+
"rebuild #{RPMBUILD_ROOT}/SRPMS/#{RPM_NAME}-#{PACKAGE_VERSION}-#{RPM_PACKAGE_REVISION}#{distro_id}.src.rpm"
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
ALL_RPM_DISTROS.each_pair do |distro_id, info|
|
551
|
+
create_rpm_build_task(distro_id, info[:mock_chroot_name], info[:distro_name])
|
552
|
+
end
|
553
|
+
|
554
|
+
desc "Build RPMs for all distributions"
|
555
|
+
task "rpm:all" => ALL_RPM_DISTROS.keys.map { |x| "rpm:#{x}" }
|
556
|
+
|
557
|
+
desc "Publish RPMs for all distributions"
|
558
|
+
task "rpm:publish" do
|
559
|
+
server = "juvia-helper.phusion.nl"
|
560
|
+
remote_dir = "/srv/oss_binaries_passenger/yumgems/phusion-misc"
|
561
|
+
rsync = "rsync -z -r --delete --progress"
|
562
|
+
|
563
|
+
ALL_RPM_DISTROS.each_key do |distro_id|
|
564
|
+
if !File.exist?("#{PKG_DIR}/#{distro_id}")
|
565
|
+
abort "No packages built for #{distro_id}. Please run 'rake rpm:all' first."
|
566
|
+
end
|
567
|
+
end
|
568
|
+
ALL_RPM_DISTROS.each_key do |distro_id|
|
569
|
+
sh "rpm --resign --define '%_signature gpg' --define '%_gpg_name #{PACKAGE_SIGNING_KEY}' #{PKG_DIR}/#{distro_id}/*.rpm"
|
570
|
+
end
|
571
|
+
sh "#{rsync} #{server}:#{remote_dir}/latest/ #{PKG_DIR}/yumgems/"
|
572
|
+
ALL_RPM_DISTROS.each_key do |distro_id|
|
573
|
+
distro_dir = "#{PKG_DIR}/#{distro_id}"
|
574
|
+
repo_dir = "#{PKG_DIR}/yumgems/#{distro_id}"
|
575
|
+
sh "mkdir -p #{repo_dir}"
|
576
|
+
sh "cp #{distro_dir}/#{RPM_NAME}*.rpm #{repo_dir}/"
|
577
|
+
sh "createrepo #{repo_dir}"
|
578
|
+
end
|
579
|
+
sh "ssh #{server} 'rm -rf #{remote_dir}/new && cp -dpR #{remote_dir}/latest #{remote_dir}/new'"
|
580
|
+
sh "#{rsync} #{PKG_DIR}/yumgems/ #{server}:#{remote_dir}/new/"
|
581
|
+
sh "ssh #{server} 'rm -rf #{remote_dir}/previous && mv #{remote_dir}/latest #{remote_dir}/previous && mv #{remote_dir}/new #{remote_dir}/latest'"
|
582
|
+
end
|
data/lib/crash_watch/version.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
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.12
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Hongli Lai
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-12-13 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: ffi
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rspec
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -56,26 +61,27 @@ files:
|
|
56
61
|
- test/gdb_controller_spec.rb
|
57
62
|
homepage: https://github.com/FooBarWidget/crash-watch
|
58
63
|
licenses: []
|
59
|
-
metadata: {}
|
60
64
|
post_install_message:
|
61
65
|
rdoc_options:
|
62
66
|
- --charset=UTF-8
|
63
67
|
require_paths:
|
64
68
|
- lib
|
65
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
66
71
|
requirements:
|
67
72
|
- - ! '>='
|
68
73
|
- !ruby/object:Gem::Version
|
69
74
|
version: '0'
|
70
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
71
77
|
requirements:
|
72
78
|
- - ! '>='
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '0'
|
75
81
|
requirements: []
|
76
82
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
83
|
+
rubygems_version: 1.8.23
|
78
84
|
signing_key:
|
79
|
-
specification_version:
|
85
|
+
specification_version: 3
|
80
86
|
summary: Monitor processes and display useful information when they crash
|
81
87
|
test_files: []
|
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
|
+
iQEcBAABAgAGBQJSquFeAAoJECrHRaUK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