fix: allow downgrades in overlay apt upgrade for FIPS builds
Metadata
Current evaluation
Merged via PR #1272. Added --allow-downgrades to apt-get upgrade in overlay steps to fix FIPS rock build failures caused by intentional libgcrypt20 downgrades. Includes a minimal test to verify the fix.
Suggested action: —
No scores available.
Issue body
## Summary
- Add `--allow-downgrades` to `apt-get -y upgrade` in the overlay step when Pro/FIPS sources are detected
- Fixes FIPS rock builds failing because the `fips-updates` repository pins `libgcrypt20` to a version older than the noble GA archive, causing apt to refuse the downgrade without `--allow-downgrades`
## Problem
When building FIPS rocks on noble, the `esm.ubuntu.com/fips-updates` repository pins `libgcrypt20` to the FIPS-certified version which is older than the GA version in the standard noble archive. During the overlay `apt-get -y upgrade` step, apt detects this as a downgrade and aborts with:
```
E: Packages were downgraded and -y was used without --allow-downgrades.
```
This started affecting builds recently (e.g. https://github.com/canonical/cilium-rocks/actions/runs/28017207023/job/83118786893).
## Fix
The `--allow-downgrades` flag is safe here because:
1. This code path only executes when Pro/FIPS sources are present (guarded by the `find` check for `ubuntu-esm-*.sources` or `ubuntu-fips-*.sources`)
2. The downgrade is intentional - the FIPS pin sets the preferred version and apt should honor it
3. No other packages are affected since only pinned packages will be downgraded
It is also future safe because it does not break existing build pipelines and allows the rockcraft team to fix future occurances of the issue when on their own pace.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged via PR #1272. Added --allow-downgrades to apt-get upgrade in overlay steps to fix FIPS rock build failures caused by intentional libgcrypt20 downgrades. Includes a minimal test to verify the fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged via PR #1272. Added --allow-downgrades to apt-get upgrade during FIPS overlay builds to resolve libgcrypt20 downgrade failures. Rebased to hotfix/1.19 and included a minimal FIPS packing test to verify the fix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1272 fix: allow downgrades in overlay apt upgrade for FIPS builds | rockcraft | merged | Merged fix allowing downgrades in overlay apt upgrade for FIPS builds. Ported from #1270 to rockcraft to enable Pro tests. Approved, passed CI, and verified via successful Pro test execution. |