Skip to content

fix(images): populate package inventories and SBOMs for minimal containers - #19369

Open
Adit Jha (aditjha-msft) wants to merge 1 commit into
4.0from
aditjha/stage-container-rpmdb-20261015
Open

Adit Jha (aditjha-msft) wants to merge 1 commit into
4.0from
aditjha/stage-container-rpmdb-20261015

Conversation

@aditjha-msft

@aditjha-msft Adit Jha (aditjha-msft) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix empty .packages files and missing installed-package entries in minimal-container SBOMs.

Retain the final RPM database in staging so KIWI can populate .packages and the existing SBOM generator can consume it. Exclude /usr/lib/sysimage/rpm and /var/lib/rpm when constructing the OCI image, keeping the shipped image database-free without restoring RPM/DNF tooling.

Exclusions are scoped to distroless/workload profiles; container-base/core and VM/WSL images are unaffected. Regression checks cover populated inventories and database exclusion.

Koji validation

The official-tag BusyBox scratch build passed on x86_64 and ARM64:

https://172.202.186.211/koji/taskinfo?taskID=1407578

  • Each image has 8 package records and 8 matching installed-package SBOM components, including busybox-1.37.0-6.azl4.
  • Verified OCI layers contain no RPM database or compatibility link, and no RPM/DNF executables.

PyTorch also passed on x86_64 and ARM64: 241 and 85 package records respectively, with matching SBOM package/version sets, including python3-torch-2.8.0-9.azl4. KIWI logs confirm the database exclusions were applied.

https://172.202.186.211/koji/taskinfo?taskID=1407698

Retain the post-cleanup RPM database only in staging and use profile-scoped KIWI OCI exclusions to keep it out of shipped minimal containers. Preserve the existing inventory/SBOM pipeline and verify populated inventories plus database-free filesystems.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2fb5f77f-1b0c-4bfd-b384-65cacf315198

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The packaging-policy decision and unverified production SBOM, signing, and publishing integration require human sign-off.

0 open findings

What changed in this PR

Keeps the RPM database in build staging for KIWI inventories and SBOMs while excluding it from shipped minimal and workload containers.

Changes:

  • Preserve package records after cleanup.
  • Apply OCI exclusions through minimal/workload profile inheritance.
  • Add inventory and database-exclusion checks, and document the policy.
File Description
docs/​containers-workloads.md Documents staging-only RPM database retention.
base/​images/​tests/​cases/​static/​test_container_inventory.py Checks inventories and shipped database absence.
base/​images/​teams/​containers-workloads.xml Applies exclusions to workload profiles.
base/​images/​teams/​container.xml Applies exclusions to distroless profiles.
base/​images/​container-exclude-files.yaml Excludes both RPM database paths.
base/​images/​config-container-base.sh Preserves the staging RPM database during cleanup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@aditjha-msft Adit Jha (aditjha-msft) changed the title fix(images): keep container RPM database in staging only (option 2) fix(images): populate package inventories and SBOMs for minimal containers Oct 17, 2026
@aditjha-msft
Adit Jha (aditjha-msft) marked this pull request as ready for review October 17, 2026 00:23
@aditjha-msft
Adit Jha (aditjha-msft) requested a review from a team as a code owner October 17, 2026 00:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants