Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
APP_NAME: 'manticore-executor'
DOCKER_TAG: 'manticoresearch/manticore-executor'
PHP_VERSION: '8.4.18'
PHP_VERSION: '8.5.10'
MAINTAINER: 'Manticore'
DESC: 'Custom built PHP executor for Manticore.'
EXTRA_NAME: 'manticore-extra'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
APP_NAME: 'manticore-executor'
PHP_VERSION: '8.4.18'
PHP_VERSION: '8.5.10'
MAINTAINER: 'Manticore'
DESC: 'Custom built PHP executor for Manticore.'

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
run: ${{ matrix.script_name }} ${{ env.PHP_VERSION }}
- name: Build binary using Docker
if: ${{ matrix.use_docker == true }}
run: docker run -v ${PWD}:/src -w /src alpine:3.21 sh -c "apk add sudo bash; ${{ matrix.script_name }} ${{ env.PHP_VERSION }}"
run: docker run -v ${PWD}:/src -w /src alpine:3.23 sh -c "apk add sudo bash; ${{ matrix.script_name }} ${{ env.PHP_VERSION }}"
- name: Create artifact
run: |
os="${{ runner.os }}"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM alpine:3.21
FROM alpine:3.23
ARG BUILD_DEV=0

# Install the manticore-executor binary
COPY . /src
RUN apk add bash && \
cd /src && \
./build-alpine 8.4.18 0 $BUILD_DEV && \
./build-alpine 8.5.10 0 $BUILD_DEV && \
mv build/dist/bin/php /usr/bin/manticore-executor && \
ln -s /usr/bin/manticore-executor /usr/bin/php && \
cd ../..
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Manticore Executor is a custom built PHP binary which:

By default, we disable all extensions and enable only those required to run our scripts.

We build executor from `PHP 8.4.18` with the following extensions enabled and compiled into the executable statically:
We build executor from `PHP 8.5.10` with the following extensions enabled and compiled into the executable statically:

* pcntl
* posix
Expand Down Expand Up @@ -84,10 +84,10 @@ Several scripts used to build the final package:
* `build-linux`
* `build-osx`

The scripts accept a version of PHP as a parameter. The current version is `8.4.18`. To build the binary, you should run the following example:
The scripts accept a version of PHP as a parameter. The current version is `8.5.10`. To build the binary, you should run the following example:

```bash
./build-linux "8.4.18"
./build-linux "8.5.10"
```

The command above will build the package on Linux with **PHP** `8.4.18`. Once it's done, you can find your binary in folder `dist/bin`.
The command above will build the package on Linux with **PHP** `8.5.10`. Once it's done, you can find your binary in folder `dist/bin`.
14 changes: 7 additions & 7 deletions build-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ install_deps() {
ln -s /usr/bin/objcopy "/usr/bin/${arch}-alpine-linux-musl-objcopy"
export CROSS_COMPILE="/usr/bin/${arch}-alpine-linux-musl-"

apk add php84 php84-dev curl git autoconf bison re2c pkgconf zlib-dev zstd-static zstd-dev openssl-libs-static openssl-dev zlib-static zlib-dev gnu-libiconv-dev clang-dev llvm-dev
apk add php85 php85-dev curl git autoconf bison re2c pkgconf zlib-dev zstd-static zstd-dev openssl-libs-static openssl-dev zlib-static zlib-dev gnu-libiconv-dev clang-dev llvm-dev

# Create symlinks for php84 to be accessible as php
ln -sf /usr/bin/php84 /usr/bin/php
ln -sf /usr/bin/php-config84 /usr/bin/php-config
ln -sf /usr/bin/phpize84 /usr/bin/phpize
# Create symlinks for php85 to be accessible as php
ln -sf /usr/bin/php85 /usr/bin/php
ln -sf /usr/bin/php-config85 /usr/bin/php-config
ln -sf /usr/bin/phpize85 /usr/bin/phpize

install_curl

Expand Down Expand Up @@ -94,7 +94,7 @@ fix_static_linking
make LDFLAGS=$MAKE_LDFLAGS -j8
make install-cli

# Remove php84 that was used for building before installing php
apk del php84 php84-dev
# Remove php85 that was used for building before installing php
apk del php85 php85-dev
rm -f /usr/bin/php /usr/bin/php-config /usr/bin/phpize

4 changes: 2 additions & 2 deletions build-bash-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set -e

PHP_VERSION="$1"
ZSTD_REV="d6d26eb805058fc672686715a7b5e39d8f65dd36"
DS_REV="118c06b8863386ceada4238f3cec18ab84c9efb7"
SWOOLE_REV="d611ff3ca60e8c9425b2e2e3ba1a9004faab64f5"
DS_REV="132ca69b19c80fba8a447f87d656c27596f43cec"
SWOOLE_REV="8e8c49915ca5f9dcb9ee654f9e336a9c88dd375e"
RDKAFKA_REV="53398031f1cd96e437e9705b67b4dc19d955acb6"
JCHASH_REV="8ed50cc8c211effe1c214eae1e3240622e0f11b0"
SIMDJSON_REV="9a2745669fea733a40f9443b1a793846d0759b89"
Expand Down
6 changes: 3 additions & 3 deletions build-linux
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install_deps() {
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install -y php8.4 php8.4-dev php8.4-cli build-essential clang libclang-dev pkg-config curl autoconf automake bison re2c libzstd-dev git libssl-dev zlib1g-dev libzip-dev libonig-dev cmake libcurl4-openssl-dev librdkafka-dev libiconv-hook-dev wget
sudo apt-get install -y php8.5 php8.5-dev php8.5-cli build-essential clang libclang-dev pkg-config curl autoconf automake bison re2c libzstd-dev git libssl-dev zlib1g-dev libzip-dev libonig-dev cmake libcurl4-openssl-dev librdkafka-dev libiconv-hook-dev wget
# Install LLVM 17 directly from apt.llvm.org
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null
Expand Down Expand Up @@ -75,6 +75,6 @@ ENABLE_STATIC=yes
make -j8
make install-cli

# Remove php84 that was used for building before installing php
sudo apt-get remove -y php8.4-dev php8.4-cli php8.4
# Remove php85 that was used for building before installing php
sudo apt-get remove -y php8.5-dev php8.5-cli php8.5

11 changes: 7 additions & 4 deletions build-osx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ set -e

install_deps() {
brew tap shivammathur/php
brew install shivammathur/php/php@8.4 bash curl autoconf automake bison re2c zstd git openssl zlib cmake libzip librdkafka libiconv llvm@17
brew link --overwrite --force shivammathur/php/php@8.4
# GitHub macOS runners ship php from homebrew/core; brew refuses to
# install a same-named formula from another tap, so drop the core one first
brew uninstall --force --ignore-dependencies php || true
brew install shivammathur/php/php bash curl autoconf automake bison re2c zstd git openssl zlib cmake libzip librdkafka libiconv llvm@17
brew link --overwrite --force shivammathur/php/php

# Add PHP to PATH - include both versioned path and brew bin directory
PHP_PREFIX="$(brew --prefix shivammathur/php/php@8.4)"
PHP_PREFIX="$(brew --prefix shivammathur/php/php)"
BREW_PREFIX="$(brew --prefix)"
export PATH="${PHP_PREFIX}/bin:${BREW_PREFIX}/bin:${PATH}"

Expand Down Expand Up @@ -58,7 +61,7 @@ fi
bison_ver=$(bison --version | head -n1 | cut -d' ' -f4)
if [[ "$bison_ver" =~ ^2\.[0-9]+$ ]]; then
if which brew; then
bison=$(brew info bison | grep files | cut -d' ' -f1)
bison="$(brew --prefix bison)"
else
bison=$(test -d /usr/local/opt && echo "$_" || which /usr)
fi
Expand Down
4 changes: 3 additions & 1 deletion helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ install_libzip() {
test -d libzip-1.9.2 && rm -fr "$_"
curl -sSL https://github.com/nih-at/libzip/releases/download/v1.9.2/libzip-1.9.2.tar.gz | tar -xzf -
cd libzip-1.9.2 && mkdir -p build && cd build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_LZMA=OFF -DENABLE_BZIP2=OFF ..
# libzip 1.9.2 declares cmake_minimum_required 3.0.2; Alpine 3.23's CMake 4
# refuses projects older than 3.5 unless this policy floor is passed
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_LZMA=OFF -DENABLE_BZIP2=OFF ..
make -j4 && make install
cd ../..
rm -fr libzip-1.9.2
Expand Down
Loading