Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using createrepo to create my yum repository. However, it seems to have a bug - one of my packages, which is 11GB in size, is incorrectly shown as just 956 MB when I try to do a yum install bigpackage from a client machine. When trying to download the big package for installation, yum errors out with this:

Error Downloading Packages:
  bigpackage-0.1-53952.x86_64: failed to retrieve bigpackage-0.1-53952.x86_64.rpm from myrepo-prod-source
error was [Errno 14] Downloaded more than max size for http://myrepo/yum/repo/centos//bigpackage-0.1-53952.x86_64.rpm: 1073004544 > 975454259

This is obviously because the package is listed in my repo with the wrong size. So I googled around for a solution.

This appears to be a bug with createrepo. It is incorrectly casting some 64bit integers internally and the variable used to store the size of the package is getting corrupted. Here are pages I've uncovered in my search for resolution of this issue:

A patch that purportedly fixes this issue:

http://yum.baseurl.org/gitweb?p=yum-metadata-parser.git;a=commitdiff;h=2d8499cf272bf9027d015fae0d344998debfae69

I'm not sure how to apply that patch, but in the hopes that the latest version of createrepo includes that fix, I downloaded and upgraded to the latest dev version of createrepo, 0.9.8.

This still didn't work, however - the size of the big package is still listed incorrectly. Argh! Any ideas on how to fix createrepo to show the right size in the repo? Any alternative tools for creating yum repos that support packages larger than 2GB?

share|improve this question
    
What version of CentOS? When did you last update your system? –  Michael Hampton Jul 24 '13 at 1:05
    
The yum repo is actually running on an Ubuntu 12.10 box. The yum clients are running on Centos 6.3 . –  Aphex Jul 24 '13 at 1:30
    
You're running createrepo on Ubuntu?! Perhaps you should describe this setup in complete detail. –  Michael Hampton Jul 24 '13 at 1:37
    
Yes. :( Not by choice. Our ops team set up our repo on this ubuntu box. When I upgraded to the new 0.9.8 createrepo version, I downloaded it from createrepo.baseurl.org and did a make and make install. Then, createrepo couldn't start because it couldn't find its python library, but adding PYTHONPATH=/usr/lib/python2.7/site-packages/:$PYTHONPATH in front of the createrepo command made it run. –  Aphex Jul 24 '13 at 20:07

1 Answer 1

up vote 0 down vote accepted

As it turns out, the patch I found is not for CreateRepo and has nothing to do with Ubuntu, it is in fact for yum-metadata-parser (on CentOS, this package is called yum-metadata-parser.x86_64 1.1.2-16.el6). It's trying to parse the large size number that is correctly written within the repository xml file and fails because it's not a 64 bit integer column in the sqlite db that yum uses.

Applying the patch to the yum-metadata-parser source, building it, and installing it worked!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.