Add Debian packages to stable releases - #158
matveynator wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What changed
.debpackage builder foramd64andarm64/usr/bin/sitebrush-install/-uninstallservice lifecyclehttps://sitebrush.com/apt/repository layoutPackage 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.