Migrate kolibri-installer-debian into the Python monorepo
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Migrate kolibri-installer-debian from its standalone repo into platforms/ as a uv workspace member. It builds the Kolibri .deb (Launchpad PPAs + the self-hosted APT repo), not a wheel. Unlike kolibri-server, it is not being deprecated — it's the base Debian/Ubuntu installer for real users, so its publish path must migrate seamlessly.
Follows the kolibri-server migration (#14964) and the apt.learningequality.org APT repo (#14965) under #13720.
Complexity: High (publish CI) · Target branch: develop
Context
Standalone repo:
debian/packaging,Dockerfile,Makefile,copy_from_pkg.sh,CHANGELOG(packaging changelog).build_tools/:generate_changelog.py,manage_python.py,build.sh,python_versions.env.scripts/:launchpad_copy.py,create_lp_creds.py.pyproject.toml—version = "0.1.0", requires-python ≥3.10, depsdistro-info+packaging, test extraspytest+vcrpy.tests/.
The .deb version is generated from the Kolibri version (generate_changelog.py) plus a -0ubuntuN packaging-revision knob. The build_deb.yml and prerelease.yml reusables take a Kolibri tarball input (tar-url/tar-file-name).
main bundles a python-build-standalone interpreter into the .deb (debian#157). The monorepo builds the .deb from the v0.16.1 packaging (ref: v0.16.1), so migrating main changes the shipped .deb.
Publish CI:
prerelease.yml(reusable): build signed source →dputtokolibri-proposed→ wait → copy to all supported Ubuntu series → wait.- Secrets:
GPG_SIGNING_KEY,GPG_PASSPHRASE,LP_CREDENTIALS.
- Secrets:
release_ppa.yml(reusable): promotekolibri-proposed→ stablekolibriPPA.release_ppa.ymlalso force-pushes arepreprorepo togh-pagesvia a GitHub App token (LE_BOT_APP_ID/LE_BOT_PRIVATE_KEY).- Both check out
repository: learningequality/kolibri-installer-debianby name.
Build / validation CI:
build_deb.yml(reusable): binary.deb, or the source package withsource-package: true.build_deb.ymlis called…@v0.18.0by the monorepo'spr_build_kolibri.ymlandrelease_kolibri.ymldebjobs.install_test.yml(reusable): installs the.debacross Ubuntu 16.04–24.04, arm64, no systempython3, and an upgrade from 0.19.5.pr_build.yml(on: pull_request): the only caller ofinstall_test.ymland of thesource-packagebuild.test.yml(pytest).- PR scaffolding,
dependabot.yml.
Tooling shared with kolibri-server (platforms/debian-server/scripts/):
- debian's
launchpad_copy.pyhardcodeskolibri-source(source) /kolibri(binary) and targets the current LTS viadistro_info. - server's takes
--packageand targets the runner's series (lsb_release), as does its changelog's distribution. - debian's changelog generator builds the full history from GitHub releases +
CHANGELOG. - server's renders a single entry from
KOLIBRI_VERSION.
kolibri-server's postinst sources platforms/apt-repo/migrate-apt-source.sh to move github.io APT sources to apt.learningequality.org.
The Change
- Move the repo into
platforms/debian/. - Migrate the source repo's
mainas the baseline, bundled interpreter included. - Register it as a uv workspace member (shared lockfile), following
platforms/debian-server/pyproject.toml:requires-python = ">=3.6, <3.15",[dependency-groups],package = false, ruffextend. - Preserve git history via
git filter-repo --to-subdirectory-filter+merge --allow-unrelated-histories. - Migrate
prerelease/release_ppa, keeping the Kolibri-tarball input (tar-url/tar-file-name). - Drop every cross-repo checkout of
learningequality/kolibri-installer-debian. - Replace
release_ppa'sgh-pagesjob with a call toplatform-apt-repo-publish.yml(deb-artifact-name). - Drop the
LE_BOT_*secrets and thedebian-repo-signing-key-idinput. - Call debian's prerelease → promote →
platform-apt-repo-publish.ymlfromrelease_kolibri.yml, mirroringserver_release. - Install
migrate-apt-source.shwith thekolibripackage and callmigrate_kolibri_apt_sourcefromkolibri.postinstonconfigure, as server does. - Make
seed_old_pages.shcreategh-pagesfromconf/distributions.inwhen the target repo has none (kolibri-server's Pages is workflow-deployed, with no branch). - Migrate
build_deb.ymlandinstall_test.yml. - Point the
debjobs inpr_build_kolibri.ymlandrelease_kolibri.ymlat the localbuild_deb.yml, dropping the@v0.18.0pin andref: v0.16.1. - Add the
source-packagebuild andinstall_test.ymltopr_build_kolibri.yml, against the PR's own.deb. - Do not migrate
pr_build.yml. - Dedup onto debian's
launchpad_copy.py, parameterized by source and binary package name. - Both packages target the current LTS.
- Server's release workflow drops runner-series detection for the changelog distribution,
wait-for-publishedandcopy-to-series. - Dedup onto debian's changelog generator; server's copy is removed.
- Collapse duplicated PR scaffolding and
dependabot.ymlinto the monorepo's copies. - Prefix-name migrated workflow files (
platform-debian-*.yml). - Add debian's
pytest tests/as a row intox.yml'splatform_testsmatrix.
Out of Scope
- Migrating other installers — separate per-repo tasks under #13720.
- Archiving the source repo.
- server/debian package consolidation — tracked in #141.
- Building the
.debfrom the source tree instead of the Kolibri tarball input. - Arch-specific bundled Python in PPA builds (debian#158).
- Behavioural changes to the Launchpad release DAG beyond the LTS targeting above.
- Admin/infra (secrets,
releaseenvironment, runningseed_old_pages.shfor the cutover, unarchiving kolibri-server and switching its Pages source togh-pages, transferring issues and open PR debian#100) — tracked on #13720. - Making the build/validation CI blocking — the WHL smoke-test fan-in remains the sole blocking gate.
Acceptance Criteria
Code migration
- [ ] Content of the source repo's
mainatplatforms/debian/. - [ ] One
launchpad_copy.py+ one changelog generator remain; server's copies gone. - [ ] Server's Launchpad pipeline uses them and targets the current LTS.
- [ ] No workflow references
learningequality/kolibri-installer-debian. - [ ] History +
git blamepreserved. - [ ] Passes pre-commit without per-file ignores.
Workspace integration
- [ ] uv workspace member under
uv sync --group dev --all-packages.
Publish / release pipeline
- [ ]
release_kolibri.ymlruns debian's Launchpad prerelease (tokolibri-proposed, multi-series) and promote (proposed→stable). - [ ]
release_kolibri.ymlpasses debian's built.debtoplatform-apt-repo-publish.yml. - [ ] The
gh-pagespush andLE_BOT_*secrets are removed. - [ ]
seed_old_pages.shseeds a repo with nogh-pagesbranch, producing a signedstablerepo holding the given.deb.
Build / validation CI
- [ ]
build_deb.ymlandinstall_test.ymlmigrated and prefix-named. - [ ]
pr_build_kolibri.ymlandrelease_kolibri.ymldebjobs callbuild_deb.ymllocally; no@v0.18.0orref: v0.16.1. - [ ]
pr_build_kolibri.ymlruns the source-package build andinstall_test.yml. - [ ]
pr_build.ymlis not migrated. - [ ] debian's
pytest tests/runs as aplatform_testsrow, instage2_required_checks'sneeds:. - [ ] Duplicated PR scaffolding collapsed.
Runtime
- [ ] The monorepo
.debpasses everyinstall_test.ymlleg. - [ ] Upgrading
kolibrirewrites an existinggithub.io/kolibri-installer-debiansource toapt.learningequality.org. - [ ] The
postinstleaves a Launchpad-PPA source untouched. - [ ]
apt install kolibrifromapt.learningequality.orgworks after installingkolibri-archive-keyring.
References
- Source repository: https://github.com/learningequality/kolibri-installer-debian
- uv workspaces: https://docs.astral.sh/uv/concepts/projects/workspaces/
AI usage
Used Claude Code to draft this issue from the migration-framework design; I drove scope and decisions. Claude read the source repo's workflows, Makefile and launchpad_copy.py, and compared them against the migrated platforms/debian-server/ and platforms/apt-repo/ on develop.
Plan: Move kolibri-installer-debian main into platforms/debian/ with history, run its build/test/publish CI from the monorepo, and dedup the Launchpad tooling kolibri-server copied from it.
- [ ] Import the source repo's history
- [ ] Wire
platforms/debianas a workspace member - [ ] Collapse duplicated scaffolding
- [ ] One changelog generator
- [ ] One
launchpad_copy.py; server's Launchpad pipeline on it - [ ] Build and install-test the
.debfrom the monorepo - [ ]
kolibrimigrates github.io APT sources on configure - [ ] Launchpad publish and APT-repo publish from
release_kolibri.yml - [ ] Seed a Pages repo that has no
gh-pagesbranch - [ ] Self-review the produced code
Assumptions — the issue did not settle these; say so if one is wrong.
- The shared generator heads the changelog with the build version, synthesizing an entry for non-release versions; if wrong, PR source-package builds fail on the orig-tarball name.
- The generator drops GitHub releases newer than the build version; if wrong, a PR into an old release branch versions its
.debas a newer release. - kolibri-server's committed
debian/changeloggets every Kolibri release after 0.5.1 prepended at build; if a single-entry changelog is wanted, the generator needs a no-history mode. - Debian's prerelease runs only for final releases, after
block_release_step, mirroringserver_release; if Kolibri betas should reachkolibri-proposed, drop itsif. - A second
release-environment approval sits between debian's prerelease and promote; if unwanted, promote runs as soon as all series publish. - One
LP_CREDENTIALSserves both pipelines despite differingAPP_NAMEs; if launchpadlib rejects that, one pipeline's login fails until credentials are regenerated. - The migration assertion runs only in the install test's upgrade leg; if fresh installs need it too, add it to every leg.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
@rtibbles Blocked — these cannot be assumed either way:
- Plan Task 9 (
seed_old_pages.shcreatinggh-pageswhen missing) and theplatforms/apt-repo/README.md/platform-apt-repo-publish.yml:53-55comment updates from Tasks 7–8 touch files outside this branch's diff, which the review pass may not modify. Land them on this branch anyway, or in a follow-up PR?
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
Land them on this branch anyway, please.
@rtibbles Blocked — these cannot be assumed either way:
- The
kolibri.debon this branch is ~155 MB (two bundled Pythons), over GitHub's 100 MiB per-file limit, soseed_old_pages.sh --repo kolibri-installer-debiancannot push to that repo'sgh-pages. Pick one: ship a cutover.debunder 100 MiB for this repo, or move that site to anactions/deploy-pagesartifact like kolibri-server's.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
We will make both sites a deploy-pages action - we will need to update both actions on those repositories to just take the URL of a deb file to deploy, so that we can do the manual cutover once.
@rtibbles Blocked — these cannot be assumed either way:
- Nothing calls
seed_old_pages.shnow that both old sites deploy from a.debURL, yet the AC "seed_old_pages.shseeds a repo with nogh-pagesbranch" still requires its create path. Drop the script, its test and that AC, or keep them?
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
I think as long as the updates to those repos also handle the cutover that seed_old_pages was responsible for, then we can drop it all.
@rtibbles Blocked — these cannot be assumed either way:
- Betas now upload to
kolibri-proposed(as you asked), so an older-line patch shipped mid-beta (e.g.0.19.6after0.20.0b1) is rejected there and never reaches the stablekolibriPPA. Accept that, or skip betas indeb_prerelease?
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
@rtibbles Blocked — these cannot be assumed either way:
- Pi image zips now take the
.deb's Debian version (kolibri-pi-image-0.20.0~alpha1.zip, was…-0.20.0a1.zip). The fix is inplatforms/raspberry-pi/Makefile:69/platform-pi-build_img.yml, outside this PR's files. Fix it on this branch, or file a follow-up?
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
Fix in this branch, this is absolutely fine!