Skip to content

fix: fall back to GitHub sources when pecl.php.net is down - #25

Open
imorland wants to merge 1 commit into
masterfrom
im/pecl-github-fallback
Open

imorland wants to merge 1 commit into
masterfrom
im/pecl-github-fallback

Conversation

@imorland

Copy link
Copy Markdown
Owner

pecl.php.net has been returning 504s on downloads for long stretches today, longer than #23's retries cover. The FPM rebuild after #24 failed on pecl install redis twice.

bin/pecl-install now tries pecl.php.net 3 times (10s, 20s), then builds the same release from the extension's GitHub tag with phpize && ./configure && make install:

Extension Source
redis phpredis/phpredis
imagick Imagick/imagick
maxminddb maxmind/MaxMind-DB-Reader-php (v tag prefix, sources in ext/)
excimer wikimedia/mediawiki-php-excimer
xdebug xdebug/xdebug
  • Version: for a bare name, pecl's rest/r/<name>/stable.txt picks it. That endpoint has kept answering while downloads failed. name-version (e.g. xdebug-3.5.3) is used as given.
  • Configure options: --configureoptions 'key="value"' becomes --key=value for configure.
  • imagick: its @PACKAGE_VERSION@ placeholder is filled in, as pecl package would.

Checked in php:8.5-cli with the fallback forced: redis 6.3.0 (lz4 + zstd), maxminddb 1.14.0, excimer 1.2.6, imagick 3.8.1, xdebug 3.5.3 all build and load. With pecl reachable, it still installs from pecl.php.net.

This only changes bin/, so merging doesn't start any build. Run both workflows by hand afterwards.

pecl.php.net has been returning 504s on package downloads for long
stretches today, longer than #23's retries cover: the FPM rebuild after #24
failed on redis twice, and a local arm64 build failed after all six retries.

pecl-install now tries pecl.php.net three times (10s, 20s), then builds the
same release from the extension's GitHub tag with phpize, configure and make.
pecl's metadata endpoint keeps answering when downloads don't, so it still
decides which version "latest stable" means; an explicit name-version (as the
xdebug installs use) is taken as given.

--configureoptions 'key="value"' pairs are translated to --key=value for
configure. The @PACKAGE_VERSION@ placeholder imagick's sources carry is filled
in, as `pecl package` would.

Verified in php:8.5-cli with the fallback forced: redis 6.3.0 (with lz4 and
zstd), maxminddb 1.14.0, excimer 1.2.6, imagick 3.8.1 and xdebug 3.5.3 all
build and load. Without it forced, excimer still installs from pecl.php.net.
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