From 4bb585bd78e5ef93ffc8256c0eece98a7fa7430e Mon Sep 17 00:00:00 2001 From: Rusydy Muhiddin Date: Sat, 7 Nov 2026 22:10:38 +0700 Subject: [PATCH 1/3] Update installation instructions in README for Ubuntu, Arch, and Fedora --- README.md | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0d6a4f99..47cf4feb 100644 --- a/README.md +++ b/README.md @@ -13,20 +13,46 @@ for your system: ### Ubuntu and Debian ```bash -sudo apt-get install -y autoconf bison build-essential curl gettext git python3 \ - libgd-dev libbz2-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev \ - libmysqlclient-dev libonig-dev libpng-dev libpq-dev libgmp-dev libreadline-dev \ - libsodium-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev libtidy-dev \ - openssl pkg-config re2c zlib1g-dev ca-certificates wget libtool automake \ - gcc-9 g++-9 libxslt1.1 libxslt1-dev autotools-dev m4 libtool-bin +sudo apt-get install -y autoconf bison build-essential curl git python3 \ + pkg-config re2c ca-certificates libbz2-dev libcurl4-openssl-dev libicu-dev \ + libjpeg-dev libpng-dev libonig-dev libreadline-dev libsqlite3-dev libssl-dev \ + libxml2-dev libzip-dev zlib1g-dev libxslt1-dev libtidy-dev ``` +### Arch Linux + +```bash +sudo pacman -Syu --needed autoconf bison gcc make re2c pkgconf curl git python \ + ca-certificates libxml2 sqlite oniguruma libzip libjpeg-turbo libpng icu \ + openssl readline zlib bzip2 libxslt tidy +``` + +### Fedora 44 + +```bash +sudo dnf install autoconf bison gcc gcc-c++ make re2c curl git python3 \ + pkgconf-pkg-config ca-certificates libxml2-devel sqlite-devel oniguruma-devel \ + libcurl-devel libzip-devel libjpeg-turbo-devel libpng-devel \ + libicu-devel openssl-devel readline-devel zlib-devel bzip2-devel libxslt-devel \ + libtidy-devel +``` + +`GMP` and `sodium` support is enabled when their development libraries are present. +These extensions are optional. On Ubuntu or Debian install `libgmp-dev` and +`libsodium-dev`; on Arch install `gmp` and `libsodium`; on Fedora install `gmp-devel` +and `libsodium-devel`; on macOS install `gmp` and `libsodium` with Homebrew. +PostgreSQL support is optional too. Install `libpq-dev` on Ubuntu or Debian, +`postgresql-libs` on Arch, `libpq-devel` on Fedora, or `libpq` with Homebrew, then +pass `--with-pgsql` through `PHP_CONFIGURE_OPTIONS`. `GD` uses PHP's bundled library, +so an OS `gd` development package is unnecessary. For `FreeType` font support in `GD`, +install `libfreetype6-dev` on Ubuntu or Debian, `freetype2` on Arch, `freetype-devel` +on Fedora, or `freetype` with Homebrew. `php-build` enables tidy by default on Linux, so these package lists include it. + ### macOS ```bash -brew install autoconf automake bison freetype gd gettext icu4c krb5 gmp \ - libedit libiconv libjpeg libpng libsodium libxml2 libzip openssl@3 \ - pkg-config re2c zlib bzip2 python3 +brew install autoconf bison bzip2 icu4c libedit libiconv libjpeg libpng \ + libxml2 libxslt libzip openssl@3 pkg-config re2c zlib python3 ``` For the optional tidy extension, run `brew install tidy-html5`. @@ -83,7 +109,8 @@ before installing it. Set `ASDF_PHP_OPENSSL_AUTO=yes` for unattended builds. - If php-build is missing from a source checkout, run `git submodule update --init --recursive vendor/php-build` there. - php-build writes logs under `${TMPDIR:-/tmp}`. After a build starts, watch them - with `tail -f "${TMPDIR:-/tmp}"/php-build.*.log`. + with `tail -f "${TMPDIR:-/tmp}"/php-build.*.log`. Configure errors name the + missing library or header. See [local testing](docs/local-testing-manually.md) for a disposable install recipe. From 6afe075571751f4fb57744665324d20a660e6fb1 Mon Sep 17 00:00:00 2001 From: Rusydy Muhiddin Date: Sat, 7 Nov 2026 22:13:11 +0700 Subject: [PATCH 2/3] Update GitHub Actions workflow to enhance PHP installation and testing --- .github/workflows/workflow.yml | 70 ++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 06c3a931..0226a4d8 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -6,21 +6,17 @@ on: - opened - synchronize - reopened - paths-ignore: - - "**.md" push: branches: - master - main - paths-ignore: - - "**.md" schedule: - cron: 0 0 * * 5 env: - # Common dependencies for all builds - UBUNTU_DEPS: "autoconf bison build-essential curl gettext git python3 libgd-dev libbz2-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libgmp-dev libreadline-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev libtidy-dev openssl pkg-config re2c zlib1g-dev ca-certificates wget libtool automake gcc-9 g++-9 libxslt1.1 libxslt1-dev autotools-dev m4 libtool-bin" - MACOS_DEPS: "autoconf automake bison freetype gd gettext icu4c krb5 gmp libedit libiconv libjpeg libpng libsodium libxml2 libzip openssl@3 pkg-config re2c zlib bzip2 python3" + # Build dependencies from the README. Optional GMP and sodium are not tested here. + UBUNTU_DEPS: "autoconf bison build-essential curl git python3 pkg-config re2c ca-certificates libbz2-dev libcurl4-openssl-dev libicu-dev libjpeg-dev libpng-dev libonig-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev zlib1g-dev libxslt1-dev libtidy-dev" + MACOS_DEPS: "autoconf bison bzip2 icu4c libedit libiconv libjpeg libpng libxml2 libxslt libzip openssl@3 pkg-config re2c zlib python3" jobs: plugin_test: @@ -77,6 +73,8 @@ jobs: sudo apt-get install -y ${{ env.UBUNTU_DEPS }} elif [ "${{ runner.os }}" = "macOS" ]; then brew install ${{ env.MACOS_DEPS }} + # Exercise the documented optional tidy extension in CI. + brew install tidy-html5 # Set up macOS-specific environment for PHP build echo "CXXFLAGS=-std=c++17 -stdlib=libc++" >> $GITHUB_ENV # Set up library paths for configure to find dependencies @@ -186,7 +184,7 @@ jobs: echo "Installation path: $(asdf where php)" # php --ri exits non-zero when an extension is not loaded - for ext in openssl curl sodium gmp; do + for ext in openssl curl intl mbstring zip gd xsl bz2 pdo_sqlite tidy; do php --ri "$ext" >/dev/null || { echo "✗ $ext extension missing"; exit 1; } echo "✓ $ext" done @@ -240,3 +238,59 @@ jobs: sudo apt-get install -y bats - name: Run tests and installer line-count gate run: make test linecount-check + + arch: + runs-on: ubuntu-latest + container: + image: archlinux:base@sha256:b1c2fe6e717bfd5673af8fc217e1e1c3ce0dcbb1d53c3414c8425e7ce79fc6d9 + steps: + - name: Install system packages + run: pacman -Syu --noconfirm --needed bash curl git nodejs autoconf bison gcc make re2c pkgconf python ca-certificates libxml2 sqlite oniguruma libzip libjpeg-turbo libpng icu openssl readline zlib bzip2 libxslt tidy + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup asdf + uses: asdf-vm/actions/setup@v4 + - name: Build and check PHP latest + shell: bash + run: | + set -euo pipefail + asdf plugin add php "$GITHUB_WORKSPACE" + if ! asdf install php latest; then + find "${TMPDIR:-/tmp}" /tmp -name 'php-build.*.log' -type f -print -exec tail -150 {} \; 2>/dev/null || true + exit 1 + fi + asdf set php latest + php --version + for ext in openssl curl intl mbstring zip gd xsl bz2 pdo_sqlite tidy; do + php --ri "$ext" >/dev/null + printf '✓ %s\n' "$ext" + done + + fedora: + runs-on: ubuntu-latest + container: + image: fedora:44 + steps: + - name: Install system packages + run: dnf install -y bash curl git nodejs autoconf bison gcc gcc-c++ make re2c pkgconf-pkg-config python3 ca-certificates libxml2-devel sqlite-devel oniguruma-devel libcurl-devel libzip-devel libjpeg-turbo-devel libpng-devel libicu-devel openssl-devel readline-devel zlib-devel bzip2-devel libxslt-devel libtidy-devel + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup asdf + uses: asdf-vm/actions/setup@v4 + - name: Build and check PHP latest + shell: bash + run: | + set -euo pipefail + asdf plugin add php "$GITHUB_WORKSPACE" + if ! asdf install php latest; then + find "${TMPDIR:-/tmp}" /tmp -name 'php-build.*.log' -type f -print -exec tail -150 {} \; 2>/dev/null || true + exit 1 + fi + asdf set php latest + php --version + for ext in openssl curl intl mbstring zip gd xsl bz2 pdo_sqlite tidy; do + php --ri "$ext" >/dev/null + printf '✓ %s\n' "$ext" + done From 7cbf2ebe509ee44a99fd6d377399a0578e38714a Mon Sep 17 00:00:00 2001 From: Rusydy Muhiddin Date: Sat, 7 Nov 2026 22:36:22 +0700 Subject: [PATCH 3/3] Add timeout to Arch job in workflow and update README for tidy dependency clarification --- .github/workflows/workflow.yml | 1 + README.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0226a4d8..03cd761a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -241,6 +241,7 @@ jobs: arch: runs-on: ubuntu-latest + timeout-minutes: 45 container: image: archlinux:base@sha256:b1c2fe6e717bfd5673af8fc217e1e1c3ce0dcbb1d53c3414c8425e7ce79fc6d9 steps: diff --git a/README.md b/README.md index 47cf4feb..1017d890 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ PostgreSQL support is optional too. Install `libpq-dev` on Ubuntu or Debian, pass `--with-pgsql` through `PHP_CONFIGURE_OPTIONS`. `GD` uses PHP's bundled library, so an OS `gd` development package is unnecessary. For `FreeType` font support in `GD`, install `libfreetype6-dev` on Ubuntu or Debian, `freetype2` on Arch, `freetype-devel` -on Fedora, or `freetype` with Homebrew. `php-build` enables tidy by default on Linux, so these package lists include it. +on Fedora, or `freetype` with Homebrew. `php-build` enables tidy by default on Linux, +except for PHP 7.4 and PHP 8.0 releases before 8.0.20. These package lists include +the tidy dependency. ### macOS