Description of problem: seems like becomeUser() is already called before unlinking the rpmdb files: INFO: Results and/or logs in: /var/lib/mock/dist-fedora-rawhide-build-7357-744/result Traceback (most recent call last): File "/usr/sbin/mock", line 865, in <module> main(retParams) File "/usr/sbin/mock", line 801, in main do_rebuild(config_opts, chroot, args) File "<peak.util.decorators.rewrap wrapping __main__.do_rebuild at 0x027A2DE8>", line 3, in do_rebuild File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 70, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 465, in do_rebuild chroot.build(srpm, timeout=config_opts['rpmbuild_timeout']) File "<peak.util.decorators.rewrap wrapping mockbuild.backend.build at 0x0278FDE8>", line 3, in build File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 70, in trace result = func(*args, **kw) File "/usr/lib/python2.6/site-packages/mockbuild/backend.py", line 554, in build os.unlink(tmp) OSError: [Errno 13] Permission denied: '/var/lib/mock/dist-fedora-rawhide-build-7357-744/root/var/lib/rpm/__db.004' Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
(In reply to comment #0) > Description of problem: > seems like becomeUser() is already called before unlinking the rpmdb files: Florian, I haven't seen the problem in my testing but that's probably just differences in host/environment. Please try the below and see if it fixes your issue. diff --git a/py/mockbuild/backend.py b/py/mockbuild/backend.py index 7186c7d..fffcf0c 100644 --- a/py/mockbuild/backend.py +++ b/py/mockbuild/backend.py @@ -535,6 +535,14 @@ class Root(object): try: self._setupDev() self._mountall() + + # remove rpm db files to prevent version mismatch problems + # note: moved to do this before the user change below! + for tmp in glob.glob(self.makeChrootPath('var/lib/rpm/__db*')): + os.unlink(tmp) + + + # drop privs and become mock user self.uidManager.becomeUser(self.chrootuid, self.chrootgid) self.state("setup") @@ -549,10 +557,6 @@ class Root(object): gid=self.chrootgid, ) - # remove rpm db files to prevent version mismatch problems - for tmp in glob.glob(self.makeChrootPath('var/lib/rpm/__db*')): - os.unlink(tmp) - # rebuild srpm/rpm from SPEC file specs = glob.glob(self.makeChrootPath(self.builddir, "SPECS", "*.sp if len(specs) < 1:
mock-1.1.15-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.15-1.fc15
mock-1.1.15-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.15-1.el6
mock-1.0.22-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.22-1.el5
mock-1.1.15-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.15-1.fc14
Package mock-1.1.15-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.1.15-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/mock-1.1.15-1.el6 then log in and leave karma (feedback).
mock-1.1.15-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.15-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
1.1.15 works fine so far, no problems showing up Thanks, Florian La Roche
mock-1.0.22-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.15-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.