Bug 949616 - Suggested patches to mock 1.1.30 to build and work on EL5
Summary: Suggested patches to mock 1.1.30 to build and work on EL5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-08 15:47 UTC by Bjarne Saltbaek
Modified: 2014-04-19 09:20 UTC (History)
3 users (show)

Fixed In Version: mock-1.1.38-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-10 06:36:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for backend.py for EL5. (5.37 KB, application/octet-stream)
2013-04-08 15:47 UTC, Bjarne Saltbaek
no flags Details
Modiufied version of previous EL5 patch for mock 1.34 (6.59 KB, patch)
2013-10-23 19:16 UTC, Clark Williams
no flags Details | Diff

Description Bjarne Saltbaek 2013-04-08 15:47:16 UTC
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.

Comment 1 Clark Williams 2013-04-13 19:18:17 UTC
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).

Comment 2 Fedora End Of Life 2013-09-16 16:39:27 UTC
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

Comment 3 Clark Williams 2013-10-23 19:16:39 UTC
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.

Comment 4 Clark Williams 2013-10-23 19:17:58 UTC
Queued for mock-1.1.34

Comment 5 Fedora Update System 2013-10-30 14:57:45 UTC
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

Comment 6 Fedora Update System 2013-10-30 14:59:41 UTC
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

Comment 7 Fedora Update System 2013-10-30 15:02:08 UTC
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

Comment 8 Fedora Update System 2013-10-30 15:04:14 UTC
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

Comment 9 Fedora Update System 2013-10-30 17:12:15 UTC
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).

Comment 10 Fedora Update System 2013-11-05 05:32:15 UTC
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

Comment 11 Fedora Update System 2013-11-05 05:34:05 UTC
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

Comment 12 Fedora Update System 2013-11-05 05:35:24 UTC
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

Comment 13 Fedora Update System 2013-11-05 05:36:41 UTC
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

Comment 14 Fedora Update System 2013-11-10 06:36:53 UTC
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.

Comment 15 Fedora Update System 2014-02-06 02:09:32 UTC
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

Comment 16 Fedora Update System 2014-02-06 02:11:15 UTC
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

Comment 17 Fedora Update System 2014-02-06 02:12:40 UTC
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

Comment 18 Fedora Update System 2014-02-08 05:03:19 UTC
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.

Comment 19 Fedora Update System 2014-03-25 20:25:35 UTC
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

Comment 20 Fedora Update System 2014-03-25 20:27:56 UTC
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

Comment 21 Fedora Update System 2014-03-25 20:29:49 UTC
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

Comment 22 Fedora Update System 2014-03-27 17:48:26 UTC
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

Comment 23 Fedora Update System 2014-03-27 17:50:21 UTC
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

Comment 24 Fedora Update System 2014-03-27 17:52:15 UTC
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

Comment 25 Fedora Update System 2014-03-31 19:05:10 UTC
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

Comment 26 Fedora Update System 2014-03-31 19:07:25 UTC
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

Comment 27 Fedora Update System 2014-03-31 19:09:20 UTC
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

Comment 28 Fedora Update System 2014-04-09 13:19:28 UTC
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.

Comment 29 Fedora Update System 2014-04-18 15:38:20 UTC
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.

Comment 30 Fedora Update System 2014-04-19 09:20:37 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.