1

I have a local yum repo that is updated via mrepo / createrepo, all my servers are targeting this local repo for their updates but it's always installing the last version which isn't good for a production environment.

I'd like to implement a procedure to control which version of packages are authorized to be pulled by clients. So I'd need to have multiple versions of packages.

I tried the following parameters in /etc/mrepo.conf, but I still see packages being removed due to newer revision during a 'mrepo -uvvg'

mirrordir-cleanup = no
reposync-cleanup = no
reposync-newest-only = no
rhnget-cleanup = no
rhnget-download-all = yes
rsync-cleanup = no

/etc/mrepo.d/centos.conf :

[centos6]
name = CentOS Repo $release ($arch)
release = 6
arch = x86_64
metadata = repomd repoview yum

### Additional repositories
centos6 = http://mirror.csclub.uwaterloo.ca/centos/$release/os/$arch/
centos6-updates=http://mirror.csclub.uwaterloo.ca/centos/$release/updates/$arch/

2 Answers 2

4

You are not syncing from RHN, so the "rhnget" options aren't doing any thing for you. Instead, I think you need lftp-cleanup = no when mirroring HTTP sources.

Also, instead of issuing yum update or yum install package, you can be more precise by requesting specific versions.

yum install httpd-2.2.15-9.el6

This is probably what you want to do for a production environment.

Client side, you could also use the Yum plugin, versionlock, if there are specific packages you need to version control, but you want to update others liberally.


EDIT:

I spent some time looking at this on our mrepo server for my own curiosity. The default behavior of lftp is to mirror the remote host. Could you provide the output showing that packages are being removed during mrepo -ug?

The notes in the example documentation show that lftp-cleanup is for:

## Clean up packages that are not on the sending side ?

So, it seems my hunch could be correct (although for the wrong reason.) My bet is that the upstream source is not archiving packages and your default lftp-cleanup value is yes. You should confirm also that the packages are still available at the source.

1
  • 1
    You're right, it's not deleting 'old' package any more with lftp-cleanup=no. I tested all similar options but missed the right one, of course :) Thanks !
    – Bastien974
    Jan 18, 2013 at 21:41
2

Even if you get mrepo to retain older package versions, updates will always use the latest version available. The solution you're looking for involves multiple local repos updated on different schedules.

1
  • I'm gonna use CFEngine to force package version, that's why I'd like a repo that contains all of them. However, i'm curious how it would work with multiple local repo ?
    – Bastien974
    Jan 16, 2013 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .