7

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.

Robert Munteanu
  • 1,542
  • 5
  • 22
  • 38

6 Answers6

5

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 .

Not Now
  • 3,532
  • 17
  • 18
4

Install yum-utils (edit: and createrepo).

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.

3

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.

Mark
  • 1,331
  • 1
  • 11
  • 16
2

http://pulpproject.org/

someone
  • 21
  • 1
1

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

Rodent43
  • 697
  • 3
  • 11
0

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.

kashani
  • 3,922
  • 18
  • 18