matrix:
distro:
- arch
- - centos_epel
+ - centos
- debian
- ubuntu
- fedora
- - rocky_epel
- - alma_epel
+ - rocky
+ - alma
- gentoo
format:
- directory
sync-uri = https://raw.githubusercontent.com/257/binpkgs/master
EOF
+ - name: Configure EPEL
+ if: matrix.distro == 'centos' || matrix.distro == 'rocky' || matrix.distro == 'alma'
+ run: |
+ tee mkosi.conf.d/mkosi.conf <<- EOF
+ [Distribution]
+ Repositories=epel
+ EOF
+
- name: Build ${{ matrix.distro }}/${{ matrix.format }}
run: sudo python3 -m mkosi build
list of directories to look for extra repository files.
- `--repositories` is now only usable on Debian/RPM based distros and can only be used to enable additional
repositories. Specifically, it cannot be used on Arch Linux anymore to add new repositories.
+- The `_epel` distributions were removed. Use `--repositories=epel` instead to enable
+ the EPEL repository.
## v14
: The distribution to install in the image. Takes one of the following
arguments: `fedora`, `debian`, `ubuntu`, `arch`, `opensuse`, `mageia`,
- `centos`, `centos_epel`, `openmandriva`, `rocky`, `rocky_epel`, `alma`,
- `alma_epel`. If not specified, defaults to the distribution of the host.
+ `centos`, `openmandriva`, `rocky`, and `alma`. If not specified,
+ defaults to the distribution of the host.
`Release=`, `--release=`, `-r`
detect_distribution,
die,
is_centos_variant,
- is_epel_variant,
is_rpm_distribution,
mkdirp_chown_current_user,
nspawn_knows_arg,
if args.release is None:
if args.distribution == Distribution.fedora:
args.release = "36"
- elif args.distribution in (Distribution.centos, Distribution.centos_epel):
+ elif args.distribution == Distribution.centos:
args.release = "9-stream"
- elif args.distribution in (Distribution.rocky, Distribution.rocky_epel):
+ elif args.distribution == Distribution.rocky:
args.release = "9"
- elif args.distribution in (Distribution.alma, Distribution.alma_epel):
+ elif args.distribution == Distribution.alma:
args.release = "9"
elif args.distribution == Distribution.mageia:
args.release = "7"
args.mirror = "https://geo.mirror.pkgbuild.com"
elif args.distribution == Distribution.opensuse:
args.mirror = "http://download.opensuse.org"
- elif args.distribution in (Distribution.rocky, Distribution.rocky_epel):
+ elif args.distribution == Distribution.rocky:
args.mirror = None
- elif args.distribution in (Distribution.alma, Distribution.alma_epel):
+ elif args.distribution == Distribution.alma:
args.mirror = None
if args.sign:
if args.repo_dirs:
args.repo_dirs = [p.absolute() for p in args.repo_dirs]
- if args.netdev and is_centos_variant(args.distribution) and not is_epel_variant(args.distribution)::
+ if args.netdev and is_centos_variant(args.distribution) and "epel" not in args.repositories:
die("--netdev is only supported on EPEL centOS variants")
if args.machine_id is not None:
if config.distribution in (
Distribution.fedora,
Distribution.centos,
- Distribution.centos_epel,
Distribution.mageia,
Distribution.rocky,
- Distribution.rocky_epel,
Distribution.alma,
- Distribution.alma_epel,
):
print(" With Documentation:", yes_no(config.with_docs))
opensuse = "opensuse", PackageType.rpm
mageia = "mageia", PackageType.rpm
centos = "centos", PackageType.rpm
- centos_epel = "centos_epel", PackageType.rpm
openmandriva = "openmandriva", PackageType.rpm
rocky = "rocky", PackageType.rpm
- rocky_epel = "rocky_epel", PackageType.rpm
alma = "alma", PackageType.rpm
- alma_epel = "alma_epel", PackageType.rpm
gentoo = "gentoo", PackageType.ebuild
def __new__(cls, name: str, package_type: PackageType) -> "Distribution":
Distribution.fedora,
Distribution.mageia,
Distribution.centos,
- Distribution.centos_epel,
Distribution.openmandriva,
Distribution.rocky,
- Distribution.rocky_epel,
Distribution.alma,
- Distribution.alma_epel
)
def is_centos_variant(d: Distribution) -> bool:
return d in (
Distribution.centos,
- Distribution.centos_epel,
Distribution.alma,
- Distribution.alma_epel,
Distribution.rocky,
- Distribution.rocky_epel,
- )
-
-
-def is_epel_variant(d: Distribution) -> bool:
- return d in (
- Distribution.centos_epel,
- Distribution.alma_epel,
- Distribution.rocky_epel,
)
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1+
-
-from mkosi.distributions.alma import AlmaInstaller
-
-
-class AlmaEpelInstaller(AlmaInstaller):
- pass
add_packages,
complete_step,
die,
- is_epel_variant,
run_workspace_command,
)
from mkosi.distributions import DistributionInstaller
if state.do_run_build_script:
packages.update(state.config.build_packages)
- if not state.do_run_build_script and is_epel_variant(state.config.distribution):
+ if not state.do_run_build_script and "epel" in state.config.repositories:
if state.config.netdev:
add_packages(state.config, packages, "systemd-networkd", conditional="systemd")
- if state.config.distribution not in (Distribution.centos, Distribution.centos_epel) and epel_release >= 9:
+ if state.config.distribution != Distribution.centos and epel_release >= 9:
add_packages(state.config, packages, "systemd-boot", conditional="systemd")
install_packages_dnf(state, packages)
def remove_packages(cls, state: MkosiState, remove: list[str]) -> None:
invoke_dnf(state, 'remove', remove)
- @classmethod
- def _is_epel(cls) -> bool:
- name = cls.__name__
- name = name.removesuffix("Installer")
- return name.endswith("Epel")
-
@staticmethod
def _parse_epel_release(release: str) -> int:
fields = release.split(".")
repos += [Repo("CRB", crb_url, gpgpath, gpgurl)]
if powertools_url is not None:
repos += [Repo("PowerTools", powertools_url, gpgpath, gpgurl)]
- if epel_url is not None and cls._is_epel():
- repos += [Repo("epel", epel_url, epel_gpgpath, epel_gpgurl)]
+ if epel_url is not None:
+ repos += [Repo("epel", epel_url, epel_gpgpath, epel_gpgurl, enabled=False)]
return repos
repos += [Repo("BaseOS", baseos_url, gpgpath, gpgurl)]
if crb_url is not None:
repos += [Repo("CRB", crb_url, gpgpath, gpgurl)]
- if epel_url is not None and cls._is_epel():
- repos += [Repo("epel", epel_url, epel_gpgpath, epel_gpgurl)]
+ if epel_url is not None:
+ repos += [Repo("epel", epel_url, epel_gpgpath, epel_gpgurl, enabled=False)]
return repos
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1+
-
-from mkosi.distributions.centos import CentosInstaller
-
-
-class CentosEpelInstaller(CentosInstaller):
- pass
url: str
gpgpath: Path
gpgurl: Optional[str] = None
+ enabled: bool = True
def setup_dnf(state: MkosiState, repos: Sequence[Repo] = ()) -> None:
name={repo.id}
{repo.url}
gpgkey={gpgkey or ''}
- enabled=1
+ enabled={int(repo.enabled)}
"""
)
)
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1+
-
-from mkosi.distributions.rocky import RockyInstaller
-
-
-class RockyEpelInstaller(RockyInstaller):
- pass