Want to subscribe to topics you're interested in?
Become a Member

Beta Branch prep for pcre2 Nginx support in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 29, 2021.

  1. eva2000

    eva2000 Administrator Staff Member

    48,887
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    8:47 PM
    Nginx 1.21.x
    MariaDB 10.x
    prep for pcre2 Nginx support in 123.09beta01

    - Nginx 1.21.5 adds optional pcre2 v10.x support if pcre2 installs are detected otherwise it will default to normal pcre install https://community.centminmod.com/threads/nginx-1-21-5-released.22317/
    - this update is prep work to ensure Centmin Mod Nginx 1.21.5 supports pcre2 v10.x optionally as opposed to current Nginx pcre v8.45 support by installing pcre2 v10.x optionally when pcre2 Nginx support is enabled. By default pcre2 v10.x support in Centmin Mod Nginx will be disabled until further testing is done as Nginx pcre/pcre2 is used by other 3rd party modules like ngx_brotli for Brotli Nginx compression and nginx lua module.
    - future updates will have to change where ngx_brotli, modsecurity and nginx lua and other Nginx modules' dependencies are installed i.e. changing install prefix from /usr/local for from current location at /usr/local/lib and /usr/local/include to a different location so as to group all Nginx dependencies under the same install prefix i.e. /usr/local/nginx-dep/lib and /usr/local/nginx-dep/include as currently that is the same location for system custom wget installed pcre dependency prefix, /usr/local. This is needed so as to be able to switch between Nginx's own pcre v8.45 and pcre2 v10.x versions without breaking system custom wget's pcre dependency
    - Current pcre2 v10.x when optionally enabled will be installed with prefix, /usr/local/nginx-dep so Nginx looks for dependencies at /usr/local/nginx-dep/lib and /usr/local/nginx-dep/include
    - For now, Centmin Mod Nginx still works fine with pcre v8.45 for all Nginx versions

    Continue reading...

    123.09beta01 branch


     
  2. eva2000

    eva2000 Administrator Staff Member

    48,887
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    8:47 PM
    Nginx 1.21.x
    MariaDB 10.x
    Looks like Nginx lua has some build issues with PCRE2 right now. But without Nginx lua module looks good so far and great that the shared library for PCRE2 is a difference name from PCRE so with updated proper reference (commit soon) to -lpcre2-8, then Nginx doesn't pick up PCRE + PCRE2 anymore :)

    Nginx binary using PCRE2 /usr/local/nginx-dep/lib/libpcre2-8.so.0
    Code (Text):
    ldd $(which nginx)
            linux-vdso.so.1 =>  (0x00007ffec195d000)
            libpcre2-8.so.0 => /usr/local/nginx-dep/lib/libpcre2-8.so.0 (0x00007f8532aca000)
            libjemalloc.so.1 => /lib64/libjemalloc.so.1 (0x00007f8532705000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007f8532501000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f85322e5000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f85320ae000)
            libGeoIP.so.1 => /lib64/libGeoIP.so.1 (0x00007f8531e7c000)
            libatomic_ops.so.1 => /usr/local/lib/libatomic_ops.so.1 (0x00007f8531c7a000)
            libc.so.6 => /lib64/libc.so.6 (0x00007f85318ac000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f8532939000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007f85316a9000)
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    48,887
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    8:47 PM
    Nginx 1.21.x
    MariaDB 10.x
    Testing a private 123.09beta01 branch with this mentioned change for changing where ngx_brotli, modsecurity and nginx lua and other Nginx modules' install to PREFIX directory = /usr/local/nginx-dep.

    this is the change with default PCRE v8.45
    Code (Text):
    ldd $(which nginx)
            linux-vdso.so.1 =>  (0x00007ffc520b4000)
            libjemalloc.so.1 => /lib64/libjemalloc.so.1 (0x00007f81dd623000)
            libpcre.so.1 => /usr/local/nginx-dep/lib/libpcre.so.1 (0x00007f81dd9f0000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007f81dd41f000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f81dd203000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f81dcfcc000)
            libGeoIP.so.1 => /lib64/libGeoIP.so.1 (0x00007f81dcd9a000)
            libc.so.6 => /lib64/libc.so.6 (0x00007f81dc9cc000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f81dd857000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007f81dc7c9000)
    

    This is one step towards interchangeably being able use PCRE v8.45 or newer PCRE2 v10.x with Nginx 1.21.5+ :)

    Still more testing to do and have to fix libatomic Nginx library detection on the new PREFIX paths.