Created attachment 732722 [details] Patch for backend.py for EL5. Description of problem: mock version 1.1.30 does not build on RedHat/CentOS 5 with Python 2.4 without patches. Version-Release number of selected component (if applicable): Version 1.1.30 How reproducible: Steps to Reproduce: 1. Download mock version 1.1.30 on a CentOS 5.9 x86_64. 2. Build it with rpmbuild using the .spec from https://github.com/repoforge/rpms/blob/master/specs/mock/mock.spec (bump it up from 1.1.21 to 1.1.30). 3. Install it. 4. Rebuild a random package with mock -vvvv -r centos-5-x86_64 rebuild mock-1.1.30-2.el5.src.rpm Actual results: Traceback (most recent call last): File "/usr/sbin/mock", line 66, in ? import mockbuild.backend File "/usr/lib/python2.4/site-packages/mockbuild/backend.py", line 255 finally: ^ SyntaxError: invalid syntax Expected results: INFO: mock.py version 1.1.30 starting... Start: init plugins Finish: init plugins Start: run INFO: Start(rpmbuild/SRPMS/mock-1.1.30-2.el5.src.rpm) Config(centos-5-x86_64) Start: lock buildroot Start: clean chroot INFO: chroot (/var/lib/mock/centos-5-x86_64) unlocked and deleted Finish: clean chroot Finish: lock buildroot Start: chroot init Start: lock buildroot Mock Version: 1.1.30 INFO: Mock Version: 1.1.30 INFO: calling preinit hooks INFO: enabled root cache INFO: /etc/mock/centos-5-x86_64.cfg newer than root cache; cache will be rebuilt INFO: enabled yum cache Start: cleaning yum metadata Finish: cleaning yum metadata Start: device setup Finish: device setup Start: yum update Finish: yum update Start: creating cache Finish: creating cache Finish: lock buildroot Finish: chroot init INFO: Installed packages: Start: build phase for mock-1.1.30-2.el5.src.rpm Start: device setup Finish: device setup Start: build setup for mock-1.1.30-2.el5.src.rpm Finish: build setup for mock-1.1.30-2.el5.src.rpm Start: rpmbuild -bb mock-1.1.30-2.el5.src.rpm Finish: rpmbuild -bb mock-1.1.30-2.el5.src.rpm Finish: build phase for mock-1.1.30-2.el5.src.rpm INFO: Done(rpmbuild/SRPMS/mock-1.1.30-2.el5.src.rpm) Config(centos-5-x86_64) 4 minutes 12 seconds INFO: Results and/or logs in: /var/lib/mock/centos-5-x86_64/result Finish: run Additional info: I have attached a patch for ./py/mockbuild/backend.py that fixes various things for it to work on EL5. * Python try:exception:finally is not available in Python 2.4. Replaced with a nested try:try * Unlinking of /dev/ptmx is needed in kernel 2.6.18 as well (EL5 baseline kernel version). * Unlinking var/lib/rpm/__db* files have issues in chroot when files are owned by root.root and the mock user tries to nuke them. I have uncommented the nuke. But I assume someone should fix it making the files owned by root.mock and not root.root * except Exception as is not available in Python 2.4. Rewrote it in Python 2.4 friendly code.
I like all of these except the removal of the RPM __db* lock files. I'll work on figuring out how to kill these (or who creates them as root.root).
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
Created attachment 815499 [details] Modiufied version of previous EL5 patch for mock 1.34 Slightly tweaked version of previous patch. Only removes the rpm __db* files if not running on EL5.
Queued for mock-1.1.34
mock-1.1.34-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc18
mock-1.1.34-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.34-1.el6
mock-1.1.34-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc20
mock-1.1.34-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.34-1.fc19
Package mock-1.1.34-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mock-1.1.34-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-20329/mock-1.1.34-1.fc20 then log in and leave karma (feedback).
mock-1.1.35-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc19
mock-1.1.35-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc18
mock-1.1.35-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.35-1.el6
mock-1.1.35-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.35-1.fc20
mock-1.1.35-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.36-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc19
mock-1.1.36-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc20
mock-1.1.36-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.36-1.el6
mock-1.1.36-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.37-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19
mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20
mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6
mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20
mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19
mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6
mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19
mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6
mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20
mock-1.1.38-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.38-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.38-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.