Change repo URL to support specific version of the repo

, ,

Hi,

This forum is not about Terraform, but nevertheless I hope to find some guidance regarding DNF
I am trying to install Terraform from here via following

sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
sudo dnf -y install terraform

The problem is that Hashicorp’s repo changes URL to:

https://rpm.releases.hashicorp.com/fedora/36/x86_64/stable/repodata/repomd.xml 

And according to documentation only fedora 33 is supported.
So my questions are:

  1. is it possible to explicitly change URL to
https://rpm.releases.hashicorp.com/fedora/33/x86_64/stable/repodata/repomd.xml 
  1. Or to make repo “think” that I am using fedora 33 (like changing user-agent in browser)?

Thank you in advance

2 Likes

You can either modify the repository file in /etc/yum.repos.d to change $release to 33 (hard code it), or you can run the dnf command with --releasever=33 and that’ll do it for you.

I’d use the second way, so that if they do ever publish a repository for F35/F36, your repo automatically starts to function.

1 Like

Thanks! This is what I was looking for! :grinning:

2 Likes