diff --git a/Containerfile b/Containerfile index 0434d7c168..9db2c64cb2 100644 --- a/Containerfile +++ b/Containerfile @@ -200,8 +200,6 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ # Setup Copr repos RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ - curl -Lo /usr/bin/copr https://raw.githubusercontent.com/ublue-os/COPR-command/main/copr && \ - chmod +x /usr/bin/copr && \ curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ curl -Lo /etc/yum.repos.d/_copr_kylegospo-bazzite-multilib.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-multilib/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-bazzite-multilib-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 && \ curl -Lo /etc/yum.repos.d/_copr_ublue-os-staging.repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo?arch=x86_64 && \ diff --git a/system_files/desktop/shared/usr/bin/copr b/system_files/desktop/shared/usr/bin/copr new file mode 100755 index 0000000000..1b25db1007 --- /dev/null +++ b/system_files/desktop/shared/usr/bin/copr @@ -0,0 +1,15 @@ +#!/bin/bash + +# Wrapper for 'dnf5 copr' +# Includes Workaround to append the chroot "fedora-RELEASE-ARCH" +function dnf5_wrapper() { + precmd="/usr/bin/dnf5 copr" + if [[ $* =~ copr\s+enable && $# -eq 2 ]]; then + exec $precmd enable "$2" "${3:-fedora-"$(lsb_release -sr)"-"$(uname -m)"}" + else + exec $precmd "$@" + fi + return +} + +dnf5_wrapper "$@"