Skip to content

Debian packaging: normalize maintainer scripts, relax libsagui dependency, and harden postinst DB/bootstrap checks#18

Merged
Al-Muhandis merged 2 commits intomainfrom
codex/fix-post-installation-script-for-tgadmin-qf3ckg
Mar 26, 2026
Merged

Debian packaging: normalize maintainer scripts, relax libsagui dependency, and harden postinst DB/bootstrap checks#18
Al-Muhandis merged 2 commits intomainfrom
codex/fix-post-installation-script-for-tgadmin-qf3ckg

Conversation

@Al-Muhandis
Copy link
Copy Markdown
Owner

Motivation

  • Ensure maintainer scripts do not carry CRLF line endings that can break execution on Debian systems.
  • Avoid making libsagui a hard dependency so package installs on systems without it still succeed while recommending it.
  • Make the postinst script more robust by detecting loader/library availability and handling MySQL root access that requires a password, with clear warnings if bootstrap is skipped.

Description

  • Add normalize_maintainer_scripts() to build-deb.sh to strip DOS line endings from DEBIAN/postinst and DEBIAN/postrm, and call it after copying the debian tree into the staging directory.
  • Update debian/DEBIAN/control to remove libsagui from Depends and add it as Recommends: libsagui2 | libsagui, and add an Origin field.
  • Enhance debian/DEBIAN/postinst by adding libsagui_available() and emitting a warning if the shared library is not found in the dynamic linker cache.
  • Change database bootstrap logic in postinst to check whether mysql -u root can run without a password before performing automatic DB creation and schema import, and emit a warning and skip the bootstrap if root access is denied.

Testing

  • No automated tests were added or run for these changes.

Codex Task

@Al-Muhandis Al-Muhandis merged commit 7415dde into main Mar 26, 2026
2 checks passed
@Al-Muhandis Al-Muhandis deleted the codex/fix-post-installation-script-for-tgadmin-qf3ckg branch March 27, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant