[Spacewalk-list] reposync RHEL repositories on Centos Spacewalk

Mike Hanby mhanby at uab.edu
Thu Jun 25 14:50:43 UTC 2009


Here's what I do to allow me to download multiple distros / architectures on my spacewalk server.

My spacewalk server is running CentOS 5 x86_64.

say I stage everything in /var/www/html/pub/<distro>-<arch> as suggested in the wiki, for example CentOS5-x86_64, i'll create a /var/www/html/pub/CentOS5-i386/yum.conf file and /var/www/html/pub/CentOS5-i386/yum.repos.d and directory.

I then customize the yum.conf to point to the customized repo files and a different cache directory / log file:
reposdir=/var/www/html/pub/CentOS5-i386/yum.repos.d
cachedir=/var/cache/yum-i386
logfile=/var/log/yum-i386.log

My reposync commands for CentOS5-i386 start like this:
reposync --config=/var/www/html/pub/CentOS5-i386/yum.conf --arch=i686 --repoid=centos5-base

I tried using the existing /etc/yum.conf and /etc/yum.repos.d and couldn't consistently download the entire set of files and ultimately found that if I hard coded the URLs in the repo files, everything worked, for example:

[centos5-base]
name=CentOS-5 - Base i386
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os

When I decided to add CentOS 4 x86_64 channels to the spacewalk server, it was simple to duplicate the configuration used for CentOS5-i386 and make the slight changes to the yum.repos.d files.

As for RHEL4, I'm still trying to come up with a solution for them, I may end up converting them to CentOS4.

Hope this helps,
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Wojtak, Greg
Sent: Thursday, June 25, 2009 9:03 AM
To: spacewalk-list at redhat.com
Subject: RE: [Spacewalk-list] reposync RHEL repositories on Centos Spacewalk

The only other thing I can think of is to use the -n(?) option to only grab the newest RPM's, compare against what's on the latest DVD iso, and then only rhnpush what's not there into an updates channel the same way CentOS does.

Is there a good way to compare two rpm's and see which one is newer?  I tried coming up with a regular expression to grab the version out of the filename for comparison, but it is not very reliable.

From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Shao Ming
Sent: Wednesday, June 24, 2009 9:36 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] reposync RHEL repositories on Centos Spacewalk

I am trying to avoid that. I hope to hv all reposync, be it RHEL Centos Fedora, to be done on the same Spacewalk box. I'm sure that is possible but I can't seem to locate the info in this list...
On Wed, Jun 24, 2009 at 8:42 PM, Wojtak, Greg <GregWojtak at quickenloans.com<mailto:GregWojtak at quickenloans.com>> wrote:
Here's what I did:

On my RHEL servers (with valid rhn subscriptions), I installed and ran reposync for the appropriate RHN repositories I needed for my environment.  I then rhnpush'ed those - for RHEL 5 it was a total of 5353 packages and for x86_64 it was 7000+.  I don't have any better idea how to manage those, and I am still trying to figure out how I am going to manage them going forward.  But at least I have a consistent set... for now.

-----Original Message-----
From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> [mailto:spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>] On Behalf Of Alexandros Soumplis
Sent: Wednesday, June 24, 2009 5:28 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] reposync RHEL repositories on Centos Spacewalk

Hi!

Ok, i understand. Well I do not use any RHEL clients on my spacewalk
infrastructure to be more helpful but I am more than convinced that you
need to have a valid rhn subscription and then configure yum appropriately
to connect to rhn repos as well. However it would be better if someone
else on the list with rhel client can shred more light :-)



> Hi Soumplis,
>
> thanks for the quick reply. I think I was not too clear in my earlier
> e-mail. I apologise.
>
> Currently, I have a mix of Centos and RHEL boxes. I have managed to use
> reposync to download packages for Centos and rhnpush to Spacewalk. My
> Spacewalk is installed on a Centos.
>
> What I am having problem is wondering how to reposync with RHEL packages?
> Do
> I create a rhel repo at /etc/yum.repos.d/? Do I need a rhn subscription
> account? I'm lost on this part.
>
> thanks
> Shao Ming
>
>
> 2009/6/24 Alexandros Soumplis <soumplis at ekt.gr<mailto:soumplis at ekt.gr>>
>
>> I think you make a mistake. As long as your clients are CentOS boxes
>> then
>> you need to use reposync on your spacewalk server to download CentOS
>> packages from a CentOS repository. Reposync uses your existing yum
>> configuration and repositories. After you've downloaded the packages you
>> can use rhnpush to push those packages into spacewalk repository. There
>> are lots of information on the wiki and on this list archives.
>>
>>
>>
>> > Hi,
>> >
>> > just started on spacewalk and need some answers/helps.
>> >
>> > I have manged to to create Software channels for my Centos 5.x
>> clients. I
>> > also have a few RHEL boxes and hope to point them to spcewalk also.
>> Can
>> > someone explain how I can use the reposync to download packages from
>> rhn
>> > and
>> > push them to spacewalk?
>> > I do not have any 'rhel' repoid in my Centos install.
>> >
>> > thanks
>> > Shao Ming
>> > _______________________________________________
>> > Spacewalk-list mailing list
>> > Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
>> > https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20090625/bde23246/attachment.htm>


More information about the Spacewalk-list mailing list