diff --git a/data/supported-extensions b/data/supported-extensions index 8ae6ebe..4688a71 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -83,6 +83,7 @@ raphf 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 rdkafka 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 recode 5.5 5.6 7.0 7.1 7.2 7.3 redis 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 +relay 7.4 8.0 8.1 seaslog 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 shmop 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 simdjson 7.1 7.2 7.3 7.4 8.0 8.1 8.2 diff --git a/install-php-extensions b/install-php-extensions index 52089ac..7279e89 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -532,6 +532,10 @@ sortModulesToInstall() { if test $PHP_MAJMIN_VERSION -le 506; then checkRequiredModule event sockets fi + # relay requires msgpack + checkRequiredModule relay msgpack + # relay requires igbinary + checkRequiredModule relay igbinary # Some module installation may use sockets if available: move it before other modules if stringInList 'sockets' "$PHP_MODULES_TO_INSTALL"; then PHP_MODULES_TO_INSTALL="$(removeStringFromList 'sockets' "$PHP_MODULES_TO_INSTALL")" @@ -1120,6 +1124,9 @@ buildRequiredPackageLists() { esac fi ;; + relay@alpine) + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent lz4-libs zstd-libs" + ;; simdjson@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++" ;; @@ -1618,7 +1625,7 @@ getModuleIniEntryType() { # # Arguments: # $1: the name of the PHP extension -# $3: additional php.ini configuration (optional) +# $2: additional php.ini configuration (optional) # # Output: # The contents of the ini file @@ -3066,6 +3073,28 @@ installRemoteModule() { addConfigureOption 'enable-redis-zstd' 'yes' fi ;; + relay) + if test -z "$installRemoteModule_version"; then + installRemoteModule_version="$(curl -sSLf https://cachewerk.s3.amazonaws.com/relay/LATEST)" + installRemoteModule_version="${installRemoteModule_version#v}" + fi + case $(uname -m) in + aarch64 | arm64 | armv8) + installRemoteModule_hardware=aarch64 + ;; + *) + installRemoteModule_hardware=x86-64 + ;; + esac + printf 'Downloading relay v%s (%s)... ' "$installRemoteModule_version" "$installRemoteModule_hardware" + installRemoteModule_url="https://cachewerk.s3.amazonaws.com/relay/v${installRemoteModule_version}/relay-v${installRemoteModule_version}-php${PHP_MAJDOTMIN_VERSION}-${DISTRO}-${installRemoteModule_hardware}.tar.gz" + installRemoteModule_src="$(getPackageSource $installRemoteModule_url)" + echo 'done.' + cp -- "$installRemoteModule_src/relay-pkg.so" "$PHP_EXTDIR/relay.so" + sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" "$PHP_EXTDIR/relay.so" + installRemoteModule_ini_extra="$(grep -vE '^[ \t]*extension[ \t]*=' $installRemoteModule_src/relay.ini)" + installRemoteModule_manuallyInstalled=1 + ;; snappy) if test -z "$installRemoteModule_path"; then if test -z "$installRemoteModule_version"; then