PDA

View Full Version : Automatically build rpm packages?


mrburns
19th October 2011, 11:17 PM
I need to to apply thirdparty patches to a few packages that are already in the Fedora repository. I looked into building rpms and it looks simple enough to edit the existing .spec file to include my patches. But I would need to do this everytime an update is out, so I was wondering if there was some way I could do this automatically as soon as a new update is available. If so, what's the best way to accomplish this.

I figured I could create a local repository using createrepo and keep all my custom built rpms in it so that yum can update automatically. When a new update is out in the official repo, I should fetch the srpm automatically, patch the .spec file and build a custom rpm and push it into my local repo. Is that how I should do it or is there a better way?

leigh123linux
20th October 2011, 08:52 AM
I don't bother with srpm, if the package is in the repos I prefer to use fedpkg


fedpkg co -a -B packagenameedit the spec and add your patch, then run this from the branch directory to build

fedpkg local

mrburns
21st October 2011, 01:04 AM

Oh, I never knew about fedpkg. Thanks for the tip. I could be wrong but it seems to do pretty much the same thing, except with fewer commands.

But my main question is.. what happens when an updated package is available in the official fedora repository? Do I need to exclude the package in yum.conf so that it doesn't overwrite my custom built rpms, or is there a sane way to automatically rebuild packages when updates are available. I'm familiar with scripting languages so I can write something that takes care of automatic building that gets triggered with a custom yum plugin, but what I'm really asking is if there exists a solution already.