Feature #39504
openAdd repoclosure-equivalent dependency checking for Debian packaging
Description
- Problem
RPM packaging has repoclosure checks at two levels:
- Release pipeline: runs against full staging repos (foreman-staging, plugins-staging, katello-staging) catching unresolved dependencies before packages are published
- Per-PR (COPR): runs per-package against COPR build repos during CI
Debian packaging has no equivalent dependency checking at either level. The DEB release pipelines (`foreman-deb.groovy`, `plugins-deb.groovy`) only run install tests via Duffy. There is no automated check for unresolved or broken dependencies in the apt repositories.
This means dependency issues in DEB packages (missing deps, version mismatches, broken alternatives) are only caught at install time — either in CI install tests or worse, by users.
- Proposed solution
Add dependency checking to DEB packaging pipelines using one or more of:
- `dose-debcheck` (from `dose-distcheck` package) — purpose-built installability checker used by Debian QA to monitor all of Debian. Supports foreground/background repo split (maps to repoclosure's target_repos/lookaside_repos pattern). Complete dependency solver handling disjunctive deps, virtual packages, conflicts, and Provides.
- `apt-cache unmet` — checks for unmet dependencies in configured repos
- `apt-rdepends` — recursive dependency resolver, can detect broken chains
This should be added to:
1. The DEB release pipelines (parity with RPM staging repoclosure)
2. Ideally also per-PR CI (parity with RPM COPR repoclosure)
- Context
Discussion originated from https://github.com/theforeman/foreman-packaging/pull/13688 — a major plugin version bump that required multiple iterations to get dependencies right. RPM repoclosure caught some issues but the DEB side had no automated safety net.
- References
- RPM repoclosure config: `package_manifest.yaml` (repoclosure_target_repos, repoclosure_lookaside_repos)
- RPM release pipeline: `theforeman.org/pipelines/release/pipelines/plugins.groovy` (staging-repoclosure stage)
- RPM per-PR pipeline: `theforeman.org/pipelines/test/rpm_copr_packaging.groovy` (Repoclosure stage)
- DEB release pipeline (no dep check): `theforeman.org/pipelines/release/pipelines/plugins-deb.groovy`
- DEB release pipeline (no dep check): `theforeman.org/pipelines/release/pipelines/foreman-deb.groovy`
- dose-debcheck manpage: https://manpages.debian.org/testing/dose-distcheck/dose-debcheck.1.en.html
Updated by Ondřej Gajdušek 5 days ago
https://github.com/theforeman/foreman-packaging/blob/deb/develop/scripts/debcheck but it was never wired to anything