feat(deb): Debian trixie packaging and freeunit rebrand#80
Conversation
Bring the Debian packaging work from the downstream development branch onto pre-1.35.6 as a single change: trixie builds for php8.3/php8.4/ php8.5 and python3.13, the freeunit rebrand of package/service/init names, a deb.sury.org apt setup with optional auto-detection and a local-mirror mode, shared package-QA gates with smoke asserts, and the build-deb GitHub Actions workflow pinned to commit SHAs. Scope is limited to pkg/deb, .github/workflows/build-deb.yml and the docs/changes.xml notes; repo-local files (FORK.md, README.md, tooling config) are intentionally excluded from this upstream branch.
There was a problem hiding this comment.
Code Review
This pull request implements a comprehensive rebranding of the Debian packaging files from 'unit' to 'freeunit', introducing customizable variables for branding, runtime paths, and directories. It also adds a local build and smoke-testing suite (build-local.sh and associated helper scripts) and extends support to Debian trixie packages for PHP 8.3, 8.4, 8.5, and Python 3.13. The review feedback suggests reverting the exit code for unknown arguments in the preinst script to 0 to adhere to Debian packaging guidelines, and consistently utilizing the newly defined $PIDFILE variable throughout the SysV init script for better maintainability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| *) | ||
| echo "preinst called with unknown argument \`$1'" >&2 | ||
| exit 0 | ||
| exit 1 |
There was a problem hiding this comment.
According to Debian packaging guidelines, maintainer scripts should exit 0 when called with unknown arguments. This ensures forward compatibility if future versions of dpkg introduce new actions or arguments. Changing this to exit 1 could cause installation or upgrade failures in the future.
| exit 1 | |
| exit 0 |
| start) | ||
| log_daemon_msg "Starting $DESC" "$NAME" | ||
| if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ | ||
| if start-stop-daemon --start --quiet --pidfile %%RUNDIR%%/$NAME.pid \ |
There was a problem hiding this comment.
Since the PIDFILE variable is now defined on line 18, it should be used consistently throughout the init script instead of repeating the hardcoded path %%RUNDIR%%/$NAME.pid.
| if start-stop-daemon --start --quiet --pidfile %%RUNDIR%%/$NAME.pid \ | |
| if start-stop-daemon --start --quiet --pidfile $PIDFILE \ |
| stop) | ||
| log_daemon_msg "Stopping $DESC" "$NAME" | ||
| if start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ | ||
| if start-stop-daemon --oknodo --stop --quiet --pidfile %%RUNDIR%%/$NAME.pid \ |
|
|
||
| start-stop-daemon --stop --quiet --pidfile \ | ||
| /var/run/$NAME.pid --exec $DAEMON || true | ||
| %%RUNDIR%%/$NAME.pid --exec $DAEMON || true |
| sleep 1 | ||
| if start-stop-daemon --start --quiet --pidfile \ | ||
| /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_ARGS; then | ||
| %%RUNDIR%%/$NAME.pid --exec $DAEMON -- $DAEMON_ARGS; then |
Address Gemini review on PR freeunitorg#80: - preinst: exit 0 (not 1) for unknown arguments, restoring upstream behaviour and matching freeunit.postinst/postrm for dpkg forward compatibility. - init: use the $PIDFILE variable in start/stop/restart instead of the repeated %%RUNDIR%%/$NAME.pid literal.
Address Gemini review on PR freeunitorg#80: - preinst: exit 0 (not 1) for unknown arguments, restoring upstream behaviour and matching freeunit.postinst/postrm for dpkg forward compatibility. - init: use the $PIDFILE variable in start/stop/restart instead of the repeated %%RUNDIR%%/$NAME.pid literal.
Wrap the build/smoke apt-get calls (local runner and CI) in apt_retry so a transient mirror/network hiccup retries with linear backoff instead of aborting the script under set -e — the cause of spurious smoke failures. Expose sury_mirror / sury_key_sha256 as workflow_dispatch inputs and env, consumed by sury-setup.sh, for builds behind a proxy or when packages.sury.org is unreachable; empty (the push-trigger default) keeps upstream behaviour. Refuse to fetch the sury signing key over a non-https mirror without SURY_KEY_SHA256: that key becomes apt's trust anchor, so an unauthenticated transport must carry an integrity pin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Brings the Debian packaging work onto
pre-1.35.6as a single squashed change:php8.3/php8.4/php8.5andpython3.13unit.* → freeunit.*)Scope
Limited to
pkg/deb/,.github/workflows/build-deb.ymland thedocs/changes.xmlnotes. Downstream-only files (FORK.md, README, tooling config) are intentionally excluded.🤖 Generated with Claude Code