Skip to content

Add Debian package build and release workflow - #274

Open
fa-saikat wants to merge 3 commits into
Gemba:masterfrom
fa-saikat:debian-packaging
Open

fa-saikat wants to merge 3 commits into
Gemba:masterfrom
fa-saikat:debian-packaging

Conversation

@fa-saikat

@fa-saikat fa-saikat commented Oct 14, 2026 •

Copy link
Copy Markdown

Follows up on #191 (automated builds, Debian packages, Qt6, tags and releases only).

Summary

  • packaging/build-deb.sh: reproducible .deb from a pinned commit. Runs qmake6 (PREFIX=/usr, SYSCONFDIR=/etc), then make, stages with INSTALL_ROOT, derives Depends via dpkg-shlibdeps (plus runtime-only libqt6sql6-sqlite and p7zip-full, which shlibdeps cannot see), packs with dpkg-deb. No existing build files touched.
  • .github/workflows/deb.yml: builds on Debian trixie (Qt6, matches current Debian libc) for packaging PRs and manual dispatch, and attaches the .deb to published releases with the same softprops/action-gh-release pattern as appimage.yml. Versioning and shipping stay manual. Complements rather than replaces @lukevp's binary-tarballs approach.
  • .gitignore: ignore .deb artifacts and local packaging scratch.

The control default Maintainer (overridable via DEB_MAINTAINER) and the description wording might need a change.

Testing

  • Built and verified locally on Debian trixie: staged tree (/usr/bin/Skyscraper, /etc/skyscraper, 38 files), control fields, and a boot test (Running Skyscraper v3.21.1, config loads).
  • End-to-end proof from my fork: published release with tested .deb attached (fa-saikat/skyscraper debian/3.21.1-1).
  • This PR's own CI run exercises the generalized files.

Risk

Additive only: two new files plus gitignore lines. No changes to the build system, AppImage flow, or release process. Happy to maintain the Debian job going forward.

packaging/build-deb.sh builds a reproducible .deb from a pinned commit (qmake6 PREFIX=/usr SYSCONFDIR=/etc, INSTALL_ROOT staging, dpkg-shlibdeps Depends, dpkg-deb). .github/workflows/deb.yml builds it on Debian trixie for packaging PRs and attaches the .deb to published releases, next to the AppImages. Follows up on Gemba#191.
@Gemba

Gemba commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Hi @fa-saikat, thanks again for your contribution and PR.

I have made some corrections.

  • Keeping also the the version info in the script is too much from my understanding. I am also leaning towards to remove the PINNED_COMMIT and make the --pin-commit mandatory.
  • The VERSION.ini may contain a "-dev" substring (these should never be a release but for local test builds this may happen)
  • The "Debian-trixie ships no git" claim: Idk where it comes from but it is nonsense

Q: What is the deal with the indirection job of "attach" in the deb.yml? What is the use-case here? I strongly assume this can be merged with the "build" job?
Q: I have the feeling you used AI to partially produce this. Can you comment on this, please?

There is more things I will change/examine:

  • The *.sh script should go to supplementary/workflows
  • Some files should go to /usr/share/skyscraper (e.g., the python scripts) resp. /usr/share/doc/skyscraper (e.g., the markdown flles). I will have a list prepared.
  • For proper initialization the environment BUNDLE_QRC=1 should be set then for qmake, it also needs some code changes. But leave it with me.
  • Some more info is missing from the final deb package, but I will have to investigate on this.

@fa-saikat

Copy link
Copy Markdown
Author

Hi @Gemba, thanks for the thorough review and for pushing the fixes.

On AI: yes. I worked with an AI coding agent on this. I made the decisions, reviewed what went out and checked the results; the agent did much of the drafting and CI debugging. I should have mentioned that in the PR description.

Also, you're right, Debian ships git and the wording was wrong. What I actually hit was narrower, the debian:trixie container image has no git, so actions/checkout fell back to downloading a tarball via the REST API, without .git, and the script's first git rev-parse failed. Your change to install git first and then check out once is the cleaner fix.

Attach job: I spilt it out for least privilege, so only the job uploading to the release held contents: write. Merging it into build is fine with me. One thing to watch in the current state: the job-level permissions is gone and the top level is still contents: read, so the softprops/action-gh-release step will most likely get a 403 the first time a real release fires. PR and dispatch runs skip that job, so CI won't show it. Whichever job uploads needs contents: write.

Agreed:

  • Version from VERSION.ini with your -dev handling. Small optional idea: if a -dev build ever gets installed, using ~ instead of - in the version (e.g. 3.22.0~dev...) makes dpkg sort it below the final 3.22.0, so upgrading to the release isn't treated as a downgrade.
  • Dropping PINNED_COMMIT and making --pin-commit mandatory. I'll do that and also clean up the comments that are now stale.
  • Moving the script to supplementary/workflows.

One thing for your file list, which you know better than I do: as I read setupUserConfig(), the first-run copy takes everything in configFiles from SYSCONFDIR/skyscraper, and if validateConfigSrcPath() finds nothing there it returns SINGLE_BIN. So the files in configFiles, which includes CACHE.md, should stay under /etc/skyscraper, and the rest can move to /usr/share/skyscraper or /usr/share/doc/skyscraper. Just flagging it in case it's useful.

I haven't verified your branch state yet. The CI runs are still waiting for approval, and I'd like to see the build pass without the safe.directory line. If you approve them I'll check the result. I'll try to build your exact branch state locally and report back.

Happy to leave BUNDLE_QRC and the remaining package contents with you. I can update the script and test it on a clean trixie install once your file list lands.

This branch has not been deployed

No deployments
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