Skip to content

feat(frankenphp): build FrankenPHP for Linux - #26

Closed
sineld wants to merge 4 commits into
flock-php:mainfrom
sineld:feat/linux-frankenphp
Closed

sineld wants to merge 4 commits into
flock-php:mainfrom
sineld:feat/linux-frankenphp

Conversation

@sineld

@sineld sineld commented Oct 19, 2026

Copy link
Copy Markdown

Builds on #24: the first three commits are that PR's; only the last one, feat(frankenphp): build FrankenPHP for Linux like PHP, is new here. I'll rebase once #24 is in.

FrankenPHP for linux-x64 and linux-arm64, built the way macOS builds it: the PHP build script with TARGET=frankenphp. That means a thread-safe PHP embedded, the same compiled-in extensions, and the same shared ones in ext/. Flock on Linux (flock-php/flock#12) installs it with no further change.

Changes

  • packages/php/linux/build.sh: TARGET and FRANKENPHP_VERSION, as in the macOS script: --enable-zts --build-frankenphp, bin/frankenphp, and FrankenPHP's license. Two Linux specifics:
    • Go and xcaddy run inside the container (spc install-pkg go-xcaddy), after the sources are downloaded on the host. That order matters: the container writes the download lock as root, and the host's spc couldn't update it afterwards.
    • FrankenPHP's source is downloaded on the host, like PHP's, and pinned to frankenphp.version.
  • build-php-linux.yml:
    • It takes package (php or frankenphp) and optional (release candidates), like build-php-macos.yml.
    • It picks the build number and asset name per package, adds frankenphp to flock-package.json, and runs smoke-php-package.sh frankenphp on the runner and on CentOS 7.
  • flockrel plan: FrankenPHP for both Linux platforms per PHP version, into php_linux, with frankenphp.linux.build.
  • release.yml: passes package and optional.

Testing

All of this ran on my fork with publish off (https://github.com/sineld/binaries/actions/workflows/build-php-linux.yml):

FrankenPHP 1.13.0 with PHP linux-x64 linux-arm64
8.2.34, 8.3.35, 8.4.26, 8.5.11 ✓ build, readelf, smoke on the runner and on CentOS 7 ✓
  • Smoke test: smoke-frankenphp.sh checks:
    • the embedded ZTS PHP of the right minor
    • every compiled-in extension
    • every shared extension, loaded through an ini file, with opentelemetry's hook
    • a classic request
    • worker mode keeping state between requests
  • End to end with Flock: the 8.4.26 arm64 package was installed with flock frankenphp install --from into Flock built from feat: Linux support for the CLI and daemon flock#12, on Ubuntu 24.04 arm64. flock frankenphp on hello --classic then served the site over HTTPS. The page reported SAPI frankenphp, PHP 8.4.26, ZTS and 64 extensions.
  • flockrel: go test passes. A plan dry run lists FrankenPHP 8.2–8.5 for both Linux platforms.

@sineld

sineld commented Oct 27, 2026

Copy link
Copy Markdown
Author

Closing: superseded by #34, see #24 (comment).

@sineld sineld closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant