1

I've successfully built the SRPM and after that step I'm trying to build the RPM from the SRPM. Following is the directory from where I am building the RPM. THe Source RPM are in the following directory.

$ ls
$ agent-ovs  genie  libopflex  libopflex-metadata  LICENSE  repo  sample  target

Then in order to build the RPM, I am using mockchain as follows:

$ mockchain -m --nocheck -r epel-7-x86_64 -a file://`pwd`/repo/ \
  -l target libopflex/*.src.rpm genie/target/libmodelgbp/*.src.rpm \
  agent-ovs/*.src.rpm 

Once I do the above I get the following error. When I check the URLs, they are not present. How do I debug this, I don't even know from where the mockchain is fetching this URL's and the repomd.xml.

INFO buildroot.py:295:  Mock Version: 1.2.12
DEBUG util.py:94:  ensuring that dir exists: /var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/pts
DEBUG util.py:97:  creating dir: /var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/pts
DEBUG util.py:94:  ensuring that dir exists: /var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/shm
DEBUG util.py:97:  creating dir: /var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/shm
DEBUG buildroot.py:433:  kernel version == 3.10.0-229.14.1.el7.x86_64
DEBUG util.py:106:  touching file: /var/lib/mock/epel-7-x86_64-noiro-28879/root/etc/fstab
DEBUG util.py:106:  touching file: /var/lib/mock/epel-7-x86_64-noiro-28879/root/var/log/yum.log
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '-t', 'proc', 'proc', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/proc'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '-t', 'sysfs', 'sysfs', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/sys'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '-t', 'tmpfs', 'tmpfs', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/shm'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '-t', 'devpts', '-o', 'gid=5,mode=0620,ptmxmode=0666,newinstance', 'devpts', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/dev/pts'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '--bind', '/var/cache/mock/epel-7-x86_64/yum_cache/', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/var/cache/yum/'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/bin/mount', '-n', '--bind', '/var/cache/mock/epel-7-x86_64/ccache/u1000/', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/tmp/ccache'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:488:  Child return code was: 0
DEBUG buildroot.py:132:  rootdir = /var/lib/mock/epel-7-x86_64-noiro-28879/root
DEBUG buildroot.py:133:  resultdir = /home/noiro/workspace/team_noiro_engineering/Opflex-master_RPM/target/results/epel-7-x86_64/libmodelgbp-1.9.0-2.el7
DEBUG util.py:94:  ensuring that dir exists: /var/lib/mock/epel-7-x86_64-noiro-28879/root/etc/pki/mock
DEBUG util.py:97:  creating dir: /var/lib/mock/epel-7-x86_64-noiro-28879/root/etc/pki/mock
DEBUG util.py:94:  ensuring that dir exists: /var/lib/mock/epel-7-x86_64-noiro-28879/root/etc/yum/pluginconf.d
DEBUG util.py:97:  creating dir: /var/lib/mock/epel-7-x86_64-noiro-28879/root/etc/yum/pluginconf.d
DEBUG package_manager.py:178:  configure yum
DEBUG package_manager.py:184:  configure yum priorities
DEBUG package_manager.py:186:  configure yum rhnplugin
DEBUG package_manager.py:77:  ['/usr/bin/yum', '--installroot', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/', '--releasever', '7', 'install', '@buildsys-build']
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: ['/usr/bin/yum', '--installroot', '/var/lib/mock/epel-7-x86_64-noiro-28879/root/', '--releasever', '7', 'install', '@buildsys-build'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_DIR': '/tmp/ccache', 'HOME': '/builddir', 'CCACHE_UMASK': '002'} and shell False
DEBUG util.py:377:  Not using downloaded repomd.xml because it is older than what we have:
DEBUG util.py:377:    Current   : Wed May 23 08:25:37 2018
DEBUG util.py:377:    Downloaded: Mon Mar  5 10:53:23 2018
DEBUG util.py:377:  http://mirror.datto.com/fedora/epel/7/x86_64/repodata/8224258b31fc16b72cdee55b19d8b214a0ad8d47f8ad32adcaa574fc8247f286-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
DEBUG util.py:377:  Trying other mirror.
DEBUG util.py:377:  https://mirrors.cat.pdx.edu/epel/7/x86_64/repodata/8224258b31fc16b72cdee55b19d8b214a0ad8d47f8ad32adcaa574fc8247f286-primary.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
DEBUG util.py:377:  Trying other mirror.
1

The yum repositories for mockchain, and the mock command it executes, would come from the configuration you specified, "epel-7-x86_64" and any --addrepo= flags used on the command line. The configuration would normally be located at /etc/mock/$CONFIG.cfg or in this case, /etc/mock/epel-7-x86_64.cfg.

The current repomd.xml appears to be coming from local yum cache on the build machine, remove it with yum clean all if necessary.

For more verbose output useful for additional debugging, you should be able to pass -m --verbose to mockchain.

  • Thanks a lot for responding. It looks like the repomd.xml is indeed coming from the yum cache, i.e "/var/cache/mock/epel-7-x86_64/yum_cache/epel". But, when I do "yum clean all", only the "epel-myrepo" and "rhel-myrepo" gets cleaned but, nothing happens in "/var/cache/mock/epel-7-x86_64/yum_cache/epel", and "/var/cache/mock/epel-7-x86_64/yum_cache/epel" is the place from where the repomd.xml is getting used. – Invictus Aug 20 '18 at 23:35
  • Also, how to tell the mock to use the local repo for the yum install rather than the yum cache. – Invictus Aug 20 '18 at 23:53
  • To clear the mock cache, I think mock -r epel-7-x86_64 --scrub=yum-cache should be able to do it. IIRC, the initial creation of the mock chroot will use the local machine's yum cache, then all actions within the chroot will use the mock yum cache. I do not think you can disable that behavior, but once you clear the yum cache it should download a fresh copy all the repositories. – GracefulRestart Aug 21 '18 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.