From 0ccb38f45ae1fe9c46123d389b53ff4b7f749702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:07:07 +0200 Subject: [PATCH 1/3] bugfix: temporarily copy some files required by `phpize` during container setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/oerdnj/deb.sury.org/issues/2025 Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7c1eeaf..39b647b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -228,6 +228,14 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2) && apt autoremove -y \ && apt clean +# Temporary fix for https://github.com/laminas/laminas-continuous-integration-action/issues/188 +RUN cp \ + /usr/share/libtool/build-aux/config.sub \ + /usr/share/libtool/build-aux/config.guess \ + /usr/share/libtool/build-aux/ltmain.sh \ + /usr/bin/shtool \ + /usr/lib/php/20230831/build + # Build/install static modules that do not have packages COPY mods-available /mods-available COPY mods-install /mods-install @@ -265,7 +273,7 @@ COPY composer.json \ RUN cd /tools \ # Install `ext-bcmath` as it seems to be a requirement for `roave/backward-compatibility-check` - && apt install -y php-bcmath php8.3-bcmath \ + && apt install -y php-bcmath \ && composer install \ --classmap-authoritative From 907ce3cfab3334917ce0b8f04a4a0ffb80a32d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:19:50 +0200 Subject: [PATCH 2/3] qa: re-order composer installation and default PHP version handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current PHP default version was determine from the `composer.json` **after** `composer install` was called. With `composer install` (prior setting default PHP version) that will be the last installed PHP version via `apt`. This reorder should actually ensure that we do not accidentally have a newer version used to install composer dependencies. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39b647b..45c136c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -271,22 +271,22 @@ COPY composer.json \ composer.lock \ /tools/ -RUN cd /tools \ - # Install `ext-bcmath` as it seems to be a requirement for `roave/backward-compatibility-check` - && apt install -y php-bcmath \ - && composer install \ - --classmap-authoritative - # Set default PHP version based on the `composer.json` `config.platform.php` setting RUN export DEFAULT_PHP_VERSION=$(jq -r '.config.platform.php | sub("(?[0-9.]).99$"; "\(.minor)")' /tools/composer.json) \ - # Cleanup composer files from external tools folder - && rm /tools/composer.* \ && update-alternatives --set php /usr/bin/php$DEFAULT_PHP_VERSION \ && update-alternatives --set phpize /usr/bin/phpize$DEFAULT_PHP_VERSION \ && update-alternatives --set php-config /usr/bin/php-config$DEFAULT_PHP_VERSION \ && update-alternatives --set phpdbg /usr/bin/phpdbg$DEFAULT_PHP_VERSION \ && echo "DEFAULT_PHP_VERSION=${DEFAULT_PHP_VERSION}" >> /etc/environment +RUN cd /tools \ + # Install `ext-bcmath` as it seems to be a requirement for `roave/backward-compatibility-check` + && apt install -y php-bcmath \ + && composer install \ + --classmap-authoritative \ + # Cleanup composer files from external tools folder + && rm /tools/composer.* \ + # Copy staabm/annotate-pull-request-from-checkstyle to external-tools stage RUN ln -s /tools/vendor/bin/cs2pr /usr/local/bin/cs2pr From 7a5bb2a05eebb4cd6e821a0840d7410ba7289125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:33:09 +0200 Subject: [PATCH 3/3] bugfix: remove trailing backslash to avoid appending the upcoming `RUN` command to the `rm` command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 45c136c..fa3b165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -285,7 +285,7 @@ RUN cd /tools \ && composer install \ --classmap-authoritative \ # Cleanup composer files from external tools folder - && rm /tools/composer.* \ + && rm /tools/composer.* # Copy staabm/annotate-pull-request-from-checkstyle to external-tools stage RUN ln -s /tools/vendor/bin/cs2pr /usr/local/bin/cs2pr