Bug 1150759 - Can not use mirrorlist with RHEL $releasever
Summary: Can not use mirrorlist with RHEL $releasever
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-release
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Stahnke
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-08 21:24 UTC by Ian Wienand
Modified: 2014-10-11 18:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-11 18:04:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ian Wienand 2014-10-08 21:24:55 UTC
I'm trying to install the latest EPEL automatically with the following repo

---
[epel]
name=Setup EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-$releasever&arch=$basearch
---

After than I can then "yum install epel-release" to know I'm getting the latest version

The issue is that on RHEL "$releasever" expands to "6Server", which is an invalid path

---
$ urlgrabber 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6Server&arch=x86_64'
$ head -2 mirrorlist 
# repo = epel-6Server arch = x86_64 error: invalid repo or arch
# following repositories are available:
---

As far as I can tell, there is no variable for yum that provides just the major version.  I think the solution is to have the mirrorlist recognise 6Server (and 7Server) and just point them at epel-X

(ps I know this isn't really a problem with this package, but I'm unsure what category would find whoever owns mirrors.fedoraproject.org)

Comment 1 Kevin Fenzi 2014-10-11 18:04:35 UTC
Right, this is not really a bug in this package. ;) 

Can you file this upstream with mirrormanager? 

https://fedorahosted.org/mirrormanager/ 

Also, in the mean time from 'man yum.conf': 

"              $YUM0-$YUM9 These will be replaced with the value of the shell environment variable of
              the same name. If the shell environment variable does not exist then the configuration
              file variable will not be replaced.

       As of 3.2.28, any file in /etc/yum/vars is turned into a variable named  after  the  filename
       (or overrides any of the above variables)."

So, you could add a var in $YUM0 or /etc/yum/vars/whatever and use that in your file? You could even override releasever (although I am unsure if that will break your rhel/centos/sl/whatever repos.


Note You need to log in before you can comment on or make changes to this bug.