Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2016 22:25:07 +0000 (UTC)
From:      "Sergey A. Osokin" <osa@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r422166 - in head/www/nginx-devel: . files
Message-ID:  <201609142225.u8EMP7KH046261@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: osa
Date: Wed Sep 14 22:25:07 2016
New Revision: 422166
URL: https://svnweb.freebsd.org/changeset/ports/422166

Log:
  Do not littering /var/log by compiled-in error log.
  Bump PORTREVISION.
  
  PR:	212416

Modified:
  head/www/nginx-devel/Makefile
  head/www/nginx-devel/files/patch-conf-nginx.conf
  head/www/nginx-devel/pkg-plist

Modified: head/www/nginx-devel/Makefile
==============================================================================
--- head/www/nginx-devel/Makefile	Wed Sep 14 22:15:29 2016	(r422165)
+++ head/www/nginx-devel/Makefile	Wed Sep 14 22:25:07 2016	(r422166)
@@ -3,6 +3,7 @@
 
 PORTNAME=	nginx
 PORTVERSION=	1.11.4
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://nginx.org/download/
 MASTER_SITES+=	LOCAL/osa
@@ -244,13 +245,13 @@ RAKE_BIN=	${LOCALBASE}/bin/rake
 .endif
 
 NGINX_VARDIR?=	/var
-NGINX_LOGDIR?=	${NGINX_VARDIR}/log
+NGINX_LOGDIR?=	${NGINX_VARDIR}/log/nginx
 NGINX_RUNDIR?=	${NGINX_VARDIR}/run
 NGINX_TMPDIR?=	${NGINX_VARDIR}/tmp/nginx
 HTTP_PORT?=	80
 
-NGINX_ACCESSLOG?=	${NGINX_LOGDIR}/nginx-access.log
-NGINX_ERRORLOG?=	${NGINX_LOGDIR}/nginx-error.log
+NGINX_ACCESSLOG?=	${NGINX_LOGDIR}/access.log
+NGINX_ERRORLOG?=	${NGINX_LOGDIR}/error.log
 
 CONFLICTS?=	nginx-1.*
 USE_RC_SUBR=	nginx
@@ -505,7 +506,7 @@ CONFIGURE_ARGS+=--with-http_flv_module
 .endif
 
 .if ${PORT_OPTIONS:MHTTP_JSON_STATUS}
-NGINX_JSON_STATUS_VERSION= 1d2f303
+NGINX_JSON_STATUS_VERSION=	1d2f303
 GH_ACCOUNT+=	nginx-modules:json_status
 GH_PROJECT+=	ngx_http_json_status_module:json_status
 GH_TAGNAME+=	${NGINX_JSON_STATUS_VERSION}:json_status
@@ -658,7 +659,7 @@ CONFIGURE_ARGS+=--with-http_sub_module
 .endif
 
 .if ${PORT_OPTIONS:MHTTP_UPLOAD}
-GIT_UPLOAD_VERSION= aba1e3f34c
+GIT_UPLOAD_VERSION=	aba1e3f34c
 GH_ACCOUNT+=	vkholodkov:upload
 GH_PROJECT+=	nginx-upload-module:upload
 GH_TAGNAME+=	${GIT_UPLOAD_VERSION}:upload
@@ -1111,7 +1112,7 @@ CONFIGURE_ARGS+=--add-module=${WRKSRC_ic
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-calio-iconv-nginx-module-config
 .endif
 
-PLIST_SUB+=	NGINX_TMPDIR=${NGINX_TMPDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
+PLIST_SUB+=	NGINX_TMPDIR=${NGINX_TMPDIR} NGINX_LOGDIR=${NGINX_LOGDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
 USERS?=	${WWWOWN}
 GROUPS?=${WWWGRP}
@@ -1141,7 +1142,8 @@ post-extract:
 
 post-patch:
 	@${REINPLACE_CMD} 's!%%HTTP_PORT%%!${HTTP_PORT}!; \
-		s!%%PREFIX%%!${PREFIX}!' \
+		s!%%PREFIX%%!${PREFIX}!; \
+		s!%%NGINX_ERRORLOG%%!${NGINX_ERRORLOG}!' \
 		${WRKSRC}/conf/nginx.conf
 .if ${PORT_OPTIONS:MHTTP_ACCESSKEY}
 	@${REINPLACE_CMD} \
@@ -1247,6 +1249,7 @@ do-install:
 	${MKDIR} ${STAGEDIR}${MODULESDIR}
 .endif
 	${MKDIR} ${STAGEDIR}${NGINX_TMPDIR}
+	${MKDIR} ${STAGEDIR}${NGINX_LOGDIR}
 	${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${STAGEDIR}${PREFIX}/sbin
 .for i in koi-utf koi-win win-utf
 	${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${ETCDIR}

Modified: head/www/nginx-devel/files/patch-conf-nginx.conf
==============================================================================
--- head/www/nginx-devel/files/patch-conf-nginx.conf	Wed Sep 14 22:15:29 2016	(r422165)
+++ head/www/nginx-devel/files/patch-conf-nginx.conf	Wed Sep 14 22:25:07 2016	(r422166)
@@ -1,6 +1,24 @@
---- conf/nginx.conf.orig	Thu Jan 18 10:08:18 2007
-+++ conf/nginx.conf	Thu Jun 14 12:57:52 2007
-@@ -33,7 +33,7 @@
+--- conf/nginx.conf.orig	2016-09-06 14:56:32 UTC
++++ conf/nginx.conf
+@@ -2,9 +2,14 @@
+ #user  nobody;
+ worker_processes  1;
+ 
+-#error_log  logs/error.log;
+-#error_log  logs/error.log  notice;
+-#error_log  logs/error.log  info;
++# This default error log path is compiled-in to make sure configuration parsing
++# errors are logged somewhere, especially during unattended boot when stderr
++# isn't normally logged anywhere. This path will be touched on every nginx
++# start regardless of error log location configured here. See
++# https://trac.nginx.org/nginx/ticket/147 for more info. 
++#
++#error_log  %%NGINX_ERRORLOG%%;
++#
+ 
+ #pid        logs/nginx.pid;
+ 
+@@ -33,7 +38,7 @@ http {
      #gzip  on;
  
      server {
@@ -9,7 +27,7 @@
          server_name  localhost;
  
          #charset koi8-r;
-@@ -41,7 +41,7 @@
+@@ -41,7 +46,7 @@ http {
          #access_log  logs/host.access.log  main;
  
          location / {
@@ -18,7 +36,7 @@
              index  index.html index.htm;
          }
  
-@@ -51,7 +51,7 @@
+@@ -51,7 +56,7 @@ http {
          #
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {

Modified: head/www/nginx-devel/pkg-plist
==============================================================================
--- head/www/nginx-devel/pkg-plist	Wed Sep 14 22:15:29 2016	(r422165)
+++ head/www/nginx-devel/pkg-plist	Wed Sep 14 22:25:07 2016	(r422166)
@@ -15,4 +15,5 @@
 %%WWWDATA%%@unexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
 sbin/nginx
 @dir %%NGINX_TMPDIR%%
+@dir %%NGINX_LOGDIR%%
 man/man8/nginx.8.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609142225.u8EMP7KH046261>