Skip to content

[3.0] Silences the manifest build in the Docker entrypoint without backgrounding it - #9686

Merged
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/entrypoint-posix-redirect
Sep 13, 2026
Merged

Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/entrypoint-posix-redirect

Conversation

@albertlast

@albertlast albertlast commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

.docker/php/entrypoint.sh runs under #!/bin/sh, which in the php:*-apache image is dash. Dash has no &> operator, so the line added in #9679

php -f "$BOARD_DIR/other/update_manifest.php" &>/dev/null || true

parses as php -f … & followed by an empty >/dev/null. The build is sent to the background, its output is not discarded, and || true guards the empty redirection rather than the build.

Measured in the container:

/bin/sh -> /usr/bin/dash
sleep 3 &>/dev/null || true        elapsed=0s   backgrounded
sleep 3 >/dev/null 2>&1 || true    elapsed=3s   waited

and on a real docker compose up from release-3.0:

04:27:48.7268  [smf-dev] building manifest.php
04:27:48.7271  [smf-dev] ready
04:27:48.97    Apache ... resuming normal operations
04:28:39       Updating manifest file...
04:28:47       Done.
04:28:52       Author identity unknown

"ready" is logged — and install.php was already answering 200 — about a minute before the manifest existed, so an install started straight after docker compose up quietly runs without one. The build's own output, git's identity error included, lands in the container log.

This spells the redirect the POSIX way, so the build is waited for and its output discarded, while a failing build still cannot stop the container starting under set -eu:

sh -n entrypoint.sh                                               syntax ok under dash
sh -c "sleep 3; echo LEAKED; exit 7" >/dev/null 2>&1 || true      elapsed=3s, nothing printed, script continued

Waiting does mean the first start of a checkout with no manifest takes as long as the build, which over a Windows bind mount was about 75 seconds on this stack. That is what the building manifest.php / ready log lines around it already describe.

Nothing here is reachable from the PHPUnit suite: it is a shell script run by the container.

Issues References (Fixes|Related|Closes)

  1. Related: [3.0] Improves file integrity checks in installer and upgrader #9679
  2. Related: [3.0] Only commits the manifest when update_manifest.php is asked to #9687 — the same manifest build also stages and commits into the developer's checkout
  3. Related: [3.0] Runs the welcome step's checks when installing from the command line #9688 — CLI installs skip the welcome checks, the manifest check included

🤖 Generated with Claude Code

…nding it

The entrypoint runs under /bin/sh, which is dash in the php image. Dash has
no &> operator, so `php -f … &>/dev/null` parsed as `php -f … &` followed
by an empty redirection: the build ran in the background, its output went
to the container log, and "ready" was logged before the manifest existed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@Sesquipedalian

Copy link
Copy Markdown
Member

I did not realize the Docker image uses dash as its shell.

@Sesquipedalian
Sesquipedalian merged commit c8ff442 into SimpleMachines:release-3.0 Sep 13, 2026
17 of 18 checks passed
@jdarwood007 jdarwood007 added the Meta Repository tools label Sep 13, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Repository tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants