Fix gearman setup

This commit is contained in:
Shivam Mathur 2021-03-06 01:37:12 +05:30
parent b95ad9e061
commit 51c455198d
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 12 additions and 13 deletions

4
dist/index.js vendored
View File

@ -1980,14 +1980,14 @@ async function addExtensionLinux(extension_csv, version) {
// match couchbase, pdo_oci, oci8, http, pecl_http
// match 5.3ioncube...7.4ioncube, 5.3geos...7.4geos
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
// match 5.6gearman...7.4gearman
// match 5.6gearman...8.1gearman
case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(version_extension):
case /^couchbase$|^pdo_oci$|^oci8$|^http|^pecl_http|^pdo_firebird$/.test(extension):
case /^(5\.6|7\.[0-4]|8\.0)intl-[\d]+\.[\d]+$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4])(ioncube|geos)$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-9])gearman$/.test(version_extension):
add_script += await utils.customPackage(ext_name, 'ext', extension, 'linux');
return;
// match pre-release versions. For example - xdebug-beta

View File

@ -249,7 +249,7 @@ export async function addExtensionLinux(
// match couchbase, pdo_oci, oci8, http, pecl_http
// match 5.3ioncube...7.4ioncube, 5.3geos...7.4geos
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
// match 5.6gearman...7.4gearman
// match 5.6gearman...8.1gearman
case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension
):
@ -262,7 +262,7 @@ export async function addExtensionLinux(
case /^(5\.6|7\.[0-4]|8\.0)intl-[\d]+\.[\d]+$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4])(ioncube|geos)$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-9])gearman$/.test(version_extension):
add_script += await utils.customPackage(
ext_name,
'ext',

View File

@ -1,17 +1,16 @@
# Helper function to add gearman extension.
add_gearman_helper() {
sudo "${debconf_fix:?}" add-apt-repository ppa:ondrej/pkg-gearman -y
if [ -e "${ext_dir:?}/gearman.so" ] && [ "$DISTRIB_RELEASE" != "16.04" ]; then
${apt_install:?} libgearman-dev
echo "extension=gearman.so" | sudo tee -a "${scan_dir:?}/20-gearman.ini" >/dev/null 2>&1
else
add_ppa ondrej/pkg-gearman
install_packages libgearman-dev
enable_extension gearman extension
if ! check_extension gearman; then
status="Installed and enabled"
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
sudo "${debconf_fix:?}" apt-get update -y
${apt_install:?} php"${version:?}"-gearman
if [[ "${version:?}" =~ 5.[3-5] ]]; then
pecl_install gearman-1.1.2
else
${apt_install:?} libgearman-dev php"${version:?}"-gearman
install_packages php"${version:?}"-gearman || pecl_install gearman
fi
enable_extension gearman extension
fi
}