[Spacewalk-list] Problem kickstarting using a Software Package Profile

Jeremy Maes jma at schaubroeck.be
Wed Apr 24 07:05:35 UTC 2013


Op 19/04/2013 22:57, Jon Miller schreef:
> I'm inching closer to my problem / solution. What I have realized is 
> that the conflicting packages are actually being located from the 
> CentOS yum repositories on the internet. My channels are currently 
> locked down and sync to CentOS 6.2 whereas the default yum repos files 
> that are distributed via the centos-release package are pointing to 
> the latest set of packages.
>
> An equivalent question to solve my problem may be: How do you disable 
> local yum repos from conflicting with what channels you have 
> configured in Spacewalk?
>    I currently have a post-chroot script setup in my kickstart profile 
> that renames any /etc/yum.repos.d/*.repo file with a ".off" extension 
> but apparently this isn't quick enough. Is there a more effective way 
> in disabling local repos quicker?
>
> Thanks,
> Jon Miller
>
I have this via a snippet in a *pre* script to create a yum config file 
for the kickstart to use. This file gets copied to /etc/yum.conf after 
the installation so the web-repositories will stay disabled unless you 
move the repo files or change the yum.conf back to the default.

> ## Change yum.repos.d default dir so base CentOS repositories aren't 
> enabled during kickstart.
> ## This way registration and installation works as it should without 
> any repo errors.
>
> mkdir -p /tmp/ks-tree-shadow/etc/yum.repos.d/custom
>
> cat << EOF > /tmp/ks-tree-shadow/etc/yum.conf
> [main]
> cachedir=/var/cache/yum/$basearch/$releasever
> reposdir=/etc/yum.repos.d/custom/
> keepcache=0
> debuglevel=2
> logfile=/var/log/yum.log
> distroverpkg=centos-release
> exactarch=1
> obsoletes=1
> gpgcheck=1
> plugins=1
> installonly_limit=5
> category=yum
>
> # Note: yum-RHN-plugin doesn't honor this.
> metadata_expire=1h
>
>
> # PUT YOUR REPOS HERE OR IN separate files named file.repo
> # in /etc/yum.repos.d/custom
> EOF
Regards,
Jeremy

 **** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20130424/b67351ca/attachment.htm>


More information about the Spacewalk-list mailing list