Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2014 18:52:29 GMT
From:      Alexander Ushakov <alexander@tauruna.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/189731: Postgres extension is disabled in nginx 1.6 port
Message-ID:  <201405121852.s4CIqTRJ078156@cgiserv.freebsd.org>
Resent-Message-ID: <201405121900.s4CJ00Vi063519@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189731
>Category:       ports
>Synopsis:       Postgres extension is disabled in nginx 1.6 port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 12 19:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Ushakov
>Release:        FreeBSD 10.0-RELEASE-p2
>Organization:
Tauruna
>Environment:
FreeBSD tools.polyvizor.ru 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0: Tue Apr 29 17:06:01 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
3rd-party nginx extension Postgres is marked to IGNORE in /usr/ports/www/nginx/Makefile since nginx 1.6:

.if ${PORT_OPTIONS:MPOSTGRES}
IGNORE=        POSTGRES: update require
USE_PGSQL=      yes
NGINX_POSTGRES_VERSION= 0.9
MASTER_SITES+=  http://labs.frickle.com/files/:postgres
DISTFILES+=     ngx_postgres-${NGINX_POSTGRES_VERSION}.tar.gz:postgres
CONFIGURE_ARGS+=--add-module=${WRKDIR}/ngx_postgres-${NGINX_POSTGRES_VERSION}
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_postgres-config
.endif

>How-To-Repeat:
cd /usr/ports/www/nginx
make config
- mark POSTGRES checkbox
make
>Fix:
Apply patch from extension author (https://github.com/FRiCKLE/ngx_postgres/commit/a9b4dd6ba99cbdece46f2e2d79628cdef1795183):

/usr/ports/www/nginx/work/ngx_postgres-0.9/src/ngx_postgres_upstream.c 
 

@@ -103,6 +103,9 @@ ngx_postgres_upstream_init(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *uscf)
 
   &#61551;        }
   &#61551;  
             peers->peer[n].host.len = ngx_sock_ntop(peers->peer[n].sockaddr,
+#if defined(nginx_version) && (nginx_version >= 1005003)
+                                          peers->peer[n].socklen,
+#endif
                                           peers->peer[n].host.data,
                                           NGX_SOCKADDR_STRLEN, 0);
   &#61551;        if (peers->peer[n].host.len == 0) {
 

remove IGNOREline in /usr/ports/www/nginx/Makefile
#IGNORE=        POSTGRES: update require


>Release-Note:
>Audit-Trail:
>Unformatted:



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