Ravenports generated: 05 Sep 2017 16:50
[ravenports.git] / bucket_58 / nginx
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               nginx
4 VERSION=                1.13.4
5 KEYWORDS=               lang
6 VARIANTS=               standard loaded
7 SDESC[standard]=        HTTP and reverse proxy server (basic options)
8 SDESC[loaded]=          HTTP and reverse proxy server (all options)
9 HOMEPAGE=               https://nginx.org/
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main geoip2 notice
13 SITES[geoip2]=          GITHUB/leev:ngx_http_geoip2_module:2.0
14 SITES[main]=            http://nginx.org/download/
15 SITES[notice]=          GITHUB/kr:nginx-notice:3c95966
16 DISTFILE[1]=            nginx-1.13.4.tar.gz:main
17 DISTFILE[2]=            generated:geoip2
18 DISTFILE[3]=            generated:notice
19 DF_INDEX=               1
20 SPKGS[standard]=        single
21 SPKGS[loaded]=          single
22
23 OPTIONS_AVAILABLE=      LOADED
24 OPTIONS_STANDARD=       none
25 VOPTS[loaded]=          LOADED=ON
26
27 BUILD_DEPENDS=          pcre:static:standard
28 BUILDRUN_DEPENDS=       pcre:shared:standard
29
30 USERS=                  {{WWWOWN}}
31 GROUPS=                 {{WWWGRP}}
32 USERGROUP_SPKG=         single
33
34 USES=                   cpe ssl zlib
35
36 CPE_PRODUCT=            nginx
37 CPE_VENDOR=             nginx
38 FPC_EQUIVALENT=         www/nginx
39
40 MUST_CONFIGURE=         yes
41 CONFIGURE_ARGS=         --prefix={{PREFIX}}/etc/nginx
42                         --with-cc-opt="-I{{LOCALBASE}}/include"
43                         --with-ld-opt="-L{{LOCALBASE}}/lib -Wl,-rpath,{{LOCALBASE}}/lib"
44                         --conf-path={{PREFIX}}/etc/nginx/nginx.conf
45                         --sbin-path={{PREFIX}}/sbin/nginx
46                         --pid-path=/var/run/nginx.pid
47                         --error-log-path=/var/log/nginx/error.log
48                         --user={{WWWOWN}}
49                         --group={{WWWGRP}}
50                         --with-pcre
51                         --modules-path={{PREFIX}}/libexec/nginx
52                         --with-file-aio
53                         --http-client-body-temp-path=/var/tmp/nginx/client_body_temp
54                         --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
55                         --http-proxy-temp-path=/var/tmp/nginx/proxy_temp
56                         --http-scgi-temp-path=/var/tmp/nginx/scgi_temp
57                         --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp
58                         --http-log-path=/var/log/nginx/access.log
59                         --with-http_addition_module
60                         --with-http_auth_request_module
61                         --with-http_dav_module
62                         --with-http_flv_module
63                         --with-http_gzip_static_module
64                         --with-http_gunzip_module
65                         --with-http_mp4_module
66                         --with-http_random_index_module
67                         --with-http_realip_module
68                         --with-http_secure_link_module
69                         --with-http_slice_module
70                         --with-http_ssl_module
71                         --with-http_stub_status_module
72                         --with-http_sub_module
73                         --with-http_v2_module
74                         --with-mail=dynamic
75                         --with-mail_ssl_module
76                         --with-stream=dynamic
77                         --with-stream_ssl_module
78                         --with-stream_ssl_preread_module
79                         --with-threads
80
81 PLIST_SUB=              WWWOWN={{WWWOWN}}
82                         WWWGRP={{WWWGRP}}
83                         NGINX_TMPDIR=/var/tmp/nginx
84                         NGINX_LOGDIR=/var/log/nginx
85 RC_SUBR=                nginx:single
86 SUB_FILES=              pkg-message-single
87 SUB_LIST=               WWWOWN={{WWWOWN}}
88                         WWWGRP={{WWWGRP}}
89                         NGINX_TMPDIR=/var/tmp/nginx
90                         NGINX_LOGDIR=/var/log/nginx
91
92 [LOADED].DESCRIPTION=                   All options enabled (heavy dependencies)
93 [LOADED].BROKEN_ON=                     need to replace gpatch with bsdpatch
94 [LOADED].BUILDRUN_DEPENDS_ON=           libmaxminddb:single:standard
95 [LOADED].CONFIGURE_ARGS_OFF=            --without-mail_imap_module
96                                         --without-mail_pop3_module
97                                         --without-mail_smtp_module
98 [LOADED].CONFIGURE_ARGS_ON=             --add-dynamic-module={{WRKDIR}}/ngx_http_geoip2_module-2.0
99                                         --add-module={{WRKDIR}}/nginx-notice-3c95966
100 [LOADED].DF_INDEX_ON=                   2
101                                         3
102 [LOADED].EXTRA_PATCHES_ON=              extra-patch-ngx_http_notice_module.c
103
104 post-patch:
105         @${REINPLACE_CMD} 's!%%HTTP_PORT%%!80!; \
106                 s!%%PREFIX%%!${PREFIX}!; \
107                 s!%%NGINX_ERRORLOG%%!/var/log/nginx/error.log!' \
108                 ${WRKSRC}/conf/nginx.conf
109
110 do-build:
111         @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD})
112
113 post-install:
114         ${CAT} ${WRKSRC}/conf/nginx.conf \
115                 >>${STAGEDIR}${PREFIX}/etc/nginx/nginx.conf-dist
116         ${INSTALL_MAN} ${WRKSRC}/objs/nginx.8 \
117                 ${STAGEDIR}${MAN8PREFIX}/man/man8
118
119 do-install:
120         ${MKDIR} ${STAGEDIR}${PREFIX}/etc/nginx \
121                 ${STAGEDIR}${PREFIX}/libexec/nginx \
122                 ${STAGEDIR}/var/tmp/nginx \
123                 ${STAGEDIR}/var/log/nginx \
124                 ${STAGEDIR}${PREFIX}/www/nginx-dist
125         ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${STAGEDIR}${PREFIX}/sbin
126 .for i in koi-utf koi-win win-utf
127         ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${PREFIX}/etc/nginx
128 .endfor
129 .for i in fastcgi_params mime.types scgi_params uwsgi_params
130         ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${PREFIX}/etc/nginx/${i}-dist
131 .endfor
132 .for i in index.html 50x.html
133         ${INSTALL_DATA} ${WRKSRC}/html/${i} ${STAGEDIR}${PREFIX}/www/nginx-dist
134 .endfor
135         ${ECHO_CMD} >> ${STAGEDIR}${PREFIX}/www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
136         (cd ${WRKSRC}/objs/ && ${FIND} . -depth -maxdepth 1 -name '*.so' -type f \
137                 -exec ${INSTALL_PROGRAM} {} ${STAGEDIR}${PREFIX}/libexec/nginx \;)
138
139 [FILE:351:descriptions/desc.single.standard]
140 NGINX is a high performance edge web server with the lowest memory
141 footprint and the key features to build modern and efficient web
142 infrastructure.
143
144 NGINX functionality includes HTTP server, HTTP and mail reverse proxy,
145 caching, load balancing, compression, request throttling, connection
146 multiplexing and reuse, SSL offload and HTTP media streaming.
147
148
149 [FILE:471:descriptions/desc.single.loaded]
150 NGINX is a high performance edge web server with the lowest memory
151 footprint and the key features to build modern and efficient web
152 infrastructure.
153
154 NGINX functionality includes HTTP server, HTTP and mail reverse proxy,
155 caching, load balancing, compression, request throttling, connection
156 multiplexing and reuse, SSL offload and HTTP media streaming.
157
158 This package contains additional modules over the standard nginx:
159   geoip2          : handles maxmind geoip2 databases
160
161
162 [FILE:324:distinfo]
163 de21f3c49ba65c611329d8759a63d72e5fcf719bc6f2a3270e2541348ef1fbba       988415 nginx-1.13.4.tar.gz
164 ebb4652c4f9a2e1ee31fddefc4c93ff78e651a4b2727d3453d026bccbd708d99         6766 leev-ngx_http_geoip2_module-2.0.tar.gz
165 e829fc94178cc8c91fef15a1fc44ee7ac162c13eddc0bba4c9427aaa23386885         3343 kr-nginx-notice-3c95966.tar.gz
166
167
168 [FILE:777:manifests/plist.single.standard]
169 @dir %%NGINX_LOGDIR%%
170 @dir %%NGINX_TMPDIR%%
171 @sample etc/nginx/fastcgi_params-dist etc/nginx/fastcgi_params
172 @sample etc/nginx/mime.types-dist etc/nginx/mime.types
173 @sample etc/nginx/nginx.conf-dist etc/nginx/nginx.conf
174 @sample etc/nginx/scgi_params-dist etc/nginx/scgi_params
175 @sample etc/nginx/uwsgi_params-dist etc/nginx/uwsgi_params
176 etc/nginx/
177  koi-utf
178  koi-win
179  win-utf
180 libexec/nginx/
181  ngx_mail_module.so
182  ngx_stream_module.so
183 sbin/nginx
184 share/man/man8/nginx.8.gz
185 www/nginx-dist/
186  50x.html
187  EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
188  index.html
189 @preexec mkdir -p -m 755 %D/www/nginx-dist
190 @preexec if [ ! -d %D/www/nginx/ ] ; then ln -fs %D/www/nginx-dist %D/www/nginx; fi
191 @preexec chmod a-w %D/www/nginx-dist
192 @postunexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
193
194
195 [FILE:833:manifests/plist.single.loaded]
196 @dir %%NGINX_LOGDIR%%
197 @dir %%NGINX_TMPDIR%%
198 @sample etc/nginx/fastcgi_params-dist etc/nginx/fastcgi_params
199 @sample etc/nginx/mime.types-dist etc/nginx/mime.types
200 @sample etc/nginx/nginx.conf-dist etc/nginx/nginx.conf
201 @sample etc/nginx/scgi_params-dist etc/nginx/scgi_params
202 @sample etc/nginx/uwsgi_params-dist etc/nginx/uwsgi_params
203 etc/nginx/
204  koi-utf
205  koi-win
206  win-utf
207 libexec/nginx/
208  ngx_http_geoip2_module.so
209  ngx_mail_module.so
210  ngx_stream_module.so
211  ngx_stream_geoip2_module.so
212 sbin/nginx
213 share/man/man8/nginx.8.gz
214 www/nginx-dist/
215  50x.html
216  EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
217  index.html
218 @preexec mkdir -p -m 755 %D/www/nginx-dist
219 @preexec if [ ! -d %D/www/nginx/ ] ; then ln -fs %D/www/nginx-dist %D/www/nginx; fi
220 @preexec chmod a-w %D/www/nginx-dist
221 @postunexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
222
223
224 [FILE:360:files/extra-patch-ngx_http_notice_module.c]
225 --- ../nginx-notice-3c95966/ngx_http_notice_module.c.orig       2009-07-16 18:37:57.000000000 +0200
226 +++ ../nginx-notice-3c95966/ngx_http_notice_module.c
227 @@ -153,7 +153,7 @@
228          return NGX_HTTP_NOT_ALLOWED;
229      }
230  
231 -    rc = ngx_http_discard_body(r);
232 +    rc = ngx_http_discard_request_body(r);
233  
234      if (rc != NGX_OK && rc != NGX_AGAIN) {
235          return rc;
236
237
238 [FILE:3521:files/nginx.in]
239 #!/bin/sh
240 #
241 # PROVIDE: nginx
242 # REQUIRE: LOGIN cleanvar
243 # KEYWORD: shutdown
244 #
245 # Add the following lines to /etc/rc.conf to enable nginx:
246 # nginx_enable (bool):          Set to "NO" by default.
247 #                               Set it to "YES" to enable nginx
248 # nginx_profiles (str):         Set to "" by default.
249 #                               Define your profiles here.
250 # nginx_pid_prefix (str):       Set to "" by default.
251 #                               When using profiles manually assign value to "nginx_"
252 #                               for prevent collision with other PIDs names.
253 # nginxlimits_enable (bool):    Set to "NO" by default.
254 #                               Set it to yes to run `limits $limits_args`
255 #                               just before nginx starts.
256 # nginx_flags (str):            Set to "" by default.
257 #                               Extra flags passed to start command.
258 # nginxlimits_args (str):       Default to "-e -U %%WWWOWN%%"
259 #                               Arguments of pre-start limits run.
260
261 . /etc/rc.subr
262
263 name="nginx"
264 rcvar=nginx_enable
265
266 start_precmd="nginx_precmd"
267 restart_precmd="nginx_checkconfig"
268 reload_precmd="nginx_checkconfig"
269 configtest_cmd="nginx_checkconfig"
270 gracefulstop_cmd="nginx_gracefulstop"
271 upgrade_precmd="nginx_checkconfig"
272 upgrade_cmd="nginx_upgrade"
273 command="%%PREFIX%%/sbin/nginx"
274 _pidprefix="%%NGINX_RUNDIR%%"
275 pidfile="${_pidprefix}/${name}.pid"
276 _tmpprefix="%%NGINX_TMPDIR%%"
277 required_files=%%PREFIX%%/etc/nginx/nginx.conf
278 extra_commands="reload configtest upgrade gracefulstop"
279
280 [ -z "$nginx_enable" ]          && nginx_enable="NO"
281 [ -z "$nginxlimits_enable" ]    && nginxlimits_enable="NO"
282 [ -z "$nginxlimits_args" ]      && nginxlimits_args="-e -U %%WWWOWN%%"
283
284 load_rc_config $name
285
286 if [ -n "$2" ]; then
287         profile="$2"
288         if [ "x${nginx_profiles}" != "x" ]; then
289                 pidfile="${_pidprefix}/${nginx_pid_prefix}${profile}.pid"
290                 eval nginx_configfile="\${nginx_${profile}_configfile:-}"
291                 if [ "x${nginx_configfile}" = "x" ]; then
292                         echo "You must define a configuration file (nginx_${profile}_configfile)"
293                         exit 1
294                 fi
295                 required_files="${nginx_configfile}"
296                 eval nginx_enable="\${nginx_${profile}_enable:-${nginx_enable}}"
297                 eval nginx_flags="\${nginx_${profile}_flags:-${nginx_flags}}"
298                 eval nginxlimits_enable="\${nginxlimits_${profile}_enable:-${nginxlimits_enable}}"
299                 eval nginxlimits_args="\${nginxlimits_${profile}_args:-${nginxlimits_args}}"
300                 nginx_flags="-c ${nginx_configfile} -g \"pid ${pidfile};\" ${nginx_flags}"
301         else
302                 echo "$0: extra argument ignored"
303         fi
304 else
305         if [ "x${nginx_profiles}" != "x" -a "x$1" != "x" ]; then
306                 for profile in ${nginx_profiles}; do
307                         echo "===> nginx profile: ${profile}"
308                         %%PREFIX%%/etc/rc.d/nginx $1 ${profile}
309                         retcode="$?"
310                         if [ "0${retcode}" -ne 0 ]; then
311                                 failed="${profile} (${retcode}) ${failed:-}"
312                         else
313                                 success="${profile} ${success:-}"
314                         fi
315                 done
316                 exit 0
317         fi
318 fi
319
320 # tmpfs(5)
321 nginx_checktmpdir()
322 {
323         if [ ! -d ${_tmpprefix} ] ; then
324                 install -d -o %%WWWOWN%% -g %%WWWGRP%% -m 755 ${_tmpprefix}
325         fi
326 }
327
328 nginx_checkconfig()
329 {
330         nginx_checktmpdir
331
332         echo "Performing sanity check on nginx configuration:"
333         eval ${command} ${nginx_flags} -t
334 }
335
336 nginx_gracefulstop()
337 {
338         echo "Performing a graceful stop:"
339         sig_stop="QUIT"
340         run_rc_command ${rc_prefix}stop $rc_extra_args || return 1
341 }
342
343 nginx_upgrade()
344 {
345         echo "Upgrading nginx binary:"
346
347         reload_precmd=""
348         sig_reload="USR2"
349         run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
350
351         sleep 1
352
353         echo "Stopping old binary:"
354
355         sig_reload="QUIT"
356         pidfile="$pidfile.oldbin"
357         run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
358 }
359
360 nginx_precmd() 
361 {
362         nginx_checkconfig
363
364         if checkyesno nginxlimits_enable
365         then
366                 eval `/usr/bin/limits ${nginxlimits_args}` 2>/dev/null
367         else
368                 return 0
369         fi
370 }
371
372 run_rc_command "$1"
373
374
375 [FILE:763:files/pkg-message-single.in]
376
377 ===================================================================
378 A recent version of the NGINX introduced dynamic modules support.
379 To load a module at runtime, include the new `load_module'
380 directive in the main context, specifying the path to the shared
381 object file for the module, enclosed in quotation marks.  When you
382 reload the configuration or restart NGINX, the module is loaded in.
383 It is possible to specify a path relative to the source directory,
384 or a full path, please see
385 https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
386 http://nginx.org/en/docs/ngx_core_module.html#load_module for
387 details.
388
389 Default path for the NGINX dynamic modules is
390
391 %%PREFIX%%/libexec/nginx.
392 ===================================================================
393
394
395
396 [FILE:314:dragonfly/patch-src_core_ngx__config.h]
397 --- src/core/ngx_config.h.orig  2017-08-08 15:00:12 UTC
398 +++ src/core/ngx_config.h
399 @@ -12,8 +12,8 @@
400  #include <ngx_auto_headers.h>
401  
402  
403 -#if defined __DragonFly__ && !defined __FreeBSD__
404 -#define __FreeBSD__        4
405 +#if defined __DragonFly__
406 +#undef  __FreeBSD_version
407  #define __FreeBSD_version  480101
408  #endif
409  
410
411
412 [FILE:470:dragonfly/patch-src_event_modules_ngx__eventport__module.c]
413 --- src/event/modules/ngx_eventport_module.c.orig       2017-08-08 15:00:13 UTC
414 +++ src/event/modules/ngx_eventport_module.c
415 @@ -49,7 +49,7 @@ typedef struct  port_notify {
416      void       *portnfy_user;   /* user defined */
417  } port_notify_t;
418  
419 -#if (__FreeBSD__ && __FreeBSD_version < 700005) || (NGX_DARWIN)
420 +#if (__FreeBSD_version < 700005) || (NGX_DARWIN)
421  
422  typedef struct itimerspec {     /* definition per POSIX.4 */
423      struct timespec it_interval;/* timer period */
424
425
426 [FILE:532:dragonfly/patch-src_event_modules_ngx__kqueue__module.c]
427 --- src/event/modules/ngx_kqueue_module.c.orig  2017-08-08 15:00:13 UTC
428 +++ src/event/modules/ngx_kqueue_module.c
429 @@ -429,8 +429,7 @@ ngx_kqueue_set_event(ngx_event_t *ev, ng
430      if (filter == EVFILT_VNODE) {
431          kev->fflags = NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND
432                                   |NOTE_ATTRIB|NOTE_RENAME
433 -#if (__FreeBSD__ == 4 && __FreeBSD_version >= 430000) \
434 -    || __FreeBSD_version >= 500018
435 +#if __FreeBSD_version >= 500018
436                                   |NOTE_REVOKE
437  #endif
438                        ;
439
440
441 [FILE:447:dragonfly/patch-src_os_unix_ngx__freebsd__init.c]
442 --- src/os/unix/ngx_freebsd_init.c.orig 2017-08-08 15:00:13 UTC
443 +++ src/os/unix/ngx_freebsd_init.c
444 @@ -162,8 +162,7 @@ ngx_os_specific_init(ngx_log_t *log)
445       * to allow an old binary to run correctly on an updated FreeBSD system.
446       */
447  
448 -#if (__FreeBSD__ == 4 && __FreeBSD_version >= 460102) \
449 -    || __FreeBSD_version == 460002 || __FreeBSD_version >= 500039
450 +#if __FreeBSD_version >= 500039
451  
452      /* a new syscall without the bug */
453  
454
455
456 [FILE:293:dragonfly/patch-src_os_unix_ngx__posix__config.h]
457 --- src/os/unix/ngx_posix_config.h.orig 2017-08-08 15:00:14 UTC
458 +++ src/os/unix/ngx_posix_config.h
459 @@ -145,7 +145,7 @@ typedef struct aiocb  ngx_aiocb_t;
460  #define ngx_debug_init()
461  
462  
463 -#if (__FreeBSD__) && (__FreeBSD_version < 400017)
464 +#if 0
465  
466  #include <sys/param.h>          /* ALIGN() */
467  
468