From b20599074af3f1d3f8680db64715914c170477b0 Mon Sep 17 00:00:00 2001 From: 11ze Date: Sat, 6 Apr 2024 11:45:46 +0800 Subject: [PATCH] chore: merge upstrem/master into 11ze --- README.md | 293 +++++++++--------- docker-compose.sample.yml | 2 + env.sample | 3 + services/elasticsearch/jvm.options | 119 +++++++ services/elasticsearch/log4j2.properties | 43 +++ .../php/extensions/install-php-extensions | 166 ++++++---- .../php56/extensions/install-php-extensions | 166 ++++++---- .../php80/extensions/install-php-extensions | 166 ++++++---- 8 files changed, 654 insertions(+), 304 deletions(-) create mode 100644 services/elasticsearch/jvm.options create mode 100644 services/elasticsearch/log4j2.properties diff --git a/README.md b/README.md index a5f5c0f2..274b9043 100644 --- a/README.md +++ b/README.md @@ -175,151 +175,154 @@ install-php-extensions apcu -| Extension | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | -|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| apcu | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| apcu_bc | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| ast | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| bitset | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| blackfire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| bz2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| calendar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| cassandra[*](#special-requirements-for-cassandra) | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| cmark | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| csv | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | -| dba | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ddtrace[*](#special-requirements-for-ddtrace) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| decimal | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ds | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ecma_intl[*](#special-requirements-for-ecma_intl) | | | | | | | | | | ✓ | -| enchant | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ev | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| event | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| excimer | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| exif | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ffi | | | | | | | ✓ | ✓ | ✓ | ✓ | -| gd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| gearman | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | -| geoip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| geos[*](#special-requirements-for-geos) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| geospatial | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| gettext | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| gmagick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| gmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| gnupg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| grpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| http | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| igbinary | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| imagick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| imap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| inotify | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| interbase | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | -| intl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ion | | | | | | | | | ✓ | ✓ | -| ioncube_loader | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | -| jsmin | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| json_post | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| jsonpath | | | | | | | ✓ | ✓ | ✓ | ✓ | -| ldap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| luasandbox | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| lz4[*](#special-requirements-for-lz4) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| lzf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| mailparse | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| maxminddb | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| mcrypt | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| memcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| memcached[*](#special-requirements-for-memcached) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| memprof[*](#special-requirements-for-memprof) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| mongo | ✓ | ✓ | | | | | | | | | -| mongodb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| mosquitto | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| msgpack | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| mssql | ✓ | ✓ | | | | | | | | | -| mysql | ✓ | ✓ | | | | | | | | | -| mysqli | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| oauth | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| oci8 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| opcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| opencensus | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| openswoole | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| opentelemetry | | | | | | | | ✓ | ✓ | ✓ | -| parallel[*](#special-requirements-for-parallel) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| parle[*](#special-requirements-for-parle) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pcntl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pcov | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_dblib | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_firebird | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_mysql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_oci | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pdo_sqlsrv[*](#special-requirements-for-pdo_sqlsrv) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| php_trie | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | -| pkcs11 | | | | | | | ✓ | ✓ | ✓ | ✓ | -| pq | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| propro | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | -| protobuf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pspell | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| pthreads[*](#special-requirements-for-pthreads) | ✓ | ✓ | ✓ | | | | | | | | -| raphf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| rdkafka | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| recode | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | -| redis | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| relay | | | | | | | ✓ | ✓ | ✓ | ✓ | -| seasclick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| seaslog | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| shmop | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| simdjson[*](#special-requirements-for-simdjson) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| smbclient | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| snappy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| snmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| snuffleupagus | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| soap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sockets | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sodium[*](#special-requirements-for-sodium) | | ✓ | ✓ | ✓ | | | | | | | -| solr | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sourceguardian | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| spx | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sqlsrv[*](#special-requirements-for-sqlsrv) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ssh2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| stomp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | ✓ | -| swoole | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sybase_ct | ✓ | ✓ | | | | | | | | | -| sync | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sysvmsg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sysvsem | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| sysvshm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| tensor[*](#special-requirements-for-tensor) | | | | | ✓ | ✓ | ✓ | ✓ | | | -| tideways | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| timezonedb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| uopz | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| uuid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| uv | | | | | | | | ✓ | ✓ | ✓ | -| vips[*](#special-requirements-for-vips) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| wddx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | -| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xdiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xhprof | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xlswriter | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xmldiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xmlrpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| xsl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| yac | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| yaml | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| yar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | -| zephir_parser | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| zip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| zmq | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| zookeeper | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - -*Number of supported extensions: 141* +| Extension | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | PHP 8.3 | +|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| apcu | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| apcu_bc | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| ast | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| bitset | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| blackfire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| bz2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| calendar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| cassandra[*](#special-requirements-for-cassandra) | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| cmark | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| csv | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| dba | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ddtrace[*](#special-requirements-for-ddtrace) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| decimal | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ds | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ecma_intl[*](#special-requirements-for-ecma_intl) | | | | | | | | | | ✓ | ✓ | +| enchant | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ev | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| event | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| excimer | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| exif | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ffi | | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | +| ftp | | | | | | | | | | ✓ | ✓ | +| gd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| gearman | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | +| geoip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| geos[*](#special-requirements-for-geos) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| geospatial | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| gettext | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| gmagick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| gmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| gnupg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| grpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| http | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| igbinary | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| imagick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | +| imap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| inotify | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| interbase | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | +| intl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ion | | | | | | | | | ✓ | ✓ | ✓ | +| ioncube_loader | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | +| jsmin | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| json_post | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| jsonpath | | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | +| ldap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| luasandbox | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| lz4[*](#special-requirements-for-lz4) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| lzf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| mailparse | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| maxminddb | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| mcrypt | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| memcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| memcached | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| memprof[*](#special-requirements-for-memprof) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| mongo | ✓ | ✓ | | | | | | | | | | +| mongodb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| mosquitto | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| msgpack | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| mssql | ✓ | ✓ | | | | | | | | | | +| mysql | ✓ | ✓ | | | | | | | | | | +| mysqli | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| oauth | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| oci8 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| opcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| opencensus | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| openswoole | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| opentelemetry | | | | | | | | ✓ | ✓ | ✓ | ✓ | +| parallel[*](#special-requirements-for-parallel) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| parle[*](#special-requirements-for-parle) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pcntl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pcov | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_dblib | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_firebird | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_mysql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_oci | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_odbc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pdo_sqlsrv[*](#special-requirements-for-pdo_sqlsrv) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| php_trie | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pkcs11 | | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | +| pq | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| propro | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | +| protobuf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pspell | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| pthreads[*](#special-requirements-for-pthreads) | ✓ | ✓ | ✓ | | | | | | | | | +| raphf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| rdkafka | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| recode | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | +| redis | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| relay | | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | +| saxon[*](#special-requirements-for-saxon) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| seasclick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| seaslog | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| shmop | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| simdjson[*](#special-requirements-for-simdjson) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| smbclient | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| snappy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| snmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| snuffleupagus | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| soap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sockets | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sodium[*](#special-requirements-for-sodium) | | ✓ | ✓ | ✓ | | | | | | | | +| solr | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sourceguardian | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | +| spx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sqlsrv[*](#special-requirements-for-sqlsrv) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ssh2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| stomp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | +| swoole | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sybase_ct | ✓ | ✓ | | | | | | | | | | +| sync | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sysvmsg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sysvsem | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| sysvshm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| tensor | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | +| tideways | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| timezonedb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| uopz | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| uuid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| uv | | | | | | | | ✓ | ✓ | ✓ | ✓ | +| vips[*](#special-requirements-for-vips) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| vld | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| wddx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | +| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xdiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xhprof | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xlswriter | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xmldiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xmlrpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| xsl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| yac | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| yaml | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| yar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | +| zephir_parser | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| zip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| zmq | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| zookeeper | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | +| zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | + +*Number of supported extensions: 144* 此扩展来自[https://github.com/mlocati/docker-php-extension-installer](https://github.com/mlocati/docker-php-extension-installer) 参考示例文件 diff --git a/docker-compose.sample.yml b/docker-compose.sample.yml index e875af25..c086e4e8 100644 --- a/docker-compose.sample.yml +++ b/docker-compose.sample.yml @@ -289,6 +289,8 @@ services: # volumes: # - ${DATA_DIR}/esdata:/usr/share/elasticsearch/data # - ${ELASTICSEARCH_CONF_FILE}:/usr/share/elasticsearch/config/elasticsearch.yml +# - ${ELASTICSEARCH_JVM_CONF_FILE}:/usr/share/elasticsearch/config/jvm.options +# - ${ELASTICSEARCH_LOG4J2_CONF_FILE}:/usr/share/elasticsearch/config/log4j2.properties # hostname: elasticsearch # restart: always # ports: diff --git a/env.sample b/env.sample index 78498e2a..2b5fe93d 100644 --- a/env.sample +++ b/env.sample @@ -195,6 +195,9 @@ MONGODB_INITDB_ROOT_PASSWORD=123456 # ELASTICSEARCH_VERSION=7.1.1 ELASTICSEARCH_CONF_FILE=./services/elasticsearch/elasticsearch.yml +ELASTICSEARCH_CONF_FILE=./services/elasticsearch/elasticsearch.yml +ELASTICSEARCH_JVM_CONF_FILE=./services/elasticsearch/jvm.options +ELASTICSEARCH_LOG4J2_CONF_FILE=./services/elasticsearch/log4j2.properties ELASTICSEARCH_HOST_PORT_C=9200 ELASTICSEARCH_HOST_PORT_S=9300 ELASTICSEARCH_PLUGINS=analysis-ik diff --git a/services/elasticsearch/jvm.options b/services/elasticsearch/jvm.options new file mode 100644 index 00000000..0e2f13b9 --- /dev/null +++ b/services/elasticsearch/jvm.options @@ -0,0 +1,119 @@ +## JVM configuration + +################################################################ +## IMPORTANT: JVM heap size +################################################################ +## +## You should always set the min and max JVM heap +## size to the same value. For example, to set +## the heap to 4 GB, set: +## +## -Xms4g +## -Xmx4g +## +## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html +## for more information +## +################################################################ + +# Xms represents the initial size of total heap space +# Xmx represents the maximum size of total heap space + +-Xms1g +-Xmx1g + +################################################################ +## Expert settings +################################################################ +## +## All settings below this section are considered +## expert settings. Don't tamper with them unless +## you understand what you are doing +## +################################################################ + +## GC configuration +-XX:+UseConcMarkSweepGC +-XX:CMSInitiatingOccupancyFraction=75 +-XX:+UseCMSInitiatingOccupancyOnly + +## G1GC Configuration +# NOTE: G1GC is only supported on JDK version 10 or later. +# To use G1GC uncomment the lines below. +# 10-:-XX:-UseConcMarkSweepGC +# 10-:-XX:-UseCMSInitiatingOccupancyOnly +# 10-:-XX:+UseG1GC +# 10-:-XX:InitiatingHeapOccupancyPercent=75 + +## DNS cache policy +# cache ttl in seconds for positive DNS lookups noting that this overrides the +# JDK security property networkaddress.cache.ttl; set to -1 to cache forever +-Des.networkaddress.cache.ttl=60 +# cache ttl in seconds for negative DNS lookups noting that this overrides the +# JDK security property networkaddress.cache.negative ttl; set to -1 to cache +# forever +-Des.networkaddress.cache.negative.ttl=10 + +## optimizations + +# pre-touch memory pages used by the JVM during initialization +-XX:+AlwaysPreTouch + +## basic + +# explicitly set the stack size +-Xss1m + +# set to headless, just in case +-Djava.awt.headless=true + +# ensure UTF-8 encoding by default (e.g. filenames) +-Dfile.encoding=UTF-8 + +# use our provided JNA always versus the system one +-Djna.nosys=true + +# turn off a JDK optimization that throws away stack traces for common +# exceptions because stack traces are important for debugging +-XX:-OmitStackTraceInFastThrow + +# flags to configure Netty +-Dio.netty.noUnsafe=true +-Dio.netty.noKeySetOptimization=true +-Dio.netty.recycler.maxCapacityPerThread=0 + +# log4j 2 +-Dlog4j.shutdownHookEnabled=false +-Dlog4j2.disable.jmx=true + +-Djava.io.tmpdir=${ES_TMPDIR} + +## heap dumps + +# generate a heap dump when an allocation from the Java heap fails +# heap dumps are created in the working directory of the JVM +-XX:+HeapDumpOnOutOfMemoryError + +# specify an alternative path for heap dumps; ensure the directory exists and +# has sufficient space +-XX:HeapDumpPath=data + +# specify an alternative path for JVM fatal error logs +-XX:ErrorFile=logs/hs_err_pid%p.log + +## JDK 8 GC logging + +8:-XX:+PrintGCDetails +8:-XX:+PrintGCDateStamps +8:-XX:+PrintTenuringDistribution +8:-XX:+PrintGCApplicationStoppedTime +8:-Xloggc:logs/gc.log +8:-XX:+UseGCLogFileRotation +8:-XX:NumberOfGCLogFiles=32 +8:-XX:GCLogFileSize=64m + +# JDK 9+ GC logging +9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m +# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise +# time/date parsing will break in an incompatible way for some date patterns and locals +9-:-Djava.locale.providers=COMPAT diff --git a/services/elasticsearch/log4j2.properties b/services/elasticsearch/log4j2.properties new file mode 100644 index 00000000..73420a04 --- /dev/null +++ b/services/elasticsearch/log4j2.properties @@ -0,0 +1,43 @@ +status = error + +# log action execution errors for easier debugging +logger.action.name = org.elasticsearch.action +logger.action.level = debug + +appender.rolling.type = Console +appender.rolling.name = rolling +appender.rolling.layout.type = ESJsonLayout +appender.rolling.layout.type_name = server + +rootLogger.level = info +rootLogger.appenderRef.rolling.ref = rolling + +appender.deprecation_rolling.type = Console +appender.deprecation_rolling.name = deprecation_rolling +appender.deprecation_rolling.layout.type = ESJsonLayout +appender.deprecation_rolling.layout.type_name = deprecation + +logger.deprecation.name = org.elasticsearch.deprecation +logger.deprecation.level = warn +logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling +logger.deprecation.additivity = false + +appender.index_search_slowlog_rolling.type = Console +appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling +appender.index_search_slowlog_rolling.layout.type = ESJsonLayout +appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog + +logger.index_search_slowlog_rolling.name = index.search.slowlog +logger.index_search_slowlog_rolling.level = trace +logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling +logger.index_search_slowlog_rolling.additivity = false + +appender.index_indexing_slowlog_rolling.type = Console +appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling +appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout +appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog + +logger.index_indexing_slowlog.name = index.indexing.slowlog.index +logger.index_indexing_slowlog.level = trace +logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling +logger.index_indexing_slowlog.additivity = false diff --git a/services/php/extensions/install-php-extensions b/services/php/extensions/install-php-extensions index eca7df2f..5e320363 100644 --- a/services/php/extensions/install-php-extensions +++ b/services/php/extensions/install-php-extensions @@ -357,74 +357,81 @@ getModuleSourceCodePath() { fi } -# Get the wanted PHP module version, resolving it if it starts with '^' +# Get the actual PHP module version, resolving it if it starts with '^' # # Arguments: -# $1: the name of the module to be normalized +# $1: the name of the module +# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion) # # Output: # The version to be used -resolveWantedPHPModuleVersion() { - resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")" - resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}" - if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then - printf '%s' "$resolveWantedPHPModuleVersion_raw" +resolvePHPModuleVersion() { + resolvePHPModuleVersion_module="$1" + if test $# -lt 2; then + resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")" + else + resolvePHPModuleVersion_raw="$2" + fi + resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}" + if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then + printf '%s' "$resolvePHPModuleVersion_raw" return fi - case "$resolveWantedPHPModuleVersion_afterCaret" in + case "$resolvePHPModuleVersion_afterCaret" in ?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable) - resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}" - resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}" + resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}" + resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}" ;; *) - resolveWantedPHPModuleVersion_wantedStability='' - resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret" + resolvePHPModuleVersion_wantedStability='' + resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret" ;; esac - resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")" + resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")" + resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")" # remove line endings, collapse spaces - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" # one line per release (eg 1.2.3stable) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#$resolveWantedPHPModuleVersion_wantedStability")" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "$resolvePHPModuleVersion_wantedStability")" fi # remove everything's up to '' (included) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*##')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*##')" # keep just the versions - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)" resetIFS - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then # Example: looking for 1.0, found 1.0.1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi done - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then continue fi - if test -z "$resolveWantedPHPModuleVersion_suffix"; then + if test -z "$resolvePHPModuleVersion_suffix"; then # Example: looking for 1.0, found exactly it - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi - case "$resolveWantedPHPModuleVersion_suffix" in + case "$resolvePHPModuleVersion_suffix" in [0-9]) # Example: looking for 1.1, but this is 1.10 ;; *) # Example: looking for 1.1, this is 1.1rc1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return ;; esac done - printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2 + printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2 exit 1 } @@ -443,7 +450,8 @@ resolvePeclStabilityVersion() { return ;; esac - peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt" + resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")" + peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt" if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then peclStabilityFlagToVersion_result='' fi @@ -811,6 +819,12 @@ buildRequiredPackageLists() { ffi@debian) buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev" ;; + ftp@alpine) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; + ftp@debian) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; gd@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev" @@ -848,7 +862,10 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev" if test $PHP_MAJMIN_VERSION -ge 801; then - if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then + if test $DISTRO_VERSION_NUMBER -ge 12; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev" + elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then case "${IPE_GD_WITHOUTAVIF:-}" in 1 | y* | Y*) ;; *) @@ -1985,11 +2002,11 @@ installOracleInstantClient() { mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH" echo 'done.' fi - if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then + if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version" installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)" ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" - UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'" + UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk" echo 'done.' fi case "$DISTRO" in @@ -2039,7 +2056,7 @@ installMicrosoftSqlServerODBC() { alpine) rm -rf /tmp/src/msodbcsql.apk if test $PHP_MAJMIN_VERSION -le 703; then - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.5.1-1_amd64.apk else case $(uname -m) in aarch64 | arm64 | armv8) @@ -2049,7 +2066,7 @@ installMicrosoftSqlServerODBC() { installMicrosoftSqlServerODBC_arch=amd64 ;; esac - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.2.1-1_$installMicrosoftSqlServerODBC_arch.apk fi printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk rm -rf /tmp/src/msodbcsql.apk @@ -2088,7 +2105,7 @@ installMicrosoftSqlServerODBC() { # 0 (true) # 1 (false) isLibaomInstalled() { - if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then + if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then return 1 fi if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then @@ -2100,7 +2117,18 @@ isLibaomInstalled() { # Install libaom installLibaom() { printf 'Installing libaom\n' - installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)" + installLibaom_version=3.8.1 + case "$DISTRO_VERSION" in + debian@10) + case $(uname -m) in + aarch* | arm*) + #see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543 + installLibaom_version=3.5.0 + ;; + esac + ;; + esac + installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)" mkdir -- "$installLibaom_dir/my.build" cd -- "$installLibaom_dir/my.build" cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib .. @@ -2127,7 +2155,7 @@ isLibdav1dInstalled() { # Install libdav1d installLibdav1d() { printf 'Installing libdav1d\n' - installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)" + installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)" mkdir -- "$installLibdav1d_dir/build" cd -- "$installLibdav1d_dir/build" meson --buildtype release -Dprefix=/usr .. @@ -2145,7 +2173,7 @@ installLibdav1d() { # 0 (true) # 1 (false) isLibyuvInstalled() { - if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then + if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then return 1 fi if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then @@ -2157,7 +2185,7 @@ isLibyuvInstalled() { # Install libyuv installLibyuv() { printf 'Installing libyuv\n' - installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)" + installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)" mkdir -- "$installLibyuv_dir/build" cd -- "$installLibyuv_dir/build" cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. .. @@ -2183,7 +2211,7 @@ isLibavifInstalled() { # Install libavif installLibavif() { printf 'Installing libavif\n' - installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)" + installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)" mkdir -- "$installLibavif_dir/build" cd -- "$installLibavif_dir/build" cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib @@ -2401,6 +2429,9 @@ EOF cd - >/dev/null fi ;; + ftp) + docker-php-ext-configure ftp --with-openssl-dir=/usr + ;; gd) if test $PHP_MAJMIN_VERSION -le 506; then docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir @@ -2418,6 +2449,11 @@ EOF installBundledModule_tmp=1 fi ;; + debian) + if test $DISTRO_VERSION_NUMBER -ge 12; then + installBundledModule_tmp=1 + fi + ;; esac if test $installBundledModule_tmp -eq 0; then case "${IPE_GD_WITHOUTAVIF:-}" in @@ -2623,7 +2659,7 @@ getPackageSource() { installRemoteModule() { installRemoteModule_module="$1" printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module" - installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")" + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")" installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")" rm -rf "$CONFIGURE_FILE" installRemoteModule_manuallyInstalled=0 @@ -2716,7 +2752,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.30.3 + installRemoteModule_tmp=0.31.0 fi cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)" make -s -j$(getProcessorCount) cmake_build @@ -2745,9 +2781,12 @@ installRemoteModule() { if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=0.75.0 - else - installCargo fi + else + installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")" + fi + if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then + installCargo fi ;; decimal) @@ -2949,6 +2988,12 @@ installRemoteModule() { fi fi ;; + imap) + # Include Kerberos Support + addConfigureOption with-kerberos yes + # Include SSL Support + addConfigureOption with-imap-ssl yes + ;; inotify) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then @@ -3168,6 +3213,14 @@ installRemoteModule() { fi fi ;; + oci8 | pdo_oci) + installOracleInstantClient + if test "$installRemoteModule_module" = oci8; then + addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + elif test "$installRemoteModule_module" = pdo_oci; then + addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + fi + ;; opencensus) if test -z "$installRemoteModule_version"; then installRemoteModule_version=alpha @@ -3333,6 +3386,8 @@ installRemoteModule() { installRemoteModule_version=3.12.4 elif test $PHP_MAJMIN_VERSION -lt 800; then installRemoteModule_version=3.24.4 + elif test $PHP_MAJMIN_VERSION -lt 801; then + installRemoteModule_version=3.25.3 fi fi ;; @@ -3478,8 +3533,8 @@ installRemoteModule() { ;; saxon) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then - installRemoteModule_version='11.6' + if test $PHP_MAJMIN_VERSION -ge 800; then + installRemoteModule_version='12.4.2' else installRemoteModule_version='12.3' fi @@ -3506,9 +3561,7 @@ installRemoteModule() { fi ldconfig || true fi - set -x cd "$installRemoteModule_dir/Saxon.C.API" - exit phpize ./configure --enable-saxon make -j$(getProcessorCount) install @@ -3572,8 +3625,10 @@ installRemoteModule() { ;; solr) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then + if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=2.4.0 + elif test $PHP_MAJMIN_VERSION -lt 704; then + installRemoteModule_version=2.6.0 fi fi ;; @@ -3584,7 +3639,7 @@ installRemoteModule() { spx) if test -z "$installRemoteModule_path"; then if test -z "$installRemoteModule_version"; then - installRemoteModule_version=v0.4.14 + installRemoteModule_version=v0.4.15 fi if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then installRemoteModule_displayVersion="$installRemoteModule_version" @@ -3616,6 +3671,8 @@ installRemoteModule() { installRemoteModule_version=5.9.0 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=5.10.1 + elif test $PHP_MAJMIN_VERSION -le 800; then + installRemoteModule_version=5.11.1 fi fi ;; @@ -3652,6 +3709,9 @@ installRemoteModule() { installRemoteModule_version=4.5.10 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=4.8.11 + elif test $PHP_BITS -eq 32; then + # See https://github.com/swoole/swoole-src/issues/5198#issuecomment-1820162178 + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module" '^5.0')" fi else installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")" diff --git a/services/php56/extensions/install-php-extensions b/services/php56/extensions/install-php-extensions index eca7df2f..5e320363 100644 --- a/services/php56/extensions/install-php-extensions +++ b/services/php56/extensions/install-php-extensions @@ -357,74 +357,81 @@ getModuleSourceCodePath() { fi } -# Get the wanted PHP module version, resolving it if it starts with '^' +# Get the actual PHP module version, resolving it if it starts with '^' # # Arguments: -# $1: the name of the module to be normalized +# $1: the name of the module +# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion) # # Output: # The version to be used -resolveWantedPHPModuleVersion() { - resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")" - resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}" - if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then - printf '%s' "$resolveWantedPHPModuleVersion_raw" +resolvePHPModuleVersion() { + resolvePHPModuleVersion_module="$1" + if test $# -lt 2; then + resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")" + else + resolvePHPModuleVersion_raw="$2" + fi + resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}" + if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then + printf '%s' "$resolvePHPModuleVersion_raw" return fi - case "$resolveWantedPHPModuleVersion_afterCaret" in + case "$resolvePHPModuleVersion_afterCaret" in ?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable) - resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}" - resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}" + resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}" + resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}" ;; *) - resolveWantedPHPModuleVersion_wantedStability='' - resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret" + resolvePHPModuleVersion_wantedStability='' + resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret" ;; esac - resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")" + resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")" + resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")" # remove line endings, collapse spaces - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" # one line per release (eg 1.2.3stable) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#$resolveWantedPHPModuleVersion_wantedStability")" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "$resolvePHPModuleVersion_wantedStability")" fi # remove everything's up to '' (included) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*##')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*##')" # keep just the versions - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)" resetIFS - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then # Example: looking for 1.0, found 1.0.1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi done - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then continue fi - if test -z "$resolveWantedPHPModuleVersion_suffix"; then + if test -z "$resolvePHPModuleVersion_suffix"; then # Example: looking for 1.0, found exactly it - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi - case "$resolveWantedPHPModuleVersion_suffix" in + case "$resolvePHPModuleVersion_suffix" in [0-9]) # Example: looking for 1.1, but this is 1.10 ;; *) # Example: looking for 1.1, this is 1.1rc1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return ;; esac done - printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2 + printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2 exit 1 } @@ -443,7 +450,8 @@ resolvePeclStabilityVersion() { return ;; esac - peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt" + resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")" + peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt" if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then peclStabilityFlagToVersion_result='' fi @@ -811,6 +819,12 @@ buildRequiredPackageLists() { ffi@debian) buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev" ;; + ftp@alpine) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; + ftp@debian) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; gd@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev" @@ -848,7 +862,10 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev" if test $PHP_MAJMIN_VERSION -ge 801; then - if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then + if test $DISTRO_VERSION_NUMBER -ge 12; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev" + elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then case "${IPE_GD_WITHOUTAVIF:-}" in 1 | y* | Y*) ;; *) @@ -1985,11 +2002,11 @@ installOracleInstantClient() { mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH" echo 'done.' fi - if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then + if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version" installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)" ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" - UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'" + UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk" echo 'done.' fi case "$DISTRO" in @@ -2039,7 +2056,7 @@ installMicrosoftSqlServerODBC() { alpine) rm -rf /tmp/src/msodbcsql.apk if test $PHP_MAJMIN_VERSION -le 703; then - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.5.1-1_amd64.apk else case $(uname -m) in aarch64 | arm64 | armv8) @@ -2049,7 +2066,7 @@ installMicrosoftSqlServerODBC() { installMicrosoftSqlServerODBC_arch=amd64 ;; esac - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.2.1-1_$installMicrosoftSqlServerODBC_arch.apk fi printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk rm -rf /tmp/src/msodbcsql.apk @@ -2088,7 +2105,7 @@ installMicrosoftSqlServerODBC() { # 0 (true) # 1 (false) isLibaomInstalled() { - if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then + if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then return 1 fi if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then @@ -2100,7 +2117,18 @@ isLibaomInstalled() { # Install libaom installLibaom() { printf 'Installing libaom\n' - installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)" + installLibaom_version=3.8.1 + case "$DISTRO_VERSION" in + debian@10) + case $(uname -m) in + aarch* | arm*) + #see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543 + installLibaom_version=3.5.0 + ;; + esac + ;; + esac + installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)" mkdir -- "$installLibaom_dir/my.build" cd -- "$installLibaom_dir/my.build" cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib .. @@ -2127,7 +2155,7 @@ isLibdav1dInstalled() { # Install libdav1d installLibdav1d() { printf 'Installing libdav1d\n' - installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)" + installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)" mkdir -- "$installLibdav1d_dir/build" cd -- "$installLibdav1d_dir/build" meson --buildtype release -Dprefix=/usr .. @@ -2145,7 +2173,7 @@ installLibdav1d() { # 0 (true) # 1 (false) isLibyuvInstalled() { - if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then + if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then return 1 fi if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then @@ -2157,7 +2185,7 @@ isLibyuvInstalled() { # Install libyuv installLibyuv() { printf 'Installing libyuv\n' - installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)" + installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)" mkdir -- "$installLibyuv_dir/build" cd -- "$installLibyuv_dir/build" cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. .. @@ -2183,7 +2211,7 @@ isLibavifInstalled() { # Install libavif installLibavif() { printf 'Installing libavif\n' - installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)" + installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)" mkdir -- "$installLibavif_dir/build" cd -- "$installLibavif_dir/build" cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib @@ -2401,6 +2429,9 @@ EOF cd - >/dev/null fi ;; + ftp) + docker-php-ext-configure ftp --with-openssl-dir=/usr + ;; gd) if test $PHP_MAJMIN_VERSION -le 506; then docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir @@ -2418,6 +2449,11 @@ EOF installBundledModule_tmp=1 fi ;; + debian) + if test $DISTRO_VERSION_NUMBER -ge 12; then + installBundledModule_tmp=1 + fi + ;; esac if test $installBundledModule_tmp -eq 0; then case "${IPE_GD_WITHOUTAVIF:-}" in @@ -2623,7 +2659,7 @@ getPackageSource() { installRemoteModule() { installRemoteModule_module="$1" printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module" - installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")" + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")" installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")" rm -rf "$CONFIGURE_FILE" installRemoteModule_manuallyInstalled=0 @@ -2716,7 +2752,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.30.3 + installRemoteModule_tmp=0.31.0 fi cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)" make -s -j$(getProcessorCount) cmake_build @@ -2745,9 +2781,12 @@ installRemoteModule() { if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=0.75.0 - else - installCargo fi + else + installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")" + fi + if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then + installCargo fi ;; decimal) @@ -2949,6 +2988,12 @@ installRemoteModule() { fi fi ;; + imap) + # Include Kerberos Support + addConfigureOption with-kerberos yes + # Include SSL Support + addConfigureOption with-imap-ssl yes + ;; inotify) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then @@ -3168,6 +3213,14 @@ installRemoteModule() { fi fi ;; + oci8 | pdo_oci) + installOracleInstantClient + if test "$installRemoteModule_module" = oci8; then + addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + elif test "$installRemoteModule_module" = pdo_oci; then + addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + fi + ;; opencensus) if test -z "$installRemoteModule_version"; then installRemoteModule_version=alpha @@ -3333,6 +3386,8 @@ installRemoteModule() { installRemoteModule_version=3.12.4 elif test $PHP_MAJMIN_VERSION -lt 800; then installRemoteModule_version=3.24.4 + elif test $PHP_MAJMIN_VERSION -lt 801; then + installRemoteModule_version=3.25.3 fi fi ;; @@ -3478,8 +3533,8 @@ installRemoteModule() { ;; saxon) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then - installRemoteModule_version='11.6' + if test $PHP_MAJMIN_VERSION -ge 800; then + installRemoteModule_version='12.4.2' else installRemoteModule_version='12.3' fi @@ -3506,9 +3561,7 @@ installRemoteModule() { fi ldconfig || true fi - set -x cd "$installRemoteModule_dir/Saxon.C.API" - exit phpize ./configure --enable-saxon make -j$(getProcessorCount) install @@ -3572,8 +3625,10 @@ installRemoteModule() { ;; solr) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then + if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=2.4.0 + elif test $PHP_MAJMIN_VERSION -lt 704; then + installRemoteModule_version=2.6.0 fi fi ;; @@ -3584,7 +3639,7 @@ installRemoteModule() { spx) if test -z "$installRemoteModule_path"; then if test -z "$installRemoteModule_version"; then - installRemoteModule_version=v0.4.14 + installRemoteModule_version=v0.4.15 fi if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then installRemoteModule_displayVersion="$installRemoteModule_version" @@ -3616,6 +3671,8 @@ installRemoteModule() { installRemoteModule_version=5.9.0 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=5.10.1 + elif test $PHP_MAJMIN_VERSION -le 800; then + installRemoteModule_version=5.11.1 fi fi ;; @@ -3652,6 +3709,9 @@ installRemoteModule() { installRemoteModule_version=4.5.10 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=4.8.11 + elif test $PHP_BITS -eq 32; then + # See https://github.com/swoole/swoole-src/issues/5198#issuecomment-1820162178 + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module" '^5.0')" fi else installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")" diff --git a/services/php80/extensions/install-php-extensions b/services/php80/extensions/install-php-extensions index eca7df2f..5e320363 100644 --- a/services/php80/extensions/install-php-extensions +++ b/services/php80/extensions/install-php-extensions @@ -357,74 +357,81 @@ getModuleSourceCodePath() { fi } -# Get the wanted PHP module version, resolving it if it starts with '^' +# Get the actual PHP module version, resolving it if it starts with '^' # # Arguments: -# $1: the name of the module to be normalized +# $1: the name of the module +# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion) # # Output: # The version to be used -resolveWantedPHPModuleVersion() { - resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")" - resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}" - if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then - printf '%s' "$resolveWantedPHPModuleVersion_raw" +resolvePHPModuleVersion() { + resolvePHPModuleVersion_module="$1" + if test $# -lt 2; then + resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")" + else + resolvePHPModuleVersion_raw="$2" + fi + resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}" + if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then + printf '%s' "$resolvePHPModuleVersion_raw" return fi - case "$resolveWantedPHPModuleVersion_afterCaret" in + case "$resolvePHPModuleVersion_afterCaret" in ?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable) - resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}" - resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}" + resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}" + resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}" ;; *) - resolveWantedPHPModuleVersion_wantedStability='' - resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret" + resolvePHPModuleVersion_wantedStability='' + resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret" ;; esac - resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")" + resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")" + resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")" # remove line endings, collapse spaces - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" # one line per release (eg 1.2.3stable) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#$resolveWantedPHPModuleVersion_wantedStability")" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "$resolvePHPModuleVersion_wantedStability")" fi # remove everything's up to '' (included) - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*##')" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*##')" # keep just the versions - resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)" + resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)" resetIFS - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then # Example: looking for 1.0, found 1.0.1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi done - for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do - resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}" - if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then + for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do + resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}" + if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then continue fi - if test -z "$resolveWantedPHPModuleVersion_suffix"; then + if test -z "$resolvePHPModuleVersion_suffix"; then # Example: looking for 1.0, found exactly it - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return fi - case "$resolveWantedPHPModuleVersion_suffix" in + case "$resolvePHPModuleVersion_suffix" in [0-9]) # Example: looking for 1.1, but this is 1.10 ;; *) # Example: looking for 1.1, this is 1.1rc1 - printf '%s' "$resolveWantedPHPModuleVersion_version" + printf '%s' "$resolvePHPModuleVersion_version" return ;; esac done - printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2 + printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2 exit 1 } @@ -443,7 +450,8 @@ resolvePeclStabilityVersion() { return ;; esac - peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt" + resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")" + peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt" if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then peclStabilityFlagToVersion_result='' fi @@ -811,6 +819,12 @@ buildRequiredPackageLists() { ffi@debian) buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev" ;; + ftp@alpine) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; + ftp@debian) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev" + ;; gd@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev" @@ -848,7 +862,10 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev" if test $PHP_MAJMIN_VERSION -ge 801; then - if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then + if test $DISTRO_VERSION_NUMBER -ge 12; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev" + elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then case "${IPE_GD_WITHOUTAVIF:-}" in 1 | y* | Y*) ;; *) @@ -1985,11 +2002,11 @@ installOracleInstantClient() { mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH" echo 'done.' fi - if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then + if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" && ! test -L "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version" installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)" ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk" - UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'" + UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS $ORACLE_INSTANTCLIENT_LIBPATH/sdk" echo 'done.' fi case "$DISTRO" in @@ -2039,7 +2056,7 @@ installMicrosoftSqlServerODBC() { alpine) rm -rf /tmp/src/msodbcsql.apk if test $PHP_MAJMIN_VERSION -le 703; then - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.10.5.1-1_amd64.apk else case $(uname -m) in aarch64 | arm64 | armv8) @@ -2049,7 +2066,7 @@ installMicrosoftSqlServerODBC() { installMicrosoftSqlServerODBC_arch=amd64 ;; esac - curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.1.1-1_$installMicrosoftSqlServerODBC_arch.apk + curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.2.1-1_$installMicrosoftSqlServerODBC_arch.apk fi printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk rm -rf /tmp/src/msodbcsql.apk @@ -2088,7 +2105,7 @@ installMicrosoftSqlServerODBC() { # 0 (true) # 1 (false) isLibaomInstalled() { - if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then + if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then return 1 fi if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then @@ -2100,7 +2117,18 @@ isLibaomInstalled() { # Install libaom installLibaom() { printf 'Installing libaom\n' - installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)" + installLibaom_version=3.8.1 + case "$DISTRO_VERSION" in + debian@10) + case $(uname -m) in + aarch* | arm*) + #see https://bugs.chromium.org/p/aomedia/issues/detail?id=3543 + installLibaom_version=3.5.0 + ;; + esac + ;; + esac + installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v$installLibaom_version.tar.gz)" mkdir -- "$installLibaom_dir/my.build" cd -- "$installLibaom_dir/my.build" cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib .. @@ -2127,7 +2155,7 @@ isLibdav1dInstalled() { # Install libdav1d installLibdav1d() { printf 'Installing libdav1d\n' - installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)" + installLibdav1d_dir="$(getPackageSource https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz)" mkdir -- "$installLibdav1d_dir/build" cd -- "$installLibdav1d_dir/build" meson --buildtype release -Dprefix=/usr .. @@ -2145,7 +2173,7 @@ installLibdav1d() { # 0 (true) # 1 (false) isLibyuvInstalled() { - if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then + if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then return 1 fi if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then @@ -2157,7 +2185,7 @@ isLibyuvInstalled() { # Install libyuv installLibyuv() { printf 'Installing libyuv\n' - installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)" + installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/d359a9f922af840b043535d43cf9d38b220d102e.tar.gz)" mkdir -- "$installLibyuv_dir/build" cd -- "$installLibyuv_dir/build" cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. .. @@ -2183,7 +2211,7 @@ isLibavifInstalled() { # Install libavif installLibavif() { printf 'Installing libavif\n' - installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)" + installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v1.0.3)" mkdir -- "$installLibavif_dir/build" cd -- "$installLibavif_dir/build" cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib @@ -2401,6 +2429,9 @@ EOF cd - >/dev/null fi ;; + ftp) + docker-php-ext-configure ftp --with-openssl-dir=/usr + ;; gd) if test $PHP_MAJMIN_VERSION -le 506; then docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir @@ -2418,6 +2449,11 @@ EOF installBundledModule_tmp=1 fi ;; + debian) + if test $DISTRO_VERSION_NUMBER -ge 12; then + installBundledModule_tmp=1 + fi + ;; esac if test $installBundledModule_tmp -eq 0; then case "${IPE_GD_WITHOUTAVIF:-}" in @@ -2623,7 +2659,7 @@ getPackageSource() { installRemoteModule() { installRemoteModule_module="$1" printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module" - installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")" + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")" installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")" rm -rf "$CONFIGURE_FILE" installRemoteModule_manuallyInstalled=0 @@ -2716,7 +2752,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.30.3 + installRemoteModule_tmp=0.31.0 fi cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)" make -s -j$(getProcessorCount) cmake_build @@ -2745,9 +2781,12 @@ installRemoteModule() { if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=0.75.0 - else - installCargo fi + else + installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")" + fi + if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then + installCargo fi ;; decimal) @@ -2949,6 +2988,12 @@ installRemoteModule() { fi fi ;; + imap) + # Include Kerberos Support + addConfigureOption with-kerberos yes + # Include SSL Support + addConfigureOption with-imap-ssl yes + ;; inotify) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then @@ -3168,6 +3213,14 @@ installRemoteModule() { fi fi ;; + oci8 | pdo_oci) + installOracleInstantClient + if test "$installRemoteModule_module" = oci8; then + addConfigureOption with-oci8 "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + elif test "$installRemoteModule_module" = pdo_oci; then + addConfigureOption with-pdo-oci "instantclient,$ORACLE_INSTANTCLIENT_LIBPATH" + fi + ;; opencensus) if test -z "$installRemoteModule_version"; then installRemoteModule_version=alpha @@ -3333,6 +3386,8 @@ installRemoteModule() { installRemoteModule_version=3.12.4 elif test $PHP_MAJMIN_VERSION -lt 800; then installRemoteModule_version=3.24.4 + elif test $PHP_MAJMIN_VERSION -lt 801; then + installRemoteModule_version=3.25.3 fi fi ;; @@ -3478,8 +3533,8 @@ installRemoteModule() { ;; saxon) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then - installRemoteModule_version='11.6' + if test $PHP_MAJMIN_VERSION -ge 800; then + installRemoteModule_version='12.4.2' else installRemoteModule_version='12.3' fi @@ -3506,9 +3561,7 @@ installRemoteModule() { fi ldconfig || true fi - set -x cd "$installRemoteModule_dir/Saxon.C.API" - exit phpize ./configure --enable-saxon make -j$(getProcessorCount) install @@ -3572,8 +3625,10 @@ installRemoteModule() { ;; solr) if test -z "$installRemoteModule_version"; then - if test $PHP_MAJMIN_VERSION -le 506; then + if test $PHP_MAJMIN_VERSION -lt 700; then installRemoteModule_version=2.4.0 + elif test $PHP_MAJMIN_VERSION -lt 704; then + installRemoteModule_version=2.6.0 fi fi ;; @@ -3584,7 +3639,7 @@ installRemoteModule() { spx) if test -z "$installRemoteModule_path"; then if test -z "$installRemoteModule_version"; then - installRemoteModule_version=v0.4.14 + installRemoteModule_version=v0.4.15 fi if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then installRemoteModule_displayVersion="$installRemoteModule_version" @@ -3616,6 +3671,8 @@ installRemoteModule() { installRemoteModule_version=5.9.0 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=5.10.1 + elif test $PHP_MAJMIN_VERSION -le 800; then + installRemoteModule_version=5.11.1 fi fi ;; @@ -3652,6 +3709,9 @@ installRemoteModule() { installRemoteModule_version=4.5.10 elif test $PHP_MAJMIN_VERSION -le 704; then installRemoteModule_version=4.8.11 + elif test $PHP_BITS -eq 32; then + # See https://github.com/swoole/swoole-src/issues/5198#issuecomment-1820162178 + installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module" '^5.0')" fi else installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"