[macports-ports] branch master updated: nginx: Add headers_more module support

Ryan Schmidt ryandesign at macports.org
Sat Apr 8 22:25:29 UTC 2017


> On Apr 8, 2017, at 11:49, Clemens Lang <cal at macports.org> wrote:
> 
> Clemens Lang (neverpanic) pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/5fb6ff652be2ee1655d41ed7891c7ead70c593cd
> 
> The following commit(s) were added to refs/heads/master by this push:
> 
>      new 5fb6ff6  nginx: Add headers_more module support
> 
> 5fb6ff6 is described below
> 
> 
> commit 5fb6ff652be2ee1655d41ed7891c7ead70c593cd
> 
> Author: Clemens Lang <cal at macports.org>
> AuthorDate: Sat Apr 8 18:49:03 2017 +0200
> 
>     nginx: Add headers_more module support
>     
>     Patch by Jeffrey Goldberg.
> 
> ---
>  www/nginx/Portfile | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/www/nginx/Portfile b/www/nginx/Portfile
> index 7ec04d9..53fea26 100644
> --- a/www/nginx/Portfile
> +++ b/www/nginx/Portfile
> @@ -29,7 +29,8 @@ master_sites        http://nginx.org/download:nginx \
>                      https://github.com/arut/nginx-rtmp-module/archive/:rtmp_module \
>                      https://github.com/slact/nchan/archive/:http_push_module \
>                      https://github.com/simpl/ngx_devel_kit/archive/:devel_kit_module \
> -                    https://github.com/openresty/lua-nginx-module/archive/:lua_module
> +                    https://github.com/openresty/lua-nginx-module/archive/:lua_module \
> +                    https://github.com/openresty/headers-more-nginx-module/archive/:h_more_module
>  
>  distfiles           ${name}-${version}${extract.suffix}:nginx
>  checksums           ${name}-${version}${extract.suffix} \
> @@ -384,6 +385,19 @@ variant lua requires devel_kit description {Enable Lua module (https://github.co
>      }
>  }
>  
> +variant headers_more description {Enable headers-more module (https://github.com/openresty/headers-more-nginx-module)} {
> +    set ngx_h_more_filename   headers-more-nginx-module
> +    set ngx_h_more_version    0.32
> +    set ngx_h_more_distname   ${ngx_h_more_filename}-${ngx_h_more_version}
> +    distfiles-append          v${ngx_h_more_version}.tar.gz:h_more_module
> +    checksums-append          v${ngx_h_more_version}.tar.gz \
> +                              rmd160  a0fd69817659321c2d51d9143de413e43cb049b4 \
> +                              sha256  c6d9dab8ea1fc997031007e2e8f47cced01417e203cd88d53a9fe9f6ae138720
> +
> +    configure.args-append     --add-module=${workpath}/${ngx_h_more_distname}
> +}

Using GitHub archive URLs in this context is not optimal, because the filename only contains the module's version number. This will only keep working until one of the modules has a version number that one of the other modules has had in the past.

In this situation, it would be better to use GitHub's older tarball URLs which can accept any filename, such as one that includes the name of the module. See for example my patch to add the fancyindex module here:

https://trac.macports.org/ticket/52103

More generally, the method of adding modules to nginx sucks. They should be separate ports, not modules. I am guessing nginx doesn't support that. Have you ever discussed this with the developers of nginx?



More information about the macports-dev mailing list