Bug 1214902 - not able initialize RHEL-5 ppc mock chroot with yum >= 3.4.3-505
Summary: not able initialize RHEL-5 ppc mock chroot with yum >= 3.4.3-505
Keywords:
Status: CLOSED DUPLICATE of bug 1211978
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: ppc64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-23 20:04 UTC by Dan Horák
Modified: 2015-04-24 09:09 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-24 09:09:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dan Horák 2015-04-23 20:04:04 UTC
dnf tries to access strange repo via mirrormanager and fails

[sharkcz@tyan-openpower-01 ~]$ mock -r rhel-5-ppc init
INFO: mock.py version 1.2.7 starting (python version = 3.4.2)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Mock Version: 1.2.7
INFO: Mock Version: 1.2.7
Start: yum install
ERROR: Command failed. See logs for output.
 # /usr/bin/yum --installroot /var/lib/mock/rhel-5-ppc/root/ --releasever 5 install buildsys-build --setopt=tsflags=nocontexts
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run 'dnf migrate'Redirecting to '/usr/bin/dnf --installroot /var/lib/mock/rhel-5-ppc/root/ --releasever 5 install buildsys-build --setopt=tsflags=nocontexts'

Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-5&arch=ppc': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink


The mock config below is copied from epel-5 config and switched from CentOS mirrorlist to a baseurl.

[sharkcz@tyan-openpower-01 ~]$ cat /etc/mock/rhel-5-ppc.cfg 
config_opts['root'] = 'rhel-5-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
config_opts['chroot_setup_cmd'] = 'install buildsys-build'
config_opts['dist'] = 'el5'  # only useful for --resultdir variable subst
#if not config_opts.has_key('macros'):  config_opts['macros'] = {}
config_opts['macros']['%__arch_install_post'] = '%{nil}'
# beware: RHEL use 5Server or 5Client
config_opts['releasever'] = '5'

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
reposdir=/dev/null
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=

# repos

[rhel5]
name=rhel5
baseurl=http://my.redhat.server/repos/RHEL-5-build/latest/ppc/
gpgcheck=0

"""

Version-Release number of selected component (if applicable):
mock-1.2.7-1.fc22.noarch
dnf-0.6.5-1.fc22.noarch
yum-3.4.3-505.fc22.noarch

Comment 1 Radek Holy 2015-04-24 09:09:52 UTC
Hello, the problem is that mock thinks that it uses YUM but in fact it uses DNF. Thus mock creates "yum.conf" instead of "dnf.conf". Because DNF does not find a configuration file in the chroot, it uses the configuration of the host. The problem has been fixed in upstream apparently.

*** This bug has been marked as a duplicate of bug 1211978 ***


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