Skip to content

Commit 5bd0e6a

Browse files
committed
check SHA-256 of PCRE downloads (#193)
1 parent a3a1a3a commit 5bd0e6a

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
## 1.19.9.1-3
5+
6+
* change ftp.pcre.org to SourceForge mirror for PCRE downloads (#193)
7+
* check SHA-256 of PCRE downloads (#193)
8+
49
## 1.19.9.1-2
510

611
* Add multi-arch upstream Debian Bullseye flavors `bullseye` and `bullseye-fat` (#191)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
211211
|`resty_openssl_patch_version` | buildarg `RESTY_OPENSSL_PATCH_VERSION` |
212212
|`resty_openssl_url_base` | buildarg `RESTY_OPENSSL_URL_BASE` |
213213
|`resty_pcre_version` | buildarg `RESTY_PCRE_VERSION` |
214+
|`resty_pcre_sha256` | buildarg `RESTY_PCRE_SHA256` |
214215
|`resty_rpm_arch` | buildarg `RESTY_RPM_ARCH` |
215216
|`resty_rpm_dist` | buildarg `RESTY_RPM_DIST` |
216217
|`resty_rpm_flavor` | buildarg `RESTY_RPM_FLAVOR` |
@@ -273,6 +274,7 @@ docker build --build-arg RESTY_J=4 -f bionic/Dockerfile .
273274
|RESTY_OPENSSL_PATCH_VERSION | 1.1.1f | The version of OpenSSL to use when patching. |
274275
|RESTY_OPENSSL_URL_BASE | https://www.openssl.org/source | The base of the URL to download OpenSSL from. |
275276
|RESTY_PCRE_VERSION | 8.44 | The version of PCRE to use. |
277+
|RESTY_PCRE_SHA256 | `aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728` | The SHA-256 checksum of the PCRE package to check. |
276278
|RESTY_J | 1 | Sets the parallelism level (-jN) for the builds. |
277279
|RESTY_CONFIG_OPTIONS | "--with-compat --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-ipv6 --with-mail --with-mail_ssl_module --with-md5-asm --with-pcre-jit --with-sha1-asm --with-stream --with-stream_ssl_module --with-threads" | Options to pass to OpenResty's `./configure` script. |
278280
|RESTY_LUAJIT_OPTIONS | "--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" | Options to tweak LuaJIT. |

alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1l"
1616
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1717
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1818
ARG RESTY_PCRE_VERSION="8.44"
19+
ARG RESTY_PCRE_SHA256="aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728"
1920
ARG RESTY_J="1"
2021
ARG RESTY_CONFIG_OPTIONS="\
2122
--with-compat \
@@ -69,6 +70,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
6970
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7071
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7172
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
73+
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7274
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7375
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
7476
LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}"
@@ -123,6 +125,7 @@ RUN apk add --no-cache --virtual .build-deps \
123125
&& make -j${RESTY_J} install_sw \
124126
&& cd /tmp \
125127
&& curl -fSL https://downloads.sourceforge.net/project/pcre/pcre/${RESTY_PCRE_VERSION}/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \
128+
&& echo "${RESTY_PCRE_SHA256} pcre-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \
126129
&& tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \
127130
&& cd /tmp/pcre-${RESTY_PCRE_VERSION} \
128131
&& ./configure \

bionic/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1l"
1717
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1818
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1919
ARG RESTY_PCRE_VERSION="8.44"
20+
ARG RESTY_PCRE_SHA256="aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728"
2021
ARG RESTY_J="1"
2122
ARG RESTY_CONFIG_OPTIONS="\
2223
--with-compat \
@@ -71,6 +72,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7172
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7273
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7374
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
75+
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7476
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7577
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
7678
LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}"
@@ -122,6 +124,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
122124
&& make -j${RESTY_J} install_sw \
123125
&& cd /tmp \
124126
&& curl -fSL https://downloads.sourceforge.net/project/pcre/pcre/${RESTY_PCRE_VERSION}/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \
127+
&& echo "${RESTY_PCRE_SHA256} pcre-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \
125128
&& tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \
126129
&& cd /tmp/pcre-${RESTY_PCRE_VERSION} \
127130
&& ./configure \

focal/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1l"
1717
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1818
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1919
ARG RESTY_PCRE_VERSION="8.44"
20+
ARG RESTY_PCRE_SHA256="aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728"
2021
ARG RESTY_J="1"
2122
ARG RESTY_CONFIG_OPTIONS="\
2223
--with-compat \
@@ -71,6 +72,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7172
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7273
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7374
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
75+
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7476
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7577
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
7678
LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}"
@@ -122,6 +124,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
122124
&& make -j${RESTY_J} install_sw \
123125
&& cd /tmp \
124126
&& curl -fSL https://downloads.sourceforge.net/project/pcre/pcre/${RESTY_PCRE_VERSION}/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \
127+
&& echo "${RESTY_PCRE_SHA256} pcre-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \
125128
&& tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \
126129
&& cd /tmp/pcre-${RESTY_PCRE_VERSION} \
127130
&& ./configure \

0 commit comments

Comments
 (0)