Replace stdeb packaging with policy-conformant debian/ directory - #104
Conversation
Build all Debian packages from a hand-written debian/ directory using the
standard debhelper / dh-python (pybuild) tooling instead of stdeb.
A single source package now produces three binary packages:
- homcc the client (/usr/bin/homcc)
- homccd the server (/usr/bin/homccd) plus its systemd unit
- python3-homcc-common the shared homcc.common code
The homcc and homccd packages depend on python3-homcc-common instead of each
shipping their own copy of homcc.common. This removes the file conflict that
previously required "dpkg -i --force-overwrite" when installing both.
Also:
- add a unified setup.py declaring all sub-packages and both console scripts
- rewrite the Makefile to build via dpkg-buildpackage and collect the .deb
files in ./target
- update the README installation and build instructions
- ignore debhelper/pybuild in-tree build artifacts
The legacy stdeb files (stdeb.cfg, setup_client.py, setup_server.py) are kept
for now and are unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match the debian/changelog 1.0.3 entry so the built package metadata and the egg-info agree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Debian packages are now built from the hand-written debian/ directory via dpkg-buildpackage, so stdeb is no longer used. Remove python3-stdeb (and the now-unused stdeb-flow apt packages) from the build workflow and drop stdeb from requirements.txt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitHub retired the cache service backend used by the older action versions, so setup-python's cache: 'pip' fails with "Cache service responded with 400". Bump checkout to v4, setup-python to v5, and upload-artifact to v4, which use the current cache backend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
psf/black@stable installs the latest black and its wrapper script crashes
under Python 3.9 ("str | None" requires 3.10+), failing format-check. Run the
black==22.6.0 and isort versions already installed from requirements.txt
directly instead, which is both version-consistent with local development and
free of the broken action wrapper.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The debian/ directory was authored in 2026. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| homcc client: deb | ||
|
|
||
| homccd: server | ||
| homccd server: deb |
There was a problem hiding this comment.
| homcc client: deb | |
| homccd: server | |
| homccd server: deb | |
| homcc client homccd server: deb |
but honestly, I am also fine with dropping these convenience targets completely
There was a problem hiding this comment.
We could remove the Makefile completely - the debian packages can be built e.g. by just calling debuild in the base directory of the repository. For cleanup, there is debclean.
There was a problem hiding this comment.
I see, thanks! I think it'd be nice to still keep the Makefile for convenience but no strong opinion.
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Pull request overview
This PR replaces the prior stdeb-based Debian packaging flow with a Debian Policy–conformant debian/ directory (debhelper + dh-python/pybuild), producing three binary packages (homcc, homccd, python3-homcc-common) to avoid file conflicts between client/server installs.
Changes:
- Added a complete
debian/packaging directory (control,rules,changelog,copyright,source/format). - Updated the
Makefileto build viadpkg-buildpackageand collect.debartifacts into./target. - Dropped legacy
debian/compatin favor ofdebhelper-compat (= 13)indebian/control.
Reviewed changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Switches build/clean targets to dpkg-buildpackage and collects .deb outputs into ./target. |
| debian/source/format | Declares native source format (3.0 (native)). |
| debian/rules | Uses dh-python/pybuild and overrides install staging dir for package splitting. |
| debian/control | Defines source package metadata and three binary packages with dependencies. |
| debian/changelog | Introduces Debian changelog entry for the packaging rewrite and package split. |
| debian/copyright | Adds DEP-5 formatted copyright/licensing metadata. |
| debian/compat | Removes deprecated compat level file (now handled via debhelper-compat). |
Files excluded by content exclusion policy (12)
- .github/workflows/build-branch.yml
- .github/workflows/build-main.yml
- .gitignore
- README.md
- debian/homcc.install
- debian/homccd.install
- debian/python3-homcc-common.docs
- debian/python3-homcc-common.install
- homcc/client/init.py
- homcc/server/init.py
- requirements.txt
- setup.py
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Debian packages are built with dpkg-buildpackage against system python3-setuptools, so the build job does not need the dev/test tooling from requirements.txt. Remove the pip install step and the now-unused python3-pip dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dpkg-buildpackage runs with -rfakeroot and debian/control sets Rules-Requires-Root: no, so the build needs no real root privileges. Running it under sudo only left root-owned artifacts in the workspace. Drop sudo from the build step. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| homcc client: deb | ||
|
|
||
| homccd: server | ||
| homccd server: deb |
There was a problem hiding this comment.
I see, thanks! I think it'd be nice to still keep the Makefile for convenience but no strong opinion.
Summary
Replaces the stdeb-generated
.debbuild with a hand-written, Debian Policy conformantdebian/directory built via the standarddebhelper/dh-python(pybuild) tooling.A single source package now produces three binary packages:
python3-homcc-commonhomcc/__init__.py,homcc/common/python3-lzo (>= 1.12)homcc/usr/bin/homcc,homcc/client/python3-homcc-common (= 1.0.3),python3-sysv-ipchomccd/usr/bin/homccd,homcc/server/, systemd unitpython3-homcc-common (= 1.0.3)Moving the shared code into
python3-homcc-commonremoves the file conflict that previously forceddpkg -i --force-overwritewhen installing both the client and the server.Changes
Packaging
debian/:control,changelog,rules,copyright,source/format(3.0 (native)), per-package*.install,python3-homcc-common.docs. Kepthomccd.service; removedcompat(nowdebhelper-compat (= 13)).setup.pydeclaring all sub-packages + both console-script entry points (drives pybuild).Makefileto build viadpkg-buildpackageand collect.debs in./target.__version__to1.0.3to match the changelog.--force-overwritenote..gitignore: ignore debhelper/pybuild in-tree build artifacts.stdeb.cfg,setup_client.py,setup_server.py) kept for now, unaffected.CI
stdebentirely: removedpython3-stdeb(and the other stdeb-flow-only apt packages) from the build job, and removedstdebfromrequirements.txt. The build job now installs only whatdpkg-buildpackage/make allneeds (dh-python debhelper devscripts fakeroot python3-all python3-setuptools liblzo2-dev) andsudo make alldrives the new flow. Also removed the now-vestigialpip install -r requirements.txtstep (and the unusedpython3-pipdep) from the build job.checkout@v4,setup-python@v5,upload-artifact@v4) to fixCache service responded with 400from the retired cache backend.psf/black@stable/isort/isort-actionmarketplace steps with direct calls to the pinnedblack==22.6.0/isortfromrequirements.txt. (psf/black@stableinstalls the latest black, whose wrapper script crashes under the pinned Python 3.9.)Verification
makebuilds all threeArchitecture: allpackages;make cleanfully resets the tree.dpkg-deb -cconfirms zero file overlap between packages; systemd unit lands only inhomccd.homcc --version,homccd --version, and cross-packagehomcc.commonimports all resolve.lintianclean except:no-manual-page(manpages out of scope) andbad-distribution-in-changes-file unstable(an Ubuntu-vendor artifact;unstableis Debian-correct).build-main.yml, somain's CI stays healthy after merge.Notes / open questions
unstable(Debian-correct). If CI should target an Ubuntu series (noble/jammy), that can be changed.build-main.yml(push tomainonly); the PR workflowbuild-branch.ymlhas no build job, somake allis first exercised post-merge. Verified locally in the meantime.🤖 Generated with Claude Code