passenger 4.0.59 → 4.0.60

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 (579) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +15 -0
  5. data/bin/passenger-install-apache2-module +2 -1
  6. data/bin/passenger-install-nginx-module +8 -2
  7. data/ext/apache2/Hooks.cpp +21 -2
  8. data/ext/apache2/MergeDirConfig.cpp +40 -40
  9. data/ext/common/ApplicationPool2/Group.h +14 -10
  10. data/ext/common/ApplicationPool2/Implementation.cpp +13 -7
  11. data/ext/common/ApplicationPool2/SmartSpawner.h +4 -1
  12. data/ext/common/Constants.h +1 -1
  13. data/ext/nginx/ContentHandler.c +17 -1
  14. data/lib/phusion_passenger.rb +4 -5
  15. data/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb +4 -3
  16. data/lib/phusion_passenger/platform_info/openssl.rb +61 -0
  17. data/lib/phusion_passenger/standalone/runtime_installer.rb +27 -22
  18. data/packaging/debian/LICENSE.md +19 -0
  19. data/packaging/debian/README.md +320 -0
  20. data/packaging/debian/Vagrantfile +25 -0
  21. data/packaging/debian/build +210 -0
  22. data/packaging/debian/debian_specs/nginx/changelog +1989 -0
  23. data/packaging/debian/debian_specs/nginx/compat.erb +5 -0
  24. data/packaging/debian/debian_specs/nginx/conf/fastcgi.conf +25 -0
  25. data/packaging/debian/debian_specs/nginx/conf/fastcgi_params +24 -0
  26. data/packaging/debian/debian_specs/nginx/conf/koi-utf +109 -0
  27. data/packaging/debian/debian_specs/nginx/conf/koi-win +103 -0
  28. data/packaging/debian/debian_specs/nginx/conf/mime.types +89 -0
  29. data/packaging/debian/debian_specs/nginx/conf/nginx.conf.erb +97 -0
  30. data/packaging/debian/debian_specs/nginx/conf/proxy_params +4 -0
  31. data/packaging/debian/debian_specs/nginx/conf/scgi_params +16 -0
  32. data/packaging/debian/debian_specs/nginx/conf/sites-available/default.erb +93 -0
  33. data/packaging/debian/debian_specs/nginx/conf/snippets/fastcgi-php.conf +13 -0
  34. data/packaging/debian/debian_specs/nginx/conf/snippets/snakeoil.conf +5 -0
  35. data/packaging/debian/debian_specs/nginx/conf/uwsgi_params +16 -0
  36. data/packaging/debian/debian_specs/nginx/conf/win-utf +125 -0
  37. data/packaging/debian/debian_specs/nginx/control.erb +226 -0
  38. data/packaging/debian/debian_specs/nginx/copyright +196 -0
  39. data/packaging/debian/debian_specs/nginx/debian-full.lintian-overrides +1 -0
  40. data/packaging/debian/debian_specs/nginx/gbp.conf +2 -0
  41. data/packaging/debian/debian_specs/nginx/help/docs/fcgiwrap +14 -0
  42. data/packaging/debian/debian_specs/nginx/help/docs/php +119 -0
  43. data/packaging/debian/debian_specs/nginx/help/docs/support-irc +28 -0
  44. data/packaging/debian/debian_specs/nginx/help/docs/upstream +51 -0
  45. data/packaging/debian/debian_specs/nginx/help/examples/drupal +114 -0
  46. data/packaging/debian/debian_specs/nginx/help/examples/http +59 -0
  47. data/packaging/debian/debian_specs/nginx/help/examples/mail +30 -0
  48. data/packaging/debian/debian_specs/nginx/help/examples/mailman +59 -0
  49. data/packaging/debian/debian_specs/nginx/help/examples/nginx.conf +34 -0
  50. data/packaging/debian/debian_specs/nginx/help/examples/nginx_modsite +162 -0
  51. data/packaging/debian/debian_specs/nginx/help/examples/virtual_hosts +155 -0
  52. data/packaging/debian/debian_specs/nginx/help/examples/wordpress +74 -0
  53. data/packaging/debian/debian_specs/nginx/helpers.rb +41 -0
  54. data/packaging/debian/debian_specs/nginx/index-debian.html.in +32 -0
  55. data/packaging/debian/debian_specs/nginx/index-ubuntu.html.in +32 -0
  56. data/packaging/debian/debian_specs/nginx/index.html.erb +10 -0
  57. data/packaging/debian/debian_specs/nginx/modules/README.Modules-versions +65 -0
  58. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/README.markdown +510 -0
  59. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/config +5 -0
  60. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/doc/HttpHeadersMoreModule.wiki +395 -0
  61. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ddebug.h +119 -0
  62. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_filter_module.c +348 -0
  63. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_filter_module.h +80 -0
  64. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_headers_in.c +826 -0
  65. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_headers_in.h +26 -0
  66. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_headers_out.c +716 -0
  67. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_headers_out.h +26 -0
  68. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_util.c +380 -0
  69. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/src/ngx_http_headers_more_util.h +52 -0
  70. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/util/build.sh +32 -0
  71. data/packaging/debian/debian_specs/nginx/modules/headers-more-nginx-module/valgrind.suppress +215 -0
  72. data/packaging/debian/debian_specs/nginx/modules/nginx-auth-pam/ChangeLog +35 -0
  73. data/packaging/debian/debian_specs/nginx/modules/nginx-auth-pam/LICENSE +25 -0
  74. data/packaging/debian/debian_specs/nginx/modules/nginx-auth-pam/README.md +93 -0
  75. data/packaging/debian/debian_specs/nginx/modules/nginx-auth-pam/config +4 -0
  76. data/packaging/debian/debian_specs/nginx/modules/nginx-auth-pam/ngx_http_auth_pam_module.c +462 -0
  77. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/CHANGES +66 -0
  78. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/LICENSE +26 -0
  79. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/README.md +171 -0
  80. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/TODO.md +7 -0
  81. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/config +21 -0
  82. data/packaging/debian/debian_specs/nginx/modules/nginx-cache-purge/ngx_cache_purge_module.c +1803 -0
  83. data/packaging/debian/debian_specs/nginx/modules/nginx-dav-ext-module/README +29 -0
  84. data/packaging/debian/debian_specs/nginx/modules/nginx-dav-ext-module/config +9 -0
  85. data/packaging/debian/debian_specs/nginx/modules/nginx-dav-ext-module/ngx_http_dav_ext_module.c +824 -0
  86. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/README +139 -0
  87. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/README_AUTO_LIB +395 -0
  88. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/TODO +1 -0
  89. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/actions/array +10 -0
  90. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/actions/palloc +8 -0
  91. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/build +597 -0
  92. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/action_replacements +5 -0
  93. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/action_types +12 -0
  94. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/conf_args +22 -0
  95. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/conf_locs +25 -0
  96. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/conf_macros +35 -0
  97. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/contexts +22 -0
  98. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/header_files +3 -0
  99. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/headers +4 -0
  100. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/module_dependencies +5 -0
  101. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/modules_optional +15 -0
  102. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/data/prefixes +2 -0
  103. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/src/array.h +7 -0
  104. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/src/conf_cmd_basic.h +43 -0
  105. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/src/conf_merge.h +78 -0
  106. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/src/palloc.h +6 -0
  107. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/auto/text/autogen +12 -0
  108. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/config +49 -0
  109. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/docs/core/action_macros +63 -0
  110. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/docs/core/conf_cmds +62 -0
  111. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/docs/modules/set_var +124 -0
  112. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/docs/patches/more_logging_info +48 -0
  113. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/docs/upstream/list +45 -0
  114. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/examples/README +12 -0
  115. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/examples/http/set_var/config +4 -0
  116. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/examples/http/set_var/ngx_http_set_var_examples_module.c +136 -0
  117. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/ngx_auto_lib_core +797 -0
  118. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/notes/CHANGES +17 -0
  119. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/notes/LICENSE +24 -0
  120. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_array.h +113 -0
  121. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_conf_cmd_basic.h +2203 -0
  122. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_conf_cmd_extra.h +5423 -0
  123. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_conf_merge.h +227 -0
  124. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_config.c +72 -0
  125. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_config.h +98 -0
  126. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_includes.h +66 -0
  127. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/objs/ndk_palloc.h +112 -0
  128. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/patches/auto_config +16 -0
  129. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/patches/expose_rewrite_functions +291 -0
  130. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/patches/rewrite_phase_handler +19 -0
  131. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/hash/md5.h +117 -0
  132. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/hash/murmurhash2.c +77 -0
  133. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/hash/sha.h +200 -0
  134. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk.c +155 -0
  135. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk.h +58 -0
  136. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_buf.c +43 -0
  137. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_buf.h +5 -0
  138. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_complex_path.c +129 -0
  139. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_complex_path.h +30 -0
  140. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_complex_value.c +192 -0
  141. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_complex_value.h +21 -0
  142. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_conf_file.c +396 -0
  143. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_conf_file.h +44 -0
  144. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_debug.c +72 -0
  145. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_debug.h +171 -0
  146. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_encoding.c +57 -0
  147. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_encoding.h +12 -0
  148. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_hash.c +82 -0
  149. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_hash.h +45 -0
  150. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_http.c +138 -0
  151. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_http.h +3 -0
  152. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_http_headers.h +35 -0
  153. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_log.c +3 -0
  154. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_log.h +165 -0
  155. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_parse.h +67 -0
  156. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_path.c +583 -0
  157. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_path.h +22 -0
  158. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_process.c +20 -0
  159. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_process.h +12 -0
  160. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_regex.c +215 -0
  161. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_regex.h +7 -0
  162. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_rewrite.c +103 -0
  163. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_rewrite.h +26 -0
  164. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_set_var.c +602 -0
  165. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_set_var.h +44 -0
  166. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_string.c +434 -0
  167. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_string.h +37 -0
  168. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_string_util.h +14 -0
  169. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_upstream_list.c +205 -0
  170. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_upstream_list.h +27 -0
  171. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_uri.c +45 -0
  172. data/packaging/debian/debian_specs/nginx/modules/nginx-development-kit/src/ndk_uri.h +6 -0
  173. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/LICENSE +25 -0
  174. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/README.markdown +1850 -0
  175. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/config +5 -0
  176. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/doc/HttpEchoModule.wiki +1558 -0
  177. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ddebug.h +109 -0
  178. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_echo.c +344 -0
  179. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_echo.h +25 -0
  180. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_filter.c +282 -0
  181. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_filter.h +15 -0
  182. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_foreach.c +183 -0
  183. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_foreach.h +16 -0
  184. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_handler.c +429 -0
  185. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_handler.h +18 -0
  186. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_location.c +178 -0
  187. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_location.h +13 -0
  188. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_module.c +667 -0
  189. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_module.h +137 -0
  190. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_request_info.c +452 -0
  191. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_request_info.h +31 -0
  192. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_sleep.c +208 -0
  193. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_sleep.h +16 -0
  194. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_subrequest.c +788 -0
  195. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_subrequest.h +19 -0
  196. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_timer.c +96 -0
  197. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_timer.h +13 -0
  198. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_util.c +298 -0
  199. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_util.h +58 -0
  200. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_var.c +110 -0
  201. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/src/ngx_http_echo_var.h +9 -0
  202. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/util/build.sh +45 -0
  203. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/util/releng +8 -0
  204. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/util/wiki2pod.pl +131 -0
  205. data/packaging/debian/debian_specs/nginx/modules/nginx-echo/valgrind.suppress +38 -0
  206. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/LICENCE +24 -0
  207. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/README +206 -0
  208. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/changelog.txt +54 -0
  209. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/config +26 -0
  210. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/protocol.txt +191 -0
  211. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_defs.c +59 -0
  212. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_defs.h +73 -0
  213. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_module.c +783 -0
  214. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_module.h +31 -0
  215. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_module_setup.c +361 -0
  216. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/ngx_http_push_types.h +120 -0
  217. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/memory/store.c +1180 -0
  218. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/memory/store.h +1 -0
  219. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/ngx_http_push_module_ipc.c +146 -0
  220. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/ngx_http_push_module_ipc.h +5 -0
  221. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/ngx_http_push_store.h +51 -0
  222. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/ngx_rwlock.c +178 -0
  223. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/ngx_rwlock.h +5 -0
  224. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/rbtree_util.c +246 -0
  225. data/packaging/debian/debian_specs/nginx/modules/nginx-http-push/src/store/rbtree_util.h +9 -0
  226. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/Changes +51 -0
  227. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/README.markdown +6954 -0
  228. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/config +363 -0
  229. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/doc/HttpLuaModule.wiki +5898 -0
  230. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/dtrace/ngx_lua_provider.d +61 -0
  231. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/misc/recv-until-pm/Makefile +3 -0
  232. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/misc/recv-until-pm/lib/RecvUntil.pm +138 -0
  233. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/misc/recv-until-pm/t/sanity.t +140 -0
  234. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/api/ngx_http_lua_api.h +52 -0
  235. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ddebug.h +82 -0
  236. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_accessby.c +377 -0
  237. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_accessby.h +22 -0
  238. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_api.c +77 -0
  239. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_args.c +537 -0
  240. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_args.h +20 -0
  241. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_bodyfilterby.c +632 -0
  242. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_bodyfilterby.h +31 -0
  243. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_cache.c +296 -0
  244. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_cache.h +24 -0
  245. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_capturefilter.c +175 -0
  246. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_capturefilter.h +20 -0
  247. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_clfactory.c +887 -0
  248. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_clfactory.h +22 -0
  249. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_common.h +478 -0
  250. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_config.c +67 -0
  251. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_config.h +19 -0
  252. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_consts.c +148 -0
  253. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_consts.h +20 -0
  254. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_contentby.c +369 -0
  255. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_contentby.h +26 -0
  256. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_control.c +483 -0
  257. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_control.h +20 -0
  258. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_coroutine.c +379 -0
  259. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_coroutine.h +23 -0
  260. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_ctx.c +216 -0
  261. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_ctx.h +23 -0
  262. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_directive.c +1081 -0
  263. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_directive.h +56 -0
  264. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_exception.c +58 -0
  265. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_exception.h +33 -0
  266. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headerfilterby.c +302 -0
  267. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headerfilterby.h +29 -0
  268. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers.c +1370 -0
  269. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers.h +22 -0
  270. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers_in.c +782 -0
  271. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers_in.h +22 -0
  272. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers_out.c +625 -0
  273. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_headers_out.h +23 -0
  274. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_initby.c +42 -0
  275. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_initby.h +23 -0
  276. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_initworkerby.c +320 -0
  277. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_initworkerby.h +25 -0
  278. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_log.c +300 -0
  279. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_log.h +20 -0
  280. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_logby.c +227 -0
  281. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_logby.h +22 -0
  282. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_misc.c +252 -0
  283. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_misc.h +20 -0
  284. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_module.c +924 -0
  285. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_ndk.c +184 -0
  286. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_ndk.h +21 -0
  287. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_output.c +794 -0
  288. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_output.h +28 -0
  289. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_pcrefix.c +106 -0
  290. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_pcrefix.h +23 -0
  291. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_phase.c +94 -0
  292. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_phase.h +13 -0
  293. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_probe.h +85 -0
  294. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_regex.c +2468 -0
  295. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_regex.h +22 -0
  296. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_req_body.c +1169 -0
  297. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_req_body.h +20 -0
  298. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_req_method.c +252 -0
  299. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_req_method.h +19 -0
  300. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_rewriteby.c +351 -0
  301. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_rewriteby.h +22 -0
  302. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_script.c +538 -0
  303. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_script.h +86 -0
  304. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_setby.c +216 -0
  305. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_setby.h +15 -0
  306. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_shdict.c +1844 -0
  307. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_shdict.h +52 -0
  308. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_sleep.c +191 -0
  309. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_sleep.h +20 -0
  310. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_socket_tcp.c +5314 -0
  311. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_socket_tcp.h +156 -0
  312. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_socket_udp.c +1624 -0
  313. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_socket_udp.h +56 -0
  314. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_string.c +704 -0
  315. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_string.h +20 -0
  316. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_subrequest.c +1741 -0
  317. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_subrequest.h +46 -0
  318. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_time.c +278 -0
  319. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_time.h +21 -0
  320. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_timer.c +661 -0
  321. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_timer.h +20 -0
  322. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_uri.c +110 -0
  323. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_uri.h +20 -0
  324. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_uthread.c +283 -0
  325. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_uthread.h +36 -0
  326. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_util.c +3972 -0
  327. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_util.h +423 -0
  328. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_variable.c +499 -0
  329. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_variable.h +20 -0
  330. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_worker.c +64 -0
  331. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/src/ngx_http_lua_worker.h +17 -0
  332. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/tapset/ngx_lua.stp +5 -0
  333. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/build.sh +39 -0
  334. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/build2.sh +55 -0
  335. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/fix-comments +27 -0
  336. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/gdbinit +415 -0
  337. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/ngx-links +62 -0
  338. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/reindex +64 -0
  339. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/releng +8 -0
  340. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/retab +8 -0
  341. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/revim +102 -0
  342. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/run_test.sh +10 -0
  343. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/util/update-readme.sh +4 -0
  344. data/packaging/debian/debian_specs/nginx/modules/nginx-lua/valgrind.suppress +144 -0
  345. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/CHANGES +107 -0
  346. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/LICENSE +25 -0
  347. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/Makefile +8 -0
  348. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/README +329 -0
  349. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/config +3 -0
  350. data/packaging/debian/debian_specs/nginx/modules/nginx-upload-progress/ngx_http_uploadprogress_module.c +1774 -0
  351. data/packaging/debian/debian_specs/nginx/modules/nginx-upstream-fair/README +53 -0
  352. data/packaging/debian/debian_specs/nginx/modules/nginx-upstream-fair/config +3 -0
  353. data/packaging/debian/debian_specs/nginx/modules/nginx-upstream-fair/ngx_http_upstream_fair_module.c +1356 -0
  354. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/CHANGELOG.md +37 -0
  355. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/HACKING.md +24 -0
  356. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/LICENSE +20 -0
  357. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/README.rst +182 -0
  358. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/config +8 -0
  359. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/nginx-0.6-support.patch +23 -0
  360. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/ngx_http_fancyindex_module.c +1305 -0
  361. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/template.awk +52 -0
  362. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/template.h +103 -0
  363. data/packaging/debian/debian_specs/nginx/modules/ngx-fancyindex/template.html +102 -0
  364. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/CHANGES +37 -0
  365. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/README +141 -0
  366. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/config +3 -0
  367. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/doc/README.google_code_home_page.wiki +120 -0
  368. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/doc/README.html +199 -0
  369. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/doc/README.wiki +123 -0
  370. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/ngx_http_subs_filter_module.c +1298 -0
  371. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/README +275 -0
  372. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/AutoInstall.pm +820 -0
  373. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install.pm +470 -0
  374. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/AutoInstall.pm +82 -0
  375. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Base.pm +83 -0
  376. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Can.pm +81 -0
  377. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Fetch.pm +93 -0
  378. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Include.pm +34 -0
  379. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Makefile.pm +415 -0
  380. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Metadata.pm +716 -0
  381. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/TestBase.pm +29 -0
  382. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Win32.pm +64 -0
  383. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/WriteAll.pm +63 -0
  384. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Spiffy.pm +539 -0
  385. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Test/Base.pm +682 -0
  386. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Test/Base/Filter.pm +341 -0
  387. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Test/Builder.pm +1413 -0
  388. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Test/Builder/Module.pm +81 -0
  389. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/inc/Test/More.pm +735 -0
  390. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx.pm +315 -0
  391. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/LWP.pm +524 -0
  392. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/Socket.pm +1749 -0
  393. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/Util.pm +874 -0
  394. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/t/subs.t +136 -0
  395. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/t/subs_capture.t +32 -0
  396. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/t/subs_fix_string.t +32 -0
  397. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/t/subs_regex.t +108 -0
  398. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/t/subs_types.t +59 -0
  399. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/test/test.sh +5 -0
  400. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/util/update-readme.sh +7 -0
  401. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/util/wiki2google_code_homepage.pl +29 -0
  402. data/packaging/debian/debian_specs/nginx/modules/ngx_http_substitutions_filter_module/util/wiki2pod.pl +129 -0
  403. data/packaging/debian/debian_specs/nginx/nginx-common.NEWS +135 -0
  404. data/packaging/debian/debian_specs/nginx/nginx-common.README.Debian +45 -0
  405. data/packaging/debian/debian_specs/nginx/nginx-common.dirs.erb +32 -0
  406. data/packaging/debian/debian_specs/nginx/nginx-common.install +3 -0
  407. data/packaging/debian/debian_specs/nginx/nginx-common.lintian-overrides +2 -0
  408. data/packaging/debian/debian_specs/nginx/nginx-common.manpages +1 -0
  409. data/packaging/debian/debian_specs/nginx/nginx-common.nginx.default +10 -0
  410. data/packaging/debian/debian_specs/nginx/nginx-common.nginx.init.erb +214 -0
  411. data/packaging/debian/debian_specs/nginx/nginx-common.nginx.logrotate +18 -0
  412. data/packaging/debian/debian_specs/nginx/nginx-common.nginx.service.erb +37 -0
  413. data/packaging/debian/debian_specs/nginx/nginx-common.postinst.erb +66 -0
  414. data/packaging/debian/debian_specs/nginx/nginx-common.postrm.erb +46 -0
  415. data/packaging/debian/debian_specs/nginx/nginx-common.preinst +47 -0
  416. data/packaging/debian/debian_specs/nginx/nginx-common.prerm.erb +28 -0
  417. data/packaging/debian/debian_specs/nginx/nginx-doc.docs +2 -0
  418. data/packaging/debian/debian_specs/nginx/nginx-doc.examples +1 -0
  419. data/packaging/debian/debian_specs/nginx/nginx-extras.install.erb +17 -0
  420. data/packaging/debian/debian_specs/nginx/nginx-extras.lintian-overrides +1 -0
  421. data/packaging/debian/debian_specs/nginx/nginx-extras.postinst.erb +44 -0
  422. data/packaging/debian/debian_specs/nginx/nginx-extras.prerm +22 -0
  423. data/packaging/debian/debian_specs/nginx/nginx.1 +47 -0
  424. data/packaging/debian/debian_specs/nginx/patches/perl-use-dpkg-buildflags.patch +23 -0
  425. data/packaging/debian/debian_specs/nginx/patches/series +1 -0
  426. data/packaging/debian/debian_specs/nginx/rules.erb +185 -0
  427. data/packaging/debian/debian_specs/nginx/source/format +1 -0
  428. data/packaging/debian/debian_specs/nginx/tests/control +4 -0
  429. data/packaging/debian/debian_specs/nginx/ufw/nginx +14 -0
  430. data/packaging/debian/debian_specs/nginx/upstream/signing-key.asc +34 -0
  431. data/packaging/debian/debian_specs/nginx/watch +3 -0
  432. data/packaging/debian/debian_specs/passenger/README.Debian +12 -0
  433. data/packaging/debian/debian_specs/passenger/changelog +316 -0
  434. data/packaging/debian/debian_specs/passenger/compat +1 -0
  435. data/packaging/debian/debian_specs/passenger/control.erb +123 -0
  436. data/packaging/debian/debian_specs/passenger/copyright +385 -0
  437. data/packaging/debian/debian_specs/passenger/helpers.rb +24 -0
  438. data/packaging/debian/debian_specs/passenger/libapache2-mod-passenger.install +3 -0
  439. data/packaging/debian/debian_specs/passenger/libapache2-mod-passenger.postinst +36 -0
  440. data/packaging/debian/debian_specs/passenger/libapache2-mod-passenger.prerm +15 -0
  441. data/packaging/debian/debian_specs/passenger/locations.ini.erb +14 -0
  442. data/packaging/debian/debian_specs/passenger/passenger-dev.install.erb +3 -0
  443. data/packaging/debian/debian_specs/passenger/passenger-doc.install.erb +2 -0
  444. data/packaging/debian/debian_specs/passenger/passenger.conf +6 -0
  445. data/packaging/debian/debian_specs/passenger/passenger.docs +4 -0
  446. data/packaging/debian/debian_specs/passenger/passenger.install.erb +16 -0
  447. data/packaging/debian/debian_specs/passenger/passenger.load +3 -0
  448. data/packaging/debian/debian_specs/passenger/passenger.manpages +3 -0
  449. data/packaging/debian/debian_specs/passenger/passenger_free_ruby.c +29 -0
  450. data/packaging/debian/debian_specs/passenger/passenger_ruby_utils.c +54 -0
  451. data/packaging/debian/debian_specs/passenger/passenger_system_ruby.c.erb +37 -0
  452. data/packaging/debian/debian_specs/passenger/patches/series +0 -0
  453. data/packaging/debian/debian_specs/passenger/rules.erb +84 -0
  454. data/packaging/debian/debian_specs/passenger/source/format +1 -0
  455. data/packaging/debian/debian_specs/passenger_enterprise/README.Debian +12 -0
  456. data/packaging/debian/debian_specs/passenger_enterprise/changelog +316 -0
  457. data/packaging/debian/debian_specs/passenger_enterprise/compat +1 -0
  458. data/packaging/debian/debian_specs/passenger_enterprise/control.erb +123 -0
  459. data/packaging/debian/debian_specs/passenger_enterprise/copyright +385 -0
  460. data/packaging/debian/debian_specs/passenger_enterprise/helpers.rb +2 -0
  461. data/packaging/debian/debian_specs/passenger_enterprise/libapache2-mod-passenger-enterprise.install +3 -0
  462. data/packaging/debian/debian_specs/passenger_enterprise/libapache2-mod-passenger-enterprise.postinst +36 -0
  463. data/packaging/debian/debian_specs/passenger_enterprise/libapache2-mod-passenger-enterprise.prerm +15 -0
  464. data/packaging/debian/debian_specs/passenger_enterprise/locations.ini.erb +14 -0
  465. data/packaging/debian/debian_specs/passenger_enterprise/passenger-enterprise-dev.install.erb +3 -0
  466. data/packaging/debian/debian_specs/passenger_enterprise/passenger-enterprise-doc.install.erb +2 -0
  467. data/packaging/debian/debian_specs/passenger_enterprise/passenger-enterprise.docs +4 -0
  468. data/packaging/debian/debian_specs/passenger_enterprise/passenger-enterprise.install.erb +14 -0
  469. data/packaging/debian/debian_specs/passenger_enterprise/passenger-enterprise.manpages +3 -0
  470. data/packaging/debian/debian_specs/passenger_enterprise/passenger.conf +6 -0
  471. data/packaging/debian/debian_specs/passenger_enterprise/passenger.load +3 -0
  472. data/packaging/debian/debian_specs/passenger_enterprise/passenger_free_ruby.c.erb +1 -0
  473. data/packaging/debian/debian_specs/passenger_enterprise/passenger_ruby_utils.c.erb +1 -0
  474. data/packaging/debian/debian_specs/passenger_enterprise/passenger_system_ruby.c.erb +1 -0
  475. data/packaging/debian/debian_specs/passenger_enterprise/patches/series +0 -0
  476. data/packaging/debian/debian_specs/passenger_enterprise/rules.erb +84 -0
  477. data/packaging/debian/debian_specs/passenger_enterprise/source/format +1 -0
  478. data/packaging/debian/docker_images/Makefile +38 -0
  479. data/packaging/debian/docker_images/buildbox/CONTAINER_VERSION.txt +0 -0
  480. data/packaging/debian/docker_images/buildbox/Dockerfile +3 -0
  481. data/packaging/debian/docker_images/buildbox/Gemfile +9 -0
  482. data/packaging/debian/docker_images/buildbox/Gemfile.lock +42 -0
  483. data/packaging/debian/docker_images/buildbox/install.sh +85 -0
  484. data/packaging/debian/docker_images/buildbox/pbuilderrc +4 -0
  485. data/packaging/debian/docker_images/buildbox/sudoers.conf +6 -0
  486. data/packaging/debian/docker_images/setup-buildbox-docker-image +7 -0
  487. data/packaging/debian/docker_images/setup-testbox-docker-image-debian-6 +7 -0
  488. data/packaging/debian/docker_images/setup-testbox-docker-image-debian-7 +7 -0
  489. data/packaging/debian/docker_images/setup-testbox-docker-image-debian-8 +7 -0
  490. data/packaging/debian/docker_images/setup-testbox-docker-image-ubuntu-12.04 +7 -0
  491. data/packaging/debian/docker_images/setup-testbox-docker-image-ubuntu-14.04 +7 -0
  492. data/packaging/debian/docker_images/setup-testbox-docker-image-ubuntu-15.04 +7 -0
  493. data/packaging/debian/docker_images/setup-testbox-docker-image-ubuntu-15.10 +7 -0
  494. data/packaging/debian/docker_images/testbox-debian-6/Dockerfile +3 -0
  495. data/packaging/debian/docker_images/testbox-debian-6/Gemfile +2 -0
  496. data/packaging/debian/docker_images/testbox-debian-6/Gemfile.lock +23 -0
  497. data/packaging/debian/docker_images/testbox-debian-6/argparse.py +2374 -0
  498. data/packaging/debian/docker_images/testbox-debian-6/install.sh +78 -0
  499. data/packaging/debian/docker_images/testbox-debian-7/Dockerfile +3 -0
  500. data/packaging/debian/docker_images/testbox-debian-7/Gemfile +2 -0
  501. data/packaging/debian/docker_images/testbox-debian-7/Gemfile.lock +23 -0
  502. data/packaging/debian/docker_images/testbox-debian-7/install.sh +71 -0
  503. data/packaging/debian/docker_images/testbox-debian-8/Dockerfile +3 -0
  504. data/packaging/debian/docker_images/testbox-debian-8/Gemfile +2 -0
  505. data/packaging/debian/docker_images/testbox-debian-8/Gemfile.lock +23 -0
  506. data/packaging/debian/docker_images/testbox-debian-8/install.sh +70 -0
  507. data/packaging/debian/docker_images/testbox-ubuntu-12.04/Dockerfile +3 -0
  508. data/packaging/debian/docker_images/testbox-ubuntu-12.04/Gemfile +2 -0
  509. data/packaging/debian/docker_images/testbox-ubuntu-12.04/Gemfile.lock +23 -0
  510. data/packaging/debian/docker_images/testbox-ubuntu-12.04/install.sh +69 -0
  511. data/packaging/debian/docker_images/testbox-ubuntu-14.04/Dockerfile +3 -0
  512. data/packaging/debian/docker_images/testbox-ubuntu-14.04/Gemfile +2 -0
  513. data/packaging/debian/docker_images/testbox-ubuntu-14.04/Gemfile.lock +23 -0
  514. data/packaging/debian/docker_images/testbox-ubuntu-14.04/install.sh +69 -0
  515. data/packaging/debian/docker_images/testbox-ubuntu-15.04/Dockerfile +3 -0
  516. data/packaging/debian/docker_images/testbox-ubuntu-15.04/Gemfile +2 -0
  517. data/packaging/debian/docker_images/testbox-ubuntu-15.04/Gemfile.lock +23 -0
  518. data/packaging/debian/docker_images/testbox-ubuntu-15.04/install.sh +69 -0
  519. data/packaging/debian/docker_images/testbox-ubuntu-15.10/Dockerfile +3 -0
  520. data/packaging/debian/docker_images/testbox-ubuntu-15.10/Gemfile +2 -0
  521. data/packaging/debian/docker_images/testbox-ubuntu-15.10/Gemfile.lock +23 -0
  522. data/packaging/debian/docker_images/testbox-ubuntu-15.10/install.sh +69 -0
  523. data/packaging/debian/internal/build/Rakefile +235 -0
  524. data/packaging/debian/internal/build/build-passenger-orig-tarball.sh +76 -0
  525. data/packaging/debian/internal/build/build-source-package.rb +121 -0
  526. data/packaging/debian/internal/build/download-nginx-orig-tarball.sh +17 -0
  527. data/packaging/debian/internal/build/rakefile_support.rb +96 -0
  528. data/packaging/debian/internal/build/setup-environment-essentials.sh +15 -0
  529. data/packaging/debian/internal/build/setup-environment.sh +29 -0
  530. data/packaging/debian/internal/lib/distro_info.rb +82 -0
  531. data/packaging/debian/internal/lib/distro_info.sh +303 -0
  532. data/packaging/debian/internal/lib/distro_info.sh.erb +65 -0
  533. data/packaging/debian/internal/lib/library.sh +83 -0
  534. data/packaging/debian/internal/lib/preprocessor.rb +173 -0
  535. data/packaging/debian/internal/lib/tracking.rb +95 -0
  536. data/packaging/debian/internal/lib/tracking_category.rb +45 -0
  537. data/packaging/debian/internal/lib/tracking_database.rb +132 -0
  538. data/packaging/debian/internal/lib/tracking_task.rb +148 -0
  539. data/packaging/debian/internal/lib/utils.rb +78 -0
  540. data/packaging/debian/internal/publish/Rakefile +97 -0
  541. data/packaging/debian/internal/publish/oss-binaries.phusionpassenger.com-fingerprint.txt +1 -0
  542. data/packaging/debian/internal/publish/packagecloud_fingerprint.txt +1 -0
  543. data/packaging/debian/internal/publish/passenger_website_fingerprint.txt +1 -0
  544. data/packaging/debian/internal/publish/preinit.sh +7 -0
  545. data/packaging/debian/internal/publish/rakefile_support.rb +183 -0
  546. data/packaging/debian/internal/scripts/gpg_noninteractive/gpg +11 -0
  547. data/packaging/debian/internal/scripts/initccache.sh +35 -0
  548. data/packaging/debian/internal/scripts/inituidgid.sh +19 -0
  549. data/packaging/debian/internal/scripts/my_init +340 -0
  550. data/packaging/debian/internal/scripts/pin_certificates +34 -0
  551. data/packaging/debian/internal/scripts/regen_distro_info_script.sh +3 -0
  552. data/packaging/debian/internal/scripts/setup-vagrant.sh +12 -0
  553. data/packaging/debian/internal/scripts/setuser +31 -0
  554. data/packaging/debian/internal/shell/initpbuilder.sh +3 -0
  555. data/packaging/debian/internal/shell/preinit.sh +28 -0
  556. data/packaging/debian/internal/shell/sudoers.conf +1 -0
  557. data/packaging/debian/internal/test/apache/apache-24.conf +5 -0
  558. data/packaging/debian/internal/test/apache/apache-pre-24.conf +4 -0
  559. data/packaging/debian/internal/test/apache/vhost.conf +17 -0
  560. data/packaging/debian/internal/test/misc/config.json +15 -0
  561. data/packaging/debian/internal/test/misc/hosts.conf +4 -0
  562. data/packaging/debian/internal/test/misc/init.sh +25 -0
  563. data/packaging/debian/internal/test/misc/nodejs_test_app.js +6 -0
  564. data/packaging/debian/internal/test/misc/python_test_app.py +3 -0
  565. data/packaging/debian/internal/test/misc/ruby_test_app.rb +5 -0
  566. data/packaging/debian/internal/test/misc/test_support.rb +61 -0
  567. data/packaging/debian/internal/test/nginx/vhost.conf +23 -0
  568. data/packaging/debian/internal/test/system_web_server_test.rb +126 -0
  569. data/packaging/debian/internal/test/test.sh +141 -0
  570. data/packaging/debian/jenkins/publish/clear_caches.rb +48 -0
  571. data/packaging/debian/jenkins/publish/publish.sh +69 -0
  572. data/packaging/debian/jenkins/test/test.sh +63 -0
  573. data/packaging/debian/passenger_apt_automation.sublime-project +14 -0
  574. data/packaging/debian/publish +172 -0
  575. data/packaging/debian/shell +116 -0
  576. data/packaging/debian/test +142 -0
  577. metadata +563 -3
  578. metadata.gz.asc +7 -7
  579. data/resources/oss-binaries.phusionpassenger.com.crt +0 -208
@@ -0,0 +1,124 @@
1
+
2
+ set var tools
3
+ =============
4
+
5
+ OVERVIEW
6
+ --------
7
+ This collection of tools is designed to make it easier to set Nginx variables
8
+ using a common interface. It works by plugging into and extending the features
9
+ of the internal rewrite module, and operations performed by this module are
10
+ therefore done at the rewrite phase of handling.
11
+
12
+
13
+ ADVANTAGES OF USING THIS MODULE
14
+ -------------------------------
15
+
16
+ - simple interface - you don't have to worry about lots of http script compiling
17
+ - it plugs into the rewrite module, so setting (and getting) vars will happen
18
+ in the order you expect based on how they appear in the configuration file
19
+ - you do not have to worry about overriding the v->get_handler (useful if
20
+ a variable of a specific name could be set in multiple different ways)
21
+
22
+
23
+ WHEN TO USE THIS AND WHEN TO USE v->get_handler = my_func
24
+ ---------------------------------------------------------
25
+
26
+ - if you want a variable to always be generated using a specific function,
27
+ and should not be over-ridden by 'set' functions (e.g. $request_uri,
28
+ $document_root), then you should use v->get_handler
29
+
30
+ - if you want to allow a variable to be set using many possible methods,
31
+ including using the 'set' directive, then this module provides an easy way
32
+ for you to do so (if you use the v->get_handler method in this case, you may
33
+ run into problems because the get_handler may over-ride previous uses of the
34
+ set directive)
35
+
36
+
37
+ USAGE
38
+ -----
39
+
40
+ - decide on the type of function you'll need to write
41
+
42
+ type use when there are these requirements
43
+ ---- -------------------------------------
44
+ NDK_SET_VAR_BASIC 0 variable values, no extra data
45
+ NDK_SET_VAR_DATA 0 variable values, extra data
46
+ NDK_SET_VAR_VALUE 1 variable value, no extra data
47
+ NDK_SET_VAR_VALUE_DATA 1 variable value, extra data
48
+ NDK_SET_VAR_MULTI_VALUE 2+ variable values, no extra data
49
+ NDK_SET_VAR_MULTI_VALUE_DATA 2+ variable values, extra data
50
+ NDK_SET_VAR_HASH the space needed for the result string
51
+ value is known in advance (usually
52
+ used in a hash function)
53
+
54
+ NOTE : if none of these generic calling types suit your needs, it is
55
+ easy to extend the list of types in the .c file (and you if you let me know
56
+ I'll add them to the list
57
+
58
+
59
+ - define the filter function with the respective prototype
60
+
61
+ type prototype
62
+ ---- ---------
63
+ NDK_SET_VAR_BASIC ndk_set_var_pt
64
+ NDK_SET_VAR_DATA ndk_set_var_data_pt
65
+ NDK_SET_VAR_VALUE ndk_set_var_value_pt
66
+ NDK_SET_VAR_DATA_VALUE ndk_set_var_value_data_pt
67
+ NDK_SET_VAR_MULTI_VALUE ndk_set_var_value_pt
68
+ NDK_SET_VAR_MULTI_VALUE_DATA ndk_set_var_value_data_pt
69
+ NDK_SET_VAR_HASH ndk_set_var_hash_pt
70
+
71
+ (See ngx_tools_module.h for the prototype definitions.)
72
+
73
+ Note : For the multi_value functions, the variable value pointer is to the
74
+ first value (with the others being in an array following it)
75
+
76
+
77
+ to use one of the default setup functions
78
+ -----------------------------------------
79
+
80
+ - define one or multiple ngx_http_var_filter_t's at the global scope, setting :
81
+
82
+ type = (one of types above)
83
+ func = function to call
84
+ size = (for multi value) the number of variable values
85
+ (for hash) length of buffer to allocate
86
+ data = (for data functions) additional data (see note below)
87
+
88
+ - define a configuration directive (see in the .c file for examples), where the
89
+ function is 'ngx_http_set_var' and the 'post' is a pointer your filter definition
90
+
91
+
92
+ to setup in a customized way
93
+ ----------------------------
94
+
95
+ - define a configuration directive which has your own specific configuration function
96
+
97
+ - inside your config function, define one or several ngx_http_var_filter_t's like
98
+ above, and call one of the ngx_http_set_var_..._core functions, passing the
99
+ variable name and value pointers as appropriate - see examples section
100
+
101
+ Note : if you're passing extra data to the function, then you will probably want
102
+ to use this second method and store the data either in the loc conf, or just
103
+ allocate the space for it using one of the ngx_palloc functions.
104
+
105
+ If the values that will be used for processing are in the same order as in the
106
+ config file and there aren't any additional values that are input, then you can
107
+ just use the (ngx_str_t *) (cf->args->elts) + 1 as your base for the values or
108
+ possibly not use the _core versions of the functions.
109
+
110
+
111
+ That's it!
112
+
113
+
114
+ FEEDBACK
115
+ --------
116
+
117
+ If you have any comments (good/bad), or have found any bugs, please let me know at:
118
+ ngx.eugaia AT gmail DOT com
119
+
120
+
121
+ TODO
122
+ ----
123
+ - add more documentation/examples
124
+
@@ -0,0 +1,48 @@
1
+ When tracking down some potential issues in the nginx constellation,
2
+ we've found it useful to understand where particular error messages
3
+ are coming from, since many of the same messages are repeated in
4
+ various places. This patch will write the source file from which the
5
+ message originated, the function name, and the line number if you're
6
+ using GCC to compile nginx. Here's an example:
7
+
8
+ Old Output:
9
+ 2010/01/12 14:43:10 [notice] 67772#0: nginx/0.7.64
10
+ 2010/01/12 14:43:10 [notice] 67772#0: built by gcc 4.0.1 (Apple Inc. build 5490)
11
+ 2010/01/12 14:43:10 [notice] 67772#0: OS: Darwin 9.8.0
12
+ 2010/01/12 14:43:10 [notice] 67772#0: hw.ncpu: 2
13
+ 2010/01/12 14:43:10 [notice] 67772#0: net.inet.tcp.sendspace: 65536
14
+ 2010/01/12 14:43:10 [notice] 67772#0: kern.ipc.somaxconn: 128
15
+ 2010/01/12 14:43:10 [notice] 67772#0: getrlimit(RLIMIT_NOFILE):
16
+ 256:9223372036854775807
17
+ 2010/01/12 14:43:10 [notice] 67772#0: start worker processes
18
+ 2010/01/12 14:43:10 [notice] 67772#0: start worker process 67785
19
+ 2010/01/12 14:43:16 [notice] 67772#0: signal 20 (SIGCHLD) received
20
+
21
+ New Output:
22
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_posix_init.c
23
+ ngx_os_status( 80) nginx/0.7.64
24
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_posix_init.c
25
+ ngx_os_status( 83) built by gcc 4.0.1 (Apple Inc. build 5490)
26
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_darwin_init.c
27
+ ngx_os_specific_status( 153) OS: Darwin 9.8.0
28
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_darwin_init.c
29
+ ngx_os_specific_status( 166) hw.ncpu: 2
30
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_darwin_init.c
31
+ ngx_os_specific_status( 166) net.inet.tcp.sendspace: 65536
32
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_darwin_init.c
33
+ ngx_os_specific_status( 166) kern.ipc.somaxconn: 128
34
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_posix_init.c
35
+ ngx_os_status( 92) getrlimit(RLIMIT_NOFILE):
36
+ 2560:9223372036854775807
37
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_process_cycle.c
38
+ ngx_start_worker_processes( 337) start worker processes
39
+ 2010/01/14 16:35:09 [notice] 27241#0: src/os/unix/ngx_process.c
40
+ ngx_spawn_process( 201) start worker process 27254
41
+ 2010/01/14 16:35:14 [notice] 27241#0: src/os/unix/ngx_process.c
42
+ ngx_signal_handler( 420) signal 20 (SIGCHLD) received
43
+
44
+ Formatting the filename and function name fields into fixed-width
45
+ fields would be nicer, however that would require further changes in
46
+ src/core/ngx_string.c
47
+
48
+ (C) Brian Moran - bmoran@onehub.com (posted to nginx-devel mailing list on 15/01/10)
@@ -0,0 +1,45 @@
1
+
2
+ NDK_UPSTREAM_LIST
3
+ -----------------
4
+
5
+ This submodule provides a directive that creates a list of upstreams, with
6
+ optional weighting. This list can then be used by other modules to hash over
7
+ the upstreams however they choose.
8
+
9
+
10
+ USAGE IN CONF FILE
11
+ ------------------
12
+
13
+ e.g. upstream_list name backend1 4:backend2 3:backend3;
14
+
15
+
16
+
17
+ USAGE WITH OTHER MODULES
18
+ ------------------------
19
+
20
+ Add a line like
21
+
22
+ CFLAGS="$CFLAGS -DNDK_UPSTREAM_LIST"
23
+
24
+ to the config file of your module.
25
+
26
+
27
+
28
+ INTEGRATING WITH YOUR MODULE
29
+ ----------------------------
30
+
31
+ The upstream lists are stored in the array given in the lists.h file, which is
32
+ an array of ndk_upstream_list_t elts. The elts are currently all pointers to
33
+ strings which have been distributed according to the weight - so if there are
34
+ two backends, with weight 3 and 4 respectively, there will be 7 pointers in
35
+ total with the first 3 pointing to the first backend and the last 4 to the
36
+ second.
37
+
38
+
39
+
40
+ TODO
41
+ ----
42
+ - replace strings with pointers to upstreams if they are available (and if
43
+ this is possible)
44
+ - add additional 'http://' to strings if necessary
45
+ - improve this documentation
@@ -0,0 +1,12 @@
1
+
2
+ 2010 (C) Marcus Clyne
3
+
4
+
5
+ Examples
6
+ --------
7
+
8
+ In this section there are a number of examples of the various features of the tools
9
+ module. These have been given in the form of dummy modules, to make it easier to
10
+ use as templates for your own module should you choose to do so.
11
+
12
+
@@ -0,0 +1,4 @@
1
+ ngx_addon_name=ngx_http_set_var_examples_module
2
+ HTTP_MODULES="$HTTP_MODULES ngx_http_set_var_examples_module"
3
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_set_var_examples_module.c"
4
+ have=NDK_SET_VAR . auto/have
@@ -0,0 +1,136 @@
1
+
2
+ /*
3
+ * 2010 (C) Marcus Clyne
4
+ */
5
+
6
+
7
+ #include <ndk.h>
8
+
9
+
10
+ static ngx_int_t ngx_http_set_var_concat2 (ngx_http_request_t *r, ngx_str_t *val, ngx_http_variable_value_t *v);
11
+ static char * ngx_http_set_prepend_hello (ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
12
+
13
+
14
+ static ndk_set_var_t ngx_http_var_set_concat2 = {
15
+ NDK_SET_VAR_MULTI_VALUE,
16
+ ngx_http_set_var_concat2,
17
+ 2,
18
+ NULL
19
+ };
20
+
21
+
22
+ static ngx_command_t ngx_http_set_var_examples_commands[] = {
23
+ {
24
+ ngx_string ("set_concat2"),
25
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE3,
26
+ ndk_set_var_multi_value,
27
+ 0,
28
+ 0,
29
+ &ngx_http_var_set_concat2
30
+ },
31
+ {
32
+ ngx_string ("set_prepend_hello"),
33
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
34
+ ngx_http_set_prepend_hello,
35
+ 0,
36
+ 0,
37
+ NULL
38
+ },
39
+ ngx_null_command
40
+ };
41
+
42
+
43
+ ngx_http_module_t ngx_http_set_var_examples_module_ctx = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
44
+ ngx_module_t ngx_http_set_var_examples_module = {
45
+
46
+ NGX_MODULE_V1,
47
+ &ngx_http_set_var_examples_module_ctx, // module context
48
+ ngx_http_set_var_examples_commands, // module directives
49
+ NGX_HTTP_MODULE, // module type
50
+ NULL, // init master
51
+ NULL, // init module
52
+ NULL, // init process
53
+ NULL, // init thread
54
+ NULL, // exit thread
55
+ NULL, // exit process
56
+ NULL, // exit master
57
+ NGX_MODULE_V1_PADDING
58
+ };
59
+
60
+
61
+ /*
62
+ This function is called by both examples, takes two variable values and concatenates them
63
+ to give a third string.
64
+ */
65
+
66
+ static ngx_int_t
67
+ ngx_http_set_var_concat2 (ngx_http_request_t *r, ngx_str_t *val, ngx_http_variable_value_t *v)
68
+ {
69
+ size_t len;
70
+ ngx_http_variable_value_t *v2;
71
+ u_char *p;
72
+
73
+ v2 = v + 1;
74
+
75
+ len = v->len + v2->len;
76
+
77
+ /*
78
+ * NDK provided abbreviation for the following code:
79
+ *
80
+ * p = ngx_palloc (r->pool, len);
81
+ * if (p == NULL)
82
+ * return NGX_ERROR;
83
+ *
84
+ * */
85
+ ndk_palloc_re(p, r->pool, len);
86
+
87
+ val->data = p;
88
+ val->len = len;
89
+
90
+ ngx_memzero (p, len);
91
+
92
+ p = ngx_cpymem (p, v->data, v->len);
93
+ ngx_memcpy (p, v2->data, v2->len);
94
+
95
+ return NGX_OK;
96
+ }
97
+
98
+
99
+
100
+ /*
101
+ This function demonstrates using the 'core' function in a function that appends the word
102
+ 'hello_' to the beginning of a variable.
103
+
104
+ set $var world;
105
+ set_prepend_hello $var $var;
106
+
107
+ If the arguments used in the variable value filter do not all come directly from the conf
108
+ file, or are not given in the order
109
+
110
+ direcive $var_name val1 "val2 string $var" ...
111
+
112
+ then the _core functions should be used inside the function that is called when the directive
113
+ is read.
114
+ */
115
+
116
+ static char *
117
+ ngx_http_set_prepend_hello (ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
118
+ {
119
+ ngx_str_t s[2], *var_name;
120
+ ndk_set_var_t filter;
121
+
122
+ var_name = cf->args->elts;
123
+ var_name++;
124
+
125
+ s[0].data = (u_char*) "hello_";
126
+ s[0].len = 6;
127
+
128
+ s[1] = *(var_name + 1);
129
+
130
+ filter.type = NDK_SET_VAR_MULTI_VALUE;
131
+ filter.func = ngx_http_set_var_concat2;
132
+ filter.size = 2;
133
+
134
+ return ndk_set_var_multi_value_core (cf, var_name, (ngx_str_t *) s, &filter);
135
+ }
136
+
@@ -0,0 +1,797 @@
1
+
2
+ ## Directories to search for usable builds:
3
+ ##
4
+ ## - [$PFX]_INC and [$PFX]_LIB
5
+ ## - the dir specified by --with-[$pfx]=*
6
+ ## - each dir named [$pfx]-* under [$PFX]_BASE (descending order)
7
+ ## - each dir named [$pfx]-* under $ngx_src_dir/.. (descending order)
8
+ ## - system_paths (see below)
9
+ ##
10
+ ## Note : specifying [$PFX]_INC or [$PFX]_LIB prevents other dirs being tried
11
+ ## specifying --with-[$pfx]= prevents autodiscovery of dirs
12
+ ##
13
+ ## Note : if this file is not in the same directory as the config file, the value
14
+ ## for ngx_auto_lib_file should be changed to a relative path from that file
15
+ ## e.g. : $ngx_addon_dir/libs/ngx_auto_lib
16
+ ##
17
+ ## TODO : explain hooks
18
+
19
+ #############
20
+ ## VERSION ##
21
+ #############
22
+
23
+ ngx_auto_lib_version=1001
24
+
25
+ if [ ! $ngx_auto_lib_file_version ] || [ $ngx_auto_lib_file_version -lt $ngx_auto_lib_version ]; then
26
+
27
+ if [ ! $ngx_addon_dir ]; then
28
+ ngx_addon_dir=`cd $(dirname $0); pwd`
29
+ fi
30
+
31
+ ngx_auto_lib_file="$ngx_addon_dir/ngx_auto_lib_core"
32
+ ngx_auto_lib_file_version="$ngx_auto_lib_version"
33
+ fi
34
+
35
+ ###############
36
+ ## VARIABLES ##
37
+ ###############
38
+
39
+ v=
40
+ v="$v inc_path"
41
+ v="$v incs"
42
+ v="$v libs"
43
+ v="$v name"
44
+ v="$v path"
45
+ v="$v run"
46
+ v="$v test"
47
+ ev=
48
+ ev="$ev add_libs"
49
+ ev="$ev add_path"
50
+ ev="$ev build_dirs"
51
+ ev="$ev build_inc_dirs"
52
+ ev="$ev build_lib_dirs"
53
+ ev="$ev check_macros_defined"
54
+ ev="$ev check_macros_non_zero"
55
+ ev="$ev defines"
56
+ ev="$ev deps"
57
+ ev="$ev exit_if_not_found"
58
+ ev="$ev haves"
59
+ ev="$ev inc_names"
60
+ ev="$ev lib_files"
61
+ ev="$ev lib_names"
62
+ ev="$ev libs_to_add"
63
+ ev="$ev modules"
64
+ ev="$ev srcs"
65
+ ev="$ev shared"
66
+ ev="$ev test_libs"
67
+ ev="$ev variables"
68
+
69
+ ngx_feature_vars="$v"
70
+ ngx_feature_extra_vars="$ev"
71
+ ngx_feature_all_vars="$v $ev"
72
+
73
+ NGX_AUTO_LIB_DEFAULT_SYSTEM_DIRS='/usr/local /usr /opt/local /opt /usr/pkg'
74
+
75
+ ####################
76
+ ## UTIL FUNCTIONS ##
77
+ ####################
78
+
79
+ to_upper() {
80
+ echo "$@" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
81
+ }
82
+
83
+ to_lower() {
84
+ echo "$@" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
85
+ }
86
+
87
+ ####################
88
+ ## INIT FUNCTIONS ##
89
+ ####################
90
+
91
+ ngx_auto_lib_init() {
92
+
93
+ . $ngx_auto_lib_file
94
+
95
+ ngx_auto_lib_init_latest $@
96
+ }
97
+
98
+ ngx_auto_lib_init_latest() {
99
+
100
+ # set name and prefixes
101
+
102
+ if [ ! $1 ]; then
103
+ echo "ngx_auto_lib_init() requires that a name be passed"
104
+ exit 1
105
+ fi
106
+
107
+ ngx_auto_lib_name=$1
108
+ ngx_auto_lib_module_name=$2
109
+
110
+ if [ $2 ]; then
111
+ NGX_AUTO_LIB_PFX=`to_upper $2`
112
+ else
113
+ NGX_AUTO_LIB_PFX=`to_upper $1`
114
+ fi
115
+
116
+ ngx_auto_lib_pfx=`to_lower $NGX_AUTO_LIB_PFX`
117
+
118
+ ngx_auto_lib_clean_feature_vars
119
+ }
120
+
121
+ ngx_auto_lib_clean_feature_vars() {
122
+ for var in $ngx_feature_all_vars; do
123
+ eval ngx_feature_$var=
124
+ done
125
+ }
126
+
127
+ ngx_auto_lib_get_variables() {
128
+
129
+ local pfx=$ngx_auto_lib_pfx
130
+ local PFX=$NGX_AUTO_LIB_PFX
131
+
132
+ eval NGX_AUTO_LIB_INC=\"\$${PFX}_INC\"
133
+ eval NGX_AUTO_LIB_LIB=\"\$${PFX}_LIB\"
134
+ eval NGX_AUTO_LIB_DIR=\"\$${PFX}\"
135
+ eval NGX_AUTO_LIB_BASE=\"\$${PFX}_BASE\"
136
+ eval NGX_AUTO_LIB_SEARCH_LIB_INC=\"\$${PFX}_SEARCH_LIB_INC\"
137
+ eval NGX_AUTO_LIB_SEARCH_DIR=\"\$${PFX}_SEARCH_DIR\"
138
+ eval NGX_AUTO_LIB_SEARCH_BASE=\"\$${PFX}_SEARCH_BASE\"
139
+ eval NGX_AUTO_LIB_SEARCH_BASE_PREFIX=\"\$${PFX}_SEARCH_BASE_PREFIX\"
140
+ eval NGX_AUTO_LIB_SEARCH_PARENT=\"\$${PFX}_SEARCH_PARENT\"
141
+ eval NGX_AUTO_LIB_SEARCH_SYSTEM=\"\$${PFX}_SEARCH_SYSTEM\"
142
+ eval NGX_AUTO_LIB_SHARED=\"\$${PFX}_SHARED\"
143
+ eval NGX_AUTO_LIB_SYSTEM_DIRS=\"\$${PFX}_SYSTEM_DIR\"
144
+ eval USE_NGX_AUTO_LIB=\"\$USE_${LIB}\"
145
+
146
+ if [ ! "$NGX_AUTO_LIB_DIR" ]; then
147
+ NGX_AUTO_LIB_DIR=NONE
148
+ fi
149
+
150
+ if [ ! "$USE_NGX_AUTO_LIB" ]; then
151
+ if [ $ngx_feature_check_macros_defined -o $ngx_feature_check_macros_non_zero ]; then
152
+ USE_NGX_AUTO_LIB=MAYBE
153
+ elif [ "$ngx_feature_required" = no ]; then
154
+ USE_NGX_AUTO_LIB=MAYBE
155
+ else
156
+ USE_NGX_AUTO_LIB=YES
157
+ fi
158
+ fi
159
+
160
+ if [ ! "$NGX_AUTO_LIB_SYSTEM_DIRS" ]; then
161
+ NGX_AUTO_LIB_SYSTEM_DIRS=$NGX_AUTO_LIB_DEFAULT_SYSTEM_DIRS
162
+ fi
163
+
164
+ # TODO : add _STATIC, and do searches for both static and shared libs
165
+
166
+ if [ ! "$NGX_AUTO_LIB_SHARED" ]; then
167
+ if [ "$ngx_feature_shared" = no ]; then
168
+ NGX_AUTO_LIB_SHARED=NO
169
+ else
170
+ NGX_AUTO_LIB_SHARED=YES
171
+ fi
172
+ fi
173
+
174
+ NGX_AUTO_LIB_SEARCH_DEP=NO
175
+
176
+ # set default search methods
177
+ # Note : these can be over-ridden by setting NGX_AUTO_LIB_SEARCH_[type]=YES|NO
178
+
179
+ local auto=y
180
+
181
+ if [ "$NGX_AUTO_LIB_INC" ] || [ "$NGX_AUTO_LIB_LIB" ]; then
182
+ ngx_auto_lib_search LIB_INC YES
183
+ auto=n
184
+ fi
185
+
186
+ if [ "$NGX_AUTO_LIB_DIR" != NONE ]; then
187
+ ngx_auto_lib_search DIR YES
188
+ auto=n
189
+ fi
190
+
191
+ if [ "$NGX_AUTO_LIB_BASE" ]; then
192
+ ngx_auto_lib_search BASE YES
193
+ auto=n
194
+ fi
195
+
196
+ if [ $auto = y ]; then
197
+ ngx_auto_lib_search PARENT YES
198
+ ngx_auto_lib_search SYSTEM YES
199
+ fi
200
+
201
+ ngx_auto_lib_search LIB_INC NO
202
+ ngx_auto_lib_search DIR NO
203
+ ngx_auto_lib_search BASE NO
204
+ ngx_auto_lib_search PARENT NO
205
+ ngx_auto_lib_search SYSTEM NO
206
+
207
+ if [ ! "$ngx_feature_lib_names" ]; then
208
+ ngx_feature_lib_names=$pfx
209
+ fi
210
+
211
+ if [ ! "$ngx_feature_inc_names" ]; then
212
+ ngx_feature_inc_names=$ngx_feature_lib_names
213
+ fi
214
+
215
+ if [ ! "$ngx_feature_exit_if_not_found" ]; then
216
+ ngx_feature_exit_if_not_found=yes
217
+ fi
218
+ }
219
+
220
+ #######################
221
+ ## DEFAULT FUNCTIONS ##
222
+ #######################
223
+
224
+ ngx_auto_lib_set_default() {
225
+
226
+ local suffix=
227
+ if [ $1 ]; then
228
+ suffix="_$1"
229
+ fi
230
+
231
+ local def=$2
232
+ local var="NGX_AUTO_LIB$suffix"
233
+
234
+ val=
235
+ if [ ! `eval echo '$'$var` ]; then
236
+ eval $var=\"$def\"
237
+ fi
238
+
239
+ #eval echo "$var = \$$var"
240
+ }
241
+
242
+ ngx_auto_lib_search() {
243
+ ngx_auto_lib_set_default "SEARCH_$1" $2
244
+ }
245
+
246
+ ####################
247
+ ## SAVE FUNCTIONS ##
248
+ ####################
249
+
250
+ ngx_auto_lib_save_vars() {
251
+ OLD_CORE_DEPS=$CORE_DEPS
252
+ OLD_CORE_INCS=$CORE_INCS
253
+ OLD_CORE_LIBS=$CORE_LIBS
254
+ OLD_CORE_SRCS=$CORE_SRCS
255
+ OLD_LINK_DEPS=$LINK_DEPS
256
+
257
+ CORE_DEPS=
258
+ CORE_INCS=
259
+ CORE_LIBS=
260
+ CORE_SRCS=
261
+ LINK_DEPS=
262
+ }
263
+
264
+ ngx_auto_lib_reset_vars() {
265
+ CORE_DEPS=$OLD_CORE_DEPS
266
+ CORE_INCS=$OLD_CORE_INCS
267
+ CORE_LIBS=$OLD_CORE_LIBS
268
+ CORE_SRCS=$OLD_CORE_SRCS
269
+ LINK_DEPS=$OLD_LINK_DEPS
270
+ }
271
+
272
+ ngx_auto_lib_save_feature_vars() {
273
+ for var in $ngx_feature_all_vars; do
274
+ eval main_ngx_feature_$var=\"\$ngx_feature_$var\"
275
+ done
276
+ }
277
+
278
+ ngx_auto_lib_reset_feature_vars() {
279
+ for var in $ngx_feature_all_vars; do
280
+ eval ngx_feature_$var=\"\$main_ngx_feature_$var\"
281
+ done
282
+ }
283
+
284
+ ########################
285
+ ## CHECKING FUNCTIONS ##
286
+ ########################
287
+
288
+ ngx_auto_lib_check_auto_config() {
289
+
290
+ ngx_auto_lib_save_feature_vars
291
+ ngx_auto_lib_clean_feature_vars
292
+
293
+ ngx_feature=$1
294
+ ngx_feature_inc_path="`echo $CFLAGS | tr ' ' '\n' | grep -- -D | tr '\n' ' '`"
295
+ ngx_feature_incs="#include <$NGX_AUTO_CONFIG_H>"
296
+ ngx_feature_libs=
297
+ ngx_feature_path=`pwd`
298
+ ngx_feature_run=no
299
+ ngx_feature_test=$2
300
+
301
+ #ngx_auto_lib_print_feature_vars
302
+
303
+ . auto/feature
304
+
305
+ if [ $ngx_found = yes ]; then
306
+ rv=0
307
+ else
308
+ rv=1
309
+ fi
310
+
311
+ ngx_auto_lib_reset_feature_vars
312
+
313
+ return $rv
314
+ }
315
+
316
+ ngx_auto_lib_check_macro_defined() {
317
+
318
+ for m in $@; do
319
+ ngx_auto_lib_check_auto_config "$m" "
320
+ #ifndef $m
321
+ rubbish
322
+ #endif" && return 0
323
+ done
324
+
325
+ return 1
326
+ }
327
+
328
+ ngx_auto_lib_check_macro_non_zero() {
329
+
330
+ for m in $@; do
331
+ ngx_auto_lib_check_auto_config "$m" "
332
+ #if !($m)
333
+ rubbish
334
+ #endif" && return 0
335
+ done
336
+
337
+ return 1
338
+ }
339
+
340
+ ngx_auto_lib_check_require() {
341
+
342
+ if [ $USE_NGX_AUTO_LIB = YES ]; then
343
+ return 0
344
+ elif [ $USE_NGX_AUTO_LIB = NO ]; then
345
+ return 1
346
+ fi
347
+
348
+
349
+ # check if the libraries are required elsewhere
350
+
351
+ for l in $ngx_feature_lib_names; do
352
+ [ ! "`echo $CORE_LIBS $ADDON_LIBS | grep -w -- -l$l`" ] && return 0
353
+ done
354
+
355
+
356
+
357
+ # check that any required macros are set
358
+
359
+ local d=$ngx_feature_check_macros_defined
360
+ local nz=$ngx_feature_check_macros_non_zero
361
+
362
+ if [ "$d" ] || [ "$nz" ]; then
363
+
364
+ ngx_auto_lib_check_macro_defined $d && return 0
365
+ ngx_auto_lib_check_macro_non_zero $nz && return 0
366
+ fi
367
+
368
+
369
+ ngx_auto_lib_check
370
+ }
371
+
372
+ ngx_auto_lib_check() {
373
+ return 1
374
+ }
375
+
376
+ ##################################
377
+ ## TEST PHASE HANDLER FUNCTIONS ##
378
+ ##################################
379
+
380
+ ngx_auto_lib_test() {
381
+ ngx_auto_lib_test_pre_setup "$@"
382
+ ngx_auto_lib_test_setup "$@"
383
+ ngx_auto_lib_test_post_setup "$@"
384
+ ngx_auto_lib_test_feature
385
+ }
386
+
387
+ ngx_auto_lib_test_pre_setup() {
388
+ return 0
389
+ }
390
+
391
+ ngx_auto_lib_test_setup() {
392
+
393
+ local INC=$1
394
+ local LIB=$2
395
+
396
+ ngx_auto_lib_inc_dir=$INC
397
+ ngx_auto_lib_lib_dir=$LIB
398
+
399
+ ngx_auto_lib_reset_feature_vars
400
+
401
+ if [ ! "$ngx_feature_path" ]; then
402
+ ngx_feature_path="$INC"
403
+ fi
404
+
405
+ ngx_feature_path="$ngx_feature_path $ngx_feature_add_path"
406
+
407
+ for sfx in $ngx_feature_path_suffixes; do
408
+ ngx_feature_path="$ngx_feature_path $INC/$sfx"
409
+ done
410
+
411
+
412
+ local inc=
413
+ local lib=
414
+ local incs="$ngx_feature_inc_names"
415
+ local libs="$ngx_feature_lib_names"
416
+ local lib_files="$ngx_feature_lib_files"
417
+
418
+ for inc in $incs; do
419
+ ngx_feature_incs="$ngx_feature_incs
420
+ #include <$inc.h>"
421
+ done
422
+
423
+
424
+ if [ ! "$ngx_feature_libs" ]; then
425
+
426
+ if [ $NGX_AUTO_LIB_SHARED = YES ]; then
427
+ if [ $NGX_RPATH = YES ]; then
428
+ ngx_feature_libs="-R$LIB"
429
+ fi
430
+ ngx_feature_libs="$ngx_feature_libs -L$LIB"
431
+
432
+ for lib in $libs; do
433
+ ngx_feature_libs="$ngx_feature_libs -l$lib"
434
+ done
435
+
436
+ # TODO : only add --rpath when the path is not a standard system path - warn if /usr
437
+
438
+ ngx_feature_libs="$ngx_feature_libs -Wl,--rpath -Wl,$LIB"
439
+
440
+ else
441
+
442
+ for lib in $lib_files; do
443
+ ngx_feature_libs="$ngx_feature_libs $LIB/$lib"
444
+ done
445
+
446
+ for lib in $libs; do
447
+ ngx_feature_libs="$ngx_feature_libs $LIB/lib$lib.a"
448
+ done
449
+ fi
450
+ fi
451
+
452
+ if [ ! $ngx_feature_run ]; then
453
+ ngx_feature_run=no
454
+ fi
455
+
456
+ if [ $NGX_AUTO_LIB_SHARED = YES ]; then
457
+
458
+ # Add a test to be called in auto/feature after compilation that will check
459
+ # whether any libraries that are linked are in fact using the path provided to
460
+ # link libraries rather than a standard path. Note : this test will work on
461
+ # all linked shared objects, even if supplied directly by setting
462
+ # $ngx_feature_libs instead of usign $ngx_feature_lib_names
463
+
464
+ # TODO : allow for some libraries to not be checked here if desired - if part of system paths
465
+
466
+ libs="`echo $ngx_feature_libs | tr ' ' '\n' | grep -- -l | sed 's|-l||g'`"
467
+
468
+ local test="
469
+ for l in $libs; do
470
+ o="'\`ldd '$NGX_AUTOTEST' | grep '$LIB'/lib\$l\\.so\`;
471
+ if [ ! \"\$o\" ]; then
472
+ chmod -x $NGX_AUTOTEST;
473
+ echo Linker does not link to correct version
474
+ else
475
+ chmod +x $NGX_AUTOTEST;
476
+ fi
477
+ done'
478
+ test="`echo "$test" | tr '\n' ' '`"
479
+
480
+ ngx_feature_test_libs="$ngx_feature_test_libs; $test"
481
+ fi
482
+
483
+ ngx_feature_libs="$ngx_feature_libs $ngx_feature_add_libs"
484
+ ngx_feature_libs_to_add="$ngx_feature_libs"
485
+ ngx_feature_libs="$ngx_feature_libs $ngx_feature_test_libs"
486
+ ngx_feature="$ngx_auto_lib_name library $ngx_feature"
487
+ }
488
+
489
+ ngx_auto_lib_test_post_setup() {
490
+ return 0
491
+ }
492
+
493
+ ngx_auto_lib_test_feature() {
494
+ #ngx_auto_lib_print_feature_vars
495
+ . auto/feature
496
+ [ $ngx_found = yes ] && return 0
497
+ return 1
498
+ }
499
+
500
+ ########################
501
+ ## TEST DIR FUNCTIONS ##
502
+ ########################
503
+
504
+ ngx_auto_lib_test_dir_pair() {
505
+ ngx_auto_lib_test_inc_dir=$1
506
+ ngx_auto_lib_test_lib_dir=$2
507
+
508
+ if [ $1 = $2 ]; then
509
+ ngx_feature="in $1$3"
510
+ else
511
+ ngx_feature="in $1 and $2$3"
512
+ fi
513
+ ngx_auto_lib_test "$1" "$2" "$3"
514
+ }
515
+
516
+ ngx_auto_lib_test_dir_pairs() {
517
+ ngx_auto_lib_test_dir_pair "$1/include" "$2/lib" "$3" && return 0
518
+ ngx_auto_lib_test_dir_pair "$1" "$2" "$3" && return 0
519
+ return 1
520
+ }
521
+
522
+ ngx_auto_lib_test_dirs() {
523
+
524
+ local msg="$1"
525
+ local bdir idir ldir
526
+
527
+ local bdirs=$ngx_feature_build_dirs
528
+ local idirs=$ngx_feature_build_inc_dirs
529
+ local ldirs=$ngx_feature_build_lib_dirs
530
+
531
+ shift
532
+
533
+ for dir in "$@"; do
534
+ ngx_auto_lib_test_dir=$dir
535
+
536
+ for ldir in $ldirs; do
537
+ for idir in $idirs; do
538
+ ngx_auto_lib_test_dir_pair "$dir/$idir" "$dir/$ldir" "$msg" && return 0
539
+ done
540
+ done
541
+
542
+ for ldir in $ldirs; do
543
+ ngx_auto_lib_test_dir_pair "$dir" "$dir/$ldir" "$msg" && return 0
544
+ done
545
+
546
+ for idir in $idirs; do
547
+ ngx_auto_lib_test_dir_pair "$dir/$idir" "$dir" "$msg" && return 0
548
+ done
549
+
550
+ for bdir in $bdirs; do
551
+ ngx_auto_lib_test_dir_pairs "$dir/$bdir" "$dir/$bdir" "$msg" && return 0
552
+ done
553
+
554
+ ngx_auto_lib_test_dir_pairs "$dir" "$dir" "$msg" && return 0
555
+ ngx_auto_lib_test_dir=
556
+ done
557
+
558
+ return 1
559
+ }
560
+
561
+ ngx_auto_lib_test_install_dirs() {
562
+
563
+ local msg="$1"
564
+ local dir=
565
+
566
+ shift
567
+
568
+ for dir in "$@"; do
569
+ ngx_auto_lib_test_dir=$dir
570
+ ngx_auto_lib_test_dir_pair "$dir/include" "$dir/lib" "$msg" && return 0
571
+ ngx_auto_lib_test_dir=
572
+ done
573
+
574
+ return 1
575
+ }
576
+
577
+ ngx_auto_lib_run_tests() {
578
+
579
+ local name="$ngx_auto_lib_name"
580
+ local pfx="$ngx_auto_lib_pfx"
581
+ local PFX="$NGX_AUTO_LIB_PFX"
582
+ local INC="$NGX_AUTO_LIB_INC"
583
+ local LIB="$NGX_AUTO_LIB_LIB"
584
+ local DIR="$NGX_AUTO_LIB_DIR"
585
+ local BASE="$NGX_AUTO_LIB_BASE"
586
+ local MSG="$NGX_AUTO_LIB_MSG"
587
+
588
+
589
+ ngx_found=no
590
+
591
+
592
+ # dependency
593
+
594
+ if [ $NGX_AUTO_LIB_SEARCH_DEP = YES ]; then
595
+ ngx_auto_lib_test_dir_pair "$INC" "$LIB" "$MSG"
596
+ return $?
597
+ fi
598
+
599
+
600
+ # lib and include dirs set explicitly (e.g. $OPENSSL_INC, $OPENSSL_LIB)
601
+
602
+ if [ $NGX_AUTO_LIB_SEARCH_LIB_INC = YES ]; then
603
+ ngx_auto_lib_test_dir_pair "$INC" "$LIB" " (specified by \$${PFX}_INC and \$${PFX}_LIB)" && return 0
604
+ fi
605
+
606
+
607
+ # path specified by ${PFX} (e.g. $OPENSSL, $PCRE)
608
+ # Note : these will be set automatically by configure for OpenSSL, PCRE, Zlib etc
609
+ # TODO : change to searching more than one path
610
+
611
+ if [ $NGX_AUTO_LIB_SEARCH_DIR = YES ] && [ $DIR != NONE ]; then
612
+ ngx_auto_lib_test_dirs " (specified by \$${PFX})" $DIR && return 0
613
+ fi
614
+
615
+
616
+ # directories beginning with '$pfx-' that are in $NGX_AUTO_LIB_BASE (e.g. $OPENSSL_BASE)
617
+
618
+ if [ $NGX_AUTO_LIB_SEARCH_BASE = YES ] && [ $BASE ]; then
619
+
620
+ p=$NGX_AUTO_LIB_SEARCH_BASE_PREFIX
621
+
622
+ if [ "$p" = YES ]; then
623
+ p="!ame $pfx-*"
624
+ elif [ "$p" ]; then
625
+ p="!ame $p*"
626
+ fi
627
+
628
+ ngx_auto_lib_test_dirs " (found under \$${PFX}_BASE)" \
629
+ `find $BASE/* -maxdepth 0 -type d $p 2> /dev/null | sort -r` && return 0
630
+ fi
631
+
632
+
633
+ # directories beginning with '$pfx-' that are in the same directory as the Nginx source
634
+
635
+ if [ $NGX_AUTO_LIB_SEARCH_PARENT = YES ]; then
636
+ local src_dir=`cd ..; pwd`
637
+ ngx_auto_lib_test_dirs " (found under Nginx source parent dir)" \
638
+ `find $src_dir/* -maxdepth 0 -type d !ame $pfx-* 2> /dev/null | sort -r` && return 0
639
+ fi
640
+
641
+
642
+ # system folders
643
+
644
+ if [ $NGX_AUTO_LIB_SEARCH_SYSTEM = YES ]; then
645
+ ngx_auto_lib_test_install_dirs "" $NGX_AUTO_LIB_SYSTEM_DIRS && return 0
646
+ fi
647
+
648
+ return 1
649
+ }
650
+
651
+ #######################
652
+ ## HANDLER FUNCTIONS ##
653
+ #######################
654
+
655
+ ngx_auto_lib_run() {
656
+ ngx_auto_lib_get_variables
657
+ eval AUTO_$NGX_AUTO_LIB_PFX=NO
658
+
659
+ ngx_auto_lib_check_require || return
660
+ ngx_auto_lib_setup || return
661
+ ngx_auto_lib_save_feature_vars
662
+ ngx_auto_lib_run_tests
663
+ ngx_auto_lib_post_tests || return
664
+ ngx_auto_lib_finalize
665
+ }
666
+
667
+ ngx_auto_lib_print_feature_vars() {
668
+ echo ----------------------------
669
+ for var in $ngx_feature_vars; do
670
+ eval "echo ngx_feature_$var = \$ngx_feature_$var"
671
+ done
672
+ echo ----------------------------
673
+ }
674
+
675
+ ngx_auto_lib_setup() {
676
+ return 0
677
+ }
678
+
679
+ ngx_auto_lib_post_tests() {
680
+ return 0
681
+ }
682
+
683
+ #############################
684
+ ## SET VARIABLES FUNCTIONS ##
685
+ #############################
686
+
687
+ # TODO : add HTTP/ADDON settings too
688
+
689
+ ngx_auto_lib_set_core_variables() {
690
+ # TODO : don't add includes / libs more than once
691
+
692
+ eval CORE_DEPS=\"$CORE_DEPS $ngx_feature_deps\"
693
+ eval CORE_INCS=\"$CORE_INCS $ngx_feature_path\"
694
+ eval CORE_LIBS=\"$CORE_LIBS $ngx_feature_libs_to_add\"
695
+ eval CORE_SRCS=\"$CORE_SRCS $ngx_feature_srcs\"
696
+ }
697
+
698
+ ngx_auto_lib_set_generic_variables() {
699
+ local INC=$ngx_auto_lib_test_inc_dir
700
+ local LIB=$ngx_auto_lib_test_lib_dir
701
+
702
+ modules="$modules $ngx_feature_modules"
703
+
704
+ for have in $ngx_feature_haves; do
705
+ . auto/have
706
+ done
707
+
708
+ set - $ngx_feature_defines
709
+
710
+ while [ $1 ]; do
711
+ have=$1
712
+ value=$2
713
+ . auto/define
714
+ done
715
+
716
+ local PFX=$NGX_AUTO_LIB_PFX
717
+
718
+ eval USE_$PFX=NO
719
+
720
+ if [ $ngx_auto_lib_test_dir ]; then
721
+ eval $PFX=$ngx_auto_lib_test_dir
722
+ else
723
+ eval $PFX=$ngx_auto_lib_lib_dir
724
+ fi
725
+
726
+ if [ $NGX_AUTO_LIB_SHARED != YES ]; then
727
+ for l in $ngx_feature_lib_names; do
728
+ CORE_LIBS=`echo $CORE_LIBS | sed 's|-\<l$l\>||g'`
729
+ ADDON_LIBS=`echo $ADDON_LIBS | sed 's|-\<l$l\>||g'`
730
+ done
731
+ fi
732
+
733
+ eval ${PFX}_INC=$INC
734
+ eval ${PFX}_LIB=$LIB
735
+ eval ${PFX}_SHARED=$NGX_AUTO_LIB_SHARED
736
+ eval AUTO_$PFX=YES
737
+ }
738
+
739
+ ngx_auto_lib_set_custom_variables() {
740
+ return 0
741
+ }
742
+
743
+ ########################
744
+ ## FINALIZE FUNCTIONS ##
745
+ ########################
746
+
747
+ ngx_auto_lib_finalize() {
748
+ ngx_auto_lib_finalize_core
749
+ }
750
+
751
+ ngx_auto_lib_finalize_core() {
752
+
753
+ if [ $ngx_found = yes ]; then
754
+
755
+ ngx_auto_lib_set_core_variables
756
+ ngx_auto_lib_set_generic_variables
757
+
758
+ if [ "$ngx_feature_variables" ]; then
759
+ eval $ngx_feature_variables
760
+ fi
761
+
762
+ ngx_auto_lib_set_custom_variables
763
+
764
+ elif [ $ngx_feature_exit_if_not_found = yes ]; then
765
+
766
+ if [ $ngx_auto_lib_module_name ]; then
767
+ module_txt=" by the $ngx_auto_lib_module_name module"
768
+ else
769
+ module_text=
770
+ fi
771
+
772
+ lib=$ngx_auto_lib_name
773
+ pfx=$ngx_auto_lib_pfx
774
+ PFX=$NGX_AUTO_LIB_PFX
775
+
776
+ cat << END
777
+
778
+ $0: error: the $lib library is required$module_txt, but cannot
779
+ be found using the current configuration. In order for the compilation to succeed,
780
+ you will need to install the library using your system's package installer or point
781
+ the configure script to the library using one of the following variables :
782
+
783
+ to define a dir to find $pfx library (source or install dir) $PFX
784
+ to define $pfx lib and include dirs separately ${PFX}_LIB & ${PFX}_INC
785
+ to define a base dir to search for dirs beginning with $pfx- ${PFX}_BASE
786
+
787
+ e.g.
788
+
789
+ $ export ${PFX}_LIB=/path/to/library/lib
790
+ $ export ${PFX}_LIB=/path/to/library/include
791
+ $ $0 ...
792
+
793
+ END
794
+ exit 1
795
+ fi
796
+ }
797
+