feat(mock-core-configs): add correct mock config for distro#16923
Open
reubeno wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
Open
feat(mock-core-configs): add correct mock config for distro#16923reubeno wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
reubeno wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.tomlwith overlays to bumpRelease, add new mock config/template files, install them, and adjust%postdefault 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 frombase/comps/components.toml(now picked up via**/*.comp.tomlinclude).
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.
This comment was marked as outdated.
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>
83809fd to
acc6d47
Compare
| lines = [ | ||
| "", | ||
| "# Azure Linux 4.0 configs (added by azldev overlay).", | ||
| "install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/mock/templates/azure-linux-4.tpl", |
Collaborator
There was a problem hiding this comment.
| @@ -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' | |||
Collaborator
There was a problem hiding this comment.
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 | |||
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.
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 mockon AZL 4.0 yields a working default config somock <srpm>produces AZL 4.0 RPMs without any extra setup.Resolves: AB#18772