Repository navigation
Fix extensions requiring another extension, binaries with docker exec and upgrade Supercronic - #417
Merged
mistraloz merged 8 commits intoOct 9, 2026
Conversation
…guration The output of these scripts is written to generated_conf.ini and to the crontab, or run by bash. A PHP warning (e.g. an extension that cannot be loaded) was written in this output: syntax error in generated_conf.ini, supercronic exiting on a "bad crontab line" and bash syntax errors stopping the container. The warnings are now only logged.
…use sudo "sudo -u www-data php ..." printed a sudo password error on each call, and failed with "Unexpected PHP proxy output" when a PHP_* variable had changed (the cache file is not writable by www-data). The proxy now runs PHP with the current configuration when sudo is not available. Fixes thecodingmachine#253
… account has it
The user running the commands is the owner of the working directory. When its ID
belongs to a system account of the image (e.g. 998 is systemd-network in Ubuntu
24.04, and the ID of the gitlab-runner user on many hosts), the commands were run
with this account: no home directory, no sudo ("touch ~/.startup_done:
Permission denied"). Setting DOCKER_USER to such an ID failed ("usermod: UID
'998' already exists").
The system account is now moved to a free ID, so that the docker user takes the
ID of the host user. Its ID is changed in /etc/passwd: usermod would also change
the owner of the files of its home directory ("/").
Also rename a test that had the same name as another one (only the last one was run).
Fixes thecodingmachine#408
memcached requires igbinary and msgpack, redis igbinary, mailparse mbstring and
swoole curl: enabled alone (or with the required extension disabled), the
extension could not be loaded ("undefined symbol: php_msgpack_serialize").
The required extensions are now enabled with it, like mysqlnd for mysqli,
pdo_mysql and swoole.
Fixes thecodingmachine#321
Since Docker 23, "docker exec" (and "docker compose exec") refuses to run a
binary found with a relative path of the PATH ("cannot run executable found
relative to current directory"): vendor/bin and node_modules/.bin were only
added as relative paths. The global Composer binaries were not found at all
outside bash ("~" is only expanded by bash).
The absolute paths of the working directory and of the global Composer binaries
are now added before the relative paths, which are kept for the other
directories.
Fixes thecodingmachine#363
Fixes thecodingmachine#310
Supercronic 0.1.9 (2019) was built with Go 1.14 and is reported by the vulnerability scanners (e.g. CVE-2022-23806 in the Go standard library). 0.2.49 is built with Go 1.26. Refs thecodingmachine#342
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes :
Depends on #416 (this branch contains its commits: merge #416 first).
memcachedcould not be loaded (igbinaryandmsgpacknot enabled), nor
rediswithigbinarydisabled,mailparsewithoutmbstringorswoolewithoutcurl.The extensions required by an enabled extension are now enabled with it, even when they are explicitly disabled,
as was already done for
mysqlnd. The dependencies are listed in a single table insetup_extensions.php.docker exec. Since Docker 23,docker exec(anddocker compose exec) refuses to run a binary found with a relative path of thePATH(cannot run executable found relative to current directory):vendor/binandnode_modules/.binwere only added as relative paths, andthe global Composer binaries were not found outside bash (
~is only expanded by bash). The absolute paths of theworking directory and of the global Composer binaries are now added before the relative paths, which are kept.
SHA1 checked for amd64 and arm64. No option was removed; a new log line at startup (
process reaping disabled, not pid 1) is expected.Fixes #321
Fixes #363
Fixes #310
Test plan (required)
New tests:
test_dependenciesOfExtensionsOnFat(php-extensions.sh) andtest_composerBinaryWithDockerExec(newtool-composer-bin.sh). Supercronic is covered by the existingtool-supercronic.sh.Checklist