Quantcast

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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ryan Schmidt-24

> On Apr 8, 2017, at 11:49, Clemens Lang <[hidden email]> 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 <[hidden email]>
> 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?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Clemens Lang-2
Hi,

----- On 9 Apr, 2017, at 00:25, Ryan Schmidt [hidden email] wrote:

> 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.

I'm aware of this limitation. We've historically done this for other modules,
too, though.


> 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

Thanks for the idea, but rather than fixing this, I'd rather move to separate
ports per module.


> 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?

nginx has added support for dynamically loaded modules in one of their more recent
releases. Unfortunately, this requires code changes in the modules to be supported
and few modules had caught up when I last checked.

Hopefully, more modules will adopt support for this in the future, at which point
we should move all modules that support it from variants to separate ports.

Development seems to be quite slow on some of the modules (to the point where I
sometimes have to disable them for nginx updates because they are incompatible), so
we may be stuck with the variants for a while.

--
Clemens Lang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ryan Schmidt-24

On Apr 10, 2017, at 05:57, Clemens Lang wrote:

>
>> 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
>
> Thanks for the idea, but rather than fixing this, I'd rather move to separate
> ports per module.

That would be great! Glad to hear nginx supports this now. Hope the modules catch up eventually.


Loading...