[Spacewalk-list] script to create webserver accessible repo of packages under Spacewalk channels

Boyd, Robert Robert.Boyd at peoplefluent.com
Tue Sep 4 16:43:22 UTC 2012


Matthew,

At the remote sites I'm using Spacewalk Proxy Servers.   How can/will this script work with those? Should I use reposync+createrepo to build mirrors on the Proxy servers?  Or is there another way?  Most of my clients won't have direct access to the master due to network and firewall restrictions.

Robert

-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Matthew Patton
Sent: Saturday, September 01, 2012 3:23 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] script to create webserver accessible repo of packages under Spacewalk channels

On Mon, 27 Aug 2012 19:46:59 -0400, Matthew Patton <mpatton at inforelay.com>
wrote:

> On https://fedorahosted.org/spacewalk/wiki/BrainBox there is a requst
> for:
> <quote>
> Allow a channel to be available as a raw yum repo. This would work for 
> building tools like mock. I often have to keep rpms around in 2 spots 
> so I can perform mock biulds. Please, please fix this. --stahnma
>   Seconded, it would also make migration, manual changes easier? An 
> export as yum repo hierarchy button somewhere? and would help with 
> Koji integration. -- Phil </quote>

I apologize to the list for the pitiful effort of my previous post.

Turns out Satellite generates repodata for each channel and stuffs it into /var/cache/rhn/repodata. So I wrote a vastly better script that extracts the information and symlinks into the hierarchy Satellite maintains. This obviates the need to spend 2x on disk space or maintain a separate repository. If you should have a 'mrepo' configuration that is uploaded into Satellite, this script can be trivially extended to remove the original RPM and symlink into the Satellite's copy.

Please note the script just takes the first match should there be an exact filename match. It also doesn't deal with EPOCH but it appears Satellite does it's own housecleaning in that regard.

If you write a yum repo file and put it somewhere that Apache can access it, and likewise symlink into /var/cache/rhn/repodata, any remote yum client can take full advantage of the Satellite channels without having to join. This is particularly useful when you want to install the rhn-client packages on a system that has no existing ties to Satellite.

...

The script itself is at
http://pastebin.com/UUmcF4yT


--
Cloud Services Architect, Senior System Administrator InfoRelay Online Systems (www.inforelay.com)




More information about the Spacewalk-list mailing list