Skip to content

Commit

Permalink
feat(mock-configs): update with rawhide on multilib
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko committed Jul 19, 2024
1 parent a8cb2bf commit 2de756f
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 35 deletions.
5 changes: 5 additions & 0 deletions anda/terra/mock-configs/terra-39-i386.cfg
Original file line number Diff line number Diff line change
@@ -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')
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['releasever'] = '38'
config_opts['releasever'] = '40'
config_opts['target_arch'] = 'aarch64'
config_opts['legal_host_arches'] = ('aarch64',)

Expand Down
5 changes: 5 additions & 0 deletions anda/terra/mock-configs/terra-40-i386.cfg
Original file line number Diff line number Diff line change
@@ -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')
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config_opts['releasever'] = '38'
config_opts['releasever'] = '40'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)

Expand Down
43 changes: 26 additions & 17 deletions anda/terra/mock-configs/terra-mock-configs.spec
Original file line number Diff line number Diff line change
@@ -1,15 +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-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
Expand All @@ -30,29 +35,33 @@ 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-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
* 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
- Include mock files for Terra 40
- Remove mock files for Terra 38

* Mon Jan 08 2024 Lleyton Gray <[email protected]> - 7-1
- Bump ccache max size to 10G

Expand Down
5 changes: 5 additions & 0 deletions anda/terra/mock-configs/terra-rawhide-aarch64.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config_opts['releasever'] = 'rawhide'
config_opts['target_arch'] = 'aarch64'
config_opts['legal_host_arches'] = ('aarch64',)

include('templates/terra.tpl')
5 changes: 5 additions & 0 deletions anda/terra/mock-configs/terra-rawhide-i386.cfg
Original file line number Diff line number Diff line change
@@ -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')
5 changes: 5 additions & 0 deletions anda/terra/mock-configs/terra-rawhide-x86_64.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config_opts['releasever'] = 'rawhide'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)

include('templates/terra.tpl')
37 changes: 21 additions & 16 deletions anda/terra/mock-configs/terra.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 Expand Up @@ -174,21 +194,6 @@ type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-cisco-openh264]
name=Fedora $releasever openh264 (From Cisco) - $basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-$releasever&arch=$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-cisco-openh264-debuginfo]
name=Fedora $releasever openh264 (From Cisco) - $basearch - Debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
{% endif %}
"""

Expand Down

0 comments on commit 2de756f

Please sign in to comment.