Bug 277719 - www/nginx: Add support for 3rd party stream-lua-nginx-module
Summary: www/nginx: Add support for 3rd party stream-lua-nginx-module
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mateusz Piotrowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-15 13:17 UTC by Eirik Oeverby
Modified: 2024-05-13 12:21 UTC (History)
5 users (show)

See Also:
0mp: maintainer-feedback-


Attachments
Recursive diff to add stream-lua-nginx-module (18.54 KB, text/plain)
2024-03-15 13:17 UTC, Eirik Oeverby
no flags Details
Patch for www/nginx (3.49 KB, patch)
2024-03-15 14:36 UTC, Xavier Beaudouin
no flags Details | Diff
Poudriere nginx log with defaut options. (99.63 KB, text/plain)
2024-03-15 14:36 UTC, Xavier Beaudouin
no flags Details
Poudriere nginx log with luastream option activated. (214.83 KB, text/plain)
2024-03-15 14:37 UTC, Xavier Beaudouin
no flags Details
nginx-devel patch (3.58 KB, patch)
2024-03-15 15:07 UTC, Xavier Beaudouin
no flags Details | Diff
Poudriere nginx-devel log with defaut options. (112.05 KB, text/plain)
2024-03-15 15:07 UTC, Xavier Beaudouin
no flags Details
Poudriere nginx-devel log with luastream option activated. (243.64 KB, text/plain)
2024-03-15 15:08 UTC, Xavier Beaudouin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2024-03-15 13:17:33 UTC
Created attachment 249185 [details]
Recursive diff to add stream-lua-nginx-module

This patch adds support for the lua module for streams; this is in addition to (or instead of) the existing lua module for http.
Comment 1 Eirik Oeverby 2024-03-15 13:19:04 UTC
Suggest considering this for www/nginx-devel as well.
Comment 2 Xavier Beaudouin 2024-03-15 14:36:09 UTC
Created attachment 249187 [details]
Patch for www/nginx

Hi !
Here is an updated patch for Eirik work's.
Also notice the ports has been successfully built on poudriere (with and without options).
Kind regards,
Xavier
Comment 3 Xavier Beaudouin 2024-03-15 14:36:43 UTC
Created attachment 249188 [details]
Poudriere nginx log with defaut options.
Comment 4 Xavier Beaudouin 2024-03-15 14:37:14 UTC
Created attachment 249189 [details]
Poudriere nginx log with luastream option activated.
Comment 5 Xavier Beaudouin 2024-03-15 15:07:09 UTC
Created attachment 249190 [details]
nginx-devel patch

nginx-devel patch (tested also in poudriere).
Comment 6 Xavier Beaudouin 2024-03-15 15:07:49 UTC
Created attachment 249191 [details]
Poudriere nginx-devel log with defaut options.
Comment 7 Xavier Beaudouin 2024-03-15 15:08:07 UTC
Created attachment 249192 [details]
Poudriere nginx-devel log with luastream option activated.
Comment 8 Eirik Oeverby 2024-03-23 16:09:06 UTC
Thanks for working on this. Any ETA on getting the port updated?
Comment 9 Jochen Neumeister freebsd_committer freebsd_triage 2024-04-02 16:39:10 UTC
@osa: what is your opinion on this PR as nginx-devel maintainer?
Comment 10 Mateusz Piotrowski freebsd_committer freebsd_triage 2024-04-02 17:18:24 UTC
Hmm, I wonder if there is a need for one more change in this patch, look at line 249 in the Makefile:

```
.if empty(PORT_OPTIONS:MLUA) && empty(PORT_OPTIONS:MMODSECURITY3) && \
    empty(PORT_OPTIONS:MPASSENGER)
CONFIGURE_ARGS+=	--with-ld-opt="-L ${LOCALBASE}/lib"
.else
CONFIGURE_ARGS+=	--with-ld-opt="-L ${LOCALBASE}/lib -lpcre"
LIB_DEPENDS+=		libpcre.so:devel/pcre
.endif
```

I suspect that LUASTREAM requires similar treatment to LUA, and so the if statement should check for empty(PORT_OPTIONS:MLUASTREAM) as well.
Comment 11 Sergey A. Osokin freebsd_committer freebsd_triage 2024-04-02 19:08:16 UTC
(In reply to Mateusz Piotrowski from comment #10)

Modern versions of the third-party lua module are working fine with the devel/pcre2 port, so this module building needs to be tested.
Comment 12 Sergey A. Osokin freebsd_committer freebsd_triage 2024-04-02 19:14:49 UTC
(In reply to Jochen Neumeister from comment #9)

Jochen,

there're several commits into master branch have been made after the recent 0.0.14 release, so I'd prefer to see recent snapshot of the module for the www/nginx-devel port.
Comment 13 Xavier Beaudouin 2024-05-07 15:11:27 UTC
(In reply to Sergey A. Osokin from comment #12)

Well I think the more sensitive part is www/nginx, not www/nginx-devel that needs some more tests.
If we can push the nginx one ? Since this is more than one month this patch has been submitted ?

Kind regards,
Xavier
Comment 14 Sergey A. Osokin freebsd_committer freebsd_triage 2024-05-07 15:52:19 UTC
(In reply to Xavier Beaudouin from comment #13)

The www/nginx ports has a maintainer, by the laws in case of a maintainer's timeout another committer can commit changes to the port.
Comment 15 Sergey A. Osokin freebsd_committer freebsd_triage 2024-05-07 15:54:36 UTC
(In reply to Xavier Beaudouin from comment #13)

In case of the update of www/nginx-devel please see my https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277719#c12 comment.

Also, www/nginx-devel has been updated to 1.26.0 recently, so the patch may need to be rebased against new version.

Thank you.
Comment 16 Eirik Oeverby 2024-05-07 15:57:19 UTC
(In reply to Xavier Beaudouin from comment #13)
Yes please - it's becoming painful to wait for this relatively simple addition.
Comment 17 commit-hook freebsd_committer freebsd_triage 2024-05-13 10:30:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5f61eef0e8bbaffff7fd816aaf0befc364e8245b

commit 5f61eef0e8bbaffff7fd816aaf0befc364e8245b
Author:     Eirik Oeverby <ltning-freebsd@anduin.net>
AuthorDate: 2024-05-13 09:48:03 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2024-05-13 10:28:23 +0000

    www/nginx: Add support for 3rd party stream-lua-nginx-module

    PR:             277719
    Approved by:    maintainer timeout
    Reported by:    Eirik Oeverby <ltning-freebsd@anduin.net>
    Sponsored by:   Modirum MDPay
    Sponsored by:   Klara, Inc.
    Co-authored-by: Xavier Beaudouin <kiwi@oav.net>

    (cherry picked from commit edac05fd7cb3fa2f9c794165b8ffcfc9e32c20c4)

 www/nginx/Makefile              |  2 +-
 www/nginx/Makefile.extmod       | 10 +++++++++-
 www/nginx/Makefile.options.desc |  1 +
 www/nginx/distinfo              |  2 ++
 www/nginx/pkg-plist             |  1 +
 5 files changed, 14 insertions(+), 2 deletions(-)
Comment 18 Mateusz Piotrowski freebsd_committer freebsd_triage 2024-05-13 12:21:28 UTC
I opened PR 278951 to track the patch for the devel port.