python hashlib

January 28, 2009

Do you have a repository you made using yum and createrepo from rawhide but you need to access them from a rhel5/centos5 box? Do you find that no matter what you do you get invalid metadata checksums?

A few days ago I checked in some patches to yum and createrepo changing over the default checksum from sha1 to sha256. This is for security or something like that.

The problem is that python 2.4 in rhel5/centos5 doesn’t have support for the fancy new hashing library that came with python 2.5.

James wrote a very clever Checksum class a few months ago in yum.misc which plays ball properly with the various available hashing libs on the various python releases. That was very helpful but it doesn’t solve the more basic problem of there not being a ‘sha256’ object to base off of at all in python 2.4.

We ran into the above problem today on the fedora builders. So here’s how you can help you problem.

Grab these packages (built for rhel5):

http://skvidal.fedorapeople.org/hashlib/

and install them on your rhel5/centos5 box as well as installing the yum pkg from rhel5.3 and centos 5.3 (when it is released) or centos-plus.

Then you should be able to handle sha256 checksums on an el5-ish box.

4 Responses to “python hashlib”

  1. Stephen Smoogen Says:

    Do you think this would be good for EPEL when you are ready?

  2. bob Says:

    oh heavens thank you. We’ve been missing this.

  3. skvidal Says:

    smooge,
    I think I will submit it for epel. At least for el5. I don’t think I’ll chase after el4, though.

    Bob,
    glad I can help.

  4. void Says:

    Great!! Thanks!!!!


Leave a comment