From 509adb58cbc7463a03e317931df65868ec8a3e92 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 11 Mar 2024 15:48:40 -0700 Subject: [PATCH] Update imagick package to 3.7.0 Also apply hack patch for preprocessor build failures --- Dockerfile.template | 18 +++++++++++++++++- beta/php8.1/apache/Dockerfile | 15 ++++++++++++--- beta/php8.1/fpm-alpine/Dockerfile | 15 ++++++++++++--- beta/php8.1/fpm/Dockerfile | 15 ++++++++++++--- beta/php8.2/apache/Dockerfile | 15 ++++++++++++--- beta/php8.2/fpm-alpine/Dockerfile | 15 ++++++++++++--- beta/php8.2/fpm/Dockerfile | 15 ++++++++++++--- beta/php8.3/apache/Dockerfile | 15 ++++++++++++--- beta/php8.3/fpm-alpine/Dockerfile | 15 ++++++++++++--- beta/php8.3/fpm/Dockerfile | 15 ++++++++++++--- cli/php8.1/alpine/Dockerfile | 15 ++++++++++++--- cli/php8.2/alpine/Dockerfile | 15 ++++++++++++--- cli/php8.3/alpine/Dockerfile | 15 ++++++++++++--- latest/php8.1/apache/Dockerfile | 15 ++++++++++++--- latest/php8.1/fpm-alpine/Dockerfile | 15 ++++++++++++--- latest/php8.1/fpm/Dockerfile | 15 ++++++++++++--- latest/php8.2/apache/Dockerfile | 15 ++++++++++++--- latest/php8.2/fpm-alpine/Dockerfile | 15 ++++++++++++--- latest/php8.2/fpm/Dockerfile | 15 ++++++++++++--- latest/php8.3/apache/Dockerfile | 15 ++++++++++++--- latest/php8.3/fpm-alpine/Dockerfile | 15 ++++++++++++--- latest/php8.3/fpm/Dockerfile | 15 ++++++++++++--- 22 files changed, 269 insertions(+), 64 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index 2296928274..64a96fa1d3 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -85,9 +85,25 @@ RUN set -ex; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 {{ ) else "" end -}} # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ +{{ if true then ( -}} +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ +{{ # TODO when imagick has another release, we should ditch this whole block and just update instead -}} +{{ ) else ( -}} + pecl install imagick-3.7.0; \ docker-php-ext-enable imagick; \ rm -r /tmp/pear; \ +{{ ) end -}} \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.1/apache/Dockerfile b/beta/php8.1/apache/Dockerfile index fe32df17f6..7131b8c7f5 100644 --- a/beta/php8.1/apache/Dockerfile +++ b/beta/php8.1/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.1/fpm-alpine/Dockerfile b/beta/php8.1/fpm-alpine/Dockerfile index 0a2e981670..ebfbeb0dc4 100644 --- a/beta/php8.1/fpm-alpine/Dockerfile +++ b/beta/php8.1/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.1/fpm/Dockerfile b/beta/php8.1/fpm/Dockerfile index f354445688..c222ecb8d0 100644 --- a/beta/php8.1/fpm/Dockerfile +++ b/beta/php8.1/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.2/apache/Dockerfile b/beta/php8.2/apache/Dockerfile index d322b6c4f1..fb86fe1c9c 100644 --- a/beta/php8.2/apache/Dockerfile +++ b/beta/php8.2/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.2/fpm-alpine/Dockerfile b/beta/php8.2/fpm-alpine/Dockerfile index 9fb8a934b2..47b034ebdc 100644 --- a/beta/php8.2/fpm-alpine/Dockerfile +++ b/beta/php8.2/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.2/fpm/Dockerfile b/beta/php8.2/fpm/Dockerfile index a870c0c2c9..6cebd43934 100644 --- a/beta/php8.2/fpm/Dockerfile +++ b/beta/php8.2/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.3/apache/Dockerfile b/beta/php8.3/apache/Dockerfile index 3de813750a..9b40a6283a 100644 --- a/beta/php8.3/apache/Dockerfile +++ b/beta/php8.3/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.3/fpm-alpine/Dockerfile b/beta/php8.3/fpm-alpine/Dockerfile index 3509da09b5..e4b0104bb8 100644 --- a/beta/php8.3/fpm-alpine/Dockerfile +++ b/beta/php8.3/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/beta/php8.3/fpm/Dockerfile b/beta/php8.3/fpm/Dockerfile index 8effd12314..3fb71419e6 100644 --- a/beta/php8.3/fpm/Dockerfile +++ b/beta/php8.3/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/cli/php8.1/alpine/Dockerfile b/cli/php8.1/alpine/Dockerfile index 9de6515711..8c6b98a42b 100644 --- a/cli/php8.1/alpine/Dockerfile +++ b/cli/php8.1/alpine/Dockerfile @@ -47,9 +47,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/cli/php8.2/alpine/Dockerfile b/cli/php8.2/alpine/Dockerfile index f89a1d7e8c..3c6e6c821e 100644 --- a/cli/php8.2/alpine/Dockerfile +++ b/cli/php8.2/alpine/Dockerfile @@ -47,9 +47,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/cli/php8.3/alpine/Dockerfile b/cli/php8.3/alpine/Dockerfile index f2a3c0a60d..8c7744ec18 100644 --- a/cli/php8.3/alpine/Dockerfile +++ b/cli/php8.3/alpine/Dockerfile @@ -47,9 +47,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.1/apache/Dockerfile b/latest/php8.1/apache/Dockerfile index f2fbea8b4f..17bac9e44d 100644 --- a/latest/php8.1/apache/Dockerfile +++ b/latest/php8.1/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.1/fpm-alpine/Dockerfile b/latest/php8.1/fpm-alpine/Dockerfile index 3645119628..a474cca80c 100644 --- a/latest/php8.1/fpm-alpine/Dockerfile +++ b/latest/php8.1/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.1/fpm/Dockerfile b/latest/php8.1/fpm/Dockerfile index 227f92fce2..774d3d46e1 100644 --- a/latest/php8.1/fpm/Dockerfile +++ b/latest/php8.1/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.2/apache/Dockerfile b/latest/php8.2/apache/Dockerfile index 9f03be2c7e..9835ef3803 100644 --- a/latest/php8.2/apache/Dockerfile +++ b/latest/php8.2/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.2/fpm-alpine/Dockerfile b/latest/php8.2/fpm-alpine/Dockerfile index 90862d7907..c138ea19e3 100644 --- a/latest/php8.2/fpm-alpine/Dockerfile +++ b/latest/php8.2/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.2/fpm/Dockerfile b/latest/php8.2/fpm/Dockerfile index f0c523771e..53b0c40689 100644 --- a/latest/php8.2/fpm/Dockerfile +++ b/latest/php8.2/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.3/apache/Dockerfile b/latest/php8.3/apache/Dockerfile index 6222bc26f2..4f48d8080e 100644 --- a/latest/php8.3/apache/Dockerfile +++ b/latest/php8.3/apache/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.3/fpm-alpine/Dockerfile b/latest/php8.3/fpm-alpine/Dockerfile index bd48bee9c3..82fbf429be 100644 --- a/latest/php8.3/fpm-alpine/Dockerfile +++ b/latest/php8.3/fpm-alpine/Dockerfile @@ -46,9 +46,18 @@ RUN set -ex; \ ; \ # WARNING: imagick is likely not supported on Alpine: https://github.com/Imagick/imagick/issues/328 # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \ diff --git a/latest/php8.3/fpm/Dockerfile b/latest/php8.3/fpm/Dockerfile index 1149d6b90c..8777b91b99 100644 --- a/latest/php8.3/fpm/Dockerfile +++ b/latest/php8.3/fpm/Dockerfile @@ -45,9 +45,18 @@ RUN set -ex; \ zip \ ; \ # https://pecl.php.net/package/imagick - pecl install imagick-3.6.0; \ - docker-php-ext-enable imagick; \ - rm -r /tmp/pear; \ +# https://github.com/Imagick/imagick/commit/5ae2ecf20a1157073bad0170106ad0cf74e01cb6 (causes a lot of build failures, but strangely only intermittent ones 🤔) +# see also https://github.com/Imagick/imagick/pull/641 +# this is "pecl install imagick-3.7.0", but by hand so we can apply a small hack / part of the above commit + curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \ + echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \ + tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \ + test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \ + sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \ + grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \ + docker-php-ext-install /tmp/imagick-3.7.0; \ + rm -rf imagick.tgz /tmp/imagick-3.7.0; \ \ # some misbehaving extensions end up outputting to stdout 🙈 (https://github.com/docker-library/wordpress/issues/669#issuecomment-993945967) out="$(php -r 'exit(0);')"; \