From rea-fbsd@codelabs.ru  Fri May 30 07:24:22 2008
Return-Path: <rea-fbsd@codelabs.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EDD7F1065671
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 May 2008 07:24:21 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45])
	by mx1.freebsd.org (Postfix) with ESMTP id 7221A8FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 May 2008 07:24:21 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25])
	by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256)
	id 1K1yyK-000IlS-3n; Fri, 30 May 2008 11:24:20 +0400
Message-Id: <20080530072419.E33651AF41F@void.codelabs.ru>
Date: Fri, 30 May 2008 11:24:19 +0400 (MSD)
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Reply-To: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: osa@freebsd.org
Subject: [patch] update www/nginx to 0.6.31 and enable custom server string
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         124123
>Category:       ports
>Synopsis:       [patch] update www/nginx to 0.6.31 and enable custom server string
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    osa
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 30 07:30:01 UTC 2008
>Closed-Date:    Tue Jun 17 14:31:22 UTC 2008
>Last-Modified:  Tue Jun 17 14:31:22 UTC 2008
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
Code Labs
>Environment:

System: FreeBSD XXX 7.0-STABLE FreeBSD 7.0-STABLE #16: Tue Mar 18 11:49:55 MSK 2008 root@XXX:/usr/obj/usr/src/sys/XXX i386

>Description:

Igor Sysoev announced at 05.05.2008 that 0.6 branch becomes stable.
So, www/nginx can be upgraded to 0.6.31.  Basically, the first of
provided patches is the www/nginx -> www/nginx-devel and changes
from 0.6.30 to 0.6.31.

Additionally, I had parametrized my old patch that changes server
string to something neutral -- I hate when people know the name
and precise version of software I am running.  Second patch adds
variable NGINX_SERVER_STRING, that will carry new server string.

>How-To-Repeat:

Look at http://sysoev.ru/ and/or http://sysoev.ru/en/

>Fix:

Patch that updates the port:
--- nginx-0.5-to-0.6.31.patch begins here ---
diff -urN ./Makefile ../nginx/Makefile
--- ./Makefile	2008-05-06 12:22:28.000000000 +0400
+++ ../nginx/Makefile	2008-05-30 10:25:46.000000000 +0400
@@ -2,20 +2,22 @@
 # Date created:				11 Oct 2004
 # Whom:					osa
 #
-# $FreeBSD: ports/www/nginx/Makefile,v 1.134 2008/05/04 14:26:12 osa Exp $
+# $FreeBSD: ports/www/nginx-devel/Makefile,v 1.145 2008/04/30 09:10:46 osa Exp $
 #
 
 PORTNAME=	nginx
-PORTVERSION=	0.5.36
+PORTVERSION=	0.6.31
 CATEGORIES=	www
 MASTER_SITES=	http://sysoev.ru/nginx/
 MASTER_SITES+=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	osa
+PKGNAMESUFFIX=	-devel
 
 MAINTAINER=	osa@FreeBSD.org
 COMMENT=	Robust and small WWW server
 
 OPTIONS=	DEBUG "Enable nginx debugging" off \
+		GOOGLE_PERFTOOLS "Enable google perftools module" off \
 		HTTP_MODULE "Enable HTTP module" on \
 		HTTP_ADDITION_MODULE "Enable http_addition module" off \
 		HTTP_DAV_MODULE "Enable http_webdav module" off \
@@ -64,6 +66,11 @@
 STRIP=		#do not strip if nginx with debug information
 .endif
 
+.if defined(WITH_GOOGLE_PERFTOOLS)
+LIB_DEPENDS+=	profiler.0:${PORTSDIR}/devel/google-perftools
+CONFIGURE_ARGS+=--with-google_perftools_module
+.endif
+
 .if defined(WITH_HTTP_MODULE)
 CONFIGURE_ARGS+=--http-client-body-temp-path=${NGINX_TMPDIR}/client_body_temp \
 		--http-proxy-temp-path=${NGINX_TMPDIR}/proxy_temp \
@@ -105,11 +112,11 @@
 .endif
 
 .if defined(WITHOUT_HTTP_REWRITE_MODULE) || defined(WITHOUT_PCRE)
-PKGNAMESUFFIX+=	-nopcre
+PKGNAMESUFFIX:=	${PKGNAMESUFFIX}-nopcre
 CONFIGURE_ARGS+=--without-http_rewrite_module \
 		--without-pcre
 .else
-LIB_DEPENDS=	pcre.0:${PORTSDIR}/devel/pcre
+LIB_DEPENDS+=	pcre.0:${PORTSDIR}/devel/pcre
 .endif
 
 .if defined(WITH_WWW)
diff -urN ./distinfo ../nginx/distinfo
--- ./distinfo	2008-05-06 12:22:28.000000000 +0400
+++ ../nginx/distinfo	2008-05-30 10:22:30.000000000 +0400
@@ -1,3 +1,3 @@
-MD5 (nginx-0.5.36.tar.gz) = 1b5b6fca369843ac74cf6123a50d4cb1
-SHA256 (nginx-0.5.36.tar.gz) = e14cce500eb341b67a25201d5f92e7b241ba449fd6dca7023d5459ec03db8ad2
-SIZE (nginx-0.5.36.tar.gz) = 489443
+MD5 (nginx-0.6.31.tar.gz) = 824bcc25bbd5b636f182237b69227bd2
+SHA256 (nginx-0.6.31.tar.gz) = e68908705dfc1fb166506ec441291c7bad3b6ddcddb760b166931bfdb5b582a7
+SIZE (nginx-0.6.30.tar.gz) = 520344
diff -urN ./files/nginx.sh.in ../nginx/files/nginx.sh.in
--- ./files/nginx.sh.in	2007-06-19 10:29:22.000000000 +0400
+++ ../nginx/files/nginx.sh.in	2008-05-30 10:20:48.000000000 +0400
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $FreeBSD: ports/www/nginx/files/nginx.sh.in,v 1.3 2007/06/18 07:08:46 osa Exp $
+# $FreeBSD: ports/www/nginx-devel/files/nginx.sh.in,v 1.3 2007/06/18 07:13:27 osa Exp $
 
 # PROVIDE: nginx
 # REQUIRE: DAEMON
diff -urN ./files/patch-conf-nginx.conf ../nginx/files/patch-conf-nginx.conf
--- ./files/patch-conf-nginx.conf	2007-06-14 22:34:02.000000000 +0400
+++ ../nginx/files/patch-conf-nginx.conf	2008-05-30 10:20:48.000000000 +0400
@@ -1,17 +1,8 @@
 
-$FreeBSD: ports/www/nginx/files/patch-conf-nginx.conf,v 1.3 2007/06/14 10:32:32 osa Exp $
+$FreeBSD: ports/www/nginx-devel/files/patch-conf-nginx.conf,v 1.4 2007/08/16 08:56:36 osa Exp $
 
 --- conf/nginx.conf.orig	Thu Jan 18 10:08:18 2007
 +++ conf/nginx.conf	Thu Jun 14 12:57:52 2007
-@@ -15,7 +15,7 @@
- 
- 
- http {
--    include       conf/mime.types;
-+    include       mime.types;
-     default_type  application/octet-stream;
- 
-     #log_format  main  '$remote_addr - $remote_user [$time_gmt] $status '
 @@ -33,7 +33,7 @@
      #gzip  on;
  
diff -urN ./pkg-plist ../nginx/pkg-plist
--- ./pkg-plist	2007-10-11 08:23:40.000000000 +0400
+++ ../nginx/pkg-plist	2008-05-30 10:20:48.000000000 +0400
@@ -1,4 +1,4 @@
-@comment $FreeBSD: ports/www/nginx/pkg-plist,v 1.11 2007/09/19 08:48:24 osa Exp $
+@comment $FreeBSD: ports/www/nginx-devel/pkg-plist,v 1.11 2007/09/03 12:19:26 osa Exp $
 %%ETCDIR%%/fastcgi_params
 %%ETCDIR%%/koi-utf
 %%ETCDIR%%/koi-win
--- nginx-0.5-to-0.6.31.patch ends here ---

Patch that adds custom server string:
--- nginx-add_custom_server_string begins here ---
diff -urN ./Makefile ../nginx/Makefile
--- ./Makefile	2008-05-30 10:28:43.000000000 +0400
+++ ../nginx/Makefile	2008-05-30 11:19:30.000000000 +0400
@@ -55,6 +55,10 @@
 		--error-log-path=${NGINX_LOGDIR}/nginx-error.log \
 		--user=${WWWOWN} --group=${WWWGRP}
 
+.if defined(NGINX_SERVER_STRING)
+EXTRA_PATCHES+=	${WRKSRC}/nginx_server_string.patch
+.endif
+
 .if defined(WITHOUT_HTTP_MODULE) && defined(WITHOUT_MAIL_MODULE)
 IGNORE=		requires at least HTTP_MODULE or MAIL_MODULE to \
 		be defined.  Please 'make config' again
@@ -151,6 +155,18 @@
 .include "${PORTSDIR}/Mk/bsd.openssl.mk"
 .endif
 
+.if defined(NGINX_SERVER_STRING)
+pre-patch:
+	@${CP} "${PATCHDIR}/nginx_server_string.patch.in" \
+	    "${WRKSRC}/nginx_server_string.patch"
+	@${REINPLACE_CMD} 's|%%NGINX_SERVER_STRING%%|${NGINX_SERVER_STRING}|' \
+	    "${WRKSRC}/nginx_server_string.patch"
+.else
+pre-patch:
+	@${ECHO_CMD} "    If you want to override the default server string,"
+	@${ECHO_CMD} "    set NGINX_SERVER_STRING to the desired value and rebuild the port."
+.endif
+
 PLIST_SUB+=	NGINX_TMPDIR=${NGINX_TMPDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
 post-patch:
diff -urN ./files/nginx_server_string.patch.in ../nginx/files/nginx_server_string.patch.in
--- ./files/nginx_server_string.patch.in	1970-01-01 03:00:00.000000000 +0300
+++ ../nginx/files/nginx_server_string.patch.in	2008-05-30 10:44:40.000000000 +0400
@@ -0,0 +1,13 @@
+--- src/http/ngx_http_header_filter_module.c.orig	2008-01-05 18:27:51.000000000 +0300
++++ src/http/ngx_http_header_filter_module.c	2008-01-05 18:28:26.000000000 +0300
+@@ -45,8 +45,8 @@
+ };
+ 
+ 
+-static char ngx_http_server_string[] = "Server: nginx" CRLF;
+-static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
++static char ngx_http_server_string[] = "Server: %%NGINX_SERVER_STRING%%" CRLF;
++static char ngx_http_server_full_string[] = "Server: %%NGINX_SERVER_STRING%%" CRLF;
+ 
+ 
+ static ngx_str_t ngx_http_status_lines[] = {
--- nginx-add_custom_server_string ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->osa 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri May 30 07:30:13 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124123 

From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/124123: [patch] update www/nginx to 0.6.31 and enable
	custom server string
Date: Fri, 30 May 2008 12:16:51 +0400

 Spotted one error: line
 -----
 PKGNAMESUFFIX=  -devel
 -----
 should be eliminated from the patched Makefile.

From: "Sergey A. Osokin" <osa@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Subject: Re: ports/124123: [patch] update www/nginx to 0.6.31 and enable custom server string
Date: Tue, 17 Jun 2008 10:24:37 +0000

 On Fri, May 30, 2008 at 11:24:19AM +0400, Eygene Ryabinkin wrote:
 > 
 > Igor Sysoev announced at 05.05.2008 that 0.6 branch becomes stable.
 > So, www/nginx can be upgraded to 0.6.31.  Basically, the first of
 > provided patches is the www/nginx -> www/nginx-devel and changes
 > from 0.6.30 to 0.6.31.
 
 Stable branch (aka www/nginx) was update to 0.6.31 Mon May 19 12:01:13 2008 UTC.
 
 > Additionally, I had parametrized my old patch that changes server
 > string to something neutral -- I hate when people know the name
 > and precise version of software I am running.  Second patch adds
 > variable NGINX_SERVER_STRING, that will carry new server string.
 > 
 > diff -urN ./distinfo ../nginx/distinfo
 > --- ./distinfo	2008-05-06 12:22:28.000000000 +0400
 > +++ ../nginx/distinfo	2008-05-30 10:22:30.000000000 +0400
 > @@ -1,3 +1,3 @@
 > -MD5 (nginx-0.5.36.tar.gz) = 1b5b6fca369843ac74cf6123a50d4cb1
 > -SHA256 (nginx-0.5.36.tar.gz) = e14cce500eb341b67a25201d5f92e7b241ba449fd6dca7023d5459ec03db8ad2
 > -SIZE (nginx-0.5.36.tar.gz) = 489443
 > +MD5 (nginx-0.6.31.tar.gz) = 824bcc25bbd5b636f182237b69227bd2
 > +SHA256 (nginx-0.6.31.tar.gz) = e68908705dfc1fb166506ec441291c7bad3b6ddcddb760b166931bfdb5b582a7
 > +SIZE (nginx-0.6.30.tar.gz) = 520344
 
 Looks like mistake here. MD5 and SHA256 are for 0.6.31, but SIZE for 0.6.30.
 
 > diff -urN ./files/nginx.sh.in ../nginx/files/nginx.sh.in
 > --- ./files/nginx.sh.in	2007-06-19 10:29:22.000000000 +0400
 > +++ ../nginx/files/nginx.sh.in	2008-05-30 10:20:48.000000000 +0400
 > @@ -1,5 +1,5 @@
 >  #!/bin/sh
 > -# $FreeBSD: ports/www/nginx/files/nginx.sh.in,v 1.3 2007/06/18 07:08:46 osa Exp $
 > +# $FreeBSD: ports/www/nginx-devel/files/nginx.sh.in,v 1.3 2007/06/18 07:13:27 osa Exp $
 
 Please don't touch $FreeBSD$ line, more information available at Porters Handbook.
 
 >  # PROVIDE: nginx
 >  # REQUIRE: DAEMON
 > diff -urN ./files/patch-conf-nginx.conf ../nginx/files/patch-conf-nginx.conf
 > --- ./files/patch-conf-nginx.conf	2007-06-14 22:34:02.000000000 +0400
 > +++ ../nginx/files/patch-conf-nginx.conf	2008-05-30 10:20:48.000000000 +0400
 > @@ -1,17 +1,8 @@
 >  
 > -$FreeBSD: ports/www/nginx/files/patch-conf-nginx.conf,v 1.3 2007/06/14 10:32:32 osa Exp $
 > +$FreeBSD: ports/www/nginx-devel/files/patch-conf-nginx.conf,v 1.4 2007/08/16 08:56:36 osa Exp $
 
 See above.
 
 > diff -urN ./pkg-plist ../nginx/pkg-plist
 > --- ./pkg-plist	2007-10-11 08:23:40.000000000 +0400
 > +++ ../nginx/pkg-plist	2008-05-30 10:20:48.000000000 +0400
 > @@ -1,4 +1,4 @@
 > -@comment $FreeBSD: ports/www/nginx/pkg-plist,v 1.11 2007/09/19 08:48:24 osa Exp $
 > +@comment $FreeBSD: ports/www/nginx-devel/pkg-plist,v 1.11 2007/09/03 12:19:26 osa Exp $
 
 Also see above.
 
 > Patch that adds custom server string:
 > --- nginx-add_custom_server_string begins here ---
 > diff -urN ./Makefile ../nginx/Makefile
 > --- ./Makefile	2008-05-30 10:28:43.000000000 +0400
 > +++ ../nginx/Makefile	2008-05-30 11:19:30.000000000 +0400
 > @@ -55,6 +55,10 @@
 >  		--error-log-path=${NGINX_LOGDIR}/nginx-error.log \
 >  		--user=${WWWOWN} --group=${WWWGRP}
 >  
 > +.if defined(NGINX_SERVER_STRING)
 > +EXTRA_PATCHES+=	${WRKSRC}/nginx_server_string.patch
 > +.endif
 > +
 >  .if defined(WITHOUT_HTTP_MODULE) && defined(WITHOUT_MAIL_MODULE)
 >  IGNORE=		requires at least HTTP_MODULE or MAIL_MODULE to \
 >  		be defined.  Please 'make config' again
 > @@ -151,6 +155,18 @@
 >  .include "${PORTSDIR}/Mk/bsd.openssl.mk"
 >  .endif
 >  
 > +.if defined(NGINX_SERVER_STRING)
 > +pre-patch:
 > +	@${CP} "${PATCHDIR}/nginx_server_string.patch.in" \
 > +	    "${WRKSRC}/nginx_server_string.patch"
 > +	@${REINPLACE_CMD} 's|%%NGINX_SERVER_STRING%%|${NGINX_SERVER_STRING}|' \
 > +	    "${WRKSRC}/nginx_server_string.patch"
 > +.else
 > +pre-patch:
 > +	@${ECHO_CMD} "    If you want to override the default server string,"
 > +	@${ECHO_CMD} "    set NGINX_SERVER_STRING to the desired value and rebuild the port."
 > +.endif
 > +
 >  PLIST_SUB+=	NGINX_TMPDIR=${NGINX_TMPDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 >  
 >  post-patch:
 > diff -urN ./files/nginx_server_string.patch.in ../nginx/files/nginx_server_string.patch.in
 > --- ./files/nginx_server_string.patch.in	1970-01-01 03:00:00.000000000 +0300
 > +++ ../nginx/files/nginx_server_string.patch.in	2008-05-30 10:44:40.000000000 +0400
 > @@ -0,0 +1,13 @@
 > +--- src/http/ngx_http_header_filter_module.c.orig	2008-01-05 18:27:51.000000000 +0300
 > ++++ src/http/ngx_http_header_filter_module.c	2008-01-05 18:28:26.000000000 +0300
 > +@@ -45,8 +45,8 @@
 > + };
 > + 
 > + 
 > +-static char ngx_http_server_string[] = "Server: nginx" CRLF;
 > +-static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
 > ++static char ngx_http_server_string[] = "Server: %%NGINX_SERVER_STRING%%" CRLF;
 > ++static char ngx_http_server_full_string[] = "Server: %%NGINX_SERVER_STRING%%" CRLF;
 > + 
 > + 
 > + static ngx_str_t ngx_http_status_lines[] = {
 > --- nginx-add_custom_server_string ends here ---
 
 
 I don't think this is useful patch for port.  Could you contact with nginx author
 for include your patch into mainstream?  Thank you for report.
 
 -- 
 ozz

From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: "Sergey A. Osokin" <osa@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/124123: [patch] update www/nginx to 0.6.31 and enable
	custom server string
Date: Tue, 17 Jun 2008 14:51:58 +0400

 Tue, Jun 17, 2008 at 10:24:37AM +0000, Sergey A. Osokin wrote:
 > On Fri, May 30, 2008 at 11:24:19AM +0400, Eygene Ryabinkin wrote:
 > > 
 > > Igor Sysoev announced at 05.05.2008 that 0.6 branch becomes stable.
 > > So, www/nginx can be upgraded to 0.6.31.  Basically, the first of
 > > provided patches is the www/nginx -> www/nginx-devel and changes
 > > from 0.6.30 to 0.6.31.
 > 
 > Stable branch (aka www/nginx) was update to 0.6.31 Mon May 19
 > 12:01:13 2008 UTC.
 
 Ah, OK, sorry for the confusion.  PR can be closed.
 -- 
 Eygene
State-Changed-From-To: open->closed 
State-Changed-By: osa 
State-Changed-When: Tue Jun 17 14:30:28 UTC 2008 
State-Changed-Why:  
Close PR by originator request.  Thanks for report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124123 
>Unformatted:
