Skip to content

Commit 134c5a6

Browse files
Merge pull request #851 from infosiftr/with-pear
Add "--with-pear" in 7.4
2 parents 3fa21b9 + 1dd1195 commit 134c5a6

File tree

13 files changed

+89
-7
lines changed

13 files changed

+89
-7
lines changed

7.4-rc/alpine3.10/cli/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ RUN set -eux; \
144144
--with-openssl \
145145
--with-zlib \
146146
\
147+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
148+
--with-pear \
149+
\
147150
# bundled pcre does not support JIT on s390x
148151
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
149152
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -172,6 +175,9 @@ RUN set -eux; \
172175
\
173176
apk del --no-network .build-deps; \
174177
\
178+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
179+
pecl update-channels; \
180+
rm -rf /tmp/pear ~/.pearrc; \
175181
# smoke test
176182
php --version
177183

7.4-rc/alpine3.10/fpm/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ RUN set -eux; \
145145
--with-openssl \
146146
--with-zlib \
147147
\
148+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
149+
--with-pear \
150+
\
148151
# bundled pcre does not support JIT on s390x
149152
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
150153
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -173,6 +176,9 @@ RUN set -eux; \
173176
\
174177
apk del --no-network .build-deps; \
175178
\
179+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
180+
pecl update-channels; \
181+
rm -rf /tmp/pear ~/.pearrc; \
176182
# smoke test
177183
php --version
178184

7.4-rc/alpine3.10/zts/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ RUN set -eux; \
145145
--with-openssl \
146146
--with-zlib \
147147
\
148+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
149+
--with-pear \
150+
\
148151
# bundled pcre does not support JIT on s390x
149152
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
150153
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -173,6 +176,9 @@ RUN set -eux; \
173176
\
174177
apk del --no-network .build-deps; \
175178
\
179+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
180+
pecl update-channels; \
181+
rm -rf /tmp/pear ~/.pearrc; \
176182
# smoke test
177183
php --version
178184

7.4-rc/alpine3.9/cli/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ RUN set -eux; \
144144
--with-openssl \
145145
--with-zlib \
146146
\
147+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
148+
--with-pear \
149+
\
147150
# bundled pcre does not support JIT on s390x
148151
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
149152
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -172,6 +175,9 @@ RUN set -eux; \
172175
\
173176
apk del --no-network .build-deps; \
174177
\
178+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
179+
pecl update-channels; \
180+
rm -rf /tmp/pear ~/.pearrc; \
175181
# smoke test
176182
php --version
177183

7.4-rc/alpine3.9/fpm/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ RUN set -eux; \
145145
--with-openssl \
146146
--with-zlib \
147147
\
148+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
149+
--with-pear \
150+
\
148151
# bundled pcre does not support JIT on s390x
149152
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
150153
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -173,6 +176,9 @@ RUN set -eux; \
173176
\
174177
apk del --no-network .build-deps; \
175178
\
179+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
180+
pecl update-channels; \
181+
rm -rf /tmp/pear ~/.pearrc; \
176182
# smoke test
177183
php --version
178184

7.4-rc/alpine3.9/zts/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ RUN set -eux; \
145145
--with-openssl \
146146
--with-zlib \
147147
\
148+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
149+
--with-pear \
150+
\
148151
# bundled pcre does not support JIT on s390x
149152
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
150153
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -173,6 +176,9 @@ RUN set -eux; \
173176
\
174177
apk del --no-network .build-deps; \
175178
\
179+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
180+
pecl update-channels; \
181+
rm -rf /tmp/pear ~/.pearrc; \
176182
# smoke test
177183
php --version
178184

7.4-rc/stretch/apache/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ RUN set -eux; \
234234
--with-openssl \
235235
--with-zlib \
236236
\
237+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
238+
--with-pear \
239+
\
237240
# bundled pcre does not support JIT on s390x
238241
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
239242
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -266,6 +269,9 @@ RUN set -eux; \
266269
; \
267270
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
268271
\
272+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
273+
pecl update-channels; \
274+
rm -rf /tmp/pear ~/.pearrc; \
269275
# smoke test
270276
php --version
271277

7.4-rc/stretch/cli/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ RUN set -eux; \
174174
--with-openssl \
175175
--with-zlib \
176176
\
177+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
178+
--with-pear \
179+
\
177180
# bundled pcre does not support JIT on s390x
178181
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
179182
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -206,6 +209,9 @@ RUN set -eux; \
206209
; \
207210
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
208211
\
212+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
213+
pecl update-channels; \
214+
rm -rf /tmp/pear ~/.pearrc; \
209215
# smoke test
210216
php --version
211217

7.4-rc/stretch/fpm/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ RUN set -eux; \
175175
--with-openssl \
176176
--with-zlib \
177177
\
178+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
179+
--with-pear \
180+
\
178181
# bundled pcre does not support JIT on s390x
179182
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
180183
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -207,6 +210,9 @@ RUN set -eux; \
207210
; \
208211
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
209212
\
213+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
214+
pecl update-channels; \
215+
rm -rf /tmp/pear ~/.pearrc; \
210216
# smoke test
211217
php --version
212218

7.4-rc/stretch/zts/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ RUN set -eux; \
175175
--with-openssl \
176176
--with-zlib \
177177
\
178+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
179+
--with-pear \
180+
\
178181
# bundled pcre does not support JIT on s390x
179182
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
180183
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@@ -207,6 +210,9 @@ RUN set -eux; \
207210
; \
208211
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
209212
\
213+
# update pecl channel definitions https://github.com/docker-library/php/issues/443
214+
pecl update-channels; \
215+
rm -rf /tmp/pear ~/.pearrc; \
210216
# smoke test
211217
php --version
212218

Dockerfile-alpine.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ RUN set -eux; \
138138
--with-openssl \
139139
--with-zlib \
140140
\
141+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
142+
--with-pear \
143+
\
141144
# bundled pcre does not support JIT on s390x
142145
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
143146
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \

Dockerfile-debian.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ RUN set -eux; \
168168
--with-openssl \
169169
--with-zlib \
170170
\
171+
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
172+
--with-pear \
173+
\
171174
# bundled pcre does not support JIT on s390x
172175
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
173176
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \

update.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,17 @@ for version in "${versions[@]}"; do
165165
sed -ri \
166166
-e '/oniguruma-dev|libonig-dev/d' \
167167
"$version/$suite/$variant/Dockerfile"
168-
else
169-
# 7.4 and above no longer include pecl/pear: https://github.com/php/php-src/pull/3781
168+
fi
169+
if [ "$majorVersion" -ge '8' ]; then
170+
# 8 and above no longer include pecl/pear (see https://github.com/docker-library/php/issues/846#issuecomment-505638494)
171+
sed -ri \
172+
-e '/pear |pearrc|pecl.*channel/d' \
173+
"$version/$suite/$variant/Dockerfile"
174+
fi
175+
if [ "$majorVersion" != '7' ] || [ "$minorVersion" -lt '4' ]; then
176+
# --with-pear is only relevant on PHP 7, and specifically only 7.4+ (see https://github.com/docker-library/php/issues/846#issuecomment-505638494)
170177
sed -ri \
171-
-e '\!pecl.*channel|/tmp/pear!d' \
178+
-e '/--with-pear/d' \
172179
"$version/$suite/$variant/Dockerfile"
173180
fi
174181
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '2' ]; then
@@ -184,10 +191,19 @@ for version in "${versions[@]}"; do
184191
fi
185192

186193
# remove any _extra_ blank lines created by the deletions above
187-
awk '
188-
NF > 0 { blank = 0 }
189-
NF == 0 { ++blank }
190-
blank < 2 { print }
194+
gawk '
195+
{
196+
if (NF == 0 || (NF == 1 && $1 == "\\")) {
197+
blank++
198+
}
199+
else {
200+
blank = 0
201+
}
202+
203+
if (blank < 2) {
204+
print
205+
}
206+
}
191207
' "$version/$suite/$variant/Dockerfile" > "$version/$suite/$variant/Dockerfile.new"
192208
mv "$version/$suite/$variant/Dockerfile.new" "$version/$suite/$variant/Dockerfile"
193209

0 commit comments

Comments
 (0)