[Buildbot-devel] 0.7.10p1 setup command bdist_rpm broken

Armstrong, Gareth gareth.armstrong at hp.com
Tue Mar 31 12:59:14 UTC 2009


Hello Darragh,

Greeting from from an old Galway head. The patch you sent comments out python's decorator syntax.  The real fix for this is to import an external python module like http://pypi.python.org/pypi/DecoratorTools which works on python 2.3.

Perhaps we need a clear statement on the minimum version of python needed to run buildbot 0.7.10+.

All the best,

Gareth

-----Original Message-----
From: Bailey, Darragh 
Sent: Tuesday, March 31, 2009 13:22
To: buildbot-devel at lists.sourceforge.net
Subject: [Buildbot-devel] 0.7.10p1 setup command bdist_rpm broken


I was finding that building an rpm from the 0.7.10p1 release using the setup.py tools kept failing.

Using a RHEL4 Update 4 virtualized environment no it is not fully patched, and no I can't patch it either, it needs to stay at exactly the same as release of update 4.


# python setup.py bdist_rpm
... Build output ...

find: /var/tmp/buildbot-buildroot/usr/lib/debug: No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip 
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip 
+ /usr/bin/objdump
Processing files: buildbot-0.7.10p1-1
error: File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/ec2buildslave.pyc
error: File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/test/test_ec2buildslave.pyc
error: File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/test/test_slaves.pyc


RPM build errors:
    File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/ec2buildslave.pyc
    File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/test/test_ec2buildslave.pyc
    File not found: /var/tmp/buildbot-buildroot/usr/lib/python2.3/site-packages/buildbot/test/test_slaves.pyc
error: command 'rpmbuild' failed with exit status 1


I've done some digging around and found that these files were suffering from syntax errors when using python 2.3. The code may be perfectly fine for later versions of python, I haven't checked. Changes that I made to allow an rpm to be built are in the patch attached.


Btw, there still appears to be a problem with it using /usr/lib/python2.3 on x86_64 systems instead of /usr/lib64/python2.3, I have a custom spec file that I use with the release tarball that works around this issue by specifying the following: 
%build
python%{?py_ver:%{py_ver}} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
python%{?py_ver:%{py_ver}} setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --install-lib=%{_libdir}/python%{?py_ver:%{py_ver}}/site-packages

I can't recall exactly what error I would encounter without this fix, but I believe there were problems with importing the correct files from twisted and other packages unless the buildbot files are installed under the correct prefix.

--
Regards,
Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2 Registered Number: 361933 




More information about the devel mailing list