Skip to content

Commit

Permalink
configs: use DNF5-team-provided bootstrap images
Browse files Browse the repository at this point in the history
At least temporarily, till the default Fedora images do not contain dnf5
and dnf5-plugins by default.

Fixes: rpm-software-management#1336
  • Loading branch information
praiskup committed Mar 11, 2024
1 parent 71a8580 commit d2d4698
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
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 }}'
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

0 comments on commit d2d4698

Please sign in to comment.