# SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
# SPDX-License-Identifier: Unlicense

[releases.rawhide]
matcher = "^(rawhide)$"
koschei_collection = "Fedora Rawhide"
# This is used for the `@copr` repo class
# `fedrq CMD -r @copr:gotmax23/aerc` to query only gotmax23/aerc
# `fedrq CMD --enablerepo @copr:gotmax23/aerc` to query the copr AND defs.base
copr_chroot_fmt = "fedora-rawhide"

# `fedrq CMD -b rawhide -r base` enables the `rawhide` and `rawhide-source`
# repos
# -b rawhide and -r base are the implicit default
defs.base = ["rawhide", "rawhide-source"]
# `fedrq CMD -b rawhide -r buildroot` enables the `fedrq-koji-rawhide` and
# `fedrq-koji-rawhide-source` repositories.
defs.buildroot = ["fedrq-koji-rawhide", "fedrq-koji-rawhide-source"]
# fedrq will search for the repository names in the following
# paths if they're not available in your system configuration.
defpaths = ["rawhide-buildroot.repo", "fedora-rawhide.repo"]
system_repos = true
# Example usage: `fedrq CMD -r @koji:f39-build-side-XXXX`
repo_aliases.koji = "@baseurl:https://kojipkgs.fedoraproject.org/repos/{}/latest/$basearch"
repo_aliases.koji-src = "@baseurl:https://kojipkgs.fedoraproject.org/repos/{}/latest/src"

[releases.branched]
# e.g. f36, f37
matcher = "^f(\\d{2})$"
koschei_collection = "Fedora {version}"
copr_chroot_fmt = "fedora-{version}"

defs.base = ["fedora", "fedora-source", "@updates"]
defs.release = ["fedora", "fedora-source"]
defs.updates = ["@repo:updates", "updates-source"]
defs.testing =  ["fedora", "fedora-source", "updates", "updates-source",
                 "updates-testing", "updates-testing-source"]
defs.testing-only =  ["updates-testing", "updates-testing-source"]

defpaths = ["fedora.repo", "fedora-updates.repo", "fedora-updates-testing.repo"]
repo_aliases.koji = "@baseurl:https://kojipkgs.fedoraproject.org/repos/{}/latest/$basearch"
repo_aliases.koji-src = "@baseurl:https://kojipkgs.fedoraproject.org/repos/{}/latest/src"

[releases.epel]
# e.g. epel8, epel9, epel10
matcher = "^epel(\\d{1,2})$"
koschei_collection = "EPEL {version}"
copr_chroot_fmt = "epel-{version}"
defpaths = ["epel.repo"]
system_repos = false

defs.base = ["epel", "epel-source"]
defs.testing = ["epel", "epel-source",
                "epel-testing", "epel-testing-source"]
defs.testing-only = ["epel-testing", "epel-testing-source"]

[releases.epel_next]
matcher = "^epel(\\d{1,2})-next$"
koschei_collection = "EPEL {version}"
copr_chroot_fmt = "centos-stream+epel-next-{version}"
defpaths = ["epel.repo"]
system_repos = false

defs.base = ["epel", "epel-source",
             "epel-next", "epel-next-source"]

defs.testing = ["epel", "epel-source",
                "epel-next", "epel-next-source",
                "epel-testing", "epel-testing-source",
                "epel-next-testing", "epel-next-testing-source"]
def.testing-only = ["epel-testing", "epel-testing-source",
                    "epel-next-testing", "epel-next-testing-source"]

defs.next-base = ["epel-next", "epel-next-source"]
def.next-testing = ["epel-next", "epel-next-source",
                    "epel-next-testing", "epel-next-testing-source"]
defs.next-testing-only = ["epel-next-testing", "epel-next-testing-source"]


[releases.centos-stream]
matcher = '^c(9|1\d)s'
copr_chroot_fmt = "centos-stream-{version}"
defpaths = [
    "centos-stream.repo",
    "centos-stream-compose.repo",
    "epel.repo",
]
system_repos = false
defs.base = [
    "fedrq-centos-stream-baseos",
    "fedrq-centos-stream-baseos-source",
    "fedrq-centos-stream-appstream",
    "fedrq-centos-stream-appstream-source",
    "fedrq-centos-stream-crb",
    "fedrq-centos-stream-crb-source",
]
defs.epel = [
    # base
    "fedrq-centos-stream-baseos",
    "fedrq-centos-stream-baseos-source",
    "fedrq-centos-stream-appstream",
    "fedrq-centos-stream-appstream-source",
    "fedrq-centos-stream-crb",
    "fedrq-centos-stream-crb-source",
    # epel
    "@repo:epel",
    "epel-source",
    "epel-next",
    "epel-next-source"
]
defs.no-crb = [
    "fedrq-centos-stream-baseos",
    "fedrq-centos-stream-baseos-source",
    "fedrq-centos-stream-appstream",
    "fedrq-centos-stream-appstream-source",
]
defs.compose-latest = [
    "centos-stream-compose-latest-*",
]

repo_aliases.kojihub = "@baseurl:https://kojihub.stream.centos.org/kojifiles/repos/{}/latest/$basearch"

[releases.centos-stream8]
matcher = "^c(8)s$"
copr_chroot_fmt = "centos-stream-{version}"
defpaths = [
    "centos-stream8.repo",
    "centos-stream8-compose.repo",
    "epel.repo",
]
defs.base = [
    "centos-stream8-baseos",
    "centos-stream8-baseos-source",
    "centos-stream8-appstream",
    "centos-stream8-appstream-source",
    "centos-stream8-powertools",
    "centos-stream8-powertools-source",
]
defs.epel = [
    # base
    "centos-stream8-baseos",
    "centos-stream8-baseos-source",
    "centos-stream8-appstream",
    "centos-stream8-appstream-source",
    "centos-stream8-powertools",
    "centos-stream8-powertools-source",
    # epel
    "@repo:epel",
    "epel-source",
    "epel-next",
    "epel-next-source"
]
defs.no-powertools = [
    "centos-stream8-baseos",
    "centos-stream8-baseos-source",
    "centos-stream8-appstream",
    "centos-stream8-appstream-source",
]
defs.compose-latest = [
    "centos-stream8-compose-latest-*",
]
repo_aliases.kojihub = "@baseurl:https://kojihub.stream.centos.org/kojifiles/repos/{}/latest/$basearch"

[releases.amazonlinux]
matcher = '^amazon(\d+)$'
defs.base = ["amazonlinux", "amazonlinux-source"]
defpaths = ["amazonlinux.repo"]

[releases.almalinux]
matcher = '^al(9|1\d)$'
copr_chroot_fmt = "epel-{version}"
defpaths = [
    "almalinux.repo",
    "epel.repo",
]
defs.base = [
    "almalinux-appstream",
    "almalinux-appstream-source",
    "almalinux-baseos",
    "almalinux-baseos-source",
    "almalinux-crb",
    "almalinux-crb-source",
]
defs.epel = [
    "@base",
    "@repo:epel",
    "epel-source",
]
defs.no-crb = [
    "almalinux-appstream",
    "almalinux-appstream-source",
    "almalinux-baseos",
    "almalinux-baseos-source",
]

[releases.almalinux8]
matcher = '^al(8)$'
copr_chroot_fmt = "epel-{version}"
defpaths = [
    "almalinux.repo",
    "epel.repo",
]
defs.base = [
    "almalinux-appstream",
    "almalinux-appstream-source",
    "almalinux-baseos",
    "almalinux-baseos-source",
    "almalinux8-powertools",
    "almalinux8-powertools-source",
]
defs.epel = [
    "@base",
    "@repo:epel",
    "epel-source",
]
defs.no-powertools = [
    "almalinux-appstream",
    "almalinux-appstream-source",
    "almalinux-baseos",
    "almalinux-baseos-source",
]

[releases.eln]
matcher = "^(eln)$"
defpaths = [
    "fedora-eln.repo",
]
defs.no-crb = [
    "eln-baseos",
    "eln-baseos-source",
    "eln-appstream",
    "eln-appstream-source",
]
defs.base = [
    "@no-crb",
    "eln-crb",
    "eln-crb-source",
]

[releases.local]
matcher = "local"
version = "$releasever"
append_system_repos = true
defs.base = []

[releases.local-custom]
matcher = "local:(.*)"
append_system_repos = true
defs.base = []
