Skip to content

sdk: enable xz RPM payload support in the SDK - #44

Merged
jiria merged 1 commit into
aclmainfrom
jiria/sdk-rpm-xz-payload
Aug 1, 2026
Merged

sdk: enable xz RPM payload support in the SDK#44
jiria merged 1 commit into
aclmainfrom
jiria/sdk-rpm-xz-payload

Conversation

@jiria

@jiria jiria commented Jul 31, 2026

Copy link
Copy Markdown
Member

Azure Linux 4 ships xz-compressed RPM payloads, which the SDK's rpm cannot install because it is built without the lzma USE flag (it never advertises rpmlib(PayloadIsXz)).

  • Add app-arch/rpm caps lzma bzip2 to the SDK target profile (profiles/coreos/targets/sdk/package.use).
  • Putting it in the profile rather than in Dockerfile.sdk-update means it applies both when a fresh SDK image is bootstrapped and when an existing one is updated — the existing --changed-use emerge in Dockerfile.sdk-update picks up the rebuild.
  • bzip2 covers rpmlib(PayloadIsBzip2); caps is pinned because file capabilities from Azure Linux packages depend on it.

Work item: AB#22734

Azure Linux ships xz-compressed RPM payloads, but rpm only advertises the
rpmlib(PayloadIsXz) capability when built with the lzma USE flag, which is
off by default upstream. Without it, installing those packages fails with a
missing-dependency error.

Set the flags in the SDK target profile rather than in Dockerfile.sdk-update
so they apply both when a fresh SDK image is bootstrapped and when an
existing one is updated. Also enable bzip2 for rpmlib(PayloadIsBzip2), and
pin caps, which is needed to apply file capabilities from Azure Linux
packages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d938d41-62cb-43ad-9422-864d07815eb2
@jiria
jiria force-pushed the jiria/sdk-rpm-xz-payload branch from 334e3af to 4765343 Compare July 31, 2026 16:59
@jiria jiria changed the title sdk: enable xz RPM payload support in the SDK container sdk: enable xz RPM payload support in the SDK Jul 31, 2026
@jiria
jiria marked this pull request as ready for review July 31, 2026 21:54
@jiria
jiria requested a review from a team as a code owner July 31, 2026 21:54
Copilot AI review requested due to automatic review settings July 31, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Enables the Gentoo app-arch/rpm features required for the SDK to install Azure Linux 4 RPMs that use xz-compressed payloads, by setting the appropriate USE flags in the SDK target profile.

Changes:

  • Enable lzma and bzip2 USE flags for app-arch/rpm so it advertises/handles rpmlib(PayloadIsXz) and rpmlib(PayloadIsBzip2).
  • Enable caps USE flag for app-arch/rpm to support applying file capabilities from Azure Linux packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jiria

jiria commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Validation

Built the SDK two ways from this branch and inspected the resulting containers.

Baseline (without this change):

rpmlib(PayloadIsBzip2) = 3.0.5-1
rpmlib(PayloadIsZstd)  = 5.4.18-1

With this change — SDK update path (update_chroot + Dockerfile.sdk-update):

rpmlib(PayloadIsBzip2) = 3.0.5-1
rpmlib(PayloadIsLzma)  = 4.4.2-1
rpmlib(PayloadIsXz)    = 5.2-1
rpmlib(PayloadIsZstd)  = 5.4.18-1

With this change — from-scratch bootstrap path (catalyst):

rpmlib(PayloadIsBzip2) = 3.0.5-1
rpmlib(PayloadIsLzma)  = 4.4.2-1
rpmlib(PayloadIsXz)    = 5.2-1
rpmlib(PayloadIsZstd)  = 5.4.18-1

The emerge output confirms app-arch/rpm is rebuilt with the expected flags:

[ebuild  N     ] app-arch/rpm-4.20.1-r2::portage-stable
  USE="acl bzip2 caps iconv lzma python readline sequoia sqlite zstd
       -audit -berkdb -dbus -doc (-nls) -openmp -selinux"

Both paths resolve the same profile via get_sdk_profile()
(build_library/toolchain_util.sh), which is consumed by update_chroot and
by DEFAULT_PROFILE in build_library/catalyst.sh — so a single
profiles/coreos/targets/sdk/package.use entry covers both, and no
Dockerfile change is needed.

@jiria
jiria merged commit bfc4015 into aclmain Aug 1, 2026
23 checks passed
@jiria
jiria deleted the jiria/sdk-rpm-xz-payload branch August 1, 2026 03:02
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.

3 participants