Skip to content

feat(mock-core-configs): add correct mock config for distro#16923

Open
reubeno wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
reubeno:mock-configs-for-distro
Open

feat(mock-core-configs): add correct mock config for distro#16923
reubeno wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
reubeno:mock-configs-for-distro

Conversation

@reubeno
Copy link
Copy Markdown
Member

@reubeno reubeno commented Apr 28, 2026

Move mock-core-configs from an inline components.toml entry to a dedicated comp definition with overlays that ship an Azure Linux 4.0 chroot config out of the box.

The template targets releasever=4.0, dist=azl4, package_manager=dnf5, and bootstraps from an alpha container image. dnf is pointed at the alpha2 RPMs (gpgcheck=0 since alpha2 staging metadata is unsigned). This includes non-base RPMs as well.

The chroot_setup_cmd mirrors the internal stage2 list (minus azurelinux-stage1-compat).

End-user effect: dnf install mock on AZL 4.0 yields a working default config so mock <srpm> produces AZL 4.0 RPMs without any extra setup.

Resolves: AB#18772

Copilot AI review requested due to automatic review settings April 28, 2026 21:30
@reubeno reubeno changed the title feat(mock-core-configs): add Azure Linux 4.0 chroot config feat(mock-core-configs): add correct mock config for distro Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR moves mock-core-configs from an inline components.toml entry into a dedicated component definition and adds overlays/files so the built mock-core-configs RPM ships Azure Linux 4.0 mock chroot configs by default.

Changes:

  • Add mock-core-configs.comp.toml with overlays to bump Release, add new mock config/template files, install them, and adjust %post default selection.
  • Add Azure Linux 4.0 mock template (azure-linux-4.tpl) and arch configs (azure-linux-4-{x86_64,aarch64}.cfg).
  • Remove the inline [components.mock-core-configs] entry from base/comps/components.toml (now picked up via **/*.comp.toml include).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
base/comps/mock-core-configs/mock-core-configs.comp.toml New dedicated component definition with overlays to ship/install AZL 4.0 mock configs and adjust default behavior.
base/comps/mock-core-configs/azure-linux-4.tpl New mock template defining AZL 4.0 bootstrap and dnf repo configuration.
base/comps/mock-core-configs/azure-linux-4-x86_64.cfg New x86_64 mock chroot config that includes the AZL 4.0 template.
base/comps/mock-core-configs/azure-linux-4-aarch64.cfg New aarch64 mock chroot config that includes the AZL 4.0 template.
base/comps/components.toml Removes the inline mock-core-configs component entry (component now defined via dedicated .comp.toml).

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

Comment thread base/comps/mock-core-configs/mock-core-configs.comp.toml
Comment thread base/comps/mock-core-configs/mock-core-configs.comp.toml
Comment thread base/comps/mock-core-configs/azure-linux-4.tpl
Comment thread base/comps/mock-core-configs/mock-core-configs.comp.toml Outdated
@github-actions

This comment was marked as outdated.

Move mock-core-configs from an inline components.toml entry to a
dedicated comp definition with overlays that ship an Azure Linux 4.0
chroot config out of the box.

The template targets releasever=4.0, dist=azl4, package_manager=dnf5,
and bootstraps from an alpha container image. dnf is pointed at the
alpha2 RPMs (gpgcheck=0 since alpha2 staging metadata is unsigned).
This includes non-base RPMs as well.

The chroot_setup_cmd mirrors the internal stage2 list (minus
azurelinux-stage1-compat).

End-user effect: `dnf install mock` on AZL 4.0 yields a working
default config so `mock <srpm>` produces AZL 4.0 RPMs without any
extra setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reubeno reubeno force-pushed the mock-configs-for-distro branch from 83809fd to acc6d47 Compare April 29, 2026 00:42
lines = [
"",
"# Azure Linux 4.0 configs (added by azldev overlay).",
"install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/mock/templates/azure-linux-4.tpl",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

SOURCE1

question(non-blocking): since we're inserting these sources, the position could change if upstream mock spec adds a new source entry. Is there a way to link these references with their corresponding source toml entry? Not needed for this PR, but just noticing it.

@@ -0,0 +1,56 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils dnf5 azurelinux-release-common findutils gawk glibc-minimal-langpack grep gzip info patch azurelinux-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: Should dnf5-plugins be up here? Or does that naturally resolve in some other way with mock?

@@ -0,0 +1,56 @@
config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio diffutils dnf5 azurelinux-release-common findutils gawk glibc-minimal-langpack grep gzip info patch azurelinux-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz'
# TODO: Replace the explicit chroot_setup_cmd package list above with a
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TODO

AB#19411

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