Bug 980244
Summary: | Wrong (r600) permissions on rpm db files - mock builds failed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Anton Guda <atu> | ||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 20 | CC: | cleech, mebrown, nphilipp, williams | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-02-07 22:03:51 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Anton Guda
2013-07-01 20:33:59 UTC
Created attachment 772378 [details]
Dirty hack - but a working workaround
Sorry, python is not one of my native languages.
It may be worth to mention replacement of dirs to symlinks
/var/lock, /var/run
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20 I just hit this after a 18 -> 19 upgrade, but a clean install of 19 in a VM with the same package versions works fine. after a successful mock --init $ repoquery --installroot=/var/lib/mock/fedora-19-x86_64/root -a --installed error: cannot open Packages index using db5 - Permission denied (13) error: cannot open Packages database in /var/lib/mock/fedora-19-x86_64/root/var/lib/rpm Traceback (most recent call last): File "/usr/bin/repoquery", line 1543, in <module> main(sys.argv) File "/usr/bin/repoquery", line 1413, in main repoq.conf File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1054, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 344, in _getConfig startupconf = config.readStartupConfig(fn, root, releasever) File "/usr/lib/python2.7/site-packages/yum/config.py", line 1036, in readStartupConfig startupconf.distroverpkg) File "/usr/lib/python2.7/site-packages/yum/config.py", line 1187, in _getsysver raise Errors.YumBaseError("Error: " + str(e)) yum.Errors.YumBaseError: Error: rpmdb open failed I managed to compare an strace of an OK mock init with one from a system that's having these permission errors. I found an odd umask(077) call that seems to be the problem, immediately after loading the lvm python module. Turns out that this only happens if lvm2-python-libs is installed, which is setting umask for some reason. Hmm, I don't have lvm2-python-libs installed, a mock init (as root, otherwise strace won't work) doesn't exhibit the umask(077) call you mentioned either. I've just kicked of a "fedpkg mockbuild" run to see whether I still have the issue or whether it some update solved it maybe. Hmm, it seems my issue stems from having a basedir != /var/lib/mock. Ignore me. As basedir is a config parameter, mock must run independently of parameter value (assume that dir exist on good filesystem with lot of space). Remember that mock has to run on F{18,19,20} as well as rawhide and EPEL6, so I'm hesitant to add Anton's patch, at least without a lot of testing across all potential hosting distros. I'm not sure what changing those directories to symlinks would do on say an EPEL6 system. I'd be curious to see what would happen if you did it all on /var/lib/mock. If it works there then something is going wrong with the umask when resultdir is pointing elsewhere. Tested with standard place: /var/lib/mock. The same result. Tested: mock-1.1.36-1 Works for me. Thanks. |