Add support for relay (#657)

pull/658/head
Michele Locati 2022-11-15 19:03:33 +01:00 committed by GitHub
parent ff442b1c6f
commit 464e403160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View File

@ -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 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 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 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 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 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 simdjson 7.1 7.2 7.3 7.4 8.0 8.1 8.2

View File

@ -532,6 +532,10 @@ sortModulesToInstall() {
if test $PHP_MAJMIN_VERSION -le 506; then if test $PHP_MAJMIN_VERSION -le 506; then
checkRequiredModule event sockets checkRequiredModule event sockets
fi 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 # Some module installation may use sockets if available: move it before other modules
if stringInList 'sockets' "$PHP_MODULES_TO_INSTALL"; then if stringInList 'sockets' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'sockets' "$PHP_MODULES_TO_INSTALL")" PHP_MODULES_TO_INSTALL="$(removeStringFromList 'sockets' "$PHP_MODULES_TO_INSTALL")"
@ -1120,6 +1124,9 @@ buildRequiredPackageLists() {
esac esac
fi fi
;; ;;
relay@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent lz4-libs zstd-libs"
;;
simdjson@alpine) simdjson@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++" buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
;; ;;
@ -1618,7 +1625,7 @@ getModuleIniEntryType() {
# #
# Arguments: # Arguments:
# $1: the name of the PHP extension # $1: the name of the PHP extension
# $3: additional php.ini configuration (optional) # $2: additional php.ini configuration (optional)
# #
# Output: # Output:
# The contents of the ini file # The contents of the ini file
@ -3066,6 +3073,28 @@ installRemoteModule() {
addConfigureOption 'enable-redis-zstd' 'yes' addConfigureOption 'enable-redis-zstd' 'yes'
fi 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) snappy)
if test -z "$installRemoteModule_path"; then if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then if test -z "$installRemoteModule_version"; then