From cfa74c52be790c3314b5d13d01f0823023c6e7ef Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 7 Aug 2024 20:37:55 +0200 Subject: [PATCH 01/14] Upgrade libcmark from 0.31.0 to 0.31.1 (#952) --- install-php-extensions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-php-extensions b/install-php-extensions index d0b97def..bb6b9230 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -2869,7 +2869,7 @@ installRemoteModule() { if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then installRemoteModule_tmp=0.29.0 else - installRemoteModule_tmp=0.31.0 + installRemoteModule_tmp=0.31.1 fi cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)" make -s -j$(getProcessorCount) cmake_build From 3e2b610d74552d6e0464abb5945b56983036a6d6 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 8 Aug 2024 09:43:34 +0200 Subject: [PATCH 02/14] Fix installing gd and vips at the same time (#955) --- install-php-extensions | 61 +++++++++++++++++++++++++++----------- scripts/ci-test-extensions | 32 +++++++++++++------- 2 files changed, 65 insertions(+), 28 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index bb6b9230..d4f3ef59 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -662,9 +662,11 @@ expandASpellDictionaries() { # PACKAGES_PERSISTENT_PRE the list of packages required at runtume that are already installed # PACKAGES_VOLATILE the list of packages required at compile time that must be installed # PACKAGES_PREVIOUS the list of packages (with their version) that are installed right now (calculated only on Debian and only if PACKAGES_PERSISTENT_NEW or PACKAGES_VOLATILE are not empty) +# COMPILE_LIBS buildRequiredPackageLists() { buildRequiredPackageLists_persistent='' buildRequiredPackageLists_volatile='' + COMPILE_LIBS='' case "$DISTRO" in alpine) apk update @@ -844,6 +846,18 @@ buildRequiredPackageLists() { case "${IPE_GD_WITHOUTAVIF:-}" in 1 | y* | Y*) ;; *) + if ! isLibaomInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libaom" + fi + if ! isLibdav1dInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libdav1d" + fi + if ! isLibyuvInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libyuv" + fi + if ! isLibavifInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libavif" + fi buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake nasm meson" ;; @@ -869,6 +883,18 @@ buildRequiredPackageLists() { case "${IPE_GD_WITHOUTAVIF:-}" in 1 | y* | Y*) ;; *) + if ! isLibaomInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libaom" + fi + if ! isLibdav1dInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libdav1d" + fi + if ! isLibyuvInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libyuv" + fi + if ! isLibavifInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libavif" + fi buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake nasm meson" ;; esac @@ -2472,6 +2498,22 @@ You may need to: EOT } +# Compile the libraries specified in the COMPILE_LIBS variable +compileLibs() { + if stringInList libaom "$COMPILE_LIBS"; then + installLibaom + fi + if stringInList libdav1d "$COMPILE_LIBS"; then + installLibdav1d + fi + if stringInList libyuv "$COMPILE_LIBS"; then + installLibyuv + fi + if stringInList libavif "$COMPILE_LIBS"; then + installLibavif + fi +} + # Install a bundled PHP module given its handle # # Arguments: @@ -2568,23 +2610,6 @@ EOF ;; esac if test $installBundledModule_tmp -eq 0; then - case "${IPE_GD_WITHOUTAVIF:-}" in - 1 | y* | Y*) ;; - *) - if ! isLibaomInstalled; then - installLibaom - fi - if ! isLibdav1dInstalled; then - installLibdav1d - fi - if ! isLibyuvInstalled; then - installLibyuv - fi - if ! isLibavifInstalled; then - installLibavif - fi - ;; - esac if isLibaomInstalled && isLibdav1dInstalled && isLibyuvInstalled && isLibavifInstalled; then installBundledModule_tmp=1 fi @@ -4829,6 +4854,8 @@ if test $USE_PICKLE -gt 1; then buildPickle fi +compileLibs + for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do case "$PHP_MODULE_TO_INSTALL" in @fix_letsencrypt) diff --git a/scripts/ci-test-extensions b/scripts/ci-test-extensions index 5ef6ff9c..e443cc32 100755 --- a/scripts/ci-test-extensions +++ b/scripts/ci-test-extensions @@ -127,13 +127,20 @@ filterUnsupportedExensionsForDistro() { ;; esac - for filterUnsupportedExensionsForDistro_extension in $EXTENSIONS_TO_BE_TESTED; do - if stringInList "!$IPETEST_DOCKER_DISTRO" "$(cat "$filterUnsupportedExensionsForDistro_reqs" | grep -E "^$filterUnsupportedExensionsForDistro_extension[ \t]")"; then - printf 'Note: extension "%s" is not supported for distro "%s"\n' "$filterUnsupportedExensionsForDistro_extension" "$IPETEST_DOCKER_DISTRO" - elif stringInList "!$filterUnsupportedExensionsForDistro_baseDistro" "$(cat "$filterUnsupportedExensionsForDistro_reqs" | grep -E "^$filterUnsupportedExensionsForDistro_extension[ \t]")"; then - printf 'Note: extension "%s" is not supported for distro "%s"\n' "$filterUnsupportedExensionsForDistro_extension" "$filterUnsupportedExensionsForDistro_baseDistro" - else - filterUnsupportedExensionsForDistro_filtered="$filterUnsupportedExensionsForDistro_filtered $filterUnsupportedExensionsForDistro_extension" + for filterUnsupportedExensionsForDistro_extensions in $EXTENSIONS_TO_BE_TESTED; do + filterUnsupportedExensionsForDistro_ok=1 + IFS='+' + for filterUnsupportedExensionsForDistro_extension in $filterUnsupportedExensionsForDistro_extensions; do + if stringInList "!$IPETEST_DOCKER_DISTRO" "$(cat "$filterUnsupportedExensionsForDistro_reqs" | grep -E "^$filterUnsupportedExensionsForDistro_extension[ \t]")"; then + printf 'Note: extension "%s" is not supported for distro "%s"\n' "$filterUnsupportedExensionsForDistro_extension" "$IPETEST_DOCKER_DISTRO" + filterUnsupportedExensionsForDistro_ok=0 + elif stringInList "!$filterUnsupportedExensionsForDistro_baseDistro" "$(cat "$filterUnsupportedExensionsForDistro_reqs" | grep -E "^$filterUnsupportedExensionsForDistro_extension[ \t]")"; then + printf 'Note: extension "%s" is not supported for distro "%s"\n' "$filterUnsupportedExensionsForDistro_extension" "$filterUnsupportedExensionsForDistro_baseDistro" + filterUnsupportedExensionsForDistro_ok=0 + fi + done + if test $filterUnsupportedExensionsForDistro_ok -eq 1; then + filterUnsupportedExensionsForDistro_filtered="$filterUnsupportedExensionsForDistro_filtered $filterUnsupportedExensionsForDistro_extensions" fi done resetIFS @@ -164,10 +171,13 @@ getDockerImageName() { getDockerImageName_reqs="$CI_BUILD_DIR/data/special-requirements" if test -f "$getDockerImageName_reqs"; then IFS=' ' - for getDockerImageName_testExtension in $1; do - if test -n "$(cat "$getDockerImageName_reqs" | grep -E "^$getDockerImageName_testExtension[ \t]+zts[ \t]*$")"; then - getDockerImageName_suffix='zts' - fi + for getDockerImageName_testExtensions in $1; do + IFS='+' + for getDockerImageName_testExtension in $getDockerImageName_testExtensions; do + if test -n "$(cat "$getDockerImageName_reqs" | grep -E "^$getDockerImageName_testExtension[ \t]+zts[ \t]*$")"; then + getDockerImageName_suffix='zts' + fi + done done fi getDockerImageName_imageName="$(printf 'php:%s-%s-%s' "$getDockerImageName_version" "$getDockerImageName_suffix" "$IPETEST_DOCKER_DISTRO")" From 258090fa152e59b4a2bee18006152676661ba421 Mon Sep 17 00:00:00 2001 From: Martijn van de Beek Date: Fri, 9 Aug 2024 09:49:44 +0200 Subject: [PATCH 03/14] Remove sqlsrv warning for ARM (#958) Microsoft ODBC 18 supports ARM architecture now. It has been tested succefully at our company. The warning is no longer needed. Co-authored-by: Martijn van de Beek --- README.md | 5 ++--- data/special-requirements | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07f7d090..64c6493c 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ install-php-extensions @fix_letsencrypt | pdo_oci | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | pdo_odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | pdo_pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_sqlsrv[*](#special-requirements-for-pdo_sqlsrv) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | +| pdo_sqlsrv | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | php_trie | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | pkcs11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | @@ -446,12 +446,11 @@ Some extensions have special requirements: | memprof | • Not available in `alpine3.9` docker images
• Not available in `alpine3.10` docker images
• Not available in `alpine3.11` docker images
• Not available in `alpine3.12` docker images
• Not available in `alpine3.13` docker images
• Not available in `alpine3.14` docker images
• Not available in `alpine3.15` docker images | | parallel | Requires images with PHP compiled with thread-safety enabled (`zts`) | | parle | Not available in `jessie` docker images | -| pdo_sqlsrv | Not available in ARM architectures | | pthreads | Requires images with PHP compiled with thread-safety enabled (`zts`) | | saxon | Not available in `alpine` docker images | | simdjson | • Not available in `jessie` docker images
• Not available in `stretch` docker images | | sodium | Not available in `jessie` docker images | -| sqlsrv | • Not available in `7.1-alpine3.9` docker images
• Not available in `7.1-alpine3.10` docker images
• Not available in ARM architectures | +| sqlsrv | • Not available in `7.1-alpine3.9` docker images
• Not available in `7.1-alpine3.10` docker images | | vips | • Not available in `alpine3.9` docker images
• Not available in `jessie` docker images | | wikidiff2 | • Not available in `jessie` docker images
• Not available in `stretch` docker images | diff --git a/data/special-requirements b/data/special-requirements index 45e2cef3..c3d62bf8 100644 --- a/data/special-requirements +++ b/data/special-requirements @@ -6,11 +6,10 @@ lz4 !jessie memprof !alpine3.9 !alpine3.10 !alpine3.11 !alpine3.12 !alpine3.13 !alpine3.14 !alpine3.15 parallel zts parle !jessie -pdo_sqlsrv !arm pthreads zts saxon !alpine simdjson !jessie !stretch sodium !jessie -sqlsrv !7.1-alpine3.9 !7.1-alpine3.10 !arm +sqlsrv !7.1-alpine3.9 !7.1-alpine3.10 vips !alpine3.9 !jessie wikidiff2 !jessie !stretch From 889b051c65df58ca35ee2b71a28d8b53ed2d717a Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 9 Aug 2024 15:32:26 +0200 Subject: [PATCH 04/14] AST was working with PHP 8.4alpha2, but not with alpha4 (#959) --- data/supported-extensions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/supported-extensions b/data/supported-extensions index 1176beba..2486c78c 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -1,7 +1,7 @@ amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 apcu 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 apcu_bc 7.0 7.1 7.2 7.3 7.4 -ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 bitset 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 blackfire 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 From 5369a5083f1b7f07336a57e5987b16d224339886 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 9 Aug 2024 13:32:40 +0000 Subject: [PATCH 05/14] [skip ci] Automatically update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64c6493c..07beb60e 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ install-php-extensions @fix_letsencrypt | amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | apcu | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | apcu_bc | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | -| ast | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | +| ast | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | bitset | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | blackfire | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | From 943f9662bf57900ff99b40324800de9dcf265522 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 12 Aug 2024 11:36:16 +0200 Subject: [PATCH 06/14] Re-add support for AST with PHP 8.4 (#961) --- data/supported-extensions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/supported-extensions b/data/supported-extensions index 2486c78c..1176beba 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -1,7 +1,7 @@ amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 apcu 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 apcu_bc 7.0 7.1 7.2 7.3 7.4 -ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 +ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 bitset 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 blackfire 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 From 09aee3182eb4f8fd52d2abbfdee38e271350701c Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 12 Aug 2024 09:36:28 +0000 Subject: [PATCH 07/14] [skip ci] Automatically update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07beb60e..64c6493c 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ install-php-extensions @fix_letsencrypt | amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | apcu | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | apcu_bc | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | -| ast | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | +| ast | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | bitset | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | blackfire | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | From d8a138cd641de8e8a5d7058d6a37c2d970a912fb Mon Sep 17 00:00:00 2001 From: Shin <2082119+shinsenter@users.noreply.github.com> Date: Wed, 14 Aug 2024 07:27:48 +0900 Subject: [PATCH 08/14] Simplify Dockerfile (#960) * Simplify Dockerfile * Update test-dockerfile.yml --- .github/workflows/test-dockerfile.yml | 9 +++++++-- Dockerfile | 11 +++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-dockerfile.yml b/.github/workflows/test-dockerfile.yml index 31c71a67..59fb05e1 100644 --- a/.github/workflows/test-dockerfile.yml +++ b/.github/workflows/test-dockerfile.yml @@ -22,11 +22,16 @@ jobs: run: docker save --output /tmp/image.tar test:latest - name: Extract layer - run: tar -C /tmp -x -f /tmp/image.tar --wildcards '*layer.tar' --strip-components=1 + run: | + tar -C /tmp -x -f /tmp/image.tar --strip-components=1 + if [ ! -d /tmp/sha256 ]; then + echo 'Cannot extract docker archive.' + exit 1 + fi - name: Check layer contents run: | - ENTRY="$(tar -v -t -f /tmp/layer.tar --wildcards '*bin/install-php-extensions')" + ENTRY="$(find /tmp/sha256 -type f -exec tar -vtf {} \; 2>/dev/null | grep install-php-extensions)" if [ -z "$ENTRY" ]; then echo 'File not found' exit 1 diff --git a/Dockerfile b/Dockerfile index 0cbb001f..ae089a8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,6 @@ -FROM bash AS build - -COPY install-php-extensions /tmp/install-php-extensions -RUN chmod +x /tmp/install-php-extensions - FROM scratch -LABEL org.opencontainers.image.source="https://github.com/mlocati/docker-php-extension-installer" \ - org.opencontainers.image.licenses="MIT" +LABEL org.opencontainers.image.source="https://github.com/mlocati/docker-php-extension-installer" +LABEL org.opencontainers.image.licenses="MIT" -COPY --from=build /tmp/install-php-extensions /usr/bin/install-php-extensions +COPY --chmod=755 install-php-extensions /usr/bin/install-php-extensions From a603c36914ed9d9633ae8e98d0f3b80df0c1c7d2 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 19 Aug 2024 09:28:36 +0200 Subject: [PATCH 09/14] openswoole, swoole, uopz: drop support for PHP 8.4 (#962) --- data/supported-extensions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/supported-extensions b/data/supported-extensions index 1176beba..8114dd9e 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -67,7 +67,7 @@ oci8 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 odbc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 opcache 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 opencensus 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 -openswoole 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +openswoole 7.2 7.3 7.4 8.0 8.1 8.2 8.3 opentelemetry 8.0 8.1 8.2 8.3 8.4 parallel 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 parle 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 @@ -111,7 +111,7 @@ spx 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 sqlsrv 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 ssh2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 stomp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.2 8.3 8.4 -swoole 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +swoole 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 sybase_ct 5.5 5.6 sync 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 sysvmsg 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 @@ -121,7 +121,7 @@ tensor 7.2 7.3 7.4 8.0 8.1 8.2 tideways 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 tidy 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 timezonedb 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 -uopz 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +uopz 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 uploadprogress 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 uuid 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 uv 8.0 8.1 8.2 8.3 8.4 From e3fd834292d91f06e0da97b8931cda755c5952b0 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 19 Aug 2024 07:28:49 +0000 Subject: [PATCH 10/14] [skip ci] Automatically update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 64c6493c..f8a14df1 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ install-php-extensions @fix_letsencrypt | odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | opcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | opencensus | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | -| openswoole | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| openswoole | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | opentelemetry | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | parallel[*](#special-requirements-for-parallel) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | parle[*](#special-requirements-for-parle) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | @@ -314,7 +314,7 @@ install-php-extensions @fix_letsencrypt | sqlsrv[*](#special-requirements-for-sqlsrv) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | ssh2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | stomp | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| swoole | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| swoole | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | sybase_ct | | | | | | | | | | | ✓ | ✓ | | sync | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | sysvmsg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -324,7 +324,7 @@ install-php-extensions @fix_letsencrypt | tideways | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | timezonedb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| uopz | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| uopz | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | uuid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | uv | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | From caa12a3846e9c8c6d47ea3a9b1c045cedf9cc4da Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 19 Aug 2024 18:31:35 +0200 Subject: [PATCH 11/14] pdo_firebird: install Firebird 5 instead of 2.5 on Alpine with PHP 8.4 (#963) --- install-php-extensions | 106 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index d4f3ef59..1c63237d 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1010,6 +1010,9 @@ buildRequiredPackageLists() { ;; interbase@alpine) buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev ncurses-dev" + if ! isFirebirdInstalled; then + COMPILE_LIBS="$COMPILE_LIBS firebird" + fi ;; interbase@debian) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2" @@ -1185,6 +1188,20 @@ buildRequiredPackageLists() { ;; pdo_firebird@alpine) buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev ncurses-dev" + if ! isFirebirdInstalled; then + COMPILE_LIBS="$COMPILE_LIBS firebird" + if test $PHP_MAJMIN_VERSION -ge 804; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev" + if ! isLibTommathInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libtommath" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake" + fi + if ! isLibTomcryptInstalled; then + COMPILE_LIBS="$COMPILE_LIBS libtomcrypt" + fi + fi + fi ;; pdo_firebird@debian) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2" @@ -2326,6 +2343,72 @@ installLibThai() { cd - >/dev/null } +isLibTommathInstalled() { + if test -f /usr/local/lib/libtommath.a && test -f /usr/local/include/tommath.h; then + return 0 + fi + return 1 +} + +installLibTommath() { + printf 'Installing libtommath\n' + installLibTommath_src="$(getPackageSource https://github.com/libtom/libtommath/releases/download/v1.3.0/ltm-1.3.0.tar.xz)" + mkdir -p "$installLibTommath_src/build" + cd -- "$installLibTommath_src/build" + CFLAGS='-fPIC' cmake -DCMAKE_BUILD_TYPE=Release .. + make -j$(getProcessorCount) + make install + cd - >/dev/null +} + +isLibTomcryptInstalled() { + if test -f /usr/local/lib/libtomcrypt.a && test -f /usr/local/include/tomcrypt.h; then + return 0 + fi + return 1 +} + +installLibTomcrypt() { + printf 'Installing libtomcrypt\n' + installLibTomcrypt_src="$(getPackageSource https://github.com/libtom/libtomcrypt/releases/download/v1.18.2/crypt-1.18.2.tar.xz)" + cd -- "$installLibTomcrypt_src" + CFLAGS='-fPIC' make -j$(getProcessorCount) + make install +} + +isFirebirdInstalled() { + if test -f /usr/lib/libfbclient.so && test -f /usr/include/ibase.h; then + return 0 + fi + if test -d /tmp/src/firebird; then + return 0 + fi + return 1 +} + +installFirebird() { + printf 'Installing firebird\n' + if test $PHP_MAJMIN_VERSION -ge 804; then + installFirebird_src="$(getPackageSource https://github.com/FirebirdSQL/firebird/releases/download/v5.0.1/Firebird-5.0.1.1469-0-source.tar.xz)" + cd -- "$installFirebird_src" + ./configure --enable-client-only + make -j$(getProcessorCount) + cp -Rd gen/Release/firebird/include/* /usr/include + cp -Rd gen/Release/firebird/lib/* /usr/lib + cd - >/dev/null + else + mv "$(getPackageSource https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0.tar.bz2)" /tmp/src/firebird + cd /tmp/src/firebird + # Patch rwlock.h (this has been fixed in later release of firebird 3.x) + sed -i '194s/.*/#if 0/' src/common/classes/rwlock.h + ./configure --with-system-icu + # -j option can't be used: make targets must be compiled sequentially + make -s btyacc_binary gpre_boot libfbstatic libfbclient + cp gen/firebird/lib/libfbclient.so /usr/lib/ + ln -s /usr/lib/libfbclient.so /usr/lib/libfbclient.so.2 + cd - >/dev/null + fi +} # Install Composer installComposer() { installComposer_version="$(getWantedPHPModuleVersion @composer)" @@ -2512,6 +2595,15 @@ compileLibs() { if stringInList libavif "$COMPILE_LIBS"; then installLibavif fi + if stringInList libtommath "$COMPILE_LIBS"; then + installLibTommath + fi + if stringInList libtomcrypt "$COMPILE_LIBS"; then + installLibTomcrypt + fi + if stringInList firebird "$COMPILE_LIBS"; then + installFirebird + fi } # Install a bundled PHP module given its handle @@ -2645,19 +2737,9 @@ EOF interbase | pdo_firebird) case "$DISTRO" in alpine) - if ! test -d /tmp/src/firebird; then - mv "$(getPackageSource https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0.tar.bz2)" /tmp/src/firebird - cd /tmp/src/firebird - # Patch rwlock.h (this has been fixed in later release of firebird 3.x) - sed -i '194s/.*/#if 0/' src/common/classes/rwlock.h - ./configure --with-system-icu - # -j option can't be used: make targets must be compiled sequentially - make -s btyacc_binary gpre_boot libfbstatic libfbclient - cp gen/firebird/lib/libfbclient.so /usr/lib/ - ln -s /usr/lib/libfbclient.so /usr/lib/libfbclient.so.2 - cd - >/dev/null + if test $PHP_MAJMIN_VERSION -lt 804; then + CFLAGS='-I/tmp/src/firebird/src/jrd -I/tmp/src/firebird/src/include -I/tmp/src/firebird/src/include/gen' docker-php-ext-configure $1 fi - CFLAGS='-I/tmp/src/firebird/src/jrd -I/tmp/src/firebird/src/include -I/tmp/src/firebird/src/include/gen' docker-php-ext-configure $1 ;; esac ;; From 71ecd5d0ba211bb37c77f1704715045b1e327687 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 20 Aug 2024 12:28:09 +0200 Subject: [PATCH 12/14] Add support for phpy (#964) --- data/special-requirements | 1 + data/supported-extensions | 1 + install-php-extensions | 14 +++++++++++++ scripts/tests/phpy | 41 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100755 scripts/tests/phpy diff --git a/data/special-requirements b/data/special-requirements index c3d62bf8..f5a98d23 100644 --- a/data/special-requirements +++ b/data/special-requirements @@ -6,6 +6,7 @@ lz4 !jessie memprof !alpine3.9 !alpine3.10 !alpine3.11 !alpine3.12 !alpine3.13 !alpine3.14 !alpine3.15 parallel zts parle !jessie +phpy !buster pthreads zts saxon !alpine simdjson !jessie !stretch diff --git a/data/supported-extensions b/data/supported-extensions index 8114dd9e..806d27ff 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -82,6 +82,7 @@ pdo_pgsql 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 pdo_sqlsrv 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 pgsql 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 php_trie 7.3 7.4 8.0 8.1 8.2 8.3 8.4 +phpy 8.1 8.2 8.3 8.4 pkcs11 7.4 8.0 8.1 8.2 8.3 8.4 pq 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 propro 5.5 5.6 7.0 7.1 7.2 7.3 7.4 diff --git a/install-php-extensions b/install-php-extensions index 1c63237d..2de0b1eb 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1218,6 +1218,20 @@ buildRequiredPackageLists() { php_trie@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++" ;; + phpy@alpine) + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent python3" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile python3-dev" + ;; + phpy@debian) + if test $DISTRO_VERSION_NUMBER -ge 12; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpython3.11" + elif test $DISTRO_VERSION_NUMBER -ge 11; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpython3.9" + else + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpython3.7" + fi + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile python3-dev" + ;; pkcs11@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent softhsm" ;; diff --git a/scripts/tests/phpy b/scripts/tests/phpy new file mode 100755 index 00000000..74909611 --- /dev/null +++ b/scripts/tests/phpy @@ -0,0 +1,41 @@ +#!/usr/bin/env php +uname(); + $unameType = gettype($uname); + if ($unameType !== 'object') { + throw new RuntimeException("os::uname() should return an object, not {$unameType}"); + } + $unameClass = get_class($uname); + if ($unameClass !== 'PyTuple') { + throw new RuntimeException("os::uname() should return a PyTuple instance, not {$unameClass}"); + } + if ($uname->count() < 5) { + throw new RuntimeException('os::uname() should return a PyTuple with at leasd 5 elements'); + } + $sysname = (string) $uname[0]; + $sysNames = ['Linux']; + if (!in_array($sysname, $sysNames, true)) { + throw new RuntimeException("os::uname()[0] should be '" . implode("' or '", $sysNames) . "', '{$sysname}' received"); + } +} catch (RuntimeException $x) { + fwrite(STDERR, rtrim($x->getMessage()) . "\n"); + exit(1); +} +echo "phpy seems ok.\n"; From 2604088666e12c211d8141576a98d2d7d7a06254 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 20 Aug 2024 10:28:22 +0000 Subject: [PATCH 13/14] [skip ci] Automatically update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f8a14df1..3add52ea 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,7 @@ install-php-extensions @fix_letsencrypt | pdo_sqlsrv | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | php_trie | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | +| phpy[*](#special-requirements-for-phpy) | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | pkcs11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | pq | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | propro | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -348,7 +349,7 @@ install-php-extensions @fix_letsencrypt | zookeeper | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -*Number of supported extensions: 146* +*Number of supported extensions: 147* PS: the pre-installed PHP extensions are excluded from this list. @@ -446,6 +447,7 @@ Some extensions have special requirements: | memprof | • Not available in `alpine3.9` docker images
• Not available in `alpine3.10` docker images
• Not available in `alpine3.11` docker images
• Not available in `alpine3.12` docker images
• Not available in `alpine3.13` docker images
• Not available in `alpine3.14` docker images
• Not available in `alpine3.15` docker images | | parallel | Requires images with PHP compiled with thread-safety enabled (`zts`) | | parle | Not available in `jessie` docker images | +| phpy | Not available in `buster` docker images | | pthreads | Requires images with PHP compiled with thread-safety enabled (`zts`) | | saxon | Not available in `alpine` docker images | | simdjson | • Not available in `jessie` docker images
• Not available in `stretch` docker images | From ac4b7672362a4e6cee18baec11f9383b2151cc44 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 21 Aug 2024 08:37:23 +0200 Subject: [PATCH 14/14] Upgrade shfmt from 3.7.0 to 3.9.0 (#965) --- .github/workflows/test-extensions.yml | 4 ++-- scripts/lint | 2 +- scripts/lint.bat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-extensions.yml b/.github/workflows/test-extensions.yml index f35486ed..1d233b8d 100644 --- a/.github/workflows/test-extensions.yml +++ b/.github/workflows/test-extensions.yml @@ -31,10 +31,10 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: "1.21.0" + go-version: ">=1.22.6" cache: false - name: Install shfmt - run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0 + run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@v3.9.0 - name: Checkout uses: actions/checkout@v4 - name: Check coding style diff --git a/scripts/lint b/scripts/lint index de083544..6c176eb8 100755 --- a/scripts/lint +++ b/scripts/lint @@ -11,7 +11,7 @@ echo '# Linting shell scripts' if ! docker --version >/dev/null 2>/dev/null; then echo 'Docker is not installed, or it is not running.' >&2 rc=1 -elif ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.7.0-alpine fix; then +elif ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.9.0-alpine fix; then echo 'ERROR!' >&2 rc=1 fi diff --git a/scripts/lint.bat b/scripts/lint.bat index eee8974f..0190967a 100644 --- a/scripts/lint.bat +++ b/scripts/lint.bat @@ -16,7 +16,7 @@ if errorlevel 1 ( echo Docker is not installed, or it's not running >&2 set rc=1 ) else ( - docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.7.0-alpine fix + docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.9.0-alpine fix if errorlevel 1 ( echo ERROR! >&2 set rc=1