mock can't find RHEL7 repo?

Issues related to applications and software problems
Post Reply
nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

mock can't find RHEL7 repo?

Post by nbritton » 2014/07/10 05:29:48

I have a stock CentOS 7.0 system and mock is complaining that it can't find redhat's yum repo. What's going on, why is it trying to reach red hat?

Code: Select all

ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/epel-7-x86_64/root/', 'install', '@buildsys-build', '--setopt=tsflags=nocontexts']
http://ftp.redhat.com/pub/redhat/rhel/rc/7/Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.


 One of the configured repositories failed (el),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail.
Below is the full log of the failed mock build:

Code: Select all

[nbritton@localhost Downloads]$ mock --rebuild forcedeth-kmod-0.62-1.25.3.el5.elrepo.src.rpm 
You are attempting to run "mock" which requires administrative
privileges, but more information is needed in order to do so.
Authenticating as "root"
Password: 
No handlers could be found for logger "trace.__main__"
INFO: mock.py version 1.1.39 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Start(forcedeth-kmod-0.62-1.25.3.el5.elrepo.src.rpm)  Config(epel-7-x86_64)
Start: lock buildroot
Start: clean chroot
INFO: chroot (/var/lib/mock/epel-7-x86_64) unlocked and deleted
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
Start: lock buildroot
Mock Version: 1.1.39
INFO: Mock Version: 1.1.39
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Start: device setup
Finish: device setup
Start: yum update
ERROR: Exception(forcedeth-kmod-0.62-1.25.3.el5.elrepo.src.rpm) Config(epel-7-x86_64) 0 minutes 3 seconds
INFO: Results and/or logs in: /var/lib/mock/epel-7-x86_64/result
ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/epel-7-x86_64/root/', 'install', '@buildsys-build', '--setopt=tsflags=nocontexts']
http://ftp.redhat.com/pub/redhat/rhel/rc/7/Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.


 One of the configured repositories failed (el),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Disable the repository, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:

            yum-config-manager --disable el

     4. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=el.skip_if_unavailable=true

failure: repodata/repomd.xml from el: [Errno 256] No more mirrors to try.
http://ftp.redhat.com/pub/redhat/rhel/rc/7/Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

[nbritton@localhost Downloads]$ 

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: mock can't find RHEL7 repo?

Post by gerald_clark » 2014/07/10 05:41:36

Where did you get mock for CentOS 7?

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: mock can't find RHEL7 repo?

Post by nbritton » 2014/07/10 05:48:47

gerald_clark wrote:Where did you get mock for CentOS 7?
epel

Code: Select all

[nbritton@localhost Downloads]$ yum list mock
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftpmirror.your.org
 * elrepo: ftp.utexas.edu
 * epel: mirror.steadfast.net
 * extras: mirrors.usinternet.com
 * updates: mirror.millry.co
Installed Packages
mock.noarch                          1.1.39-1.el7                          @epel 

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mock can't find RHEL7 repo?

Post by TrevorH » 2014/07/10 09:34:09

Your mock config is still set up to use the RHEL7RC repos which have been removed. Fix the config to point to the CentOS 7 repos and/or report the problem to the maintainers of the EPEL package (if they don't already know).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: mock can't find RHEL7 repo?

Post by nbritton » 2014/07/10 15:19:39

https://bugzilla.redhat.com/show_bug.cgi?id=1117842
https://bugzilla.redhat.com/attachment.cgi?id=916774

diff --git a/etc/mock/epel-7-x86_64.cfg b/etc/mock/epel-7-x86_64.cfg
index f66a4ce..1c572af 100644
--- a/etc/mock/epel-7-x86_64.cfg
+++ b/etc/mock/epel-7-x86_64.cfg
@@ -18,9 +18,14 @@ syslog_ident=mock
syslog_device=

# repos
-[el]
-name=el
-mirrorlist=https://mirrors.fedoraproject.org/metal ... rch=x86_64
+[base]
+name=BaseOS
+mirrorlist=http://mirrorlist.centos.org/?release=7 ... 64&repo=os
+failovermethod=priority
+
+[updates]
+name=updates
+mirrorlist=http://mirrorlist.centos.org/?release=7 ... po=updates
failovermethod=priority

[epel]

Post Reply