passenger 4.0.53 → 4.0.55

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.

@@ -205,10 +205,11 @@ string escapeForXml(const StaticString &input);
205
205
 
206
206
  /**
207
207
  * Returns the username of the user that the current process is running as.
208
- * If the user has no associated username, then "UID xxxx" is returned,
209
- * where xxxx is the current UID.
208
+ * If the user has no associated username, then the behavior depends on the
209
+ * `fallback` argument. When true, "UID xxxx" is returned, where xxxx is the
210
+ * current UID. When false, the empty string is returned.
210
211
  */
211
- string getProcessUsername();
212
+ string getProcessUsername(bool fallback = true);
212
213
 
213
214
  /**
214
215
  * Returns either the group name for the given GID, or (if the group name
@@ -37,8 +37,10 @@ end
37
37
  have_header('alloca.h')
38
38
  have_header('ruby/version.h')
39
39
  have_header('ruby/io.h')
40
+ have_header('ruby/thread.h')
40
41
  have_var('ruby_version')
41
42
  have_func('rb_thread_io_blocking_region')
43
+ have_func('rb_thread_call_without_gvl')
42
44
 
43
45
  with_cflags($CFLAGS) do
44
46
  create_makefile('passenger_native_support')
@@ -36,6 +36,9 @@
36
36
  #ifdef HAVE_RUBY_VERSION_H
37
37
  #include "ruby/version.h"
38
38
  #endif
39
+ #ifdef HAVE_RUBY_THREAD_H
40
+ #include "ruby/thread.h"
41
+ #endif
39
42
  #include <sys/types.h>
40
43
  #include <sys/stat.h>
41
44
  #include <sys/ioctl.h>
@@ -199,11 +202,19 @@ update_group_written_info(IOVectorGroup *group, ssize_t bytes_written) {
199
202
  int iovcnt;
200
203
  } WritevWrapperData;
201
204
 
202
- static VALUE
203
- writev_wrapper(void *ptr) {
204
- WritevWrapperData *data = (WritevWrapperData *) ptr;
205
- return (VALUE) writev(data->filedes, data->iov, data->iovcnt);
206
- }
205
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
206
+ static void *
207
+ writev_wrapper(void *ptr) {
208
+ WritevWrapperData *data = (WritevWrapperData *) ptr;
209
+ return (void *) writev(data->filedes, data->iov, data->iovcnt);
210
+ }
211
+ #else
212
+ static VALUE
213
+ writev_wrapper(void *ptr) {
214
+ WritevWrapperData *data = (WritevWrapperData *) ptr;
215
+ return (VALUE) writev(data->filedes, data->iov, data->iovcnt);
216
+ }
217
+ #endif
207
218
  #endif
208
219
 
209
220
  static VALUE
@@ -320,7 +331,10 @@ f_generic_writev(VALUE fd, VALUE *array_of_components, unsigned int count) {
320
331
  writev_wrapper_data.filedes = fd_num;
321
332
  writev_wrapper_data.iov = groups[i].io_vectors;
322
333
  writev_wrapper_data.iovcnt = groups[i].count;
323
- #ifdef HAVE_RB_THREAD_IO_BLOCKING_REGION
334
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
335
+ ret = (int) rb_thread_call_without_gvl(writev_wrapper,
336
+ &writev_wrapper_data, RUBY_UBF_IO, NULL);
337
+ #elif defined(HAVE_RB_THREAD_IO_BLOCKING_REGION)
324
338
  ret = (int) rb_thread_io_blocking_region(writev_wrapper,
325
339
  &writev_wrapper_data, fd_num);
326
340
  #else
@@ -726,13 +740,23 @@ fs_watcher_wait_fd(VALUE _fd) {
726
740
  }
727
741
 
728
742
  #ifndef TRAP_BEG
729
- static VALUE
730
- fs_watcher_read_byte_from_fd_wrapper(void *_arg) {
731
- FSWatcherReadByteData *data = (FSWatcherReadByteData *) _arg;
732
- data->ret = read(data->fd, &data->byte, 1);
733
- data->error = errno;
734
- return Qnil;
735
- }
743
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
744
+ static void *
745
+ fs_watcher_read_byte_from_fd_wrapper(void *_arg) {
746
+ FSWatcherReadByteData *data = (FSWatcherReadByteData *) _arg;
747
+ data->ret = read(data->fd, &data->byte, 1);
748
+ data->error = errno;
749
+ return NULL;
750
+ }
751
+ #else
752
+ static VALUE
753
+ fs_watcher_read_byte_from_fd_wrapper(void *_arg) {
754
+ FSWatcherReadByteData *data = (FSWatcherReadByteData *) _arg;
755
+ data->ret = read(data->fd, &data->byte, 1);
756
+ data->error = errno;
757
+ return Qnil;
758
+ }
759
+ #endif
736
760
  #endif
737
761
 
738
762
  static VALUE
@@ -743,6 +767,9 @@ fs_watcher_read_byte_from_fd(VALUE _arg) {
743
767
  data->ret = read(data->fd, &data->byte, 1);
744
768
  TRAP_END;
745
769
  data->error = errno;
770
+ #elif defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
771
+ rb_thread_call_without_gvl2(fs_watcher_read_byte_from_fd_wrapper,
772
+ data, RUBY_UBF_IO, NULL);
746
773
  #elif defined(HAVE_RB_THREAD_IO_BLOCKING_REGION)
747
774
  rb_thread_io_blocking_region(fs_watcher_read_byte_from_fd_wrapper,
748
775
  data, data->fd);
@@ -30,7 +30,7 @@ module PhusionPassenger
30
30
 
31
31
  PACKAGE_NAME = 'passenger'
32
32
  # Run 'rake ext/common/Constants.h' after changing this number.
33
- VERSION_STRING = '4.0.53'
33
+ VERSION_STRING = '4.0.55'
34
34
 
35
35
  PREFERRED_NGINX_VERSION = '1.6.2'
36
36
  NGINX_SHA256_CHECKSUM = 'b5608c2959d3e7ad09b20fc8f9e5bd4bc87b3bc8ba5936a513c04ed8f1391a18'
@@ -37,16 +37,17 @@ module Packaging
37
37
  # Files that must be generated before packaging.
38
38
  PREGENERATED_FILES = [
39
39
  'ext/common/Constants.h',
40
- 'doc/Packaging.html'
40
+ 'doc/Packaging.html',
41
+ 'doc/CloudLicensingConfiguration.html'
41
42
  ] + ASCII_DOCS
42
-
43
+
43
44
  USER_EXECUTABLES = [
44
45
  'passenger',
45
46
  'passenger-install-apache2-module',
46
47
  'passenger-install-nginx-module',
47
48
  'passenger-config'
48
49
  ]
49
-
50
+
50
51
  SUPER_USER_EXECUTABLES = [
51
52
  'passenger-status',
52
53
  'passenger-memory-stats'
@@ -62,7 +63,7 @@ module Packaging
62
63
  'passenger-install-apache2-module',
63
64
  'passenger-install-nginx-module'
64
65
  ]
65
-
66
+
66
67
  # A list of globs which match all files that should be packaged
67
68
  # in the Phusion Passenger gem or tarball.
68
69
  GLOB = [
@@ -129,7 +130,7 @@ module Packaging
129
130
  'test/stub/**/*',
130
131
  'test/stub/**/.*'
131
132
  ]
132
-
133
+
133
134
  EXCLUDE_GLOB = [
134
135
  '**/.DS_Store',
135
136
  'packaging/*/.git',
@@ -34,14 +34,14 @@ module PlatformInfo
34
34
  def self.os_name
35
35
  if rb_config['target_os'] =~ /darwin/ && (sw_vers = find_command('sw_vers'))
36
36
  return "macosx"
37
- elsif rb_config['target_os'] == "linux-"
37
+ elsif rb_config['target_os'] =~ /^linux-/
38
38
  return "linux"
39
39
  else
40
40
  return rb_config['target_os']
41
41
  end
42
42
  end
43
43
  memoize :os_name
44
-
44
+
45
45
  # The current platform's shared library extension ('so' on most Unices).
46
46
  def self.library_extension
47
47
  if os_name == "macosx"
@@ -50,7 +50,7 @@ module PlatformInfo
50
50
  return "so"
51
51
  end
52
52
  end
53
-
53
+
54
54
  # Returns the `uname` command, or nil if `uname` cannot be found.
55
55
  # In addition to looking for `uname` in `PATH`, this method also looks
56
56
  # for `uname` in /bin and /usr/bin, just in case the user didn't
@@ -129,7 +129,7 @@ module PlatformInfo
129
129
  elsif arch == "amd64"
130
130
  arch = "x86_64"
131
131
  end
132
-
132
+
133
133
  if arch == "x86"
134
134
  # Most x86 operating systems nowadays are probably running on
135
135
  # a CPU that supports both x86 and x86_64, but we're not gonna
@@ -146,7 +146,7 @@ module PlatformInfo
146
146
  end
147
147
  end
148
148
  memoize :cpu_architectures, true
149
-
149
+
150
150
  # Returns whether the OS's main CPU architecture supports the
151
151
  # x86/x86_64 sfence instruction.
152
152
  def self.supports_sfence_instruction?
@@ -161,7 +161,7 @@ module PlatformInfo
161
161
  }))
162
162
  end
163
163
  memoize :supports_sfence_instruction?, true
164
-
164
+
165
165
  # Returns whether the OS's main CPU architecture supports the
166
166
  # x86/x86_64 lfence instruction.
167
167
  def self.supports_lfence_instruction?
@@ -169,6 +169,7 @@ module Utils
169
169
  if thread_name = thread[:name]
170
170
  thread_name = "(#{thread_name})"
171
171
  end
172
+ stack ||= ["(empty)"]
172
173
  output << ("-" * 60) << "\n"
173
174
  output << "# Thread: #{thread.inspect}#{thread_name}, "
174
175
  if thread == Thread.main
@@ -62,7 +62,11 @@ when "deb"
62
62
  APACHE2_MODULE_PATH = "/usr/lib/apache2/modules/mod_passenger.so"
63
63
  SUPPORTS_COMPILING_APACHE_MODULE = false
64
64
 
65
- APXS2 = "/usr/bin/apxs2"
65
+ if `lsb_release -r -s`.strip <= '12.04'
66
+ APXS2 = "/usr/bin/apxs2"
67
+ else
68
+ APXS2 = "/usr/bin/apxs"
69
+ end
66
70
  APACHE2 = "/usr/sbin/apache2"
67
71
  APACHE2CTL = "/usr/sbin/apache2ctl"
68
72
  APACHE_CONFIG_FILE = "/etc/apache2/apache2.conf"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.53
4
+ version: 4.0.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -143,6 +143,8 @@ files:
143
143
  - dev/vagrant/nginx_start
144
144
  - dev/vagrant/provision.sh
145
145
  - dev/vagrant/sudoers.conf
146
+ - doc/CloudLicensingConfiguration.html
147
+ - doc/CloudLicensingConfiguration.txt.md
146
148
  - doc/CodingTipsAndPitfalls.md
147
149
  - doc/DebuggingAndStressTesting.md
148
150
  - doc/Design and Architecture.html
@@ -165,6 +167,7 @@ files:
165
167
  - doc/Users guide.html
166
168
  - doc/Users guide.txt
167
169
  - doc/images/by_sa.png
170
+ - doc/images/cloud_licensing_batch_job.png
168
171
  - doc/images/code_walkthrough.jpg
169
172
  - doc/images/direct_spawning.png
170
173
  - doc/images/direct_spawning.svg
@@ -213,6 +216,7 @@ files:
213
216
  - doc/images/startup_sequence.png
214
217
  - doc/images/typical_isolated_web_application.png
215
218
  - doc/images/typical_isolated_web_application.svg
219
+ - doc/templates/bootstrap.config.json
216
220
  - doc/templates/bootstrap.min.css
217
221
  - doc/templates/markdown.html.erb
218
222
  - doc/users_guide_snippets/alternative_for_flying_passenger.txt
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
- iQEcBAABAgAGBQJUK9cjAAoJECrHRaUKISqMRTgIAKJVJG6YhhvH+p0wfTavrjXs
6
- sQ3ovOKf3NchudkMC24B0D88I4hvYCsFPmA9ltllpnh95IJu9ffDL3jp5Pb/vh+E
7
- dWpEojuzw03gaob9JYNMVij3V7yKfSznGQwjOgpcz1/dSwGElOoZdSMsL0OHJRXl
8
- k+d9c6PpiJqn1wdmIIez91zeENFuxcc9qlTPJWFGgQvaztnV78Av0KBO6d46ohRt
9
- fon/+sj4BVpsg3kvj5Z/dzegCHd1FX6LTvNrnrfcFf+IR1ky1XhS+NPM6AZbUnsf
10
- WlszF70EnEgxBCZDtpiUlJKBg16P7XSAVE5dyzM082jvZeBs1t5ZJzEmCNCwDhM=
11
- =R6Mx
5
+ iQEcBAABAgAGBQJUiwJyAAoJECrHRaUKISqMAsYIAJrctJZvwWdk61VIysNIQdBa
6
+ 8Rt8kvfFvCyUQzXn2CiofyhLT66lhJxnP76b+Y6rbLTPJvYQNwdK+gqpSO1PqSkh
7
+ PFm4rT68dzYh1UfRJL+KRuciz8U/gREpNEg10gxeHU+jwvKLlgnrmxXVLKVMhmvX
8
+ B26++RExwF/7pasctr8QOe6EecTM5ccWwy7/Cl+qt3Y7W3rM6KZqtZWAvvCNfq0w
9
+ Q0z487MHplF3tPy+HSfPJrcBaUBHw5Bda0pMXsNOjj62Kz9j7MARIdzyCjArayma
10
+ 1OXtXfO7nt1rNKs527P1Umf46xToZZOnP278rrMivgSbKOTylZnfV8VxC0e2tng=
11
+ =/7tV
12
12
  -----END PGP SIGNATURE-----