Add modern Debian/Ubuntu packaging for Python 3 (PEP 517, autopkgtest)#87
Add modern Debian/Ubuntu packaging for Python 3 (PEP 517, autopkgtest)#87sarsolot wants to merge 5 commits intocfv-project:python3from
Conversation
Complete rewrite of Debian packaging for the Python 3 version: * Migrate from Python 2 to Python 3 * Switch to PEP 517 build system (pyproject.toml with setuptools.build_meta) * Update to debhelper-compat 13 and dh-sequence-python3 * Add autopkgtest with smoke test and functional verification * Update to Standards-Version 4.7.0 * Add explicit man page installation via debian/cfv.manpages * Modernize debian/copyright to DEP-5 format (includes MIT license for BitTorrent code) * Add debian/watch file for upstream release monitoring * Remove obsolete Python 2 era files (compat, dirs, docs, README.Debian) * Update Vcs-* fields to point to GitHub repository * Target Ubuntu 25.10 (questing) for PPA upload Packaging suitable for both Ubuntu PPA and future Debian submission.
|
Thanks for your effort in updating the Debian packaging! Since I do not know much myself about Debian packaging standards, I would suggest to just merge your changes, since it can only get better from the current broken state. I only noticed two things: You do not run the unit and integration tests in the autopkgtests. Was this an intentional decision? cfv/.github/workflows/ci-python3.yml Lines 60 to 73 in 8533a22 Your current version Line 29 in 8533a22 Does the .dev0 suffix make problems in Debian package versioning?(In Python packaging 3.2.1.dev0 is smaller than 3.2.1: https://packaging.python.org/en/latest/discussions/versioning/)
|
- Bump version from 3.2.0 to 3.2.1~dev0 to match Python version 3.2.1.dev0 - The ~ prefix ensures proper Debian version sorting (sorts before release)
- Simplify version to 1~ppa2 (remove Ubuntu version suffix) - Update Standards-Version from 4.7.0 to 4.7.2
Add cfv-upstream test script that runs: - Unit tests (test.py --unit) - Integration tests - internal (test.py -i) - Integration tests - external process (test.py -e) The test script provides a 'python' shim for upstream tests that use environment. This matches the test suite run in CI and addresses maintainer feedback about running tests in autopkgtests.
|
Thanks a lot for the review - much appreciated. Even though I have been a long-time Debian/Ubuntu user (and admin), Debian packaging itself is something I am still actively learning, so the feedback was very helpful. For now I:
One thought: it might make sense to merge the packaging first for Ubuntu (PPA), but keep this Debian issue open. A working PPA and in-tree debian/ files are a good step, but they are not the same as an official Debian package yet. Additionally, it may be smoother to finalize/merge the Debian packaging once the BLAKE3 and xxh/xxhsfv PRs are merged, so the packaging can reflect them properly (e.g. via Suggests: python3-blake3, python3-xxhash) rather than revisiting it again shortly after. |
|
Thanks for the iteration, it looks good to me. I agree that this PR does not fully solve #4, but it is the first milestone for solving the issue. I have no objection to delay this PR until the others are merged. I will take a look at the BLAKE3 MR in the next days. |
Add modern Debian/Ubuntu packaging for Python 3 (PEP 517, autopkgtest)
Summary
This PR adds/upgrades in-tree Debian/Ubuntu packaging for the Python 3 version of cfv (the
python3branch).The existing
debian/directory in the repo appears to be from the legacy Python 2 era; this replaces it with modern packaging suitable for current Debian/Ubuntu workflows.What’s included
debhelper-compat (= 13)+dh-sequence-python3pyproject.tomlbuild viapybuild(PYBUILD_SYSTEM=pyproject)debian/rulesandRules-Requires-Root: noautopkgtest:cfv --helpsmoke testcfv.1man page viadebian/cfv.manpagesdebian/copyright(includes MIT BitTorrent code licensing)debian/watchincluded for future release monitoringTested
Locally verified on Ubuntu with:
dpkg-buildpackage -blintian -IE --pedantic(only remaining notes relate to upstream LICENSE placement, which is acceptable)autopkgtest -B . -- null(PASS)Ubuntu PPA
For convenience (and to demonstrate it builds/installs cleanly), builds are published in Launchpad PPA:
ppa:sarsolot/cfvNotes for Debian
I’m not a Debian maintainer, but I tried to keep the packaging aligned with Debian best practices so it can be adopted with minimal changes later (mainly versioning/changelog targeting
unstable/UNRELEASEDand any maintainer-field conventions a sponsor may prefer).Happy to iterate on this based on maintainer or sponsor feedback.