Local CentOS repo - Mismatch between rsync mirror and available update files?

by Locane   Last Updated July 13, 2018 20:00 PM

I recently set up a local CentOS and epel mirror, using rsync against publicly available mirrors that support rsync.

Then, I set up custom repo files for the client machines connecting to my local mirror (I basically just replaced "mirrorlist" with a "baseurl"):

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://<MY LOCAL SERVER IP>/centpo/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://<MY LOCAL SERVER IP>/centpo/$releasever/updates/$basearch/

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://<MY LOCAL SERVER IP>/centpo/$releasever/extras/$basearch/

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://<MY LOCAL SERVER IP>/centpo/$releasever/centosplus/$basearch/
enabled=0

Running yum -y update on a client machine configured to use the local repo gets a list of the newest packages (from somewhere?) and then looks for them in the local repo I have set up.

Sometimes, these packages don't exist, for example, currently running yum -y install python-devel on the client machine goes and looks for:

7/updates/x86_64/Packages/python-devel-2.7.5-69.el7_5.x86_64.rpm

When my local repo only has:

7.5.1804/os/x86_64/Packages/python-devel-2.7.5-68.el7.x86_64.rpm

(The "7" directory is a symlink to 7.5.1804)

So my local repo is missing the updated package python-devel-2.7.5-69. Re-running my rsync against a couple of the publicly available CentOS mirrors yields no changes - IE they don't appear to have this file either.

My question is:

What am I doing wrong, and what is the proper way to set up a local CentOS repo and repo files? Clearly it can't be as simple as finding a more up to date server to rsync to?



Related Questions


Openproject Gitlab integration

Updated February 24, 2017 22:00 PM


Self-signed Cert for yum repository server

Updated May 21, 2018 16:00 PM

Can't set a local repository in Centos

Updated June 19, 2018 13:00 PM