Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configs: use DNF5-team-provided bootstrap images #1347

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions mock-core-configs/etc/mock/templates/fedora-branched.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ config_opts['chroot_setup_cmd'] = 'install @{% if mirrored %}buildsys-{% endif %
config_opts['dist'] = 'fc{{ releasever }}' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]

# https://fedoraproject.org/wiki/Changes/BuildWithDNF5 for Fedora 40+
config_opts['package_manager'] = '{% if releasever|int >= 40 %}dnf5{% else %}dnf{% endif %}'

config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:{{ releasever }}'
# For F41+ there's https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5 so
# once finished, we may use the default Fedora image. Now we are on nightlies
# maintained by the RPM Software Management team.
if int(config_opts['releasever']) >= 40:
config_opts['package_manager'] = 'dnf5'
config_opts['bootstrap_image'] = 'quay.io/rpmsoftwaremanagement/fedora-dnf5:{{ releasever }}'
Comment on lines +13 to +17
Copy link

Choose a reason for hiding this comment

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

fedora-dnf5:tag provides fedora with dnf5 installed from main repository. These images are rebuilt every day but they use the fedora:tag images and just istall dnf5 in it.

we actually have fedora-dnf5-nightly:tag which provides the nightly dnf5 builds

Copy link
Member Author

Choose a reason for hiding this comment

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

This was an intentional choice, I don't think we want to use pre-release DNF5 images.

Copy link

@inknos inknos Mar 11, 2024

Choose a reason for hiding this comment

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

yeah yeah I mean "Now we are on nightlies" is confusing. or at least confused me for a second :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I see, good point, I'm going to reword the docs :)

config_opts['bootstrap_image_ready'] = True
else:
config_opts['package_manager'] = 'dnf'
config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:{{ releasever }}'

config_opts['dnf.conf'] = """
[main]
Expand Down
8 changes: 4 additions & 4 deletions mock-core-configs/etc/mock/templates/fedora-rawhide.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ config_opts['releasever'] = '41'
# https://fedoraproject.org/wiki/Changes/BuildWithDNF5
config_opts['package_manager'] = 'dnf5'

config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:rawhide'

# For F41+ there's https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5 so
# once done, re-revert https://pagure.io/fedora-kickstarts/c/f7bf98d3af6d655c6d64ba9c8d2f88cbffbbb06d?branch=main
#config_opts['bootstrap_image_ready'] = True
# once finished, we may use the default Fedora image. Now we are on nightlies
# maintained by the RPM Software Management team.
config_opts['bootstrap_image'] = 'quay.io/rpmsoftwaremanagement/fedora-dnf5:rawhide'
config_opts['bootstrap_image_ready'] = True

config_opts['description'] = 'Fedora Rawhide'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Fedora Rawhide and Branched configurations have been updated to utilize
bootstrap images `{% raw %}quay.io/rpmsoftwaremanagement/fedora-dnf5:{{ releasever }}{% endraw %}`
for Fedora 40 and newer versions. These images come pre-installed with the
`dnf5` and `dnf5-plugins` packages, allowing Mock to set `bootstrap_image_ready`
and significantly expedite the environment preparation process.
Loading