Wednesday, December 2, 2009

Repo Master....ing...Stage 2 | DXR-PROJECT

So after making the repository directories (i386, source, and x86_64) and collecting the rpm packages, I had a few more tasks to do as the REPO MASTER.


1. Create a script (my favorite thing in the world...not really lol) that will automate the creation of the repository data.

2. Create a repo rpm (that includes the gpg key).


So first thing is first, the oh so dreaded script (that ended up not being so bad). After using a template I found on the net and with a few adjustments (with the help of Chris Tyler)....VOILA!


#!/bin/sh

destdir="/var/www/html/DXR/"

rpm --addsign /var/www/html/DXR/*/*.rpm

for arch in i386 x86_64 source
do
cd ${destdir}/${arch}
createrepo .

done


After running script, everything seemed to be fine however I found a kink later on in the process (which I will mention further down).

To make the repo rpm, I created a spec file and edited the repo file to ensure the baseurl was set to $basearch.

Once I had my rpm file, I installed it on Australia to make sure the install worked. This is where the kink in the createrepo was noticed. Yum could not find the mirror because the url repeated itself like this http://scotland.proximity.on.ca/DXR/var/www/html/DXR/....

I ran a manual createrepo . in thr repo directories, ran a yum clean all on the client, and tried the install again on Australia.... success!

I have tried to run this on Germany, however when it comes to installing viewsource it doesnt seem to find the package, I will discuss this in my SBR600 class tomorrow.

For now, here is the link the repo rpm

No comments:

Post a Comment