Skip to content

Supplemental packages#988

Draft
cpuguy83 wants to merge 5 commits intoproject-dalec:mainfrom
cpuguy83:supplemental_packages
Draft

Supplemental packages#988
cpuguy83 wants to merge 5 commits intoproject-dalec:mainfrom
cpuguy83:supplemental_packages

Conversation

@cpuguy83
Copy link
Copy Markdown
Collaborator

@cpuguy83 cpuguy83 commented Mar 6, 2026

Closes #607

cpuguy83 added 5 commits March 5, 2026 13:11
Introduce SubPackage and SubPackageDependencies types for supplemental
package support (subpackages from shared builds). Add Packages field to
Target, validation in Spec.Validate(), and full unit test coverage.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
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>
Add subpackage support to the Debian packaging pipeline:

- Control file: emit additional Package: stanzas for each subpackage
  with Architecture, Section, Depends, Recommends, Replaces, Conflicts,
  Provides, and Description fields.
- Install scripts: refactor createInstallScripts into per-package helper
  (packageInstallScripts) that generates .install, .manpages, .dirs,
  .docs, and .links files for both the primary package and subpackages.
- Postinst: refactor ownership/capabilities helpers to accept artifacts
  directly; add generateSubPackagePostinst for per-subpackage postinst.
- Fix perms: refactor fixupArtifactPerms to iterate primary + subpackages
  via writePackagePerms; update OverridePerms to check subpackage artifacts.
- Systemd: extend OverrideSystemd to emit dh_installsystemd -p<pkgName>
  for subpackage units; refactor customDHInstallSystemdPostinst to handle
  both primary and subpackage units via writeCustomEnableForUnits helper.
- Add comprehensive LLB-level and unit tests covering all generated files.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 self-assigned this Mar 9, 2026
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.

[REQ] Supplemental packages

1 participant