yum+src.rpm+CentOS

Hmmm da, stari OS (RHEL 4U5) pa sam našla samo src.rpm YUM paket koji mi treba (za taj OS ide verzija 2.0.8-1, i radiće kao treba).
I kako sada sa njim?
Dakle evo kako :
Spustiti paket u privremeni folder :
# wget http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm
# rpmbuild –rebuild yum-2.0.8-1.src.rpm
Paziti!!! ispred “rebuild” su DVA znaka “-“!!
Ogroman izlaz, paziti samo da se ne javi neki ERROR…
Pa otići u folder gde se automatski smeštaju napravljeni RPM paketi :
# cd /usr/src/redhat/RPMS/noarch
# rpm -ivh yum-2.0.8-1.noarch.rpm

Pošto je ovaj yum star, lako se može desiti ovakva greška :
# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4AS – i386 – Base
retrygrab() failed for:
http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4AS/i386/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4AS/i386/headers/header.info
[Errno 4] IOError:

E onda uvedemo u igru CentOS (RHEL4 se podudara sa CentOS4). Prvo se podesi /etc/yum.conf :
[main]
proxy=http://IP-adresa-proxy-servera:port
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
[base]
name=CentOS-$releasever – Base
baseurl=http://vault.centos.org/4.0/os/i386/
gpgcheck=1
[updates]
name=Red Hat Linux $releasever – Updates
baseurl=http://vault.centos.org/4.0/os/i386/
gpgcheck=1

A onda :
# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
# rpm –import RPM-GPG-KEY-CentOS-4
Paziti, tu su DVA znaka minus!
I sada sve radi :
# yum update
Gathering header information file(s) from server(s)
Server: CentOS-4AS . Base
Server: Red Hat Linux 4AS . Updates
Finding updated packages
Downloading needed headers
indexhtml-3-4-1.centos4.n 100% |=========================| 2.5 kB 00:00
…..

Propuštanje YUM-a kroz iptables – samo u INPUT chain dodati :
-A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

Ako i dalje neće da radi obavezno pogledati fajl : /etc/yum.repos.d/CentOS-Base.repo i ukloniti hash znak (#) ispred redova koji počinju sa “baseurl=http://”