From c955fe4949d46a239abaad88c91b7cfdcd535c2e Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 14 Mar 2021 18:10:38 +0100 Subject: [PATCH 1/5] [minor] Sort sqlsrv/pdo_sqlsrv --- MAINTAINERS.md | 12 ++++++------ install-php-extensions | 34 +++++++++++++++++----------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index d45f434..c91e6a2 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -85,17 +85,17 @@ The latest available version of the `opencensus` PHP extension is not compatible We manually patch the latest version to make it compatible with PHP 7.3 and PHP 7.4. We should switch to the stable release once it will be available. -### pdo_sqlsrv / sqlsrv - -The `pdo_sqlsrv` and `sqlsrv` PHP extensions require the Microsoft ODBC Driver for SQL Server. -On Alpine Linux there's no way to automatically install its latest version, so we install it manually. -We need to monitor new releases at https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#alpine17 - ### snuffleupagus The `snuffleupagus` PHP extension is not available in the PECL archive, so we install it manually. We need to monitor new releases at https://github.com/jvoisin/snuffleupagus/releases +### sqlsrv / pdo_sqlsrv + +The `pdo_sqlsrv` and `sqlsrv` PHP extensions require the Microsoft ODBC Driver for SQL Server. +On Alpine Linux there's no way to automatically install its latest version, so we install it manually. +We need to monitor new releases at https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#alpine17 + ### ssh2 The latest stable release of the `ssh2` PHP extension is very old, so we install the latest beta release. diff --git a/install-php-extensions b/install-php-extensions index 9b7f8dd..b8dfdca 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1817,23 +1817,6 @@ installRemoteModule() { fi fi ;; - pdo_sqlsrv | sqlsrv) - if test -z "$installRemoteModule_version"; then - # https://docs.microsoft.com/it-it/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017 - if test $PHP_MAJMIN_VERSION -le 506; then - installRemoteModule_version=3.0.1 - elif test $PHP_MAJMIN_VERSION -le 700; then - installRemoteModule_version=5.3.0 - elif test $PHP_MAJMIN_VERSION -le 701; then - installRemoteModule_version=5.6.1 - elif test $PHP_MAJMIN_VERSION -le 702; then - installRemoteModule_version=5.8.1 - fi - fi - if ! isMicrosoftSqlServerODBCInstalled; then - installMicrosoftSqlServerODBC - fi - ;; propro) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then @@ -1947,6 +1930,23 @@ installRemoteModule() { fi fi ;; + sqlsrv | pdo_sqlsrv) + if test -z "$installRemoteModule_version"; then + # https://docs.microsoft.com/it-it/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017 + if test $PHP_MAJMIN_VERSION -le 506; then + installRemoteModule_version=3.0.1 + elif test $PHP_MAJMIN_VERSION -le 700; then + installRemoteModule_version=5.3.0 + elif test $PHP_MAJMIN_VERSION -le 701; then + installRemoteModule_version=5.6.1 + elif test $PHP_MAJMIN_VERSION -le 702; then + installRemoteModule_version=5.8.1 + fi + fi + if ! isMicrosoftSqlServerODBCInstalled; then + installMicrosoftSqlServerODBC + fi + ;; ssh2) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then From 185c2f8d522a55fec333b91fdfa89b8e1e16458a Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 14 Mar 2021 18:14:34 +0100 Subject: [PATCH 2/5] [minor] Unify handling of odbc and pdo_odbc --- install-php-extensions | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index b8dfdca..868170b 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -707,11 +707,11 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libaio[0-9]*$" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unzip" ;; - odbc@alpine) + odbc@alpine | pdo_odbc@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent unixodbc" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev" ;; - odbc@debian) + odbc@debian | pdo_odbc@debian) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libodbc1" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev" ;; @@ -730,14 +730,6 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile firebird-dev libib-util" ;; - pdo_odbc@alpine) - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent unixodbc" - buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev" - ;; - pdo_odbc@debian) - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libodbc1" - buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev" - ;; pdo_pgsql@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile postgresql-dev" From 74f8d87521336337796804132883ce6111852f2e Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 14 Mar 2021 18:16:06 +0100 Subject: [PATCH 3/5] [minor] Unify handling of pgsql and pdo_pgsql --- install-php-extensions | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index 868170b..b1f43b9 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -730,19 +730,11 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile firebird-dev libib-util" ;; - pdo_pgsql@alpine) + pgsql@alpine | pdo_pgsql@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile postgresql-dev" ;; - pdo_pgsql@debian) - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpq5" - buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpq-dev" - ;; - pgsql@alpine) - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs" - buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile postgresql-dev" - ;; - pgsql@debian) + pgsql@debian | pdo_pgsql@debian) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpq5" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpq-dev" ;; From 7d4f346612f1026f8b34ea893248949d60d42a83 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 14 Mar 2021 21:53:55 +0100 Subject: [PATCH 4/5] Enable parallel compilation for all extensions --- install-php-extensions | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index b1f43b9..befe16c 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1104,13 +1104,13 @@ setTargetTriplet() { # The number of processors to be used getCompilationProcessorCount() { case "$1" in - amqp | bcmath | bz2 | calendar | decimal | excimer | exif | gd | geospatial | gettext | gmagick | grpc | http | imagick | intl | mysqli | opcache | pcntl | pdo_mysql | protobuf | raphf | redis | ssh2 | soap | sockets | tensor | tidy | xdebug | xmlrpc | xsl | yaml | zip) - # These extensions support parallel compilation - getProcessorCount + '') + # The above extensions don't support parallel compilation + echo 1 ;; *) - # We don't know - it's safer to disable parallel compilation - echo 1 + # All the other extensions support parallel compilation + getProcessorCount ;; esac } From a281a79f235f1b7c8577b492431140aee9ad6f79 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 14 Mar 2021 21:54:32 +0100 Subject: [PATCH 5/5] [minor] Fix indentation of comments --- install-php-extensions | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install-php-extensions b/install-php-extensions index befe16c..a0c78b9 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1366,7 +1366,7 @@ EOF 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) + # 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 @@ -1996,7 +1996,7 @@ installRemoteModule() { # enable mysqlnd support? addConfigureOption enable-mysqlnd yes elif test $(compareVersions "$installRemoteModule_version" 4.2.11) -ge 0; then - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl @@ -2007,7 +2007,7 @@ installRemoteModule() { # enable postgresql coroutine client support? addConfigureOption enable-coroutine-postgresql yes elif test $(compareVersions "$installRemoteModule_version" 4.2.7) -ge 0; then - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl @@ -2022,7 +2022,7 @@ installRemoteModule() { elif test $(compareVersions "$installRemoteModule_version" 4.2.6) -ge 0; then # enable debug/trace log support? addConfigureOption enable-debug-log no - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl @@ -2035,7 +2035,7 @@ installRemoteModule() { elif test $(compareVersions "$installRemoteModule_version" 4.2.0) -ge 0; then # enable debug/trace log support? addConfigureOption enable-debug-log no - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl @@ -2050,7 +2050,7 @@ installRemoteModule() { elif test $(compareVersions "$installRemoteModule_version" 2.1.2) -ge 0; then # enable debug/trace log support? addConfigureOption enable-swoole-debug no - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl @@ -2065,7 +2065,7 @@ installRemoteModule() { elif test $(compareVersions "$installRemoteModule_version" 1.10.4) -ge 0 && test $(compareVersions "$installRemoteModule_version" 1.10.5) -le 0; then # enable debug/trace log support? addConfigureOption enable-swoole-debug no - #enable sockets supports? + # enable sockets supports? addConfigureOption enable-sockets $installRemoteModule_sockets # enable openssl support? addConfigureOption enable-openssl $installRemoteModule_openssl