Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Dec 2011 11:21:43 GMT
From:      "Sergey V. Dyatko" <sergey.dyatko@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163148: [patch] www/nginx, www/nginx-devel. add 3rd party nginx module
Message-ID:  <201112091121.pB9BLhUp062557@red.freebsd.org>
Resent-Message-ID: <201112091130.pB9BU8lH023769@freefall.freebsd.org>

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

>Number:         163148
>Category:       ports
>Synopsis:       [patch] www/nginx, www/nginx-devel. add 3rd party nginx module
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 09 11:30:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Sergey V. Dyatko
>Release:        HEAD
>Organization:
>Environment:
FreeBSD laptop.minsk.domain 10.0-CURRENT FreeBSD 10.0-CURRENT #10 r227991M: Sat Nov 26 21:09:20 FET 2011     root@laptop.minsk.domain:/usr/obj/usr/src/sys/b450  amd64

>Description:
changelog: 
* removed DEVEL_KIT_MODULE option. At the moment it is only used for
  LUA_MODULE and following looks strange:

.if !defined(WITH_DEVEL_KIT_MODULE)
BROKEN=                for lua module build devel_kit also should be
defined 
.endif

user must know about that dependency or/and re-run config after build
stopped if he really wants ngx_lua

* added 3rd party set-misc module
http://wiki.nginx.org/HttpSetMiscModule 
devel_kit requires for that module too

>How-To-Repeat:

>Fix:
www/nginx:
diff -Nura Makefile.orig Makefile
--- Makefile.orig       2011-12-09 09:31:53.833260581 +0300
+++ Makefile    2011-12-09 11:21:36.520260395 +0300
@@ -73,13 +73,13 @@
                HTTP_UPSTREAM_KEEPALIVE "3rd party upstream keepalive module" off \
                HTTP_ZIP_MODULE         "3rd party http_zip module" off \
                CHUNKIN_MODULE          "3rd party chunkin module" off \
-               DEVEL_KIT_MODULE        "3rd party devel_kit module" off \
                GRIDFS_MODULE           "3rd party gridfs module" off \
                LUA_MODULE              "3rd party lua module" off \
                MEMC_MODULE             "3rd party memc (memcached) module" off \
                PASSENGER_MODULE        "3rd party passenger module" off \
                POSTGRES_MODULE         "3rd party postgresql module" off \
                REDIS2_MODULE           "3rd party redis2 module" off \
+               SET_MISC_MODULE         "3rd party set-misc-nginx module" on \
                SLOWFS_CACHE_MODULE     "3rd party slowfs_cache module" off \
                SRCACHE_MODULE          "3rd party srcache module" off \
                SUPERVISORD_MODULE      "3rd party supervisord module" off \
@@ -423,15 +423,6 @@
 CONFIGURE_ARGS+=--add-module=${WRKDIR}/agentzh-chunkin-nginx-module-${GIT_CHUNKIN_MODULE_VERSION:S/^0-g//}
 .endif
 
-.if defined(WITH_DEVEL_KIT_MODULE)
-NGINX_DEVEL_KIT_MODULE_VERSION=        0.2.17
-GIT_DEVEL_KIT_MODULE_VERSION=  0-gbc97eea
-FETCH_ARGS=    -pRr
-MASTER_SITES+= https://github.com/simpl/ngx_devel_kit/tarball/v${NGINX_DEVEL_KIT_MODULE_VERSION}/:devel_kit
-DISTFILES+=    simpl-ngx_devel_kit-v${NGINX_DEVEL_KIT_MODULE_VERSION}-${GIT_DEVEL_KIT_MODULE_VERSION}.tar.gz:devel_kit
-CONFIGURE_ARGS+=--add-module=${WRKDIR}/simpl-ngx_devel_kit-${GIT_DEVEL_KIT_MODULE_VERSION:S/^0-g//}
-.endif
-
 .if defined(WITH_GRIDFS_MODULE)
 NGINX_GRIDFS_MODULE_VERSION=   0.8
 GIT_GRIDFS_MODULE_VERSION=     0-gb5f8113
@@ -446,9 +437,7 @@
 .endif
 
 .if defined(WITH_LUA_MODULE)
-.if !defined(WITH_DEVEL_KIT_MODULE)
-BROKEN=                for lua module build devel_kit also should be defined
-.endif
+USE_NGINX_DEVEL_KIT=   yes
 USE_LUA=       5.1+
 NGINX_LUA_MODULE_VERSION=      0.3.0
 GIT_LUA_MODULE_VERSION=        0-gdd0d4d0
@@ -459,6 +448,26 @@
 EXTRA_PATCHES+=        ${PATCHDIR}/extra-patch-chaoslawful-lua-nginx-module::config
 .endif
 
+.if defined(WITH_SET_MISC_MODULE)
+USE_NGINX_DEVEL_KIT=    yes
+NGINX_SET_MISC_MODULE_VERSION= 0.22rc3
+GIT_SET_MISC_VERSION=  0-g7adef5a
+FETCH_ARGS=     -pRr
+MASTER_SITES+=  https://github.com/agentzh/set-misc-nginx-module/tarball/v${NGINX_SET_MISC_MODULE_VERSION}/:setmisc
+DISTFILES+=    agentzh-set-misc-nginx-module-v${NGINX_SET_MISC_MODULE_VERSION}-${GIT_SET_MISC_VERSION}.tar.gz:setmisc
+CONFIGURE_ARGS+=--add-module=${WRKDIR}/agentzh-set-misc-nginx-module-${GIT_SET_MISC_VERSION:S/^0-g//}
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-agentzh-set-misc-nginx-module::config
+.endif
+
+.if defined(USE_NGINX_DEVEL_KIT)
+NGINX_DEVEL_KIT_MODULE_VERSION= 0.2.17
+GIT_DEVEL_KIT_MODULE_VERSION=   0-gbc97eea
+FETCH_ARGS=     -pRr
+MASTER_SITES+=  https://github.com/simpl/ngx_devel_kit/tarball/v${NGINX_DEVEL_KIT_MODULE_VERSION}/:devel_kit
+DISTFILES+=     simpl-ngx_devel_kit-v${NGINX_DEVEL_KIT_MODULE_VERSION}-${GIT_DEVEL_KIT_MODULE_VERSION}.tar.gz:devel_kit
+CONFIGURE_ARGS+=--add-module=${WRKDIR}/simpl-ngx_devel_kit-${GIT_DEVEL_KIT_MODULE_VERSION:S/^0-g//}
+.endif
+
 .if defined(WITH_MEMC_MODULE)
 NGINX_MEMC_MODULE_VERSION=     0.12
 GIT_MEMC_MODULE_VERSION=       0-g4f1952c

diff -Nura distinfo.orig distinfo 
--- distinfo.orig       2011-11-29 08:56:08.000000000 +0300
+++ distinfo    2011-12-09 11:34:28.046261256 +0300
@@ -64,6 +64,8 @@
 SIZE (ngx_postgres-0.8.tar.gz) = 40108
 SHA256 (agentzh-redis2-nginx-module-v0.07-0-g6f7fc37.tar.gz) = 3fbc76fbf60e02e879184b28cb9e834a4bb8f10ecd073ebd3cc585c469650b1a
 SIZE (agentzh-redis2-nginx-module-v0.07-0-g6f7fc37.tar.gz) = 23458
+SHA256 (agentzh-set-misc-nginx-module-v0.22rc3-0-g7adef5a.tar.gz) = 3fab5dcd2fc653983c4295a6223ddb42283b06ac739131a45470aa084b17c402
+SIZE (agentzh-set-misc-nginx-module-v0.22rc3-0-g7adef5a.tar.gz) = 30689
 SHA256 (ngx_slowfs_cache-1.6.tar.gz) = cc0505dbba30153691ff7b3a7353804d5ceb9a519a407b938cae49e9913a7bcc
 SIZE (ngx_slowfs_cache-1.6.tar.gz) = 10972
 SHA256 (agentzh-srcache-nginx-module-v0.12-0-g362530f.tar.gz) = 05adb583377c0ae82dc99af5dcd3866407d57f6c278c621c8a48d5ec186801d4

diff -Nura files.orig/extra-patch-agentzh-set-misc-nginx-module::config files/extra-patch-agentzh-set-misc-nginx-module::config
--- files/extra-patch-agentzh-set-misc-nginx-module::config        1970-01-01 03:00:00.000000000 +0300
+++ files/extra-patch-agentzh-set-misc-nginx-module::config     2011-12-09 10:31:07.833254645 +0300
@@ -0,0 +1,13 @@
+--- ../agentzh-set-misc-nginx-module-7adef5a/config.orig       2011-12-09 10:27:53.861265188 +0300
++++ ../agentzh-set-misc-nginx-module-7adef5a/config    2011-12-09 10:28:07.107259301 +0300
+@@ -1,10 +1,3 @@
+-if echo $HTTP_MODULES | grep " ndk_http_module" > /dev/null; then
+-    echo "found ngx_devel_kit for ngx_set_misc; looks good."
+-else
+-    echo "error: ngx_devel_kit is required to build ngx_set_misc; please put it before ngx_set_misc." 1>&2
+-    exit 1
+-fi
+-
+ ngx_addon_name=ngx_http_set_misc_module
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_set_misc_module"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_set_base32.c $ngx_addon_dir/src/ngx_http_set_default_value.c $ngx_addon_dir/src/ngx_http_set_hashed_upstream.c $ngx_addon_dir/src/ngx_http_set_quote_sql.c $ngx_addon_dir/src/ngx_http_set_quote_json.c $ngx_addon_dir/src/ngx_http_set_unescape_uri.c $ngx_addon_dir/src/ngx_http_set_misc_module.c $ngx_addon_dir/src/ngx_http_set_escape_uri.c $ngx_addon_dir/src/ngx_http_set_hash.c $ngx_addon_dir/src/ngx_http_set_local_today.c $ngx_addon_dir/src/ngx_http_set_hex.c $ngx_addon_dir/src/ngx_http_set_base64.c $ngx_addon_dir/src/ngx_http_set_random.c"

www/nginx-devel:
diff -Nura Makefile.orig Makefile
--- Makefile.orig       2011-11-30 08:36:00.000000000 +0300
+++ Makefile    2011-12-09 14:08:44.970258509 +0300
@@ -71,13 +71,13 @@
                HTTP_UPSTREAM_HASH      "3rd party upstream hash module" off \
                HTTP_ZIP_MODULE         "3rd party http_zip module" off \
                CHUNKIN_MODULE          "3rd party chunkin module" off \
-               DEVEL_KIT_MODULE        "3rd party devel_kit module" off \
                GRIDFS_MODULE           "3rd party gridfs module" off \
                LUA_MODULE              "3rd party lua module" off \
                MEMC_MODULE             "3rd party memc (memcached) module" off \
                PASSENGER_MODULE        "3rd party passenger module" off \
                POSTGRES_MODULE         "3rd party postgresql module" off \
                REDIS2_MODULE           "3rd party redis2 module" off \
+               SET_MISC_MODULE         "3rd party set-misc-nginx module" on \
                SLOWFS_CACHE_MODULE     "3rd party slowfs_cache module" off \
                SRCACHE_MODULE          "3rd party srcache module" off \
                SUPERVISORD_MODULE      "3rd party supervisord module" off \
@@ -435,9 +435,7 @@
 .endif
 
 .if defined(WITH_LUA_MODULE)
-.if !defined(WITH_DEVEL_KIT_MODULE)
-IGNORE=        for lua module build devel_kit also should be defined
-.endif
+USE_NGINX_DEVEL_KIT=   yes
 USE_LUA=       5.1+
 NGINX_LUA_MODULE_VERSION=      0.3.0
 GIT_LUA_MODULE_VERSION=        0-gdd0d4d0
@@ -448,6 +446,27 @@
 EXTRA_PATCHES+=        ${PATCHDIR}/extra-patch-chaoslawful-lua-nginx-module::config
 .endif
 
+.if defined(WITH_SET_MISC_MODULE)
+USE_NGINX_DEVEL_KIT=    yes
+NGINX_SET_MISC_MODULE_VERSION= 0.22rc3
+GIT_SET_MISC_VERSION=  0-g7adef5a
+FETCH_ARGS=     -pRr
+MASTER_SITES+=  https://github.com/agentzh/set-misc-nginx-module/tarball/v${NGINX_SET_MISC_MODULE_VERSION}/:setmisc
+DISTFILES+=    agentzh-set-misc-nginx-module-v${NGINX_SET_MISC_MODULE_VERSION}-${GIT_SET_MISC_VERSION}.tar.gz:setmisc
+CONFIGURE_ARGS+=--add-module=${WRKDIR}/agentzh-set-misc-nginx-module-${GIT_SET_MISC_VERSION:S/^0-g//}
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-agentzh-set-misc-nginx-module::config
+.endif
+
+.if defined(USE_NGINX_DEVEL_KIT)
+NGINX_DEVEL_KIT_MODULE_VERSION=        0.2.17
+GIT_DEVEL_KIT_MODULE_VERSION=  0-gbc97eea
+FETCH_ARGS=    -pRr
+MASTER_SITES+= https://github.com/simpl/ngx_devel_kit/tarball/v${NGINX_DEVEL_KIT_MODULE_VERSION}/:devel_kit
+DISTFILES+=    simpl-ngx_devel_kit-v${NGINX_DEVEL_KIT_MODULE_VERSION}-${GIT_DEVEL_KIT_MODULE_VERSION}.tar.gz:devel_kit
+CONFIGURE_ARGS+=--add-module=${WRKDIR}/simpl-ngx_devel_kit-${GIT_DEVEL_KIT_MODULE_VERSION:S/^0-g//}
+.endif
+
+
 .if defined(WITH_MEMC_MODULE)
 NGINX_MEMC_MODULE_VERSION=     0.12
 GIT_MEMC_MODULE_VERSION=       0-g4f1952c

diff -Nura distinfo.orig distinfo |more
--- distinfo.orig       2011-11-29 08:56:08.000000000 +0300
+++ distinfo    2011-12-09 11:34:28.046261256 +0300
@@ -64,6 +64,8 @@
 SIZE (ngx_postgres-0.8.tar.gz) = 40108
 SHA256 (agentzh-redis2-nginx-module-v0.07-0-g6f7fc37.tar.gz) = 3fbc76fbf60e02e879184b28cb9e834a4bb8f10ecd073ebd3cc585c469650b1a
 SIZE (agentzh-redis2-nginx-module-v0.07-0-g6f7fc37.tar.gz) = 23458
+SHA256 (agentzh-set-misc-nginx-module-v0.22rc3-0-g7adef5a.tar.gz) = 3fab5dcd2fc653983c4295a6223ddb42283b06ac739131a45470aa084b17c402
+SIZE (agentzh-set-misc-nginx-module-v0.22rc3-0-g7adef5a.tar.gz) = 30689
 SHA256 (ngx_slowfs_cache-1.6.tar.gz) = cc0505dbba30153691ff7b3a7353804d5ceb9a519a407b938cae49e9913a7bcc
 SIZE (ngx_slowfs_cache-1.6.tar.gz) = 10972
 SHA256 (agentzh-srcache-nginx-module-v0.12-0-g362530f.tar.gz) = 05adb583377c0ae82dc99af5dcd3866407d57f6c278c621c8a48d5ec186801d4

diff -Nura files.orig/extra-patch-agentzh-set-misc-nginx-module::config files/extra-patch-agentzh-set-misc-nginx-module::config
--- files/extra-patch-agentzh-set-misc-nginx-module::config        1970-01-01 03:00:00.000000000 +0300
+++ files/extra-patch-agentzh-set-misc-nginx-module::config     2011-12-09 10:31:07.833254645 +0300
@@ -0,0 +1,13 @@
+--- ../agentzh-set-misc-nginx-module-7adef5a/config.orig       2011-12-09 10:27:53.861265188 +0300
++++ ../agentzh-set-misc-nginx-module-7adef5a/config    2011-12-09 10:28:07.107259301 +0300
+@@ -1,10 +1,3 @@
+-if echo $HTTP_MODULES | grep " ndk_http_module" > /dev/null; then
+-    echo "found ngx_devel_kit for ngx_set_misc; looks good."
+-else
+-    echo "error: ngx_devel_kit is required to build ngx_set_misc; please put it before ngx_set_misc." 1>&2
+-    exit 1
+-fi
+-
+ ngx_addon_name=ngx_http_set_misc_module
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_set_misc_module"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_set_base32.c $ngx_addon_dir/src/ngx_http_set_default_value.c $ngx_addon_dir/src/ngx_http_set_hashed_upstream.c $ngx_addon_dir/src/ngx_http_set_quote_sql.c $ngx_addon_dir/src/ngx_http_set_quote_json.c $ngx_addon_dir/src/ngx_http_set_unescape_uri.c $ngx_addon_dir/src/ngx_http_set_misc_module.c $ngx_addon_dir/src/ngx_http_set_escape_uri.c $ngx_addon_dir/src/ngx_http_set_hash.c $ngx_addon_dir/src/ngx_http_set_local_today.c $ngx_addon_dir/src/ngx_http_set_hex.c $ngx_addon_dir/src/ngx_http_set_base64.c $ngx_addon_dir/src/ngx_http_set_random.c"


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



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