[CentOS] Updating Centos Machines

Mon Sep 4 06:41:07 UTC 2006
"Petr \"Qaxi\" Klíma" <qaxi at seznam.cz>

> 
> Try Yam:
> 
> 	http://dag.wieers.com/home-made/yam/
> 

YAM is nice piece of SW but have two cons for me:

- I have to have ISO files for BASE of an repo.
   (please correct me if I am wrong)
   it force me to download ISOs by hand when CentOS respin is released

- I have to sync all packages from additional repos
   if you use several packages from RPMForge repo (thank you boys) you 
have to download/sync full repository or have a custom script 
downloading just what you want


Now i use this to make yams part of work:
=======================================================
#!/bin/bash

RSYNC='rsync -rlptzH --delete --exclude=SRPMS --exclude="*.src.rpm"'

function download () {
     stSERVER=$1
     stRSOPT=$2
     stREL=$3
     stARCH=$4
     stFSROOT=$5
     for i in $6
     do
#        echo $RSYNC $stSERVER/$stREL/$i/$stARCH/ $stFSROOT/$i
         $RSYNC $stSERVER/$stREL/$i/$stARCH/ $stFSROOT/$i
     done
}

# CentOS 4 OS a update
SERVER="rsync.hrz.tu-chemnitz.de::ftp/pub/linux/centos"
FSROOT="/var/install/CentOS-4-i386"

download $SERVER "" 4 i386 $FSROOT "os updates extras centosplus addons"

# CentOS 4 OS a update
FSROOT="/var/install/CentOS-3-i386"
download $SERVER "" 3 i386 $FSROOT "os updates extras centosplus addons"

cd /var/install

# update local packages repo
createrepo -q local
yum-arch -q local 2>/dev/null
=================================================================

in local repo there are custom packages and some packages downloaded 
from RPMForge or others

-- 

    Petr Klíma

    e-mail:  qaxi at seznam.cz