Skip to content

Add Debian packages to stable releases - #158

Closed
matveynator wants to merge 5 commits into
mainfrom
debian-packaging
Closed

matveynator wants to merge 5 commits into
mainfrom
debian-packaging

Conversation

@matveynator

Copy link
Copy Markdown
Owner

What changed

  • add an upstream .deb package builder for amd64 and arm64
  • install the server binary as /usr/bin/sitebrush
  • reuse SiteBrush's existing -install / -uninstall service lifecycle
  • build both Debian packages during every stable release
  • document the recommended https://sitebrush.com/apt/ repository layout
  • keep official Debian source packaging as a separate later step

Package version

Stable release packages use 2.0.${GITHUB_RUN_NUMBER} so package versions increase monotonically with the existing release workflow.

Validation

The package builder was exercised with dpkg-deb --build, --info, and --contents.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bbfd095af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

set -e

if [ "$1" = "configure" ]; then
/usr/bin/sitebrush -install

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid rewriting the live service binary during upgrades

When upgrading an existing installation, the old service remains running and this postinst invokes -install again. The installer previously copied /usr/bin/sitebrush to /usr/local/bin/sitebrush and runs the service from that copy; prepareInstallFilesystem then tries to reopen the still-running executable with O_TRUNC, which Linux rejects with ETXTBSY (text file busy). Consequently, normal upgrades leave the package unconfigured unless the service is stopped first or the package uses a package-owned executable without rewriting it in place.

Useful? React with 👍 / 👎.


case "$1" in
remove|deconfigure)
/usr/bin/sitebrush -uninstall || 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.

P1 Badge Uninstall the service noninteractively before package removal

During ordinary or unattended package removal, -uninstall enters the interactive wizard because the CLI always passes stdin; EOF or Enter selects its safe default of keeping the service, and the cancellation is treated as a successful exit. The unconditional || true also hides actual uninstall failures, so dpkg removes /usr/bin/sitebrush while the enabled service and its unmanaged /usr/local/bin/sitebrush copy continue running. The maintainer script needs a noninteractive removal path whose failures prevent package removal.

Useful? React with 👍 / 👎.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matveynator
matveynator deleted the debian-packaging branch September 27, 2026 08:39
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.

2 participants