diff --git a/bin/misp_compile_php_extensions.sh b/bin/misp_compile_php_extensions.sh index f0e673e..a9d1e1d 100644 --- a/bin/misp_compile_php_extensions.sh +++ b/bin/misp_compile_php_extensions.sh @@ -31,7 +31,7 @@ mkdir /build/php-modules/ # Compile simdjson mkdir /tmp/simdjson cd /tmp/simdjson -download_and_check https://github.com/JakubOnderka/simdjson_php/archive/92f94a6d5e450a7e62c569681a6df55c6496ec0c.tar.gz 8b26dd26b32822386263eccd3f4c33e3a7a31de4c853262b1672881a291a5367 +download_and_check https://github.com/JakubOnderka/simdjson_php/archive/70c201112f01aeb712f3ecfe7f65f8bd1e1873bb.tar.gz 05516e933cf3f351177648343a07fda72d037d1e490d05c8db36ec806f18fa46 phpize CXXFLAGS="$DEFAULT_FLAGS" CFLAGS="$DEFAULT_FLAGS" LDFLAGS="$DEFAULT_LDFLAGS" ./configure --silent make -j"$NPROC" @@ -52,7 +52,7 @@ mkdir /tmp/zstd cd /tmp/zstd download_and_check https://github.com/kjdev/php-ext-zstd/archive/refs/tags/0.16.0.tar.gz 0dd59954167de75d8bb335268144a54b4df1326c807580305fc0e3763c923f7d cd zstd -download_and_check https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 +download_and_check https://github.com/facebook/zstd/releases/download/v1.6.0/zstd-1.6.0.tar.gz 2ba599ae2a257976278e7e71e998433a387bfd18aa7b78678229fd5d84f5e9b8 cd .. phpize CFLAGS="$DEFAULT_FLAGS" LDFLAGS="$DEFAULT_LDFLAGS" ./configure --silent diff --git a/bin/misp_redis_ready.py b/bin/misp_redis_ready.py index 83a6d60..782cd8b 100644 --- a/bin/misp_redis_ready.py +++ b/bin/misp_redis_ready.py @@ -3,7 +3,6 @@ import os import sys import time -from typing import Optional, Tuple import redis import logging @@ -23,13 +22,13 @@ def convert_bool(value: str) -> bool: error(f"Environment variable 'REDIS_USE_TLS' must be boolean (`true`, `1`, `yes`, `false`, `0` or `no`), `{value}` given") -def connect(host: str, port: int, password: Optional[str] = None, use_tls: bool = False) -> redis.Redis: +def connect(host: str, port: int, password: str | None = None, use_tls: bool = False) -> redis.Redis: r = redis.Redis(host=host, port=port, password=password, ssl=use_tls) r.ping() return r -def wait_for_connection(host: str, port: int, password: Optional[str] = None, use_tls: bool = False) -> redis.Redis: +def wait_for_connection(host: str, port: int, password: str | None = None, use_tls: bool = False) -> redis.Redis: logging.info(f"Connecting to Redis server {host}:{port}") last_exception = None for i in range(1, 10): @@ -69,7 +68,7 @@ def wait_for_load(connection: redis.Redis): logging.warning("Redis is still loading data to memory, waiting skipped") -def get_connection_info() -> Tuple[str, int, Optional[str], bool]: +def get_connection_info() -> tuple[str, int, str | None, bool]: host = os.environ.get("REDIS_HOST") if host is None: error("Environment variable 'REDIS_HOST' not set.") @@ -84,7 +83,7 @@ def get_connection_info() -> Tuple[str, int, Optional[str], bool]: def main(): - logging.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=logging.DEBUG) + logging.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=logging.INFO) host, port, password, use_tls = get_connection_info() redis = wait_for_connection(host, port, password, use_tls)