Re: git: 36f20b63acf3 - main - www/{nginx,nginx-devel,freenginx}: 3rd-party modules management

Jochen Neumeister <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>

Am 17.08.26 um 02:50 schrieb Sergey A. Osokin:
> On Sun, Aug 16, 2026 at 08:41:50PM +0200, Jochen Neumeister wrote:
>>
>>
>> Am 16.08.26 um 20:28 schrieb Sergey A. Osokin:
>>> Hi Jochen,
>>> hope you're doing well.
>>>
>>> On Fri, Aug 14, 2026 at 02:32:56PM +0000, Jochen Neumeister wrote:
>>> [...]
>>>> -    SUBDIR += lua-stream-nginx-module
>>>> +    SUBDIR += nginx-module-lua-stream
>>>
>>> I still don't think this is the right approach to install source
>>> code [without tests, and that's the separate topic] into the system
>>> for building a separate port.
>>>
>>> In case of creating a separate module for nginx* it's probably
>>> a good way to take a look on www/angie-module* infra.
>>
>> the source install is what the options-based builds of nginx,
>> nginx-devel and freenginx consume: they compile the module during
>> the server build, so the sources have to be present at build time.
> 
> This is not right, just because every port from the list may have
> its own patches to build a third-party module.  Also, the
> www/nginx-module-lua port install a shared object and the whole
> source files, which is complex and absolutely needless.
> 
>> A prebuilt DSO can't serve that purpose. The port simply replaces
>> the former GH_TUPLE downloads, so the module version is maintained
>> in one place instead of three.
> 
> Actualy, the port not just replaces the former GH_TUPLE, but also
> installs needless files.
> 
>> I'm aware of the angie-module* infra. That model covers a different
>> use case, and www/nginx-module-lua already provides exactly that
>> for the nginx package.
> 
> Well, would you mind to explain your model here, so we may have to
> create a more feasible solution for that.
> 
> Thank you.
> 

the model is simple: every 3rd-party module lives in exactly one
nginx-module-* port, which installs the upstream sources required
to build the module under share/nginx/modules/<portname>. The
nginx ports pull them in via BUILD_DEPENDS and compile them during
the server build, exactly as they did with the GH_TUPLE downloads
before. Module version and distinfo exist once in the tree, and
portscout tracks the module port.

Per-port patches are covered: compatibility patches live in the
module port itself, see nginx-module-lua-stream, which carries the
fixes needed for freenginx. A consumer can still patch the copied
sources on its own after the copy if it ever needs a private
change. The port installs only the files required for building,
tests and CI metadata are already stripped since June.

nginx-module-lua installs the DSO for users of the stock nginx
package plus the sources for the options-based builds. That is one
port serving both consumers instead of two ports fetching the same
tarball twice.

Jochen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.