[Buildbot-devel] 0.7.10p1 setup command bdist_rpm broken

Bailey, Darragh dbailey at hp.com
Tue Mar 31 11:21:41 UTC 2009


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 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildbot-0.7.10-buildfixes.patch
Type: application/octet-stream
Size: 3432 bytes
Desc: buildbot-0.7.10-buildfixes.patch
URL: <http://buildbot.net/pipermail/devel/attachments/20090331/00cc9d32/attachment.obj>


More information about the devel mailing list