How to change Yum to point to my repository
Scientific Linux was designed so that users could easily change where their machines get their nightly updates. There are a few things that need to be pointed out.
/etc/cron.daily/yum.cron: The nightly yum.cron (also known as autoyum) uses the same repository configurations as when you use yum manually. So if you have a yum repository enabled, the yum.cron is going to use that repository for updates.
/etc/yum.conf: The yum.conf file is used for the global settings of yum.
/etc/yum.repos.d/: This directory is where all the yum repositories are held. They generally are one repository per file, although more than one repository can be defined in each file.
Just Edit The Files
- Any other files in /etc/yum.repos.d/ that are enabled by default. To list them do
grep enabled=1 /etc/yum.repos.d/*
Customize yum-conf rpm
Scientific Linux has two yum rpm's. yum and yum-conf. This initially was so that yum could be upgraded without touching the configuration files. But it also allows people to completely change their yum-conf to point to wherever they wish.
Steps to customize your yum-conf rpm.
For the example we'll assume this is for release 4.3
- Get the yum-conf src rpm. Get the appropriate rpm for your distribution
- install the src.rpm and untar the source
rpm -Uvh yum-conf-43-4.SL.src.rpm
tar xfz yum-conf-43.tar.gz
- Edit the appopriate files. Changing them to point to your machines.
- Tar back up the directory
tar cfz yum-conf-43.tar.gz yum-conf-43
- cd to the spec directory
cd /usr/src/redhat/SPECS/ Edit the spec file. Change the release to something appropriate
- Build your rpm
rpmbuild -ba yum-conf-sl43.spec
Last modified 2009-03-09 10:44 AM