Skip to content

feat(deb): Debian trixie packaging and freeunit rebrand#80

Open
6RUN0 wants to merge 3 commits into
freeunitorg:pre-1.35.6from
6RUN0:feat/pre-1.35.6-debian-trixie-packaging
Open

feat(deb): Debian trixie packaging and freeunit rebrand#80
6RUN0 wants to merge 3 commits into
freeunitorg:pre-1.35.6from
6RUN0:feat/pre-1.35.6-debian-trixie-packaging

Conversation

@6RUN0

@6RUN0 6RUN0 commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Brings the Debian packaging work onto pre-1.35.6 as a single squashed change:

  • trixie builds for php8.3 / php8.4 / php8.5 and python3.13
  • freeunit rebrand of package, service and init script names (unit.* → freeunit.*)
  • deb.sury.org apt setup with optional auto-detection plus a local-mirror mode for offline/reproducible builds
  • shared package-QA gates with smoke asserts, runnable both locally and in CI
  • build-deb GitHub Actions workflow, pinned to commit SHAs

Scope

Limited to pkg/deb/, .github/workflows/build-deb.yml and the docs/changes.xml notes. Downstream-only files (FORK.md, README, tooling config) are intentionally excluded.

🤖 Generated with Claude Code

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/deb/debian/freeunit.preinst Outdated
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
exit 1
exit 0

Comment thread pkg/deb/debian/freeunit.init Outdated
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 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
if start-stop-daemon --start --quiet --pidfile %%RUNDIR%%/$NAME.pid \
if start-stop-daemon --start --quiet --pidfile $PIDFILE \

Comment thread pkg/deb/debian/freeunit.init Outdated
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 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the defined PIDFILE variable here for consistency and better maintainability.

Suggested change
if start-stop-daemon --oknodo --stop --quiet --pidfile %%RUNDIR%%/$NAME.pid \
if start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \

Comment thread pkg/deb/debian/freeunit.init Outdated

start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON || true
%%RUNDIR%%/$NAME.pid --exec $DAEMON || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the defined PIDFILE variable here for consistency and better maintainability.

Suggested change
%%RUNDIR%%/$NAME.pid --exec $DAEMON || true
$PIDFILE --exec $DAEMON || true

Comment thread pkg/deb/debian/freeunit.init Outdated
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the defined PIDFILE variable here for consistency and better maintainability.

Suggested change
%%RUNDIR%%/$NAME.pid --exec $DAEMON -- $DAEMON_ARGS; then
$PIDFILE --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.
6RUN0 added a commit to 6RUN0/freeunit that referenced this pull request Jun 17, 2026
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>
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