- replace custom "kill -QUIT" with the kill signal setting in

the service file

OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=55
This commit is contained in:
Marcus Rückert 2015-10-16 15:10:00 +00:00 committed by Git OBS Bridge
parent 348db313e0
commit 452e7dc03b
4 changed files with 11 additions and 215 deletions

View File

@ -1,82 +0,0 @@
Index: passenger/build/common_library.rb
===================================================================
--- passenger.orig/build/common_library.rb
+++ passenger/build/common_library.rb
@@ -34,7 +34,7 @@ require 'phusion_passenger/common_librar
# Defines tasks for compiling a static library containing Boost and OXT.
def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
output_file = "#{output_dir}.a"
- flags = "-Iext #{extra_compiler_flags} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
+ flags = "-Iext #{extra_compiler_flags} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} -fPIC #{ENV['RPM_OPT_FLAGS']} "
if false && boolean_option('RELEASE')
# Disable RELEASE support. Passenger Standalone wants to link to the
@@ -126,7 +126,7 @@ if USE_VENDORED_LIBEV
]
file LIBEV_OUTPUT_DIR + "Makefile" => dependencies do
# Disable all warnings: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
- cflags = "#{EXTRA_CXXFLAGS} -w"
+ cflags = "#{EXTRA_CXXFLAGS} #{ENV['RPM_OPT_FLAGS']} -w"
sh "mkdir -p #{LIBEV_OUTPUT_DIR}" if !File.directory?(LIBEV_OUTPUT_DIR)
sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure " +
"--disable-shared --enable-static CFLAGS='#{cflags}' orig_CFLAGS=1"
@@ -174,7 +174,7 @@ if USE_VENDORED_LIBEIO
file LIBEIO_OUTPUT_DIR + "Makefile" => dependencies do
# Disable all warnings. The author has a clear standpoint on that:
# http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
- cflags = "#{EXTRA_CXXFLAGS} -w"
+ cflags = "#{EXTRA_CXXFLAGS} #{ENV['RPM_OPT_FLAGS']} -w"
sh "mkdir -p #{LIBEIO_OUTPUT_DIR}" if !File.directory?(LIBEIO_OUTPUT_DIR)
sh "cd #{LIBEIO_OUTPUT_DIR} && sh #{LIBEIO_SOURCE_DIR}configure " +
"--disable-shared --enable-static CFLAGS='#{cflags}'"
@@ -183,6 +183,7 @@ if USE_VENDORED_LIBEIO
libeio_sources = Dir["ext/libeio/{*.c,*.h}"]
file LIBEIO_OUTPUT_DIR + ".libs/libeio.a" => [LIBEIO_OUTPUT_DIR + "Makefile"] + libeio_sources do
sh "rm -f #{LIBEIO_OUTPUT_DIR}/libeio.la"
+ sh "cd #{LIBEIO_OUTPUT_DIR} && make eio.o"
sh "cd #{LIBEIO_OUTPUT_DIR} && make libeio.la"
end
Index: passenger/ext/boost/libs/thread/src/pthread/thread.cpp
===================================================================
--- passenger.orig/ext/boost/libs/thread/src/pthread/thread.cpp
+++ passenger/ext/boost/libs/thread/src/pthread/thread.cpp
@@ -376,6 +376,7 @@ namespace boost
boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
#endif
}
+ return false;
}
bool thread::joinable() const BOOST_NOEXCEPT
Index: passenger/ext/nginx/StaticContentHandler.c
===================================================================
--- passenger.orig/ext/nginx/StaticContentHandler.c
+++ passenger/ext/nginx/StaticContentHandler.c
@@ -67,13 +67,6 @@ passenger_static_content_handler(ngx_htt
return NGX_DECLINED;
}
- #if (PASSENGER_NGINX_MINOR_VERSION == 8 && PASSENGER_NGINX_MICRO_VERSION < 38) || \
- (PASSENGER_NGINX_MINOR_VERSION == 7 && PASSENGER_NGINX_MICRO_VERSION < 66)
- if (r->zero_in_uri) {
- return NGX_DECLINED;
- }
- #endif
-
log = r->connection->log;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
Index: passenger/lib/phusion_passenger/common_library.rb
===================================================================
--- passenger.orig/lib/phusion_passenger/common_library.rb
+++ passenger/lib/phusion_passenger/common_library.rb
@@ -101,7 +101,7 @@ class CommonLibraryBuilder
end
def define_tasks(extra_compiler_flags = nil)
- flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
+ flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} -fPIC #{ENV['RPM_OPT_FLAGS']} "
flags << "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
flags.strip!

View File

@ -1,131 +0,0 @@
Index: passenger/ext/nginx/Configuration.c
===================================================================
--- passenger.orig/ext/nginx/Configuration.c 2015-06-24 23:29:12.725985654 +0800
+++ passenger/ext/nginx/Configuration.c 2015-06-24 23:02:39.654901783 +0800
@@ -261,7 +261,11 @@
conf->upstream_config.pass_request_body = NGX_CONF_UNSET;
#if (NGX_HTTP_CACHE)
- conf->upstream_config.cache = NGX_CONF_UNSET_PTR;
+ #if NGINX_VERSION_NUM >= 1007009
+ conf->upstream_config.cache = NGX_CONF_UNSET_PTR;
+ #else
+ conf->upstream_config.cache = NGX_CONF_UNSET;
+ #endif
conf->upstream_config.cache_min_uses = NGX_CONF_UNSET_UINT;
conf->upstream_config.cache_bypass = NGX_CONF_UNSET_PTR;
conf->upstream_config.no_cache = NGX_CONF_UNSET_PTR;
@@ -270,6 +274,9 @@
conf->upstream_config.cache_lock = NGX_CONF_UNSET;
conf->upstream_config.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
#endif
+ #if NGINX_VERSION_NUM >= 1007008
+ conf->upstream_config.cache_lock_age = NGX_CONF_UNSET_MSEC;
+ #endif
#endif
conf->upstream_config.intercept_errors = NGX_CONF_UNSET;
@@ -374,15 +381,34 @@
/******************************/
/******************************/
- if (conf->upstream_config.store != 0) {
- ngx_conf_merge_value(conf->upstream_config.store,
- prev->upstream_config.store, 0);
+ #if (NGX_HTTP_CACHE) && NGINX_VERSION_NUM >= 1007009
+ if (conf->upstream_config.store > 0) {
+ conf->upstream_config.cache = 0;
+ }
+ if (conf->upstream_config.cache > 0) {
+ conf->upstream_config.store = 0;
+ }
+ #endif
+
+ #if NGINX_VERSION_NUM >= 1007009
+ if (conf->upstream_config.store == NGX_CONF_UNSET) {
+ ngx_conf_merge_value(conf->upstream_config.store,
+ prev->upstream_config.store, 0);
- if (conf->upstream_config.store_lengths == NULL) {
conf->upstream_config.store_lengths = prev->upstream_config.store_lengths;
conf->upstream_config.store_values = prev->upstream_config.store_values;
}
- }
+ #else
+ if (conf->upstream_config.store != 0) {
+ ngx_conf_merge_value(conf->upstream_config.store,
+ prev->upstream_config.store, 0);
+
+ if (conf->upstream_config.store_lengths == NULL) {
+ conf->upstream_config.store_lengths = prev->upstream_config.store_lengths;
+ conf->upstream_config.store_values = prev->upstream_config.store_values;
+ }
+ }
+ #endif
ngx_conf_merge_uint_value(conf->upstream_config.store_access,
prev->upstream_config.store_access, 0600);
@@ -526,20 +552,42 @@
#if (NGX_HTTP_CACHE)
- ngx_conf_merge_ptr_value(conf->upstream_config.cache,
- prev->upstream_config.cache, NULL);
+ #if NGINX_VERSION_NUM >= 1007009
+ if (conf->upstream_config.cache == NGX_CONF_UNSET) {
+ ngx_conf_merge_value(conf->upstream_config.cache,
+ prev->upstream_config.cache, 0);
+
+ conf->upstream_config.cache_zone = prev->upstream_config.cache_zone;
+ conf->upstream_config.cache_value = prev->upstream_config.cache_value;
+ }
- if (conf->upstream_config.cache && conf->upstream_config.cache->data == NULL) {
- ngx_shm_zone_t *shm_zone;
+ if (conf->upstream_config.cache_zone && conf->upstream_config.cache_zone->data == NULL) {
+ ngx_shm_zone_t *shm_zone;
- shm_zone = conf->upstream_config.cache;
+ shm_zone = conf->upstream_config.cache_zone;
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"scgi_cache\" zone \"%V\" is unknown",
- &shm_zone->shm.name);
+ "\"scgi_cache\" zone \"%V\" is unknown",
+ &shm_zone->shm.name);
- return NGX_CONF_ERROR;
- }
+ return NGX_CONF_ERROR;
+ }
+ #else
+ ngx_conf_merge_ptr_value(conf->upstream_config.cache,
+ prev->upstream_config.cache, NULL);
+
+ if (conf->upstream_config.cache && conf->upstream_config.cache->data == NULL) {
+ ngx_shm_zone_t *shm_zone;
+
+ shm_zone = conf->upstream_config.cache;
+
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"scgi_cache\" zone \"%V\" is unknown",
+ &shm_zone->shm.name);
+
+ return NGX_CONF_ERROR;
+ }
+ #endif
ngx_conf_merge_uint_value(conf->upstream_config.cache_min_uses,
prev->upstream_config.cache_min_uses, 1);
@@ -585,6 +633,11 @@
prev->upstream_config.cache_lock_timeout, 5000);
#endif
+ #if NGINX_VERSION_NUM >= 1007008
+ ngx_conf_merge_msec_value(conf->upstream_config.cache_lock_age,
+ prev->upstream_config.cache_lock_age, 5000);
+ #endif
+
#endif
ngx_conf_merge_value(conf->upstream_config.pass_request_headers,

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 16 15:08:28 UTC 2015 - mrueckert@suse.de
- replace custom "kill -QUIT" with the kill signal setting in
the service file
-------------------------------------------------------------------
Fri Oct 16 15:01:17 UTC 2015 - mrueckert@suse.de

View File

@ -3,11 +3,14 @@ Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target
[Service]
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx -g "daemon off;"
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=mixed
PrivateTmp=true
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target