Update for Fedora 40/41/Rawhide (riscv64)

We should always have koji_direct set to True as we want to build
against Koji working repos.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-08-25 12:34:36 +03:00
parent 1d8dce145d
commit ee3e5ee3da
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3

View File

@ -22,7 +22,7 @@ index 0000000..b996fbe
+include('templates/fedora-branched.tpl') +include('templates/fedora-branched.tpl')
diff --git a/etc/mock/fedora-40-riscv64.cfg b/etc/mock/fedora-40-riscv64.cfg diff --git a/etc/mock/fedora-40-riscv64.cfg b/etc/mock/fedora-40-riscv64.cfg
new file mode 100644 new file mode 100644
index 0000000..ae8dac1 index 0000000..2274e24
--- /dev/null --- /dev/null
+++ b/etc/mock/fedora-40-riscv64.cfg +++ b/etc/mock/fedora-40-riscv64.cfg
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
@ -34,7 +34,7 @@ index 0000000..ae8dac1
+ +
+config_opts['description'] = 'Fedora {{ releasever }}' +config_opts['description'] = 'Fedora {{ releasever }}'
+# Pull directly from Koji working repositories +# Pull directly from Koji working repositories
+config_opts['koji_direct'] = False +config_opts['koji_direct'] = True
+ +
+config_opts['chroot_setup_cmd'] = 'install @{% if not koji_direct %}buildsys-{% endif %}build' +config_opts['chroot_setup_cmd'] = 'install @{% if not koji_direct %}buildsys-{% endif %}build'
+ +
@ -102,14 +102,84 @@ index 0000000..ae8dac1
+""" +"""
diff --git a/etc/mock/fedora-41-riscv64.cfg b/etc/mock/fedora-41-riscv64.cfg diff --git a/etc/mock/fedora-41-riscv64.cfg b/etc/mock/fedora-41-riscv64.cfg
new file mode 100644 new file mode 100644
index 0000000..65beeab index 0000000..ef50779
--- /dev/null --- /dev/null
+++ b/etc/mock/fedora-41-riscv64.cfg +++ b/etc/mock/fedora-41-riscv64.cfg
@@ -0,0 +1,4 @@ @@ -0,0 +1,74 @@
+config_opts['releasever'] = '41'
+config_opts['target_arch'] = 'riscv64' +config_opts['target_arch'] = 'riscv64'
+config_opts['legal_host_arches'] = ('riscv64',) +config_opts['legal_host_arches'] = ('riscv64',)
+ +
+include('templates/fedora-rawhide.tpl') +config_opts['root'] = 'fedora-{{ releasever }}-{{ target_arch }}'
+
+config_opts['description'] = 'Fedora {{ releasever }}'
+# Pull directly from Koji working repositories
+config_opts['koji_direct'] = True
+
+config_opts['chroot_setup_cmd'] = 'install @{% if not koji_direct %}buildsys-{% endif %}build'
+
+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 %}'
+
+# Disabled, until Fedora 41 (riscv64) container image is generated
+config_opts['use_bootstrap'] = False
+#config_opts['bootstrap_image'] = 'fedora.riscv.rocks:3000/davidlt/fedora:{{ releasever }}'
+#config_opts['bootstrap_image'] = 'fedora.riscv.rocks:3000/davidlt/fedora:41'
+
+config_opts['dnf.conf'] = """
+[main]
+keepcache=1
+system_cachedir=/var/cache/dnf
+debuglevel=2
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+install_weak_deps=0
+metadata_expire=0
+best=1
+module_platform_id=platform:f{{ releasever }}
+protected_packages=
+user_agent={{ user_agent }}
+
+# repos
+
+[local]
+name=local
+baseurl=http://fedora.riscv.rocks/repos/f{{ releasever }}-build/latest/$basearch/
+cost=2000
+enabled={{ koji_direct }}
+skip_if_unavailable=False
+
+{% if not koji_direct %}
+[fedora]
+name=fedora
+baseurl=http://fedora.riscv.rocks/repos-dist/f{{ releasever }}/latest/$basearch/
+gpgcheck=0
+skip_if_unavailable=False
+
+[fedora-debuginfo]
+name=fedora-debuginfo
+baseurl=http://fedora.riscv.rocks/repos-dist/f{{ releasever }}/latest/$basearch/debug/
+enabled=0
+gpgcheck=0
+skip_if_unavailable=False
+
+[fedora-source]
+name=fedora-source
+baseurl=http://fedora.riscv.rocks/repos-dist/f{{ releasever }}/latest/src/
+gpgcheck=0
+enabled=0
+skip_if_unavailable=False
+{% endif %}
+"""
diff --git a/etc/mock/fedora-eln-riscv64.cfg b/etc/mock/fedora-eln-riscv64.cfg diff --git a/etc/mock/fedora-eln-riscv64.cfg b/etc/mock/fedora-eln-riscv64.cfg
new file mode 100644 new file mode 100644
index 0000000..3cf209c index 0000000..3cf209c
@ -123,11 +193,67 @@ index 0000000..3cf209c
+config_opts['description'] = 'Fedora ELN' +config_opts['description'] = 'Fedora ELN'
diff --git a/etc/mock/fedora-rawhide-riscv64.cfg b/etc/mock/fedora-rawhide-riscv64.cfg diff --git a/etc/mock/fedora-rawhide-riscv64.cfg b/etc/mock/fedora-rawhide-riscv64.cfg
new file mode 100644 new file mode 100644
index 0000000..65beeab index 0000000..9a94f09
--- /dev/null --- /dev/null
+++ b/etc/mock/fedora-rawhide-riscv64.cfg +++ b/etc/mock/fedora-rawhide-riscv64.cfg
@@ -0,0 +1,4 @@ @@ -0,0 +1,60 @@
+config_opts['releasever'] = '42'
+config_opts['target_arch'] = 'riscv64' +config_opts['target_arch'] = 'riscv64'
+config_opts['legal_host_arches'] = ('riscv64',) +config_opts['legal_host_arches'] = ('riscv64',)
+ +
+include('templates/fedora-rawhide.tpl') +config_opts['root'] = 'fedora-rawhide-{{ target_arch }}'
+
+config_opts['description'] = 'Fedora Rawhide'
+# Pull directly from Koji working repositories
+config_opts['koji_direct'] = True
+
+config_opts['chroot_setup_cmd'] = 'install @{% if not koji_direct %}buildsys-{% endif %}build'
+
+config_opts['dist'] = 'rawhide' # 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'] = 'dnf5'
+
+# Disabled, until Fedora Rawhide (riscv64) container image is generated
+config_opts['use_bootstrap'] = False
+#config_opts['bootstrap_image'] = 'fedora.riscv.rocks:3000/davidlt/fedora:{{ releasever }}'
+#config_opts['bootstrap_image'] = 'fedora.riscv.rocks:3000/davidlt/fedora:rawhide'
+
+config_opts['dnf.conf'] = """
+[main]
+keepcache=1
+system_cachedir=/var/cache/dnf
+debuglevel=2
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+install_weak_deps=0
+metadata_expire=0
+best=1
+module_platform_id=platform:f{{ releasever }}
+protected_packages=
+user_agent={{ user_agent }}
+
+# repos
+
+[local]
+name=local
+baseurl=http://fedora.riscv.rocks/repos/rawhide/latest/$basearch/
+cost=2000
+enabled={{ koji_direct }}
+skip_if_unavailable=False
+
+{% if not koji_direct %}
+[fedora]
+name=fedora
+baseurl=http://fedora.riscv.rocks/repos/rawhide/latest/$basearch/
+gpgcheck=0
+skip_if_unavailable=False
+{% endif %}
+"""