[Buildbot-devel] 0.7.10p1 setup command bdist_rpm broken

Steve 'Ashcrow' Milner smilner at redhat.com
Tue Mar 31 16:46:29 UTC 2009


Just an FYI, this issue is for more than just buildbot ... I can run
bdist_rpm for other modules on F10 and get errors of unpackaged pyo
files. I think it's related to what bdist_rpm expects in it's
generated spec file and what the local rpm build creates via it's
scripts .... namely on F10 /usr/lib/rpm/brp-python-bytecompile

<snip>
# Generate normal (.pyc) byte-compiled files.
$python    -c 'import compileall;
compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' >
/dev/null

# Generate optimized (.pyo) byte-compiled files.
$python -O -c 'import compileall;
compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' >
/dev/null
</snip>

I think the real fix ends up being a fix to bdist_rpm to allow for
FILENAME.py* instead of FILENAME.py (though I could be wrong, wouldn't
be the first time :-P).

On 31/03/09 11:12 -0500, Dustin J. Mitchell wrote:
>(Adding Gary)
>
>Gary, can you take a look at this?  I've created a corresponding bug:
>  http://buildbot.net/trac/ticket/544
>
>Darragh, I think the immediate solution is to exclude those files from
>your release, perhaps just by deleting them.
>
>Dustin
>
>---------- Forwarded message ----------
>From: Bailey, Darragh <dbailey at hp.com>
>Date: Tue, Mar 31, 2009 at 6:21 AM
>Subject: [Buildbot-devel] 0.7.10p1 setup command bdist_rpm broken
>To: "buildbot-devel at lists.sourceforge.net"
><buildbot-devel at lists.sourceforge.net>
>
>
>
>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
>
>------------------------------------------------------------------------------
>
>_______________________________________________
>Buildbot-devel mailing list
>Buildbot-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
>
>
>-- 
>Storage Software Engineer
>http://www.zmanda.com


>------------------------------------------------------------------------------

>_______________________________________________
>Buildbot-devel mailing list
>Buildbot-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/buildbot-devel


-- 
kthxbye!
Steve 'Ashcrow' Milner
Agent of Infosec
IRC: ashcrow
GnuPG ID: 28DFD4BE

"In the heat of conversation I may have said certain things I believe 
to be untrue. The alleged lie that you might have heard me saying 
allegedly moments ago ... thats a parasite that lives in my neck." 
     -- Tad Ghostal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20090331/93410e32/attachment.bin>


More information about the devel mailing list