Bug 1451212 - epel.repo: mirrorlist instead of metalink
Summary: epel.repo: mirrorlist instead of metalink
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-release
Version: epel7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Michael Stahnke
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 06:54 UTC by Eva Mrakova
Modified: 2017-09-15 18:43 UTC (History)
10 users (show)

Fixed In Version: epel-release-7-10
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-11 20:51:36 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1464843 None CLOSED livemedia-creator: Cannot create live media using repos with metalinks 2019-09-13 06:43:10 UTC

Internal Links: 1464843

Description Eva Mrakova 2017-05-16 06:54:18 UTC
Description of problem:

after installing epel-release, in epel repofile /etc/yum.repos.d/epel.repo 
there are metalinks incorrectly marked as mirrorlists.
As a consequence, it is not possible to install anything from epel repo
using dnf on RHEL-7.

Version-Release number of selected component (if applicable):
epel-release-7-9.noarch
dnf-2.4.1_1-3g9288d90.el7.centos.noarch

How reproducible:
always

Steps to Reproduce:
1. install epel-release
2. run "dnf -v --disablerepo=* --enablerepo=epel install python2-behave"

Actual results:
# dnf -v --disablerepo=* --enablerepo=epel install python2-behave
DNF version: 2.4.1
cachedir: /var/cache/dnf
error: Curl error (6): Couldn't resolve host name for HTTP://<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Tue, 16 May 2017 06:25:53 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">/repodata/repomd.xml [Could not resolve host: <metalink version="3.0" xmlns="http; Name or service not known] (HTTP://<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Tue, 16 May 2017 06:25:53 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">/repodata/repomd.xml).
error: Curl error (6): Couldn't resolve host name for HTTP://<url protocol="http" type="http" location="US" preference="100" >http://mirror.oss.ou.edu/epel/7/x86_64/repodata/repomd.xml</url>/repodata/repomd.xml [Could not resolve host: <url protocol="http" type="http" location="US" preference="100" >http; Name or service not known] (HTTP://<url protocol="http" type="http" location="US" preference="100" >http://mirror.oss.ou.edu/epel/7/x86_64/repodata/repomd.xml</url>/repodata/repomd.xml).
...
...
error: Curl error (6): Couldn't resolve host name for HTTP://<url protocol="http" type="http" location="CA" preference="70" >http://fedora.westmancom.com/epel/7/x86_64/repodata/repomd.xml</url>/repodata/repomd.xml [Could not resolve host: <url protocol="http" type="http" location="CA" preference="70" >http; Name or service not known] (HTTP://<url protocol="http" type="http" location="CA" preference="70" >http://fedora.westmancom.com/epel/7/x86_64/repodata/repomd.xml</url>/repodata/repomd.xml).
Cannot download 'https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried.
Failed to synchronize cache for repo 'epel', disabling.
No package python2-behave available.
Error: Unable to find a match: python2-behave

Expected results:
# dnf -v --disablerepo=* --enablerepo=epel install python2-behave
DNF version: 2.4.1
cachedir: /var/cache/dnf
Extra Packages for Enterprise Linux 7 - x86_64    37 MB/s |  13 MB     00:00    
not found deltainfo for: Extra Packages for Enterprise Linux 7 - x86_64
epel: using metadata from Mon May 15 09:50:08 2017 EDT.
Last metadata expiration check: 0:00:03 ago on Tue May 16 02:40:10 2017 EDT.
--> Starting dependency resolution
---> Package python2-behave.noarch 1.2.5-18.el7 will be installed
---> Package python-parse.noarch 1.6.4-4.el7 will be installed
---> Package python-parse_type.noarch 0.3.4-6.el7 will be installed
---> Package python-enum34.noarch 1.0-4.el7 will be installed
--> Finished dependency resolution
Dependencies resolved.
=================================================================================
 Package                  Arch          Version                Repository   Size
=================================================================================
Installing:
 python2-behave           noarch        1.2.5-18.el7           epel        218 k
Installing dependencies:
 python-enum34            noarch        1.0-4.el7              epel         51 k
 python-parse             noarch        1.6.4-4.el7            epel         24 k
 python-parse_type        noarch        0.3.4-6.el7            epel         57 k

Transaction Summary
=================================================================================
Install  4 Packages

Total download size: 350 k
Installed size: 1.7 M
Is this ok [y/N]: 


Additional info:
when mirrorlist keywords in /etc/yum.repos.d/epel.repo are substituted with metalink, dnf works as expected.

Comment 1 Kevin Fenzi 2017-05-16 16:24:45 UTC
Yes, this is because we predate yum handling 'metalink=' in a repo file. 

yum handles this transparently with: 

"As a special hack is the mirrorlist URL contains the word "metalink" then the value of mirrorlist is copied to metalink (if  metalink is not set)."

Im a bit leary of changing this now as I am not sure if older rhel7's yum's would handle metalink=

Perhaps dnf could just use this same workaround? Moving over to them to comment on...

Comment 2 Igor Gnatenko 2017-05-29 09:28:51 UTC
I definitely don't like this "hacks"... What if I just had metalink.foo.bar/mirrorlist URL... shall it use metalink instead of mirrorlist?

Comment 3 Eva Mrakova 2017-06-13 11:31:48 UTC
(In reply to Kevin Fenzi from comment #1)
... 
> Im a bit leary of changing this now as I am not sure if older rhel7's yum's
> would handle metalink=
...

I've tested the following scenario for several rhel/yum versions and it always
worked OK:
1. install epel-release
2. replace mirrorlist keyword with metalink in /etc/yum.repos.d/epel.repo
3. list available pkgs in epel repo
4. install a pkg from epel

rhel/yum versions tested:
* RHEL-7.4, yum-3.4.3-154.el7
* RHEL-7.1, yum-3.4.3-125.el7
* RHEL-7.1, yum-3.4.3-118.el7 (should be the version from released RHEL-7.0)
* RHEL-6.9, yum-3.2.29-81.el6
* RHEL-6.0, yum-3.2.27-14.el6

Example of changed epel.repo:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Comment 4 Igor Gnatenko 2017-06-13 11:52:35 UTC
Eva, thanks a lot for testing. Switching back to epel-release.

Comment 5 Fedora Update System 2017-06-24 15:08:54 UTC
epel-release-7-10 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-eb495217ca

Comment 6 Fedora Update System 2017-06-24 21:20:42 UTC
epel-release-7-10 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-eb495217ca

Comment 7 Fedora Update System 2017-07-11 20:51:36 UTC
epel-release-7-10 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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