* refactor: simplify checking for enabled 3rd party repos We are generally no longer doing the dnf enable/disable dance (except for the nvidia install script) because we are vendoring the .repo files which simplifies things a bit. Also I think that the move to checking what is allowed instead of checking what is not allowed makes more sense anyway. resolves: https://github.com/ublue-os/aurora/issues/2854 [1]1e4d10b9ac/build_files/nvidia/nvidia-install.sh* get openh264 from negativo Our base image [1] can't legally include this from fedora-cisco-openh264 repo. Comparing the spec files for Fedora [2] and Negativo [3], they seem to be built with the same build flags, so they should not have any differing functionality. The fedora-cisco-openh264 repo is currently enabled (which is not the case for F44 images) because our repo validation script broke due to the move to /usr [4]. We are already shipping various other codecs on the system, including mesa, they get more irrelevant each day but we should have this. I don't know why exactly but for some reason we now have a stray /var/log/dnf5.log which makes bootc container lint fail. [1]54e811f17a/common.yaml (L144)[2]cd15228484/f/openh264.spec[3]dfac89f533/openh264.spec[4] https://fedoraproject.org/wiki/Changes/RelocateRpmRepoConfigsToUsr
30 lines
755 B
Bash
Executable file
30 lines
755 B
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
set -eou pipefail
|
|
|
|
ALLOWED_REPOS=(
|
|
fedora
|
|
updates{-archive,}
|
|
)
|
|
|
|
BETA_REPOS=(updates-testing)
|
|
|
|
source /usr/lib/os-release
|
|
|
|
# TODO: we need a way to temporarily allow this on stable releases by checking
|
|
# installed packages via dnf
|
|
# Betas/pre-releases use updates-testing
|
|
if [[ "$RELEASE_TYPE" == "development" ]]; then
|
|
ALLOWED_REPOS=( "${ALLOWED_REPOS[@]}" "${BETA_REPOS[@]}" )
|
|
fi
|
|
|
|
ALLOWED_REPO_LIST="$(printf '%s\n' "${ALLOWED_REPOS[@]}")"
|
|
|
|
ENABLED_REPOS="$(dnf repolist --enabled | awk 'NR>1 {print $1}')"
|
|
|
|
BAD_REPOS="$(grep -v --fixed-strings --line-regexp -f <(echo "$ALLOWED_REPO_LIST") <<< "$ENABLED_REPOS" || true)"
|
|
|
|
if [[ -n "$BAD_REPOS" ]]; then
|
|
echo "unexpected enabled repo(s) detected:"
|
|
echo "$BAD_REPOS"; exit 1
|
|
fi
|