From b6bb9a12165b903539dad4dfe865d794a6ce4920 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Wed, 16 Oct 2024 17:37:40 +0300 Subject: [PATCH] ci: Make repo checking work for unreleased Fedora versions Unreleased Fedora versions may refer to themselves as "rawhide", instead of their version (e.g., "41"). For this reason, we should try and replace the "rawhide" string with the proper Fedora version. --- .github/workflows/check_repos.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/check_repos.yml b/.github/workflows/check_repos.yml index 2b950f4..2e11d71 100644 --- a/.github/workflows/check_repos.yml +++ b/.github/workflows/check_repos.yml @@ -89,6 +89,17 @@ jobs: dnf install -y 'dnf-command(config-manager)' dnf-3 config-manager --add-repo=https://packages.freedom.press/yum-tools-prod/dangerzone/dangerzone.repo + - name: Replace 'rawhide' string with Fedora version + # The previous command has created a `dangerzone.repo` file. The + # config-manager plugin should have substituted the $releasever variable + # with the Fedora version number. However, for unreleased Fedora + # versions, this gets translated to "rawhide", even though they do have + # a number. To fix this, we need to substitute the "rawhide" string + # witht the proper Fedora version. + run: | + source /etc/os-release + sed -i "s/rawhide/${VERSION_ID}/g" /etc/yum.repos.d/dangerzone.repo + - name: Install Dangerzone # FIXME: We add the `-y` flag here, in lieu of a better way to check the # Dangerzone signature.