Skip to content

Commit ce75780

Browse files
authored
Add source support for PCRE 2 and OpenSSL 3.0 (#526)
1 parent 1f6d61d commit ce75780

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ FEATURES:
1111

1212
ENHANCEMENTS:
1313

14+
* Add support for PCRE 2 and OpenSSL 3.0 (built from source) when building NGINX from source.
1415
* Tweak Release Drafter config.
1516
* Bump the Ansible `community.general` collection to `5.1.1`, `ansible.posix` collection to `1.4.0` and `community.docker` collection to `2.6.0`.
1617

molecule/common/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN \
2525
&& dnf clean all; \
2626
elif [ $(command -v yum) ]; then \
2727
yum makecache fast \
28-
&& yum install -y bash iproute initscripts sudo /usr/bin/python /usr/bin/python2-config vim yum-plugin-ovl http://mirror.centos.org/centos/7/os/x86_64/Packages/pcre2-10.23-2.el7.x86_64.rpm \
28+
&& yum install -y bash iproute initscripts sudo /usr/bin/python /usr/bin/python2-config vim yum-plugin-ovl \
2929
&& sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf \
3030
&& yum clean all; \
3131
elif [ $(command -v zypper) ]; then \

tasks/opensource/install-source.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
name:
2626
- ca-certificates
2727
- gcc
28+
- gcc-c++
2829
- gd
2930
- gd-devel
3031
- glibc
@@ -103,23 +104,23 @@
103104

104105
- name: (CentOS/RHEL) Install PCRE dependency from package
105106
ansible.builtin.yum:
106-
name: pcre-devel
107+
name: "{{ (pcre_release == 2) | ternary('pcre2-devel', 'pcre-devel') }}"
107108
update_cache: true
108109
when:
109110
- nginx_install_source_pcre | bool
110111
- ansible_facts['os_family'] == "RedHat"
111112

112113
- name: (Debian/Ubuntu) Install PCRE dependency from package
113114
ansible.builtin.apt:
114-
name: libpcre3-dev
115+
name: "{{ (pcre_release == 2) | ternary('libpcre2-dev', 'libpcre3-dev') }}"
115116
update_cache: true
116117
when:
117118
- nginx_install_source_pcre | bool
118119
- ansible_facts['os_family'] == "Debian"
119120

120121
- name: (Alpine Linux) Install PCRE dependency from package
121122
community.general.apk:
122-
name: pcre-dev
123+
name: "{{ (pcre_release == 2) | ternary('pcre2-dev', 'pcre-dev') }}"
123124
update_cache: true
124125
when:
125126
- nginx_install_source_pcre | bool
@@ -129,7 +130,7 @@
129130
block:
130131
- name: Download PCRE dependency
131132
ansible.builtin.get_url:
132-
url: "https://ftp.exim.org/pub/pcre/{{ pcre_version }}.tar.gz"
133+
url: "{{ (pcre_release == 2) | ternary('https://github.com/PCRE2Project/pcre2/releases/download/' ~ pcre_version ~ '/' ~ pcre_version ~ '.tar.gz', 'https://ftp.exim.org/pub/pcre/' ~ pcre_version ~ '.tar.gz') }}"
133134
dest: "/tmp/{{ pcre_version }}.tar.gz"
134135
mode: 0600
135136
register: pcre_source

vars/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ nginx_freebsd_dependencies: [
8080
'security/ca_root_nss',
8181
]
8282

83-
# Default locations and versions when 'nginx_install_from' is set to 'source'
84-
pcre_version: pcre-8.45
85-
zlib_version: zlib-1.2.11
86-
openssl_version: openssl-1.1.1m
83+
# Default locations and versions when 'nginx_install_from' is set to 'source'.
84+
# Set 'pcre_release' to 1 to install PCRE 1, modify the 'openssl_version' to move back to 1.1.1.
85+
pcre_release: 2
86+
pcre_version: pcre2-10.40
87+
zlib_version: zlib-1.2.12
88+
openssl_version: openssl-3.0.4
8789

8890
# Supported NGINX Open Source dynamic modules
8991
nginx_modules_list: [

0 commit comments

Comments
 (0)