Skip to content

Commit

Permalink
fix(mock-configs): multilib dnf mirrors (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko authored Jul 19, 2024
1 parent c9726d2 commit c63064d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
6 changes: 3 additions & 3 deletions anda/terra/mock-configs/terra-mock-configs.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: terra-mock-configs
Version: 11
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Mock configs for Terra repos

License: MIT
Expand All @@ -16,7 +16,6 @@ Source9: terra-rawhide-x86_64.cfg
Source10: terra-rawhide-aarch64.cfg
Source11: terra-rawhide-i386.cfg


BuildRequires: mock-core-configs
Requires: mock-core-configs
BuildArch: noarch
Expand All @@ -31,6 +30,7 @@ Obsoletes: anda-mock-configs < 3-2%{?dist}

%build


%install
mkdir -p %{buildroot}%{_sysusersdir}
mkdir -p %{buildroot}%{_sysconfdir}/mock/templates
Expand All @@ -55,7 +55,7 @@ cp -v %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/


%changelog
* Wed Jul 18 2024 Cappy Ishihara <[email protected]> - 11-1
* Thu Jul 18 2024 Cappy Ishihara <[email protected]> - 11-1
- Include multilib mock files for x86-based systems (backwards compatibility)

* Wed Jul 10 2024 madonuko <[email protected]> - 10-1
Expand Down
24 changes: 22 additions & 2 deletions anda/terra/mock-configs/terra.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
config_opts['root'] = 'terra-{{ releasever }}-{{ target_arch }}'
config_opts['dist'] = 'fc{{ releasever }}' # only useful for --resultdir variable subst
config_opts['macros']['%dist'] = '.fc{{ releasever }}'
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['package_manager'] = 'dnf5'
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:{{ releasever }}'
config_opts['mirrored'] = True
config_opts['mirrored'] = config_opts['target_arch'] != 'i686'
config_opts['chroot_setup_cmd'] = 'install @{% if mirrored %}buildsys-{% endif %}build'
config_opts['plugin_conf']['root_cache_enable'] = True
config_opts['plugin_conf']['yum_cache_enable'] = True
config_opts['plugin_conf']['ccache_enable'] = True
Expand Down Expand Up @@ -43,6 +43,26 @@ enabled=1
enabled_metadata=1
metadata_expire=4h

# Only used for multilib builds, pulls straight from fedora koji
# Use /rawhide/latest instead of /f{{ releasever }}-build/latest for rawhide
[local-f{{ releasever }}-build]
name=local
baseurl=https://kojipkgs.fedoraproject.org/repos/f{{ releasever }}-build/latest/$basearch/
cost=2000
# enabled only if not mirrored, and not rawhide
enabled={% if not mirrored and releasever != 'rawhide' %}1{% else %}0{% endif %}
skip_if_unavailable=False

[local-rawhide-build]
name=local-rawhide
baseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/$basearch/
cost=2000
# enabled only if not mirrored, and rawhide
enabled={% if not mirrored and releasever == 'rawhide' %}1{% else %}0{% endif %}
skip_if_unavailable=False




{% if mirrored %}
[fedora]
Expand Down

0 comments on commit c63064d

Please sign in to comment.