Generate supplemental RPM packages#1147
Open
cpuguy83 wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds RPM generation for target-level supplemental packages sharing the primary build output.
Changes:
- Generates RPM subpackage metadata, artifacts, dependencies, and scriptlets.
- Refactors shared artifact installation and scriptlet generation.
- Adds template and LLB-level tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
packaging/linux/rpm/template.go |
Generates supplemental RPM sections and artifacts. |
packaging/linux/rpm/template_test.go |
Tests generated subpackage specifications. |
packaging/linux/rpm/buildroot_test.go |
Tests generated RPM-spec LLB operations. |
cpuguy83
force-pushed
the
subpackage-rpm
branch
2 times, most recently
from
July 17, 2026 18:12
a194042 to
117864c
Compare
Add SubPackages() method and supporting types to produce %package, %description, %files, and scriptlet sections for each supplemental package. Refactor Install() to include subpackage artifacts in the shared %install section. Includes comprehensive template-level tests. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Test RPMSpec() at the LLB layer by marshaling the returned state, extracting protobuf ops, and asserting on Mkdir/Mkfile actions. Covers default and custom directory paths, subpackage sections with default and custom names, dependencies, sorted ordering, install artifacts, wrong-target exclusion, and invalid spec error handling. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Install only the primary RPM in default containers and apply package metadata, scriptlets, ownership, and artifact selection to the package that declares them. Strip disabling remains spec-wide because rpmbuild processes the shared buildroot as one unit. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Keep the shared buildroot strip setting controlled by the root package while preserving independent automatic dependency discovery for supplemental packages. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Use deterministic map iteration, derive ownership dependencies without rendering scripts, and keep test gateway doubles minimal. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Generate supplemental package sections directly from the shared target package sequence. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Restore default containers to install every generated binary RPM and keep supplemental package integration coverage with the RPM implementation. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds RPM subpackage sections, artifact selection, and scriptlets, with template and LLB-level coverage.
This is layer 2 of the native supplemental-packages stack and depends on #1146.
Related to #607.