Description of problem: With configuration: config_opts['createrepo_on_rpms'] = True config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm' All files in "resultdir" are own by the "builder" (log and rpm), except the "repodata" directory. This is quite annoying, as the "builder" can't clean the folder and regenerate the repodata. Version-Release number of selected component (if applicable): mock-1.1.7-1.fc14 (noarch) How reproducible: Always Steps to Reproduce: 1. mock some.src.rpm Actual results: $ ls -al repodata total 248 drwxr-sr-x. 2 root mock 4096 9 janv. 18:47 . drwxrwsr-x. 3 extras mock 4096 9 janv. 18:47 .. -rw-r--r--. 1 root mock 65354 9 janv. 18:47 filelists.sqlite.bz2 -rw-r--r--. 1 root mock 61448 9 janv. 18:47 filelists.xml.gz -rw-r--r--. 1 root mock 10788 9 janv. 18:47 other.sqlite.bz2 -rw-r--r--. 1 root mock 4059 9 janv. 18:47 other.xml.gz -rw-r--r--. 1 root mock 33731 9 janv. 18:47 primary.sqlite.bz2 -rw-r--r--. 1 root mock 12233 9 janv. 18:47 primary.xml.gz -rw-r--r--. 1 root mock 2703 9 janv. 18:47 repomd.xml Expected results: $ ls -al repodata total 248 drwxr-sr-x. 2 extras mock 4096 9 janv. 18:47 . drwxrwsr-x. 3 extras mock 4096 9 janv. 18:47 .. -rw-r--r--. 1 extras mock 65354 9 janv. 18:47 filelists.sqlite.bz2 -rw-r--r--. 1 extras mock 61448 9 janv. 18:47 filelists.xml.gz -rw-r--r--. 1 extras mock 10788 9 janv. 18:47 other.sqlite.bz2 -rw-r--r--. 1 extras mock 4059 9 janv. 18:47 other.xml.gz -rw-r--r--. 1 extras mock 33731 9 janv. 18:47 primary.sqlite.bz2 -rw-r--r--. 1 extras mock 12233 9 janv. 18:47 primary.xml.gz -rw-r--r--. 1 extras mock 2703 9 janv. 18:47 repomd.xml
Remi, See if this fixes your problem: diff --git a/py/mock.py b/py/mock.py index cbecc8b..cc7c353 100755 --- a/py/mock.py +++ b/py/mock.py @@ -477,9 +477,11 @@ def do_rebuild(config_opts, chroot, srpms): if config_opts["createrepo_on_rpms"]: log.info("Running createrepo on binary rpms in resultdir") + chroot.uidManager.dropPrivsTemp() cmd = config_opts["createrepo_command"].split() cmd.append(chroot.resultdir) mock.util.do(cmd) + chroot.uidManager.restorePrivs() except (Exception, KeyboardInterrupt): elapsed = time.time() - start
Patch tested against mock-1.1.8-1.fc14.noarch Works as expected. Thanks
mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13
mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5
mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6
mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14
mock-1.0.16-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5
mock-1.1.9-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc15
mock-1.1.9-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.9-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6
mock-1.1.10-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.10-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.0.17-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.10-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.