From 99ccdf58a898437e06d6ce8d35efecf69d1d1be2 Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 19 Jul 2024 13:48:55 +0800 Subject: [PATCH 1/5] feat(mock-configs): i386 multilib support --- anda/terra/mock-configs/terra-38-aarch64.cfg | 5 -- anda/terra/mock-configs/terra-38-x86_64.cfg | 5 -- anda/terra/mock-configs/terra-39-i386.cfg | 5 ++ anda/terra/mock-configs/terra-40-i386.cfg | 5 ++ .../mock-configs/terra-mock-configs.spec | 46 +++++++++---------- .../terra/mock-configs/terra-rawhide-i386.cfg | 5 ++ 6 files changed, 38 insertions(+), 33 deletions(-) delete mode 100644 anda/terra/mock-configs/terra-38-aarch64.cfg delete mode 100644 anda/terra/mock-configs/terra-38-x86_64.cfg create mode 100644 anda/terra/mock-configs/terra-39-i386.cfg create mode 100644 anda/terra/mock-configs/terra-40-i386.cfg create mode 100644 anda/terra/mock-configs/terra-rawhide-i386.cfg diff --git a/anda/terra/mock-configs/terra-38-aarch64.cfg b/anda/terra/mock-configs/terra-38-aarch64.cfg deleted file mode 100644 index 42efc70495..0000000000 --- a/anda/terra/mock-configs/terra-38-aarch64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '38' -config_opts['target_arch'] = 'aarch64' -config_opts['legal_host_arches'] = ('aarch64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-38-x86_64.cfg b/anda/terra/mock-configs/terra-38-x86_64.cfg deleted file mode 100644 index caa7a68cc3..0000000000 --- a/anda/terra/mock-configs/terra-38-x86_64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '38' -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-39-i386.cfg b/anda/terra/mock-configs/terra-39-i386.cfg new file mode 100644 index 0000000000..7b57433f26 --- /dev/null +++ b/anda/terra/mock-configs/terra-39-i386.cfg @@ -0,0 +1,5 @@ +config_opts['releasever'] = '39' +config_opts['target_arch'] = 'i686' +config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') + +include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-40-i386.cfg b/anda/terra/mock-configs/terra-40-i386.cfg new file mode 100644 index 0000000000..6e2647df9a --- /dev/null +++ b/anda/terra/mock-configs/terra-40-i386.cfg @@ -0,0 +1,5 @@ +config_opts['releasever'] = '40' +config_opts['target_arch'] = 'i686' +config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') + +include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-mock-configs.spec b/anda/terra/mock-configs/terra-mock-configs.spec index dfe9dfc468..b816d72e5c 100644 --- a/anda/terra/mock-configs/terra-mock-configs.spec +++ b/anda/terra/mock-configs/terra-mock-configs.spec @@ -1,17 +1,20 @@ Name: terra-mock-configs -Version: 9 +Version: 11 Release: 1%{?dist} Summary: Mock configs for Terra repos License: MIT URL: https://terra.fyralabs.com Source0: terra.tpl -Source1: terra-38-x86_64.cfg -Source2: terra-38-aarch64.cfg Source3: terra-39-x86_64.cfg Source4: terra-39-aarch64.cfg -Source5: terra-rawhide-x86_64.cfg -Source6: terra-rawhide-aarch64.cfg +Source5: terra-40-x86_64.cfg +Source6: terra-40-aarch64.cfg +Source7: terra-40-i386.cfg +Source8: terra-39-i386.cfg +Source9: terra-rawhide-x86_64.cfg +Source10: terra-rawhide-aarch64.cfg +Source11: terra-rawhide-i386.cfg BuildRequires: mock-core-configs Requires: mock-core-configs @@ -32,35 +35,32 @@ Obsoletes: anda-mock-configs < 3-2%{?dist} mkdir -p %{buildroot}%{_sysusersdir} mkdir -p %{buildroot}%{_sysconfdir}/mock/templates - cp -v %{SOURCE0} %{buildroot}%{_sysconfdir}/mock/templates/ -cp -v %{SOURCE1} %{buildroot}%{_sysconfdir}/mock/ -cp -v %{SOURCE2} %{buildroot}%{_sysconfdir}/mock/ cp -v %{SOURCE3} %{buildroot}%{_sysconfdir}/mock/ cp -v %{SOURCE4} %{buildroot}%{_sysconfdir}/mock/ cp -v %{SOURCE5} %{buildroot}%{_sysconfdir}/mock/ cp -v %{SOURCE6} %{buildroot}%{_sysconfdir}/mock/ +cp -v %{SOURCE7} %{buildroot}%{_sysconfdir}/mock/ +cp -v %{SOURCE8} %{buildroot}%{_sysconfdir}/mock/ +cp -v %{SOURCE9} %{buildroot}%{_sysconfdir}/mock/ +cp -v %{SOURCE10} %{buildroot}%{_sysconfdir}/mock/ +cp -v %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/ -# For legacy compatibility, only while Terra 38 is still alive -ln -s %{_sysconfdir}/mock/templates/terra.tpl %{buildroot}%{_sysconfdir}/mock/templates/anda.tpl -ln -s %{_sysconfdir}/mock/terra-38-x86_64.cfg %{buildroot}%{_sysconfdir}/mock/anda-38-x86_64.cfg -ln -s %{_sysconfdir}/mock/terra-38-aarch64.cfg %{buildroot}%{_sysconfdir}/mock/anda-38-aarch64.cfg %files %config %{_sysconfdir}/mock/templates/terra.tpl -%config %{_sysconfdir}/mock/terra-rawhide-x86_64.cfg -%config %{_sysconfdir}/mock/terra-rawhide-aarch64.cfg -%config %{_sysconfdir}/mock/terra-39-x86_64.cfg -%config %{_sysconfdir}/mock/terra-39-aarch64.cfg -%config %{_sysconfdir}/mock/terra-38-x86_64.cfg -%config %{_sysconfdir}/mock/terra-38-aarch64.cfg -%config %{_sysconfdir}/mock/templates/anda.tpl -%config %{_sysconfdir}/mock/anda-38-x86_64.cfg -%config %{_sysconfdir}/mock/anda-38-aarch64.cfg +%config %{_sysconfdir}/mock/terra-*-x86_64.cfg +%config %{_sysconfdir}/mock/terra-*-aarch64.cfg +%config %{_sysconfdir}/mock/terra-*-i386.cfg + %changelog -* Mon Jan 15 2024 madonuko - 9.1 -- Update for Terra rawhide +* Wed Jul 18 2024 Cappy Ishihara - 11-1 +- Include multilib mock files for x86-based systems (backwards compatibility) + +* Wed Jul 10 2024 madonuko - 10-1 +- Include mock files for Terra 40 +- Remove mock files for Terra 38 * Mon Jan 08 2024 Lleyton Gray - 7-1 - Bump ccache max size to 10G diff --git a/anda/terra/mock-configs/terra-rawhide-i386.cfg b/anda/terra/mock-configs/terra-rawhide-i386.cfg new file mode 100644 index 0000000000..518184ea6d --- /dev/null +++ b/anda/terra/mock-configs/terra-rawhide-i386.cfg @@ -0,0 +1,5 @@ +config_opts['releasever'] = 'rawhide' +config_opts['target_arch'] = 'i686' +config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') + +include('templates/terra.tpl') From eb3b8d68b18cad7b49db5e8251e104e0559ed8df Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 19 Jul 2024 14:00:26 +0800 Subject: [PATCH 2/5] missing 40 mock files --- anda/terra/mock-configs/terra-40-aarch64.cfg | 5 +++++ anda/terra/mock-configs/terra-40-x86_64.cfg | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 anda/terra/mock-configs/terra-40-aarch64.cfg create mode 100644 anda/terra/mock-configs/terra-40-x86_64.cfg diff --git a/anda/terra/mock-configs/terra-40-aarch64.cfg b/anda/terra/mock-configs/terra-40-aarch64.cfg new file mode 100644 index 0000000000..b5e1e14f5f --- /dev/null +++ b/anda/terra/mock-configs/terra-40-aarch64.cfg @@ -0,0 +1,5 @@ +config_opts['releasever'] = '40' +config_opts['target_arch'] = 'aarch64' +config_opts['legal_host_arches'] = ('aarch64',) + +include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-40-x86_64.cfg b/anda/terra/mock-configs/terra-40-x86_64.cfg new file mode 100644 index 0000000000..b3cc8cafc4 --- /dev/null +++ b/anda/terra/mock-configs/terra-40-x86_64.cfg @@ -0,0 +1,5 @@ +config_opts['releasever'] = '40' +config_opts['target_arch'] = 'x86_64' +config_opts['legal_host_arches'] = ('x86_64',) + +include('templates/terra.tpl') From eb70d70027e93f4681b0dcfe5051ccfc2389188f Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 19 Jul 2024 14:00:55 +0800 Subject: [PATCH 3/5] bad date --- anda/terra/mock-configs/terra-mock-configs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/terra/mock-configs/terra-mock-configs.spec b/anda/terra/mock-configs/terra-mock-configs.spec index b816d72e5c..ffa93cd65a 100644 --- a/anda/terra/mock-configs/terra-mock-configs.spec +++ b/anda/terra/mock-configs/terra-mock-configs.spec @@ -55,7 +55,7 @@ cp -v %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/ %changelog -* Wed Jul 18 2024 Cappy Ishihara - 11-1 +* Thu Jul 18 2024 Cappy Ishihara - 11-1 - Include multilib mock files for x86-based systems (backwards compatibility) * Wed Jul 10 2024 madonuko - 10-1 From 159b1af63fc0e3e619c8815b64b2a13b62c6cba8 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Fri, 19 Jul 2024 13:04:31 +0700 Subject: [PATCH 4/5] feat: pull from Fedora Koji for i686 --- anda/terra/mock-configs/terra.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/anda/terra/mock-configs/terra.tpl b/anda/terra/mock-configs/terra.tpl index e3edff879b..9bdec8ddb0 100644 --- a/anda/terra/mock-configs/terra.tpl +++ b/anda/terra/mock-configs/terra.tpl @@ -5,7 +5,7 @@ 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['plugin_conf']['root_cache_enable'] = True config_opts['plugin_conf']['yum_cache_enable'] = True config_opts['plugin_conf']['ccache_enable'] = True @@ -43,6 +43,14 @@ enabled=1 enabled_metadata=1 metadata_expire=4h +# Only used for multilib builds, pulls straight from fedora koji +[local] +name=local +baseurl=https://kojipkgs.fedoraproject.org/repos/f{{ releasever }}-build/latest/$basearch/ +cost=2000 +enabled={{ not mirrored }} +skip_if_unavailable=False + {% if mirrored %} [fedora] From ee6d3ddc4f191942d054f517d73ec9cf19516196 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Fri, 19 Jul 2024 13:15:20 +0700 Subject: [PATCH 5/5] fix: jinja2 templating --- anda/terra/mock-configs/terra.tpl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/anda/terra/mock-configs/terra.tpl b/anda/terra/mock-configs/terra.tpl index 9bdec8ddb0..73490fa8ab 100644 --- a/anda/terra/mock-configs/terra.tpl +++ b/anda/terra/mock-configs/terra.tpl @@ -44,13 +44,25 @@ enabled_metadata=1 metadata_expire=4h # Only used for multilib builds, pulls straight from fedora koji -[local] +# 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={{ not mirrored }} +# 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]