passenger 5.2.0 → 5.2.1

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 662ef10e6355ee7d591b4c7693f55555e604fd2c
4
- data.tar.gz: 7ec97f50b885886f64500f061be9814733a6459f
3
+ metadata.gz: 4b004a624f6e999498dcb7033c16bd552696b2a0
4
+ data.tar.gz: f6c0c50888bfff73ff97c9f1f53e61da1be4cd3f
5
5
  SHA512:
6
- metadata.gz: '08e0bd4acf4de0ffe3db1261c2512e08119531d3785e6405a74bc445b8c559e9a6eefb01b1fa403c9a28b63f7f3ede24b2ede47b4c85ca483851b35f3e751843'
7
- data.tar.gz: d46303428cd6bbd875f184278f354e84180825c7c7cefb5614eb2c87bf061d7e5880510e4795c4bf902e20d261fd5f28b6a8507fd7a9d7ab5223206e97dd4922
6
+ metadata.gz: 86f190ae09c09448f6cdb69f48c4f66b90ef7c7c9cf94633053b0de5aa2412bb80ace7271f11954327bbebf7715c2a0a05b61326072b8d354e6fb05e3c9b7a2e
7
+ data.tar.gz: 9428480d5d9fc6c9829e2d1c6a6ab00daabce12235f11a1aade4afdb91d736e7a25fd42d3cfbf7fd648ff412808001eadb6225908ebc641348b8d8d6cabfd7ab
data/CHANGELOG CHANGED
@@ -1,3 +1,17 @@
1
+ Release 5.2.1
2
+ -------------
3
+
4
+ * Fixes a regression from 5.1.11 that prevented Passenger from compiling on FreeBSD in some cases. Closes GH-2031.
5
+ * Fixes a bounds issue in printing an error message that could occur in some cases when spawning a child process fails. Issue was present from 5.1.11.
6
+ * Fixes a regression from 5.2.0 which prevented setting the max pool idle time to 0. Closes GH-2020.
7
+ * Warns if using an incompatible compiler on macOS < 10.13. Closes GH-2017.
8
+ * No longer uses Security Framework on macOS 10.13+. This will prevent further keychain warnings from appropriately compiled Passengers.
9
+ * Fixes warning on macOS about /proc/self access (excluded some code that was intended only for Linux).
10
+ * `passenger-install-nginx-module` now downloads the preferred Nginx version via https. Thanks to smiba for pointing this out.
11
+ * [Apache] Fixes a regression from 5.2.0 that caused a crash on startup when no top-level ServerName is set. Closes GH-2029.
12
+ * [Enterprise] Adds support for using RAM-based pricing on Heroku.
13
+
14
+
1
15
  Release 5.2.0
2
16
  -------------
3
17
 
data/Rakefile CHANGED
@@ -44,6 +44,11 @@ end
44
44
 
45
45
  require("#{SOURCE_ROOT}/config") if File.exist?("#{SOURCE_ROOT}/config.rb")
46
46
  require_build_system_file 'basics'
47
+
48
+ if PlatformInfo.os_name_simple == 'macosx'
49
+ ENV["MACOSX_DEPLOYMENT_TARGET"] ||= PlatformInfo.os_version
50
+ end
51
+
47
52
  if boolean_option('ONLY_RUBY')
48
53
  require_build_system_file 'ruby_extension'
49
54
  else
@@ -88,8 +88,8 @@ class Installer < PhusionPassenger::AbstractInstaller
88
88
  end
89
89
  ids << 'rack'
90
90
  end
91
- # On macOS our Crypto.cpp uses TransportSecurity instead of OpenSSL.
92
- if PlatformInfo.os_name_simple != 'macosx'
91
+ # On macOS Curl uses TransportSecurity instead of OpenSSL, except on High Sierra or later.
92
+ if !(PlatformInfo.os_name_simple == 'macosx' && PlatformInfo.os_version <= '10.13')
93
93
  ids << 'openssl-dev'
94
94
  end
95
95
  if PlatformInfo.apxs2_needed_for_building_apache_modules?
@@ -306,7 +306,7 @@ private
306
306
  new_screen
307
307
  puts "<banner>Downloading Nginx...</banner>"
308
308
 
309
- url = "http://www.nginx.org/download/nginx-#{PREFERRED_NGINX_VERSION}.tar.gz"
309
+ url = "https://nginx.org/download/nginx-#{PREFERRED_NGINX_VERSION}.tar.gz"
310
310
  dirname = "nginx-#{PREFERRED_NGINX_VERSION}"
311
311
  tarball = "#{@working_dir}/nginx.tar.gz"
312
312
 
@@ -62,8 +62,14 @@ let(:agent_ldflags) do
62
62
  result << '-lselinux' if USE_SELINUX
63
63
  # Extra linker flags for backtrace_symbols() to generate useful output (see agent/Base.cpp).
64
64
  result << PlatformInfo.export_dynamic_flags
65
- # Enable dead symbol elimination on OS X.
66
- result << '-Wl,-dead_strip' if PlatformInfo.os_name_simple == 'macosx'
65
+ if PlatformInfo.os_name_simple == 'macosx'
66
+ # Enable dead symbol elimination on OS X.
67
+ result << '-Wl,-dead_strip'
68
+ if PlatformInfo.os_version >= '10.13'
69
+ result << PlatformInfo.openssl_extra_ldflags
70
+ result << '-lcrypto'
71
+ end
72
+ end
67
73
  result.join(' ')
68
74
  end
69
75
 
@@ -83,6 +89,7 @@ AGENT_OBJECTS.each_pair do |object, source|
83
89
  libuv_cflags,
84
90
  websocketpp_cflags,
85
91
  PlatformInfo.curl_flags,
92
+ PlatformInfo.openssl_extra_cflags,
86
93
  PlatformInfo.zlib_flags
87
94
  ]
88
95
  } }
@@ -40,6 +40,7 @@ PhusionPassenger.require_passenger_lib 'platform_info/apache'
40
40
  PhusionPassenger.require_passenger_lib 'platform_info/curl'
41
41
  PhusionPassenger.require_passenger_lib 'platform_info/zlib'
42
42
  PhusionPassenger.require_passenger_lib 'platform_info/crypto'
43
+ PhusionPassenger.require_passenger_lib 'platform_info/openssl'
43
44
  PhusionPassenger.require_passenger_lib 'platform_info/compiler'
44
45
  PhusionPassenger.require_passenger_lib 'platform_info/cxx_portability'
45
46
 
@@ -278,7 +278,7 @@
278
278
  "type" : "unsigned integer"
279
279
  },
280
280
  "server_software" : {
281
- "default_value" : "Phusion_Passenger/5.2.0",
281
+ "default_value" : "Phusion_Passenger/5.2.1",
282
282
  "has_default_value" : "static",
283
283
  "type" : "string"
284
284
  },
@@ -772,7 +772,7 @@
772
772
  "type" : "string"
773
773
  },
774
774
  "server_software" : {
775
- "default_value" : "Phusion_Passenger/5.2.0",
775
+ "default_value" : "Phusion_Passenger/5.2.1",
776
776
  "has_default_value" : "static",
777
777
  "type" : "string"
778
778
  },
@@ -1481,7 +1481,7 @@
1481
1481
  "type" : "string"
1482
1482
  },
1483
1483
  "server_software" : {
1484
- "default_value" : "Phusion_Passenger/5.2.0",
1484
+ "default_value" : "Phusion_Passenger/5.2.1",
1485
1485
  "has_default_value" : "static",
1486
1486
  "type" : "string"
1487
1487
  },
@@ -216,7 +216,7 @@ a list of all possible assets and asset directories.
216
216
  A directory that contains the Phusion Passenger Ruby library files. Note that
217
217
  the Phusion Passenger administration tools still locate phusion_passenger.rb
218
218
  as described in the section "The Phusion Passenger Ruby libraries",
219
- irregardless of the value of this key in the location configuration file.
219
+ irrespective of the value of this key in the location configuration file.
220
220
  The value is only useful to non-Ruby Phusion Passenger code.
221
221
 
222
222
  Value when originally packaged: `<SOURCE_ROOT>/src/ruby_supportlib`.
@@ -585,7 +585,7 @@ Group::disable(const ProcessPtr &process, const DisableCallback &callback) {
585
585
  /* All processes are going to be disabled, so in order
586
586
  * to avoid blocking requests we first spawn a new process
587
587
  * and disable this process after the other one is done
588
- * spawning. We do this irregardless of resource limits
588
+ * spawning. We do this irrespective of resource limits
589
589
  * because this is an exceptional situation.
590
590
  */
591
591
  P_DEBUG("Spawning a new process to avoid the disable action from blocking requests");
@@ -150,7 +150,7 @@ using namespace std;
150
150
  * security_update_checker_interval unsigned integer - default(86400)
151
151
  * security_update_checker_proxy_url string - -
152
152
  * security_update_checker_url string - default("https://securitycheck.phusionpassenger.com/v1/check.json")
153
- * server_software string - default("Phusion_Passenger/5.2.0")
153
+ * server_software string - default("Phusion_Passenger/5.2.1")
154
154
  * show_version_in_header boolean - default(true)
155
155
  * single_app_mode_app_root string - default,read_only
156
156
  * single_app_mode_app_type string - read_only
@@ -280,9 +280,6 @@ private:
280
280
  if (config["max_pool_size"].asUInt() < 1) {
281
281
  errors.push_back(Error("'{{max_pool_size}}' must be at least 1"));
282
282
  }
283
- if (config["pool_idle_time"].asUInt() < 1) {
284
- errors.push_back(Error("'{{pool_idle_time}}' must be at least 1"));
285
- }
286
283
  }
287
284
 
288
285
  static void validateController(const ConfigKit::Store &config, vector<ConfigKit::Error> &errors) {
@@ -111,7 +111,7 @@ parseControllerBenchmarkMode(const StaticString &mode) {
111
111
  * multi_app boolean - default(true),read_only
112
112
  * request_freelist_limit unsigned integer - default(1024)
113
113
  * response_buffer_high_watermark unsigned integer - default(134217728)
114
- * server_software string - default("Phusion_Passenger/5.2.0")
114
+ * server_software string - default("Phusion_Passenger/5.2.1")
115
115
  * show_version_in_header boolean - default(true)
116
116
  * start_reading_after_accept boolean - default(true)
117
117
  * stat_throttle_rate unsigned integer - default(10)
@@ -1319,7 +1319,9 @@ coreMain(int argc, char *argv[]) {
1319
1319
  *coreConfig, coreSchema->loggingKit.translator,
1320
1320
  parseOptions, NULL, 2);
1321
1321
 
1322
+ #if !BOOST_OS_MACOS
1322
1323
  restoreOomScore(coreConfig->get("oom_score").asString());
1324
+ #endif
1323
1325
 
1324
1326
  ret = runCore();
1325
1327
  shutdownAgent(coreSchema, coreConfig);
@@ -44,6 +44,14 @@
44
44
  #if BOOST_OS_MACOS
45
45
  #include <sys/syslimits.h>
46
46
  #include <unistd.h>
47
+ #include <Availability.h>
48
+ #ifndef __MAC_10_13
49
+ #define __MAC_10_13 101300
50
+ #endif
51
+ #define PRE_HIGH_SIERRA (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_13)
52
+ #if !PRE_HIGH_SIERRA
53
+ #include <openssl/err.h>
54
+ #endif
47
55
  #endif
48
56
 
49
57
  namespace Passenger {
@@ -55,11 +63,13 @@ using namespace oxt;
55
63
  #define MIN_CHECK_BACKOFF_SEC (12 * 60 * 60)
56
64
  #define MAX_CHECK_BACKOFF_SEC (7 * 24 * 60 * 60)
57
65
 
66
+ #if PRE_HIGH_SIERRA
58
67
  // Password for the .p12 client certificate (because .p12 is required to be pwd protected on some
59
68
  // implementations). We're OK with hardcoding because the certs are not secret anyway, and they're not used
60
69
  // for client id/auth (just to easily deflect unrelated probes from the server endpoint).
61
70
  #define CLIENT_CERT_PWD "p6PBhK8KtorrhMxHnH855MvF"
62
71
  #define CLIENT_CERT_LABEL "Phusion Passenger Open Source"
72
+ #endif
63
73
 
64
74
  #define POSSIBLE_MITM_RESOLUTION "(if this error persists check your connection security or try upgrading " SHORT_PROGRAM_NAME ")"
65
75
 
@@ -289,7 +299,7 @@ private:
289
299
 
290
300
  logUpdateFail(error);
291
301
 
292
- #if !BOOST_OS_MACOS
302
+ #if !(BOOST_OS_MACOS && PRE_HIGH_SIERRA)
293
303
  unsigned long cryptoErrorCode = ERR_get_error();
294
304
  if (cryptoErrorCode == 0) {
295
305
  logUpdateFailAdditional("CURLcode" + toString(code));
@@ -371,7 +381,7 @@ private:
371
381
  return code;
372
382
  }
373
383
 
374
- #if BOOST_OS_MACOS
384
+ #if BOOST_OS_MACOS && PRE_HIGH_SIERRA
375
385
  // preauth the security update check key in the user's keychain (this is for libcurl's benefit because they don't bother to authorize themselves to use the keys they import)
376
386
  if (!crypto.preAuthKey(clientCertPath.c_str(), CLIENT_CERT_PWD, CLIENT_CERT_LABEL)) {
377
387
  return CURLE_SSL_CERTPROBLEM;
@@ -459,7 +469,7 @@ public:
459
469
  throw RuntimeException("resourceLocator must be non-NULL");
460
470
  }
461
471
 
462
- #if BOOST_OS_MACOS
472
+ #if BOOST_OS_MACOS && PRE_HIGH_SIERRA
463
473
  clientCertPath = resourceLocator->getResourcesDir() + "/update_check_client_cert.p12";
464
474
  #else
465
475
  clientCertPath = resourceLocator->getResourcesDir() + "/update_check_client_cert.pem";
@@ -713,7 +723,7 @@ public:
713
723
  }
714
724
  } while (false);
715
725
 
716
- #if BOOST_OS_MACOS
726
+ #if BOOST_OS_MACOS && PRE_HIGH_SIERRA
717
727
  // remove the security update check key from the user's keychain so that if we are stopped/crash and are upgraded or reinstalled before restarting we don't have permission problems
718
728
  crypto.killKey(CLIENT_CERT_LABEL);
719
729
  #endif
@@ -142,7 +142,7 @@ using namespace std;
142
142
  * security_update_checker_interval unsigned integer - default(86400)
143
143
  * security_update_checker_proxy_url string - -
144
144
  * security_update_checker_url string - default("https://securitycheck.phusionpassenger.com/v1/check.json")
145
- * server_software string - default("Phusion_Passenger/5.2.0")
145
+ * server_software string - default("Phusion_Passenger/5.2.1")
146
146
  * setsid boolean - default(false)
147
147
  * show_version_in_header boolean - default(true)
148
148
  * single_app_mode_app_root string - default,read_only
@@ -88,6 +88,7 @@ private:
88
88
  _exit(1);
89
89
  }
90
90
 
91
+ #if !BOOST_OS_MACOS
91
92
  bool isLegacy;
92
93
  ret = tryRestoreOomScore(originalOomScore, isLegacy);
93
94
  if (ret != 0) {
@@ -106,6 +107,7 @@ private:
106
107
  pos = ASSU::appendData(pos, end, "). Process will remain at inherited OOM score.");
107
108
  ASSU::printError(buf, pos - buf);
108
109
  }
110
+ #endif
109
111
  }
110
112
 
111
113
  void
@@ -176,6 +176,7 @@ static void cleanup(const WorkingObjectsPtr &wo);
176
176
 
177
177
  /***** Functions *****/
178
178
 
179
+ #if !BOOST_OS_MACOS
179
180
  static FILE *
180
181
  openOomAdjFileGetType(const char *mode, OomFileType &type) {
181
182
  FILE *f = fopen("/proc/self/oom_score_adj", mode);
@@ -249,6 +250,7 @@ setOomScoreNeverKill() {
249
250
 
250
251
  return oldScore;
251
252
  }
253
+ #endif
252
254
 
253
255
  static void
254
256
  terminationHandler(int signo) {
@@ -791,7 +793,9 @@ initializeBareEssentials(int argc, char *argv[], WorkingObjectsPtr &wo) {
791
793
  * for this watchdog. Note that the OOM score is inherited by child processes
792
794
  * so we need to restore it after each fork().
793
795
  */
796
+ #if !BOOST_OS_MACOS
794
797
  string oldOomScore = setOomScoreNeverKill();
798
+ #endif
795
799
 
796
800
  watchdogSchema = new Schema();
797
801
  watchdogConfig = new ConfigKit::Store(*watchdogSchema);
@@ -804,7 +808,9 @@ initializeBareEssentials(int argc, char *argv[], WorkingObjectsPtr &wo) {
804
808
 
805
809
  wo = boost::make_shared<WorkingObjects>();
806
810
  workingObjects = wo.get();
811
+ #if !BOOST_OS_MACOS
807
812
  wo->extraConfigToPassToSubAgents["oom_score"] = oldOomScore;
813
+ #endif
808
814
  }
809
815
 
810
816
  static void
@@ -198,7 +198,11 @@ private:
198
198
  server_rec *serverRec, core_dir_config *cdconf, DirConfig *pdconf)
199
199
  {
200
200
  Json::Value vhostDoc;
201
- vhostDoc["server_names"].append(serverRec->defn_name);
201
+ if (serverRec->defn_name) {
202
+ vhostDoc["server_names"].append(serverRec->defn_name);
203
+ } else {
204
+ vhostDoc["server_names"].append("NOT_RECEIVED");
205
+ }
202
206
 
203
207
  Json::Value locationMatcherDoc;
204
208
  locationMatcherDoc["value"] = cdconf->d;
@@ -80,7 +80,7 @@
80
80
  #define PASSENGER_API_VERSION_MAJOR 0
81
81
  #define PASSENGER_API_VERSION_MINOR 3
82
82
  #define PASSENGER_DEFAULT_USER "nobody"
83
- #define PASSENGER_VERSION "5.2.0"
83
+ #define PASSENGER_VERSION "5.2.1"
84
84
  #define POOL_HELPER_THREAD_STACK_SIZE 262144
85
85
  #define PROCESS_SHUTDOWN_TIMEOUT 60
86
86
  #define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
@@ -162,6 +162,7 @@ OSStatus Crypto::copyIdentityFromPKCS12File(const char *cPath,
162
162
  return status;
163
163
  }
164
164
 
165
+ #if PRE_HIGH_SIERRA
165
166
  void Crypto::killKey(const char *cLabel) {
166
167
  SecIdentityRef id = NULL;
167
168
  OSStatus status = lookupKeychainItem(cLabel, &id);
@@ -238,6 +239,7 @@ bool Crypto::preAuthKey(const char *path, const char *passwd, const char *cLabel
238
239
  return false;
239
240
  }
240
241
  }
242
+ #endif
241
243
 
242
244
  bool Crypto::generateRandomChars(unsigned char *rndChars, int rndLen) {
243
245
  FILE *fPtr = fopen("/dev/random", "r");
@@ -31,8 +31,13 @@
31
31
  #include <modp_b64.h>
32
32
 
33
33
  #if BOOST_OS_MACOS
34
+ #include <Availability.h>
35
+ #ifndef __MAC_10_13
36
+ #define __MAC_10_13 101300
37
+ #endif
34
38
  #include <CoreFoundation/CoreFoundation.h>
35
39
  #include <Security/Security.h>
40
+ #define PRE_HIGH_SIERRA (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_13)
36
41
  #else
37
42
  #include <openssl/pem.h>
38
43
  #include <openssl/rand.h>
@@ -105,11 +110,13 @@ public:
105
110
  bool generateAndAppendNonce(string &nonce);
106
111
 
107
112
  #if BOOST_OS_MACOS
113
+ #if PRE_HIGH_SIERRA
108
114
  /**
109
115
  * sets the permissions on the certificate so that curl doesn't prompt
110
116
  */
111
117
  bool preAuthKey(const char *path, const char *passwd, const char *cLabel);
112
118
  void killKey(const char *cLabel);
119
+ #endif
113
120
  bool generateRandomChars(unsigned char *rndChars, int rndLen);
114
121
  #endif
115
122
 
@@ -38,6 +38,7 @@
38
38
  #include <cstring>
39
39
  #include <cctype>
40
40
  #include <stdlib.h>
41
+ #include <sys/wait.h>
41
42
 
42
43
  #include <jsoncpp/json.h>
43
44
 
@@ -422,7 +422,7 @@ closeAllFileDescriptors(int lastToKeepOpen, bool asyncSignalSafe) {
422
422
  for (int i = getHighestFileDescriptor(asyncSignalSafe); i > lastToKeepOpen; i--) {
423
423
  /* Even though we normally shouldn't retry on EINTR
424
424
  * (http://news.ycombinator.com/item?id=3363819)
425
- * it's okay to do that here because because this function
425
+ * it's okay to do that here because this function
426
426
  * may only be called in a single-threaded environment.
427
427
  */
428
428
  int ret;
@@ -434,7 +434,7 @@ closeAllFileDescriptors(int lastToKeepOpen, bool asyncSignalSafe) {
434
434
 
435
435
  void
436
436
  printExecError(const char **command, int errcode) {
437
- char buf[1024];
437
+ char buf[1024] = { };
438
438
  printExecError2(command, errcode, buf, sizeof(buf));
439
439
  }
440
440
 
@@ -452,7 +452,7 @@ printExecError2(const char **command, int errcode, char *buf, size_t size) {
452
452
  pos = AsyncSignalSafeUtils::appendInteger<int, 10>(pos, end, errcode);
453
453
  pos = AsyncSignalSafeUtils::appendData(pos, end, ")\n");
454
454
 
455
- AsyncSignalSafeUtils::printError(buf, end - pos);
455
+ AsyncSignalSafeUtils::printError(buf, pos - buf);
456
456
  }
457
457
 
458
458
 
@@ -1154,7 +1154,7 @@ private:
1154
1154
  &count);
1155
1155
  if (status == KERN_SUCCESS) {
1156
1156
  metrics.ramUsed = ((ssize_t) vmStat.active_count + vmStat.wire_count);
1157
- #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
1157
+ #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9
1158
1158
  metrics.ramUsed += vmStat.compressor_page_count;
1159
1159
  #endif
1160
1160
  metrics.ramUsed = metrics.ramUsed * (pageSize / 1024);
@@ -31,7 +31,7 @@ module PhusionPassenger
31
31
 
32
32
  PACKAGE_NAME = 'passenger'
33
33
  # Run 'rake src/cxx_supportlib/Constants.h configkit_schemas_inline_comments' after changing this number.
34
- VERSION_STRING = '5.2.0'
34
+ VERSION_STRING = '5.2.1'
35
35
 
36
36
  PREFERRED_NGINX_VERSION = '1.12.2'
37
37
  NGINX_SHA256_CHECKSUM = '305f379da1d5fb5aefa79e45c829852ca6983c7cd2a79328f8e084a324cf0416'
@@ -141,6 +141,15 @@ module PhusionPassenger
141
141
  end
142
142
  private_class_method :cc_or_cxx_supports_feliminate_unused_debug?
143
143
 
144
+ def self.cc_or_cxx_supports_blocks?(language)
145
+ ext = detect_language_extension(language)
146
+ compiler_type_name = detect_compiler_type_name(language)
147
+ command = create_compiler_command(language,"-E -dM",'- </dev/null')
148
+ result = `#{command}`
149
+ return result.include? "__BLOCKS__"
150
+ end
151
+ private_class_method :cc_or_cxx_supports_blocks?
152
+
144
153
  public
145
154
  def self.cc
146
155
  return string_env('CC', default_cc)
@@ -429,6 +438,16 @@ module PhusionPassenger
429
438
  end
430
439
  memoize :cxx_supports_feliminate_unused_debug?, true
431
440
 
441
+ def self.cc_block_support_ok?
442
+ return (os_name_simple != 'macosx' || cc_or_cxx_supports_blocks?(:c) || os_version >= "10.13" )
443
+ end
444
+ memoize :cc_block_support_ok?, true
445
+
446
+ def self.cxx_block_support_ok?
447
+ return (os_name_simple != 'macosx' || cc_or_cxx_supports_blocks?(:cxx) || os_version >= "10.13" )
448
+ end
449
+ memoize :cxx_block_support_ok?, true
450
+
432
451
  # Returns whether compiling C++ with -fvisibility=hidden might result
433
452
  # in tons of useless warnings, like this:
434
453
  # http://code.google.com/p/phusion-passenger/issues/detail?id=526
@@ -3,7 +3,7 @@ define 'cc' do
3
3
  website "http://gcc.gnu.org/"
4
4
  define_checker do
5
5
  PhusionPassenger.require_passenger_lib 'platform_info/compiler'
6
- check_for_command(PlatformInfo.cc, false)
6
+ PlatformInfo.cc_block_support_ok? && check_for_command(PlatformInfo.cc, false)
7
7
  end
8
8
 
9
9
  on :debian do
@@ -20,6 +20,7 @@ define 'cc' do
20
20
  end
21
21
  on :macosx do
22
22
  install_osx_command_line_tools
23
+ append_install_instructions(" You must use an Apple compiler, with BLOCKS support.") unless PlatformInfo.cc_block_support_ok?
23
24
  end
24
25
  end
25
26
 
@@ -28,7 +29,7 @@ define 'c++' do
28
29
  website "http://gcc.gnu.org/"
29
30
  define_checker do
30
31
  PhusionPassenger.require_passenger_lib 'platform_info/compiler'
31
- check_for_command(PlatformInfo.cxx, false)
32
+ PlatformInfo.cxx_block_support_ok? && check_for_command(PlatformInfo.cxx, false)
32
33
  end
33
34
 
34
35
  on :debian do
@@ -45,6 +46,7 @@ define 'c++' do
45
46
  end
46
47
  on :macosx do
47
48
  install_osx_command_line_tools
49
+ append_install_instructions(" You must use an Apple compiler, with BLOCKS support.") unless PlatformInfo.cxx_block_support_ok?
48
50
  end
49
51
  end
50
52
 
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: 5.2.0
4
+ version: 5.2.1
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: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake