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.
This commit is contained in:
Alex Pyrgiotis 2024-10-16 17:37:40 +03:00
parent eaef95b774
commit b6bb9a1216
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -89,6 +89,17 @@ jobs:
dnf install -y 'dnf-command(config-manager)' dnf install -y 'dnf-command(config-manager)'
dnf-3 config-manager --add-repo=https://packages.freedom.press/yum-tools-prod/dangerzone/dangerzone.repo 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 - name: Install Dangerzone
# FIXME: We add the `-y` flag here, in lieu of a better way to check the # FIXME: We add the `-y` flag here, in lieu of a better way to check the
# Dangerzone signature. # Dangerzone signature.