passenger 4.0.3 → 4.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (46) hide show
  1. data.tar.gz.asc +7 -7
  2. data/NEWS +30 -0
  3. data/build/agents.rb +3 -0
  4. data/build/apache2.rb +2 -3
  5. data/build/basics.rb +20 -0
  6. data/build/common_library.rb +15 -0
  7. data/build/cxx_tests.rb +4 -1
  8. data/build/packaging.rb +22 -32
  9. data/doc/Packaging.html +792 -0
  10. data/doc/Users guide Nginx.html +2 -2
  11. data/doc/Users guide Nginx.txt +2 -2
  12. data/ext/apache2/Configuration.cpp +34 -62
  13. data/ext/apache2/Configuration.hpp +1 -14
  14. data/ext/apache2/DirectoryMapper.h +134 -104
  15. data/ext/apache2/Hooks.cpp +33 -19
  16. data/ext/common/AgentsStarter.cpp +22 -22
  17. data/ext/common/AgentsStarter.h +25 -25
  18. data/ext/common/ApplicationPool2/AppTypes.cpp +6 -6
  19. data/ext/common/ApplicationPool2/AppTypes.h +61 -9
  20. data/ext/common/ApplicationPool2/Implementation.cpp +14 -2
  21. data/ext/common/Constants.h +54 -23
  22. data/ext/common/Constants.h.erb +42 -0
  23. data/ext/common/ServerInstanceDir.h +6 -11
  24. data/ext/common/Utils/CachedFileStat.cpp +10 -9
  25. data/ext/common/Utils/CachedFileStat.h +8 -8
  26. data/ext/common/Utils/LargeFiles.cpp +12 -4
  27. data/ext/common/agents/HelperAgent/RequestHandler.h +1 -0
  28. data/ext/common/agents/Watchdog/Main.cpp +2 -2
  29. data/ext/nginx/Configuration.c +1 -1
  30. data/ext/nginx/Configuration.h +0 -1
  31. data/ext/nginx/ContentHandler.c +15 -15
  32. data/ext/nginx/ngx_http_passenger_module.c +48 -48
  33. data/ext/nginx/ngx_http_passenger_module.h +7 -9
  34. data/helper-scripts/wsgi-loader.py +2 -2
  35. data/lib/phusion_passenger.rb +1 -3
  36. data/lib/phusion_passenger/admin_tools/server_instance.rb +5 -11
  37. data/lib/phusion_passenger/constants.rb +42 -0
  38. data/lib/phusion_passenger/packaging.rb +8 -6
  39. data/lib/phusion_passenger/platform_info.rb +11 -6
  40. data/lib/phusion_passenger/standalone/command.rb +4 -2
  41. data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -1
  42. data/resources/templates/standalone/config.erb +14 -2
  43. data/test/ruby/admin_tools_spec.rb +14 -16
  44. metadata +4 -3
  45. metadata.gz.asc +7 -7
  46. data/lib/phusion_passenger/wsgi/request_handler.py +0 -199
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
- iQEcBAABAgAGBQJRn9OwAAoJECrHRaUKISqM2xYIAKE41ZDQV2ulFOBNCbIZidxB
6
- XXl0iOyX47E1YxjA2YZEA5qZO0XRYY6Sm/1fzCZtODnP2gMMGf4sES/Afvdjh4G3
7
- gWL6wf7j9rU/dUTdWh4q9DZxsUXtIGRLXjA9KFWKwO2Qb2BXe8Jmc444+DHvQvSh
8
- wEiNOUfumIRalaMkXhBKSsLV6UaOTMBy3IinuRWq+8KVCt94jP4baErEzVJb37+I
9
- s//uBkH2iKcMV3ccAgS7J3VeQ9Ye6+Lo7z7/T5lM17aQ2huKZ/XEUfRSyiEIkafb
10
- 6aIfEkv9ADznI21qp9I60/lGoATuLcpXKC6zpqcB+rX5T9Dui+gF0yw0jIbGn8w=
11
- =OGrJ
5
+ iQEcBAABAgAGBQJRo8yCAAoJECrHRaUKISqMlDcH+gJX2c+V84Rj7ZqJDWegW3DL
6
+ Ve1y0leJszFGTxU5IO8HdbqlPeJNeoBzIoLrzPxb4cOhGvhvoQLATsm4oPup1hG9
7
+ ZXen2bpAdZL+e/r6CoVcK1Ft4PjVfBzBlF91SE1yAx1VCNexcTPbkXsBjZbFOujR
8
+ oE5U5p2YgmydxQE6LjEG7ipNbEJrQrfQJ3l32L8OYAAmlBHWO2DFfm9UE6FPBUgj
9
+ KXgUmFUHvnfrXuO+3KaV1L9YsWMUe/jo4QjafOS5jFoKh3jUjHz4bJfkcAeSR+eb
10
+ /XxJor58BsuOX5IUOQj9koM2WZj8Tc18YHncY6pmG/o6jTlO9xKO9cotYwMYSKQ=
11
+ =RoSQ
12
12
  -----END PGP SIGNATURE-----
data/NEWS CHANGED
@@ -1,3 +1,33 @@
1
+ Release 4.0.4
2
+ -------------
3
+
4
+ * Fixed autodetection of noexec-mount /tmp directory. Fixes issue #850
5
+ and issue #625.
6
+ * Fixed a WSGI bug. wsgi.input was a file object opened in text mode,
7
+ but should be opened in binary mode. Fixes issue #881.
8
+ * Fixed a potential crash in Out-of-Band Work. Fixes issue #894.
9
+ * Fixed a potential crash in rolling restarting, which only occurs if a
10
+ process was also being spawned at the same time. Fixes issue #896.
11
+ * [Apache] The RailsBaseURI and RackBaseURI directives have been unified.
12
+ For a long time, RailsBaseURI told Phusion Passenger that the given
13
+ sub-URI belongs to a **Rails 2** application. Attempt to use this
14
+ directive with Rails 3 or with Rack applications would result in an
15
+ error. Because this confused users, RailsBaseURI and RackBaseURI
16
+ have now been unified and can now be used interchangably. Phusion
17
+ Passenger will automatically detect what kind of application it is.
18
+ The Nginx version already worked like this. Fixes issue #882.
19
+ * [Standalone] The Passenger Standalone temp directory and
20
+ PassengerWatchdog server instance directory have been unified.
21
+ PassengerWatchdog already automatically updates the timestamps of
22
+ all files in its server instance directory every 6 hours to prevent
23
+ /tmp cleaners from deleting the directory. Therefore this
24
+ unification prevents the Passenger Standalone temp directory to be
25
+ deleted by /tmp cleaners as well. Fixes issue #654.
26
+ * [Standalone] types_hash_max_size has been increased from 1024 to
27
+ 2048. This solves a problem that causes Nginx not to start on some
28
+ platforms. Contributed by Jan-Willem Koelewijn.
29
+
30
+
1
31
  Release 4.0.3
2
32
  -------------
3
33
 
@@ -28,6 +28,7 @@ dependencies = [
28
28
  'ext/common/agents/Watchdog/HelperAgentWatcher.cpp',
29
29
  'ext/common/agents/Watchdog/LoggingAgentWatcher.cpp',
30
30
  'ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp',
31
+ 'ext/common/Constants.h',
31
32
  'ext/common/ServerInstanceDir.h',
32
33
  'ext/common/ResourceLocator.h',
33
34
  'ext/common/Utils/VariantMap.h',
@@ -60,6 +61,7 @@ dependencies = [
60
61
  'ext/common/agents/HelperAgent/RequestHandler.cpp',
61
62
  'ext/common/agents/HelperAgent/ScgiRequestParser.h',
62
63
  'ext/common/agents/HelperAgent/BacktracesServer.h',
64
+ 'ext/common/Constants.h',
63
65
  'ext/common/StaticString.h',
64
66
  'ext/common/Account.h',
65
67
  'ext/common/AccountsDatabase.h',
@@ -115,6 +117,7 @@ dependencies = [
115
117
  'ext/common/agents/LoggingAgent/RemoteSender.h',
116
118
  'ext/common/agents/LoggingAgent/DataStoreId.h',
117
119
  'ext/common/agents/LoggingAgent/FilterSupport.h',
120
+ 'ext/common/Constants.h',
118
121
  'ext/common/ServerInstanceDir.h',
119
122
  'ext/common/Logging.h',
120
123
  'ext/common/EventedServer.h',
@@ -35,7 +35,6 @@ APACHE2_MODULE_INPUT_FILES = {
35
35
  ext/apache2/Configuration.cpp
36
36
  ext/apache2/Configuration.h
37
37
  ext/apache2/Configuration.hpp
38
- ext/common/Constants.h
39
38
  ext/common/agents/LoggingAgent/FilterSupport.h),
40
39
  APACHE2_OUTPUT_DIR + 'Bucket.o' => %w(
41
40
  ext/apache2/Bucket.cpp
@@ -52,7 +51,6 @@ APACHE2_MODULE_INPUT_FILES = {
52
51
  ext/common/Logging.h
53
52
  ext/common/RandomGenerator.h
54
53
  ext/common/ServerInstanceDir.h
55
- ext/common/Constants.h
56
54
  ext/common/Utils.h
57
55
  ext/common/Utils/Timer.h)
58
56
  }
@@ -89,7 +87,8 @@ task :apache2 => [
89
87
 
90
88
  # Define rules for the individual Apache 2 module source files.
91
89
  APACHE2_MODULE_INPUT_FILES.each_pair do |target, sources|
92
- file(target => sources) do
90
+ extra_deps = ['ext/common/Constants.h']
91
+ file(target => sources + extra_deps) do
93
92
  object_basename = File.basename(target)
94
93
  object_filename = APACHE2_OUTPUT_DIR + object_basename
95
94
  compile_cxx(sources[0], "#{APACHE2_MODULE_CXXFLAGS} -o #{object_filename}")
@@ -44,6 +44,26 @@ require 'build/cplusplus_support'
44
44
 
45
45
  #################################################
46
46
 
47
+ class TemplateRenderer
48
+ def initialize(filename)
49
+ require 'erb' if !defined?(ERB)
50
+ @erb = ERB.new(File.read(filename))
51
+ @erb.filename = filename
52
+ end
53
+
54
+ def render
55
+ return @erb.result(binding)
56
+ end
57
+
58
+ def render_to(filename)
59
+ puts "Creating #{filename}"
60
+ text = render
61
+ File.open(filename, 'w') do |f|
62
+ f.write(text)
63
+ end
64
+ end
65
+ end
66
+
47
67
  def string_option(name, default_value = nil)
48
68
  value = ENV[name]
49
69
  if value.nil? || value.empty?
@@ -199,6 +199,21 @@ else
199
199
  end
200
200
 
201
201
 
202
+ ########## Shared definitions ##########
203
+ # Shared definition files should be in source control so that they don't
204
+ # have to be built by users. Users may not have write access to the source
205
+ # root, for example as is the case with Passenger Standalone.
206
+ #
207
+ # If you add a new shared definition file, don't forget to update
208
+ # lib/phusion_passenger/packaging.rb!
209
+
210
+ file 'ext/common/Constants.h' => ['ext/common/Constants.h.erb', 'lib/phusion_passenger/constants.rb'] do
211
+ require 'phusion_passenger/constants'
212
+ template = TemplateRenderer.new('ext/common/Constants.h.erb')
213
+ template.render_to('ext/common/Constants.h')
214
+ end
215
+
216
+
202
217
  ##############################
203
218
 
204
219
 
@@ -241,6 +241,7 @@ dependencies = [
241
241
  LIBEIO_TARGET,
242
242
  TEST_BOOST_OXT_LIBRARY,
243
243
  TEST_COMMON_LIBRARY.link_objects,
244
+ 'ext/common/Constants.h',
244
245
  'ext/common/MultiLibeio.cpp'
245
246
  ].flatten.compact
246
247
  file 'test/cxx/CxxTestMain' => dependencies.flatten do
@@ -253,6 +254,7 @@ deps = [
253
254
  'test/tut/tut.h',
254
255
  'ext/oxt/thread.hpp',
255
256
  'ext/oxt/tracable_exception.hpp',
257
+ 'ext/common/Constants.h',
256
258
  'ext/common/ServerInstanceDir.h',
257
259
  'ext/common/Exceptions.h',
258
260
  'ext/common/Utils.h',
@@ -263,7 +265,8 @@ file 'test/cxx/TestSupport.h.gch' => deps do
263
265
  end
264
266
 
265
267
  TEST_CXX_OBJECTS.each_pair do |target, sources|
266
- file(target => sources + ['test/cxx/TestSupport.h', 'test/cxx/TestSupport.h.gch']) do
268
+ extra_deps = ['test/cxx/TestSupport.h', 'test/cxx/TestSupport.h.gch', 'ext/common/Constants.h']
269
+ file(target => sources + extra_deps) do
267
270
  # To use precompiled headers in Clang, we must -include them on them command line.
268
271
  compile_cxx sources[0], "-o #{target} -include test/cxx/TestSupport.h #{TEST_CXX_CFLAGS}"
269
272
  end
@@ -55,55 +55,45 @@ task 'package:release' => ['package:gem', 'package:tarball', 'package:sign'] do
55
55
  sh "scp pkg/#{basename}.{gem.asc,tar.gz.asc} app@shell.phusion.nl:/u/apps/signatures/phusion-passenger/"
56
56
  sh "./dev/googlecode_upload.py -p phusion-passenger -s 'Phusion Passenger #{version}' pkg/passenger-#{version}.tar.gz"
57
57
  sh "gem push pkg/passenger-#{version}.gem"
58
+ puts "Updating version number on website..."
59
+ if is_beta
60
+ uri = URI.parse("https://www.phusionpassenger.com/latest_beta_version")
61
+ else
62
+ uri = URI.parse("https://www.phusionpassenger.com/latest_stable_version")
63
+ end
64
+ http = Net::HTTP.new(uri.host, uri.port)
65
+ http.use_ssl = true
66
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
67
+ request = Net::HTTP::Post.new(uri.request_uri)
68
+ request.basic_auth("admin", website_config["admin_password"])
69
+ request.set_form_data("version" => version)
70
+ response = http.request(request)
71
+ if response.code != 200 && response.body != "ok"
72
+ abort "*** ERROR: Cannot update version number on www.phusionpassenger.com:\n" +
73
+ "Status: #{response.code}\n\n" +
74
+ response.body
75
+ end
58
76
  puts "--------------"
59
- puts "All done. Please update the version number in the Phusion Passenger website."
77
+ puts "All done."
60
78
  else
61
79
  dir = "/u/apps/passenger_website/shared"
62
80
  subdir = string_option('NAME', version)
63
81
  sh "scp pkg/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} app@shell.phusion.nl:#{dir}/"
64
82
  sh "ssh app@shell.phusion.nl 'mkdir -p \"#{dir}/assets/#{subdir}\" && mv #{dir}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} \"#{dir}/assets/#{subdir}/\"'"
65
83
  end
66
-
67
- puts "Updating version number on website..."
68
- if is_beta
69
- uri = URI.parse("https://www.phusionpassenger.com/latest_beta_version")
70
- else
71
- uri = URI.parse("https://www.phusionpassenger.com/latest_stable_version")
72
- end
73
- http = Net::HTTP.new(uri.host, uri.port)
74
- http.use_ssl = true
75
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
76
- request = Net::HTTP::Post.new(uri.request_uri)
77
- request.basic_auth("admin", website_config["admin_password"])
78
- request.set_form_data("version" => version)
79
- response = http.request(request)
80
- if response.code != 200 && response.body != "ok"
81
- abort "*** ERROR: Cannot update version number on www.phusionpassenger.com:\n" +
82
- "Status: #{response.code}\n\n" +
83
- response.body
84
- end
85
84
  else
86
85
  puts "Did not upload anything."
87
86
  end
88
87
  end
89
88
 
90
- task 'package:check' do
91
- require 'phusion_passenger'
92
-
93
- File.read("ext/common/Constants.h") =~ /PASSENGER_VERSION \"(.+)\"/
94
- if $1 != PhusionPassenger::VERSION_STRING
95
- abort "Version number in ext/common/Constants.h doesn't match."
96
- end
97
- end
98
-
99
- task 'package:gem' => Packaging::ASCII_DOCS + ['package:check'] do
89
+ task 'package:gem' => Packaging::PREGENERATED_FILES do
100
90
  require 'phusion_passenger'
101
91
  sh "gem build #{PhusionPassenger::PACKAGE_NAME}.gemspec --sign --key 0x0A212A8C"
102
92
  sh "mkdir -p pkg"
103
93
  sh "mv #{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}.gem pkg/"
104
94
  end
105
95
 
106
- task 'package:tarball' => Packaging::ASCII_DOCS + ['package:check'] do
96
+ task 'package:tarball' => Packaging::PREGENERATED_FILES do
107
97
  require 'phusion_passenger'
108
98
  require 'fileutils'
109
99
 
@@ -281,7 +271,7 @@ task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
281
271
  end
282
272
 
283
273
  desc "Create a Debian package"
284
- task 'package:debian' => 'package:check' do
274
+ task 'package:debian' do
285
275
  checkbuilddeps = PlatformInfo.find_command("dpkg-checkbuilddeps")
286
276
  debuild = PlatformInfo.find_command("debuild")
287
277
  if !checkbuilddeps || !debuild
@@ -0,0 +1,792 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Packaging</title>
7
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
8
+ <!--[if lt IE 9]>
9
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
10
+ <![endif]-->
11
+ <style type="text/css">
12
+ /*!
13
+ * Bootstrap v2.0.3
14
+ *
15
+ * Copyright 2012 Twitter, Inc
16
+ * Licensed under the Apache License v2.0
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
20
+ */
21
+ .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
22
+ .clearfix:after{clear:both;}
23
+ .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
24
+ .input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
25
+ article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
26
+ audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
27
+ audio:not([controls]){display:none;}
28
+ html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
29
+ a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
30
+ a:hover,a:active{outline:0;}
31
+ sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
32
+ sup{top:-0.5em;}
33
+ sub{bottom:-0.25em;}
34
+ img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
35
+ button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
36
+ button,input{*overflow:visible;line-height:normal;}
37
+ button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
38
+ button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
39
+ input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
40
+ input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
41
+ textarea{overflow:auto;vertical-align:top;}
42
+ body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
43
+ a{color:#0088cc;text-decoration:none;}
44
+ a:hover{color:#005580;text-decoration:underline;}
45
+ p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
46
+ .lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
47
+ h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
48
+ h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
49
+ h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
50
+ h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
51
+ h4,h5,h6{line-height:18px;}
52
+ h4{font-size:14px;}h4 small{font-size:12px;}
53
+ h5{font-size:12px;}
54
+ h6{font-size:11px;color:#999999;text-transform:uppercase;}
55
+ .page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
56
+ .page-header h1{line-height:1;}
57
+ ul,ol{padding:0;margin:0 0 9px 25px;}
58
+ ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
59
+ ul{list-style:disc;}
60
+ ol{list-style:decimal;}
61
+ li{line-height:18px;}
62
+ ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
63
+ dl{margin-bottom:18px;}
64
+ dt,dd{line-height:18px;}
65
+ dt{font-weight:bold;line-height:17px;}
66
+ dd{margin-left:9px;}
67
+ .dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
68
+ .dl-horizontal dd{margin-left:130px;}
69
+ hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
70
+ strong{font-weight:bold;}
71
+ em{font-style:italic;}
72
+ .muted{color:#999999;}
73
+ abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
74
+ abbr.initialism{font-size:90%;text-transform:uppercase;}
75
+ blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
76
+ blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
77
+ blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
78
+ q:before,q:after,blockquote:before,blockquote:after{content:"";}
79
+ address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
80
+ small{font-size:100%;}
81
+ cite{font-style:normal;}
82
+ code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
83
+ code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
84
+ pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
85
+ pre code{padding:0;color:inherit;background-color:transparent;border:0;}
86
+ .pre-scrollable{max-height:340px;overflow-y:scroll;}
87
+ .label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
88
+ .label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
89
+ .badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
90
+ a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
91
+ .label-important,.badge-important{background-color:#b94a48;}
92
+ .label-important[href],.badge-important[href]{background-color:#953b39;}
93
+ .label-warning,.badge-warning{background-color:#f89406;}
94
+ .label-warning[href],.badge-warning[href]{background-color:#c67605;}
95
+ .label-success,.badge-success{background-color:#468847;}
96
+ .label-success[href],.badge-success[href]{background-color:#356635;}
97
+ .label-info,.badge-info{background-color:#3a87ad;}
98
+ .label-info[href],.badge-info[href]{background-color:#2d6987;}
99
+ .label-inverse,.badge-inverse{background-color:#333333;}
100
+ .label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
101
+ table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
102
+ .table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
103
+ .table th{font-weight:bold;}
104
+ .table thead th{vertical-align:bottom;}
105
+ .table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
106
+ .table tbody+tbody{border-top:2px solid #dddddd;}
107
+ .table-condensed th,.table-condensed td{padding:4px 5px;}
108
+ .table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
109
+ .table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
110
+ .table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
111
+ .table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
112
+ .table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
113
+ .table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
114
+ .table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
115
+ .table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
116
+ table .span1{float:none;width:44px;margin-left:0;}
117
+ table .span2{float:none;width:124px;margin-left:0;}
118
+ table .span3{float:none;width:204px;margin-left:0;}
119
+ table .span4{float:none;width:284px;margin-left:0;}
120
+ table .span5{float:none;width:364px;margin-left:0;}
121
+ table .span6{float:none;width:444px;margin-left:0;}
122
+ table .span7{float:none;width:524px;margin-left:0;}
123
+ table .span8{float:none;width:604px;margin-left:0;}
124
+ table .span9{float:none;width:684px;margin-left:0;}
125
+ table .span10{float:none;width:764px;margin-left:0;}
126
+ table .span11{float:none;width:844px;margin-left:0;}
127
+ table .span12{float:none;width:924px;margin-left:0;}
128
+ table .span13{float:none;width:1004px;margin-left:0;}
129
+ table .span14{float:none;width:1084px;margin-left:0;}
130
+ table .span15{float:none;width:1164px;margin-left:0;}
131
+ table .span16{float:none;width:1244px;margin-left:0;}
132
+ table .span17{float:none;width:1324px;margin-left:0;}
133
+ table .span18{float:none;width:1404px;margin-left:0;}
134
+ table .span19{float:none;width:1484px;margin-left:0;}
135
+ table .span20{float:none;width:1564px;margin-left:0;}
136
+ table .span21{float:none;width:1644px;margin-left:0;}
137
+ table .span22{float:none;width:1724px;margin-left:0;}
138
+ table .span23{float:none;width:1804px;margin-left:0;}
139
+ table .span24{float:none;width:1884px;margin-left:0;}
140
+ form{margin:0 0 18px;}
141
+ fieldset{padding:0;margin:0;border:0;}
142
+ legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;}
143
+ label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;}
144
+ input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
145
+ label{display:block;margin-bottom:5px;color:#333333;}
146
+ input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
147
+ .uneditable-textarea{width:auto;height:auto;}
148
+ label input,label textarea,label select{display:block;}
149
+ input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;background-color:transparent;border:0 \9;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
150
+ input[type="image"]{border:0;}
151
+ input[type="file"]{width:auto;padding:initial;line-height:initial;background-color:#ffffff;background-color:initial;border:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
152
+ input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
153
+ select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
154
+ input[type="file"]{line-height:18px \9;}
155
+ select{width:220px;background-color:#ffffff;}
156
+ select[multiple],select[size]{height:auto;}
157
+ input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
158
+ textarea{height:auto;}
159
+ input[type="hidden"]{display:none;}
160
+ .radio,.checkbox{min-height:18px;padding-left:18px;}
161
+ .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
162
+ .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
163
+ .radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
164
+ .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
165
+ input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
166
+ input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
167
+ input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
168
+ .input-mini{width:60px;}
169
+ .input-small{width:90px;}
170
+ .input-medium{width:150px;}
171
+ .input-large{width:210px;}
172
+ .input-xlarge{width:270px;}
173
+ .input-xxlarge{width:530px;}
174
+ input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
175
+ input,textarea,.uneditable-input{margin-left:0;}
176
+ input.span12, textarea.span12, .uneditable-input.span12{width:930px;}
177
+ input.span11, textarea.span11, .uneditable-input.span11{width:850px;}
178
+ input.span10, textarea.span10, .uneditable-input.span10{width:770px;}
179
+ input.span9, textarea.span9, .uneditable-input.span9{width:690px;}
180
+ input.span8, textarea.span8, .uneditable-input.span8{width:610px;}
181
+ input.span7, textarea.span7, .uneditable-input.span7{width:530px;}
182
+ input.span6, textarea.span6, .uneditable-input.span6{width:450px;}
183
+ input.span5, textarea.span5, .uneditable-input.span5{width:370px;}
184
+ input.span4, textarea.span4, .uneditable-input.span4{width:290px;}
185
+ input.span3, textarea.span3, .uneditable-input.span3{width:210px;}
186
+ input.span2, textarea.span2, .uneditable-input.span2{width:130px;}
187
+ input.span1, textarea.span1, .uneditable-input.span1{width:50px;}
188
+ input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;}
189
+ input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
190
+ .control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
191
+ .control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
192
+ .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
193
+ .control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
194
+ .control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
195
+ .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
196
+ .control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
197
+ .control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
198
+ .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
199
+ input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
200
+ .form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
201
+ .form-actions:after{clear:both;}
202
+ .uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);}
203
+ :-moz-placeholder{color:#999999;}
204
+ ::-webkit-input-placeholder{color:#999999;}
205
+ .help-block,.help-inline{color:#555555;}
206
+ .help-block{display:block;margin-bottom:9px;}
207
+ .help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
208
+ .input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2;}
209
+ .input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
210
+ .input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;}
211
+ .input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
212
+ .input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
213
+ .input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
214
+ .input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
215
+ .input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
216
+ .input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;}
217
+ .input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
218
+ .input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
219
+ .input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
220
+ .input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
221
+ .search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
222
+ .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;}
223
+ .form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
224
+ .form-search label,.form-inline label{display:inline-block;}
225
+ .form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
226
+ .form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
227
+ .form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
228
+ .control-group{margin-bottom:9px;}
229
+ legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
230
+ .form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
231
+ .form-horizontal .control-group:after{clear:both;}
232
+ .form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;}
233
+ .form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:160px;}
234
+ .form-horizontal .help-block{margin-top:9px;margin-bottom:0;}
235
+ .form-horizontal .form-actions{padding-left:160px;}
236
+ .btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9;}
237
+ .btn:active,.btn.active{background-color:#cccccc \9;}
238
+ .btn:first-child{*margin-left:0;}
239
+ .btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
240
+ .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
241
+ .btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
242
+ .btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
243
+ .btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
244
+ .btn-large [class^="icon-"]{margin-top:1px;}
245
+ .btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
246
+ .btn-small [class^="icon-"]{margin-top:-1px;}
247
+ .btn-mini{padding:2px 6px;font-size:11px;line-height:14px;}
248
+ .btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
249
+ .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
250
+ .btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
251
+ .btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0055cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;*background-color:#004ab3;}
252
+ .btn-primary:active,.btn-primary.active{background-color:#004099 \9;}
253
+ .btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505;}
254
+ .btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
255
+ .btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a;}
256
+ .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
257
+ .btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;*background-color:#499249;}
258
+ .btn-success:active,.btn-success.active{background-color:#408140 \9;}
259
+ .btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;*background-color:#2a85a0;}
260
+ .btn-info:active,.btn-info.active{background-color:#24748c \9;}
261
+ .btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;*background-color:#151515;}
262
+ .btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
263
+ button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
264
+ button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
265
+ button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
266
+ button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
267
+ [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("images/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
268
+ .icon-white{background-image:url("images/glyphicons-halflings-white.png");}
269
+ .icon-glass{background-position:0 0;}
270
+ .icon-music{background-position:-24px 0;}
271
+ .icon-search{background-position:-48px 0;}
272
+ .icon-envelope{background-position:-72px 0;}
273
+ .icon-heart{background-position:-96px 0;}
274
+ .icon-star{background-position:-120px 0;}
275
+ .icon-star-empty{background-position:-144px 0;}
276
+ .icon-user{background-position:-168px 0;}
277
+ .icon-film{background-position:-192px 0;}
278
+ .icon-th-large{background-position:-216px 0;}
279
+ .icon-th{background-position:-240px 0;}
280
+ .icon-th-list{background-position:-264px 0;}
281
+ .icon-ok{background-position:-288px 0;}
282
+ .icon-remove{background-position:-312px 0;}
283
+ .icon-zoom-in{background-position:-336px 0;}
284
+ .icon-zoom-out{background-position:-360px 0;}
285
+ .icon-off{background-position:-384px 0;}
286
+ .icon-signal{background-position:-408px 0;}
287
+ .icon-cog{background-position:-432px 0;}
288
+ .icon-trash{background-position:-456px 0;}
289
+ .icon-home{background-position:0 -24px;}
290
+ .icon-file{background-position:-24px -24px;}
291
+ .icon-time{background-position:-48px -24px;}
292
+ .icon-road{background-position:-72px -24px;}
293
+ .icon-download-alt{background-position:-96px -24px;}
294
+ .icon-download{background-position:-120px -24px;}
295
+ .icon-upload{background-position:-144px -24px;}
296
+ .icon-inbox{background-position:-168px -24px;}
297
+ .icon-play-circle{background-position:-192px -24px;}
298
+ .icon-repeat{background-position:-216px -24px;}
299
+ .icon-refresh{background-position:-240px -24px;}
300
+ .icon-list-alt{background-position:-264px -24px;}
301
+ .icon-lock{background-position:-287px -24px;}
302
+ .icon-flag{background-position:-312px -24px;}
303
+ .icon-headphones{background-position:-336px -24px;}
304
+ .icon-volume-off{background-position:-360px -24px;}
305
+ .icon-volume-down{background-position:-384px -24px;}
306
+ .icon-volume-up{background-position:-408px -24px;}
307
+ .icon-qrcode{background-position:-432px -24px;}
308
+ .icon-barcode{background-position:-456px -24px;}
309
+ .icon-tag{background-position:0 -48px;}
310
+ .icon-tags{background-position:-25px -48px;}
311
+ .icon-book{background-position:-48px -48px;}
312
+ .icon-bookmark{background-position:-72px -48px;}
313
+ .icon-print{background-position:-96px -48px;}
314
+ .icon-camera{background-position:-120px -48px;}
315
+ .icon-font{background-position:-144px -48px;}
316
+ .icon-bold{background-position:-167px -48px;}
317
+ .icon-italic{background-position:-192px -48px;}
318
+ .icon-text-height{background-position:-216px -48px;}
319
+ .icon-text-width{background-position:-240px -48px;}
320
+ .icon-align-left{background-position:-264px -48px;}
321
+ .icon-align-center{background-position:-288px -48px;}
322
+ .icon-align-right{background-position:-312px -48px;}
323
+ .icon-align-justify{background-position:-336px -48px;}
324
+ .icon-list{background-position:-360px -48px;}
325
+ .icon-indent-left{background-position:-384px -48px;}
326
+ .icon-indent-right{background-position:-408px -48px;}
327
+ .icon-facetime-video{background-position:-432px -48px;}
328
+ .icon-picture{background-position:-456px -48px;}
329
+ .icon-pencil{background-position:0 -72px;}
330
+ .icon-map-marker{background-position:-24px -72px;}
331
+ .icon-adjust{background-position:-48px -72px;}
332
+ .icon-tint{background-position:-72px -72px;}
333
+ .icon-edit{background-position:-96px -72px;}
334
+ .icon-share{background-position:-120px -72px;}
335
+ .icon-check{background-position:-144px -72px;}
336
+ .icon-move{background-position:-168px -72px;}
337
+ .icon-step-backward{background-position:-192px -72px;}
338
+ .icon-fast-backward{background-position:-216px -72px;}
339
+ .icon-backward{background-position:-240px -72px;}
340
+ .icon-play{background-position:-264px -72px;}
341
+ .icon-pause{background-position:-288px -72px;}
342
+ .icon-stop{background-position:-312px -72px;}
343
+ .icon-forward{background-position:-336px -72px;}
344
+ .icon-fast-forward{background-position:-360px -72px;}
345
+ .icon-step-forward{background-position:-384px -72px;}
346
+ .icon-eject{background-position:-408px -72px;}
347
+ .icon-chevron-left{background-position:-432px -72px;}
348
+ .icon-chevron-right{background-position:-456px -72px;}
349
+ .icon-plus-sign{background-position:0 -96px;}
350
+ .icon-minus-sign{background-position:-24px -96px;}
351
+ .icon-remove-sign{background-position:-48px -96px;}
352
+ .icon-ok-sign{background-position:-72px -96px;}
353
+ .icon-question-sign{background-position:-96px -96px;}
354
+ .icon-info-sign{background-position:-120px -96px;}
355
+ .icon-screenshot{background-position:-144px -96px;}
356
+ .icon-remove-circle{background-position:-168px -96px;}
357
+ .icon-ok-circle{background-position:-192px -96px;}
358
+ .icon-ban-circle{background-position:-216px -96px;}
359
+ .icon-arrow-left{background-position:-240px -96px;}
360
+ .icon-arrow-right{background-position:-264px -96px;}
361
+ .icon-arrow-up{background-position:-289px -96px;}
362
+ .icon-arrow-down{background-position:-312px -96px;}
363
+ .icon-share-alt{background-position:-336px -96px;}
364
+ .icon-resize-full{background-position:-360px -96px;}
365
+ .icon-resize-small{background-position:-384px -96px;}
366
+ .icon-plus{background-position:-408px -96px;}
367
+ .icon-minus{background-position:-433px -96px;}
368
+ .icon-asterisk{background-position:-456px -96px;}
369
+ .icon-exclamation-sign{background-position:0 -120px;}
370
+ .icon-gift{background-position:-24px -120px;}
371
+ .icon-leaf{background-position:-48px -120px;}
372
+ .icon-fire{background-position:-72px -120px;}
373
+ .icon-eye-open{background-position:-96px -120px;}
374
+ .icon-eye-close{background-position:-120px -120px;}
375
+ .icon-warning-sign{background-position:-144px -120px;}
376
+ .icon-plane{background-position:-168px -120px;}
377
+ .icon-calendar{background-position:-192px -120px;}
378
+ .icon-random{background-position:-216px -120px;}
379
+ .icon-comment{background-position:-240px -120px;}
380
+ .icon-magnet{background-position:-264px -120px;}
381
+ .icon-chevron-up{background-position:-288px -120px;}
382
+ .icon-chevron-down{background-position:-313px -119px;}
383
+ .icon-retweet{background-position:-336px -120px;}
384
+ .icon-shopping-cart{background-position:-360px -120px;}
385
+ .icon-folder-close{background-position:-384px -120px;}
386
+ .icon-folder-open{background-position:-408px -120px;}
387
+ .icon-resize-vertical{background-position:-432px -119px;}
388
+ .icon-resize-horizontal{background-position:-456px -118px;}
389
+ .icon-hdd{background-position:0 -144px;}
390
+ .icon-bullhorn{background-position:-24px -144px;}
391
+ .icon-bell{background-position:-48px -144px;}
392
+ .icon-certificate{background-position:-72px -144px;}
393
+ .icon-thumbs-up{background-position:-96px -144px;}
394
+ .icon-thumbs-down{background-position:-120px -144px;}
395
+ .icon-hand-right{background-position:-144px -144px;}
396
+ .icon-hand-left{background-position:-168px -144px;}
397
+ .icon-hand-up{background-position:-192px -144px;}
398
+ .icon-hand-down{background-position:-216px -144px;}
399
+ .icon-circle-arrow-right{background-position:-240px -144px;}
400
+ .icon-circle-arrow-left{background-position:-264px -144px;}
401
+ .icon-circle-arrow-up{background-position:-288px -144px;}
402
+ .icon-circle-arrow-down{background-position:-312px -144px;}
403
+ .icon-globe{background-position:-336px -144px;}
404
+ .icon-wrench{background-position:-360px -144px;}
405
+ .icon-tasks{background-position:-384px -144px;}
406
+ .icon-filter{background-position:-408px -144px;}
407
+ .icon-briefcase{background-position:-432px -144px;}
408
+ .icon-fullscreen{background-position:-456px -144px;}
409
+
410
+
411
+ h1, h2, h3, h4, h5, h6 {
412
+ margin-bottom: 9px;
413
+ }
414
+
415
+ ul ul,
416
+ ul ol,
417
+ ol ol,
418
+ ol ul {
419
+ margin-bottom: 9px;
420
+ }
421
+
422
+ #container {
423
+ max-width: 767px;
424
+ margin-left: auto;
425
+ margin-right: auto;
426
+ }
427
+
428
+ #top-vertical-container-margin {
429
+ margin-top: 20px;
430
+ }
431
+
432
+ #bottom-vertical-container-margin {
433
+ margin-bottom: 20px;
434
+ }
435
+
436
+ #logo {
437
+ text-align: center;
438
+ margin-bottom: 9px;
439
+ }
440
+
441
+ #title {
442
+ text-align: center;
443
+ font-size: 400%;
444
+ line-height: 1em;
445
+ padding-bottom: 30px;
446
+ margin-bottom: 30px;
447
+ border-bottom: solid 1px #d0d0d0;
448
+ }
449
+
450
+ #toc {
451
+ margin-bottom: 20px;
452
+ }
453
+
454
+ #toc .level-2 {
455
+ margin-left: 18px;
456
+ }
457
+
458
+ #toc .level-3 {
459
+ margin-left: 36px;
460
+ }
461
+
462
+ footer {
463
+ border-top: solid 1px #d0d0d0;
464
+ margin-top: 9px;
465
+ padding-top: 9px;
466
+ }
467
+ </style>
468
+ </head>
469
+ <body>
470
+
471
+ <div id="container">
472
+ <div id="top-vertical-container-margin"></div>
473
+ <div id="logo">
474
+ <a href="http://www.phusion.nl/"><img src="images/phusion_banner_small.png" alt="Phusion docs" width="350" height="59"></a>
475
+ </div>
476
+ <div id="title">Packaging</div>
477
+
478
+ <div id="toc" style="display: none">
479
+ <div class="header"><strong>Table of contents</strong></div>
480
+ </div>
481
+
482
+ <h1>Introduction</h1>
483
+
484
+ <p>Phusion Passenger can be configured in 2 ways, the "originally packaged"
485
+ configuration and the "natively packaged" configuration. Depending on the
486
+ configuration, Phusion Passenger locates its files (also called <em>assets</em>)
487
+ in a different manner.</p>
488
+
489
+ <h2>Originally packaged</h2>
490
+
491
+ <p>This is the configuration you get when you checkout Phusion Passenger from git,
492
+ when you install Phusion Passenger from a gem or when you extract it from a tarball.
493
+ All the original files are stored in a single directory tree, which we call the
494
+ <em>source root</em>.</p>
495
+
496
+ <p>This configuration does not come with any binaries; they have to be compiled by the
497
+ user. Binaries may either be located in the source root, or located in a different
498
+ location. The following rules apply when it comes to looking for binaries and
499
+ determining where to store compiled binaries:</p>
500
+
501
+ <ul>
502
+ <li>It will normally look for binaries in a subdirectory under the source root, and
503
+ it will store compiled binaries in a subdirectory under the source root.</li>
504
+ <li><p>Phusion Passenger Standalone does things a little differently. It looks for
505
+ its binaries in one of these places, whichever first exists:</p>
506
+
507
+ <ul>
508
+ <li><code>~/.passenger/standalone/&lt;VERSION&gt;/&lt;TYPE-AND-ARCH&gt;</code> (a)</li>
509
+ <li><code>/var/lib/passenger-standalone/&lt;VERSION-AND-ARCH&gt;</code> (b)</li>
510
+ </ul>
511
+
512
+
513
+ <p>If neither directories exist, then Passenger Standalone compiles the binaries and
514
+ stores them in (b) (when running as root) or in (a). It still looks for everything
515
+ else (like the .rb files) in the source root.</p></li>
516
+ </ul>
517
+
518
+
519
+ <h2>Natively packaged</h2>
520
+
521
+ <p>Phusion Passenger is packaged, usually (but not necessarily) through a DEB or RPM
522
+ package. This configuration comes not only with all necessary binaries, but also
523
+ with some (but not all) source files. This is because when you run Phusion Passenger
524
+ with a different Ruby interpreter than the packager intended, Phusion Passenger
525
+ must be able to compile a new Ruby extension for that Ruby interpreter. This
526
+ configuration does not however allow compiling against a different Apache or Nginx
527
+ version than the packager intended.</p>
528
+
529
+ <p>In this configuration, files can be scattered anywhere throughout the filesystem. This
530
+ way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations
531
+ of the different types of files can be specified through a
532
+ <em>location configuration file</em>. The existance and usage of a location configuration
533
+ file does not automatically imply that Phusion Passenger is natively packaged.</p>
534
+
535
+ <p>This configuration also does not allow running Phusion Passenger Standalone against
536
+ a different Nginx version than the packager intended, but does allow running
537
+ against a different Ruby version. Passenger Standlone looks for its binaries
538
+ in the location as specified by the location configuration file; it makes no
539
+ attempt to compile anything, except of course for the Ruby extension.</p>
540
+
541
+ <p>If either the non-Standalone or the Standalone Passenger needs to have a new Ruby
542
+ extension compiled, then it will store that in <code>~/.passenger/native_support/&lt;VERSION&gt;/&lt;ARCH&gt;</code>.</p>
543
+
544
+ <h1>The location configuration file</h1>
545
+
546
+ <p>The Phusion Passenger administration tools, such as <code>passenger-status</code>, look for a
547
+ location configuration file in the following places, in the given order:</p>
548
+
549
+ <ul>
550
+ <li>The environment variable <code>$PASSENGER_LOCATION_CONFIGURATION_FILE</code>.</li>
551
+ <li><code>&lt;RUBYLIBDIR&gt;/phusion_passenger/locations.ini</code>, where <LIBDIR> is the Ruby library
552
+ directory that contains phusion_passenger.rb. For example,
553
+ <code>/usr/lib/ruby/1.9.0/phusion_passenger/locations.ini</code>.</li>
554
+ <li><code>~/.passenger/locations.ini</code></li>
555
+ <li><code>/etc/phusion-passenger/locations.ini</code></li>
556
+ </ul>
557
+
558
+
559
+ <p>If it cannot find a location configuration file, then it assumes that Phusion
560
+ Passenger is originally packaged. If a location configuration file is found then
561
+ the configuration is determined by the <code>natively_packaged</code> option in the
562
+ location configuration file, which can be either "true" or "false".</p>
563
+
564
+ <p>The Apache module and the Nginx module expect <code>PassengerRoot</code>/<code>passenger_root</code> to
565
+ refer to either a directory or a file. If the value refers to a directory, then it
566
+ assumes that Phusion Passenger is originally packaged, where the source root is the
567
+ specified directory. If the value refers to a file, then it will use it as the
568
+ location configuration file, and the configuration depends on the
569
+ <code>natively_packaged</code> setting.</p>
570
+
571
+ <p>The location configuration file is an ini file that looks as follows:</p>
572
+
573
+ <pre><code>[locations]
574
+ natively_packaged=true
575
+ bin=/usr/bin
576
+ agents=/usr/lib/phusion-passenger/agents
577
+ libdir=/usr/lib/phusion-passenger
578
+ helper_scripts=/usr/share/phusion-passenger/helper-scripts
579
+ resources=/usr/share/phusion-passenger
580
+ includedir=/usr/share/phusion-passenger/include
581
+ doc=/usr/share/doc/phusion-passenger
582
+ rubylibdir=/usr/lib/ruby/vendor_ruby
583
+ apache2_module=/usr/lib/apache2/modules/mod_passenger.so
584
+ ruby_extension_source=/usr/share/phusion-passenger/ruby_extension_source
585
+ </code></pre>
586
+
587
+ <p>All keys except fo <code>natively_packaged</code> specify the locations of assets and asset
588
+ directories. The "Asset types" section provides a description of all asset types.</p>
589
+
590
+ <p>Thus, if you're packaging Phusion Passenger, then we recommend the following:</p>
591
+
592
+ <ul>
593
+ <li>Put a locations.ini file in <code>&lt;RUBYLIBDIR&gt;/phusion_passenger/locations.ini</code> and
594
+ set <code>PassengerRoot</code>/<code>passenger_root</code> to that filename. We don't recommend using
595
+ <code>~/.passenger</code> or <code>/etc/phusion-passenger</code> because if the user wants to install
596
+ a different Phusion Passenger version alongside the one that you've packaged,
597
+ then that other version will incorrectly locate your packaged files instead of
598
+ its own files.</li>
599
+ <li>Always set <code>natively_packaged</code> to "true". The "false" value is used
600
+ internally for implementing Phusion Passenger Standalone and should never be
601
+ used by packagers.</li>
602
+ </ul>
603
+
604
+
605
+ <h1>The Phusion Passenger Ruby libraries</h1>
606
+
607
+ <h2>phusion_passenger.rb</h2>
608
+
609
+ <p>The Phusion Passenger administration tools are written in Ruby. So the first thing
610
+ they do is trying to load <code>phusion_passenger.rb</code>, which is the source file
611
+ responsible for figuring out where all the other Phusion Passenger files are. It
612
+ tries to look for phusion<em>passenger.rb in <code>&lt;OWN_DIRECTORY&gt;/../lib</code> where
613
+ <code>&lt;OWN_DIRECTORY&gt;</code> is the directory that the tool is located in. If
614
+ phusion</em>passenger.rb is not there, then it tries to load it from the normal Ruby
615
+ load path.</p>
616
+
617
+ <h2>Ruby extension</h2>
618
+
619
+ <p>The Phusion Passenger loader scripts try to load the Phusion Passenger Ruby
620
+ extension (<code>passenger_native_support.so</code>) from the following places, in the given order:</p>
621
+
622
+ <ul>
623
+ <li>If Phusion Passenger is originally packaged, it will look for the Ruby
624
+ extension in <code>&lt;SOURCE_ROOT&gt;/libout/ruby/&lt;ARCH&gt;</code>. Otherwise, this step is skipped.</li>
625
+ <li>The Ruby library load path.</li>
626
+ <li><code>~/.passenger/native_support/&lt;VERSION&gt;/&lt;ARCH&gt;</code></li>
627
+ </ul>
628
+
629
+
630
+ <p>If it cannot find the Ruby extension in any of the above places, then it will
631
+ attempt to compile the Ruby extension and store it in
632
+ <code>~/.passenger/native_support/&lt;VERSION&gt;/&lt;ARCH&gt;</code>.</p>
633
+
634
+ <h2>Conclusion for packagers</h2>
635
+
636
+ <p>If you're packaging Phusion Passenger then you should put both phusion_passenger.rb
637
+ and <code>passenger_native_support.so</code> somewhere in the Ruby load path, or make sure that
638
+ that directory is included in the <code>$RUBYLIB</code> environment variable. You cannot specify
639
+ a custom directory though the location configuration file.</p>
640
+
641
+ <h1>Asset types</h1>
642
+
643
+ <p>Throughout the Phusion Passenger codebase, we refer to all kinds of assets. Here's
644
+ a list of all possible assets and asset directories.</p>
645
+
646
+ <ul>
647
+ <li><p><code>source_root</code></p>
648
+
649
+ <p>When Phusion Passenger is originally packaged, this refers to the directory
650
+ that contains the entire Phusion passenger source tree. Not available when
651
+ natively packaged.</p></li>
652
+ <li><p><code>bin</code></p>
653
+
654
+ <p>A directory containing administration binaries and scripts and like
655
+ <code>passenger-status</code>; tools that the user may directly invoke on the command line.</p>
656
+
657
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/bin</code></p></li>
658
+ <li><p><code>agents</code></p>
659
+
660
+ <p>A directory that contains (platform-dependent) binaries that Phusion Passenger
661
+ uses, but that should not be directly invoked from the command line. Things like
662
+ PassengerHelperAgent are located here.</p>
663
+
664
+ <p>Value when originally packaged:</p>
665
+
666
+ <ul>
667
+ <li>Normally: <code>&lt;SOURCE_ROOT&gt;/agents</code></li>
668
+ <li>Passenger Standalone: <code>~/.passenger/standalone/&lt;VERSION&gt;/support-&lt;ARCH&gt;</code></li>
669
+ </ul>
670
+ </li>
671
+ <li><p><code>helper_scripts</code></p>
672
+
673
+ <p>A directory that contains non-binary scripts that Phusion Passenger uses, but
674
+ that should not be directly invoked from the command line. Things like
675
+ rack-loader.rb are located here.</p>
676
+
677
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/helper-scripts</code></p></li>
678
+ <li><p><code>resources</code></p>
679
+
680
+ <p>A directory that contains non-executable, platform-independent resource files
681
+ that the user should not directly access, like error page templates and
682
+ configuration file templates.</p>
683
+
684
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/resources</code>.</p></li>
685
+ <li><p><code>doc</code></p>
686
+
687
+ <p>A directory that contains documentation.</p>
688
+
689
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/doc</code>.</p></li>
690
+ <li><p><code>includedir</code></p>
691
+
692
+ <p>A directory that contains the Phusion Passenger header files that are
693
+ necessary for compiling Nginx.</p>
694
+
695
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/ext</code></p></li>
696
+ <li><p><code>libdir</code></p>
697
+
698
+ <p>A directory that contains the Phusion Passenger library files, e.g.
699
+ libboost_oxt.a and various .o files.</p>
700
+
701
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/libout</code></p></li>
702
+ <li><p><code>rubylibdir</code></p>
703
+
704
+ <p>A directory that contains the Phusion Passenger Ruby library files. Note that
705
+ the Phusion Passenger administration tools still locate phusion_passenger.rb
706
+ as described in the section "The Phusion Passenger Ruby libraries",
707
+ irregardless of the value of this key in the location configuration file.
708
+ The value is only useful to non-Ruby Phusion Passenger code.</p>
709
+
710
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/lib</code>.</p></li>
711
+ <li><p><code>apache2_module</code></p>
712
+
713
+ <p>The filename of the Apache 2 module, or the filename that the Apache 2 module
714
+ will be stored after it's compiled. Used by <code>passenger-install-module</code> to
715
+ print an example configuration snippet.</p>
716
+
717
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/ext/apache2/mod_passenger.so</code>.</p></li>
718
+ <li><p><code>ruby_extension_source</code></p>
719
+
720
+ <p>The directory that contains the source code for the Phusion Passenger Ruby
721
+ extension.</p>
722
+
723
+ <p>Value when originally packaged: <code>&lt;SOURCE_ROOT&gt;/ext/ruby</code>.</p></li>
724
+ </ul>
725
+
726
+
727
+ <h1>Vendoring of libraries</h1>
728
+
729
+ <p>Phusion Passenger vendors libev and libeio in order to make installation easier
730
+ for users on operating systems without proper package management, like OS X.
731
+ If you want Phusion Passenger to compile against the system-provided
732
+ libev and/or libeio instead, then set the following environment variables
733
+ before compiling:</p>
734
+
735
+ <ul>
736
+ <li><code>export USE_VENDORED_LIBEV=no</code></li>
737
+ <li><code>export USE_VENDORED_LIBEIO=no</code></li>
738
+ </ul>
739
+
740
+
741
+ <p>Note that we require at least libev 4.11 and libeio 1.0.</p>
742
+
743
+ <h1>Generating gem and tarball</h1>
744
+
745
+ <p>Use the following commands to generate a gem and tarball, in which Phusion
746
+ Passenger is originally packaged and without any binaries:</p>
747
+
748
+ <pre><code>rake package:gem
749
+ rake package:tarball
750
+ </code></pre>
751
+
752
+ <p>The files will be stored in <code>pkg/</code>.</p>
753
+
754
+ <h1>Fakeroot</h1>
755
+
756
+ <p>You can generate a fakeroot with the command <code>rake fakeroot</code>. This will
757
+ generate an FHS-compliant directory tree in <code>pkg/fakeroot</code>, which you can
758
+ directly package or with minor modifications. The fakeroot even contains
759
+ a location configuration file.</p>
760
+
761
+
762
+ <footer>
763
+ <p>&copy; Phusion</p>
764
+ </footer>
765
+
766
+ <div id="bottom-vertical-container-margin"></div>
767
+ </div>
768
+
769
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
770
+ <script>
771
+ (function() {
772
+ var toc = $('#toc');
773
+ var i = 1;
774
+
775
+ $('h1,h2,h3').each(function() {
776
+ var level = parseInt(this.nodeName.match(/\d+/)[0]);
777
+ var id = "header_" + i;
778
+ var item = $('<div><a></a></div>').appendTo(toc);
779
+ item.addClass("level-" + level);
780
+ item.find('a').
781
+ text($(this).text()).
782
+ prop('href', '#' + id);
783
+ $(this).prop('id', id);
784
+ i++;
785
+ });
786
+
787
+ toc.show();
788
+ })();
789
+ </script>
790
+
791
+ </body>
792
+ </html>