Bug 505699
| Summary: | "/usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/ resolvedep ccache 'taglib-devel' 'curl-devel' 'ncurses-devel'" fails | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michal Nowak <mnowak> |
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 11 | CC: | ffesti, james.antill, jnovy, ohudlick, pmatilai, tim.lauridsen |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-06-24 12:44:17 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The code here is:
idx = ts.dbMatch('provides', distroverpkg)
if idx.count() == 0:
releasever = '$releasever'
else:
hdr = idx.next()
releasever = hdr['version']
...so this looks like a weird rpm or rpm-python bug. What versions of rpm are you using?
rpm-4.7.0-1.fc11.i586 My first guess: dont run mock as root (see bug 487430, this is probably a dupe of that) Running under sudo is not helping either:
newman ~ $ sudo mock -r fedora-11-i386 /home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm
INFO: mock.py version 0.9.16 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mock/util.py", line 61, in mkdirIfAbsent
os.makedirs(dirName)
File "/usr/lib/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
ERROR: Exception(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386) 0 minutes 14 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-11-i386/result
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Dont run under sudo either. Add yourself to "mock" group and run without further gimmicks, that's how it's intended to work. You probably need to clean up various leftover directories/files that now have wrong permissions due to earlier runs as root. That worked. Thanks. |
Description of problem: Mock rebuild fails on root ~ # mock -r fedora-11-i386 /home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm INFO: mock.py version 0.9.16 starting... State Changed: init plugins State Changed: start INFO: Start(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386) State Changed: lock buildroot State Changed: clean State Changed: init State Changed: lock buildroot Mock Version: 0.9.16 INFO: Mock Version: 0.9.16 INFO: enabled root cache INFO: enabled yum cache State Changed: cleaning yum metadata INFO: enabled ccache State Changed: running yum State Changed: creating cache State Changed: setup ERROR: Exception(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386) 4 minutes 57 seconds INFO: Results and/or logs in: /var/lib/mock/fedora-11-i386/result ERROR: Command failed: # /usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/ resolvedep ccache 'taglib-devel' 'curl-devel' 'ncurses-devel' Traceback (most recent call last): File "/usr/bin/yum", line 29, in <module> yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 309, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 157, in main base.getOptionsConfig(args) File "/usr/share/yum-cli/cli.py", line 189, in getOptionsConfig self.conf File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 652, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 239, in _getConfig self._conf = config.readMainConfig(startupconf) File "/usr/lib/python2.6/site-packages/yum/config.py", line 794, in readMainConfig yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg) File "/usr/lib/python2.6/site-packages/yum/config.py", line 873, in _getsysver hdr = idx.next() StopIteration Even this fails, when ran manually: /usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/ Version-Release number of selected component (if applicable): mock-0.9.16-1.fc11.noarch yum-3.2.23-3.fc11.noarch How reproducible: always