Are there any tools for maintaining private yum repositories?
Specifically, I'd like to:
- upload rpms and have them placed in the proper directory;
- indexes/metadata kept-up-to-date automatically;
- keep old versions around;
- reject invalid rpms ( overwriting existing ones for instance ).
Update:
This will be a repo with my custom-built RPMs, not a mirror of an existing one.
As Andrew says, createrepo is all you need.
Put your rpms in a dir, run createrepo on it whenever you add rpms. Expose this dir over http. Add this http url to compatible clients through their /etc/yum.repos.d/ directory .
Install
yum-utils
(edit: andcreaterepo
).Since a yum repository is just a directory that you run
createrepo(8)
against and serve over http, functions you mention like uploading, keeping old versions around etc can be done with your usual tools like the shell, ssh, rsync etc. Or are you after a kind of attractive web-based method of managing a repo? I'm not sure if one exists.As for updating metadata automatically, perhaps just use cron? Really, if these are your own packages then you should have tested the rpm before placing it in the repo, so having something check automatically if a rpm is invalid might not be needed, but again a regular cron job with
rpm --test
could tell you.I'm probably missing some great tools but this has worked for me for our limited needs for years.
I use mrepo to manage local yum repositories. It is a tool for mirroring repositories and in your case you could set it up to mirror a local directory containing your custom rpms.
http://pulpproject.org/
The HowtoForge has an article regarding a local YUM repo, not sure if its what you are after
can be found > Here <
There are many tutorials regarding local or private repo's
Are you after making your own?
Hope that helps
Assuming you're running Centos5 or later you'll want to install yum-utils, yum-protectbase, and yum-priorities on any machine using your internal repo. When you're running your own repo you can easily shoot yourself in the foot by over writing base RPMs. These packages help avoid that.