[Spacewalk-list] Using Spacewalk also as basic repo server

J Epperson spacewalk at epperson.homelinux.net
Tue Sep 16 13:52:04 UTC 2014


 

Well, I'd use yum, not rpm. But here's an example of how we do the HP
Proliant Support Pack repos. With this setup we can do "yum
--enablerepo=HP-spp install <package>" for any SPP package (but you
could use rpm and URLs if you insist). We don't use Satellite/spacewalk
child channels because we'd have to replicate them for each QA snapshot
clone base channel. 

HP-spp.repo: 

# Local HP spp repo for hp-health, hp-snmp-agents, hpacucli, etc.
[HP-spp]
name=HP Software Delivery Repository for spp
baseurl=http://satellite/pub/repos/hp/spp/$releasever/$basearch
enabled=0
gpgcheck=1
#gpgkey=http://satellite/pub/repos/hp/spp/GPG-KEY-spp
gpgkey=file:///etc/pki/rpm-gpg/GPG-KEY-spp

# ls -l /var/www/html/pub/repos/hp/spp
total 140
drwxr-xr-x 3 root root 45056 Sep 14 04:46 5-i386
drwxr-xr-x 2 root root 4096 Feb 27 2014 5Server
drwxr-xr-x 3 root root 36864 Sep 14 04:47 5-x86_64
drwxr-xr-x 3 root root 20480 Sep 14 04:46 6-i386
drwxr-xr-x 2 root root 4096 Feb 27 2014 6Server
drwxr-xr-x 3 root root 20480 Sep 14 04:46 6-x86_64
-rw-r--r-- 1 root root 990 Jan 30 2014 GPG-KEY-spp 

hp-reposync.sh script: 

#!/bin/bash
# Syncs the HP hardware snmp tools repos from hp
# Note: reposync is known to throw spurious "listed more than once" repo
messages when yum-rhn-plugin is present.
#
# Implemented via soft link in /etc/cron.weekly
#
REPOCFG="/etc/yum.repos.d/HP-spp-mirror.repo"
REPODIR="/var/www/html/pub/repos/hp/spp"
# Get repo list from REPOCFG, pipe to reposync and createrepo
grep "[.*]" $REPOCFG|sed "s/[//g"|sed "s/]//g"|
while read REPO
do
 /usr/bin/reposync -c $REPOCFG -r $REPO -p $REPODIR
 /usr/bin/createrepo -d $REPODIR/$REPO/
done

HP-spp-mirror.repo: 

# For local mirroring of HP Proliant spp yum repos
# DO NOT enable these repos!
[6-i386]
name=HP Proliant spp 6 x32
baseurl=http://downloads.linux.hp.com/repo/spp/RedHatEnterpriseServer/6Server/i386/current
enabled=0
gpgcheck=1
gpgkey=http://downloads.linux.hp.com/SDR/repo/spp/GPG-KEY-spp

[6-x86_64]
name=HP Proliant spp 6 x64
baseurl=http://downloads.linux.hp.com/repo/spp/RedHatEnterpriseServer/6Server/x86_64/current
enabled=0
gpgcheck=1
gpgkey=http://downloads.linux.hp.com/SDR/repo/spp/GPG-KEY-spp

[5-i386]
name=HP Proliant spp 5 x32
baseurl=http://downloads.linux.hp.com/repo/spp/RedHatEnterpriseServer/5Server/i386/current
enabled=0
gpgcheck=1
gpgkey=http://downloads.linux.hp.com/SDR/repo/spp/GPG-KEY-spp

[5-x86_64]
name=HP Proliant spp 5 x64
baseurl=http://downloads.linux.hp.com/repo/spp/RedHatEnterpriseServer/5Server/x86_64/current
enabled=0
gpgcheck=1
gpgkey=http://downloads.linux.hp.com/SDR/repo/spp/GPG-KEY-spp 

On 2014-09-16 9:15, Thomas Foster wrote: 

> Spacewalk is using a webserver, so you could use createrepo to add rpm packages to the same server different location. 
> 
> https://access.redhat.com/solutions/7227 [4] 
> 
> On Tue, Sep 16, 2014 at 9:03 AM, Glen Collins <glenc2004 at comcast.net> wrote:
> 
>> Hi All, 
>> 
>> I'm wondering if it's possible to use Spacewalk as both the repo server it's meant to be but also a be able to use the rpm -ivf http://ip/<path>/file.rpm [1] to be able to download rpm files from the command line. I've bee searching on specific keywords for this type of use but cannot find any type of content that would show me how this can be done. It will just make it easier if I can combine both a regular local yum server and the features of spacewalk. 
>> 
>> If this is possible, would someone be able to provide a sample baseurl that would work? 
>> 
>> So in conclusion: 
>> 
>> 1) Use Spacewalk to manage the RHEL/CENTOS systems 
>> 2) Use spacewalk resources and be able to download rpm's from it's repo/channel from the linux command line using "rpm -ivh http://ip/path/filename.rpm" [2] 
>> 
>> Thanks! 
>> 
>> Glen Collins 
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list [3]
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list [3]
 

Links:
------
[1] http://ip/%3Cpath%3E/file.rpm
[2] http://ip/path/filename.rpm%22
[3] https://www.redhat.com/mailman/listinfo/spacewalk-list
[4] https://access.redhat.com/solutions/7227
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20140916/0dafcbe7/attachment.htm>


More information about the Spacewalk-list mailing list