On Tue, Sep 18, 2018 at 08:12:20AM -0400, Thomas Ward wrote:
> Downstream in Ubuntu, it has been proposed to demote pcre3 and
> use pcre2 instead as it is newer.
> https://trac.nginx.org/nginx/ticket/720 shows it was marked 4
> years ago that NGINX does not support pcre2. Are there any
> plans to use pcre2 instead of pcre3?
There are no immediate plans.
When we last checked, there were no problems with PCRE, but PCRE2
wasn't available in most distributions we support, making the
switch mostly meaningless.
Also, it looks like PCRE2 is still not supported even by Exim,
which is the parent project of PCRE and PCRE2:
As such, adding PCRE2 support to nginx looks premature.
In Clear Linux OS, we generally prefer to build DSO modules separately
from the server code. We do this for e.g. php modules using `phpize`.
For nginx, this is 3/4 of the way there, except it fails on the last
part - modules instructions clearly indicate that modules, with all
their dependencies, need to build together. But in reality, there is no
technical reason for this.
For Clear Linux therefore, I've come up with the following approach and
it works really well, and therefore I'd like this to be considered as a
PoC for possible inclusion/consideration so other distributions can
benefit from the simplicity that it offers to Linux distributions.
Now, this script is mostly still a terrible hack. I'm not properly
fetching the nginx module names for instance. However, the method of
installing header files saves us from having to include nginx source
code in *every* nginx module, which will prevent lots of problems later on.
Obviously a permanent solution would be for the module build system to
properly -I/usr/include/nginx instead of copying headers, as well.
PS: Example of how an (automated) module build looks using this: