<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Hi,</div><div><br></div><div>Here i send you how i have running centos5 online sync to the spacewalk centos5 channels.</div><div>Maybe there is anybody how can use this.</div><div><br></div><div>I use reposync from the yum-utils package and runpush from the rhnpush package.</div><div>I have running spacewalk on a 32bit xen guest centos5 and there are filesystems for reposync and spacewalk self like:</div><div><br></div><div>/var/satellite 15Gb with use 70% for 32bit and 64bit centos5</div><div><div>/something/repo<span class="Apple-tab-span" style="white-space:pre">     </span>10Gb with use 60% for reposync 32bit centos5</div><div><br></div><div>and on a other 64bit centos5 xen guest i have a filesystem:</div><div><br></div><div>/something/repo with use 60% for reposync 64bit centos5</div><div><br></div><div>This i because reposync from yum-utils use always the current host arch.</div><div>Current i don't know how i can sync 32bit repos on 64bit arch or 64bit repos on 32bit arch.</div></div><div><br></div><div>For both nodes 32bit and 64bit centos5 i have a scipt as cronjob running.</div><div>For this script there are channels required on the spacewalk with channel label descriped in the script sync_repo2spacewalk</div><div>and there is a user/pw required with the role "<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'Luxi Sans'; font-size: 13px; ">Channel Administrator" on the spacewalk.</span></div><div><br></div></div><div><div><br></div><div>This are my channels summary and description:</div><div><br></div><div><div><div><img name="id101-image" alt="Parent Channel Button" height="11" width="15" src="cid:7782CB76-CDE5-4527-B421-14F195D71073"> CentOS 5 Base i386 (32bit)</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:06762536-0CF4-4B17-BDF7-59318B9EDAF7"> CentOS 5 i386 (32bit) Addons</div><div><img alt="Child Channel" height="12" width="20" src="cid:D51E9CB5-22A3-4014-8E60-7AF5076D1125"> CentOS 5 i386 (32bit) Centosplus<span class="Apple-tab-span" style="white-space:pre">   </span></div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:7B0C157B-73F8-42DC-82A0-6C2B2D22C37E"> CentOS 5 i386 (32bit) Extras</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:7D1F8D04-8281-46C8-9E70-4D81816F8FB6"> CentOS 5 i386 (32bit) Updates</div><div><br></div><div><div><div><img name="id101-image" alt="Parent Channel Button" height="11" width="15" src="cid:7782CB76-CDE5-4527-B421-14F195D71073"> CentOS 5 Base x86_64 (64bit)</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:06762536-0CF4-4B17-BDF7-59318B9EDAF7"> CentOS 5 x86_64 (64bit) Addons</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:D51E9CB5-22A3-4014-8E60-7AF5076D1125"> CentOS 5 x86_64 (64bit) Centosplus</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:7B0C157B-73F8-42DC-82A0-6C2B2D22C37E"> CentOS 5 x86_64 (64bit) Extras</div></div><div><div><img alt="Child Channel" height="12" width="20" src="cid:7D1F8D04-8281-46C8-9E70-4D81816F8FB6"> CentOS 5 x86_64 (64bit) Updates</div></div></div><div><br></div><div><br></div><div>Script for sync repo 2 spacewalk:</div><div>----</div><div><div>#!/bin/bash</div><div># Scriptname: sync_repo2spacewalk</div><div># Sync Repo to Spacewalk</div><div># Need: $OS-$R-$ARCH channel labels on Spacewalk</div><div># where $R = {base,extras,centosplus,updates}</div><div># Must: ARCH == arch from host where this script is running.</div><div><br></div><div><br></div><div>LOGFILE=/var/log/sync_repo2spacewalk.log</div><div>REPODIR=/something/repo/spacewalk</div><div><br></div><div># Use the host arch where the script is running.</div><div>ARCH=i386</div><div>USER=mySyncUser</div><div>PWD=mySyncPw</div><div>SERVER=<a href="http://myspacewalk.domain.name">http://myspacewalk.domain.name</a></div><div>OS=centos-5</div><div>REPOS="base extras centosplus updates"</div><div>OPTS="--username=$USER --password=$PWD --newest -v"</div><div><br></div><div><br></div><div>echo "Start sync repo 2 spacewalk for $REPODIR/$ARCH" > $LOGFILE</div><div><br></div><div>if [ -d $REPODIR/$ARCH ]; then</div><div>   cd $REPODIR/$ARCH</div><div>   for R in $REPOS</div><div>   do</div><div>      reposync --repoid=$R && \</div><div><div>      if [ $R = "base" ]; then</div><div><div>         RDIR=$REPODIR/$ARCH/$R/CentOS</div><div>      else</div><div>         RDIR=$REPODIR/$ARCH/$R/RPMS</div><div>      fi       </div></div></div><div>      rhnpush $OPTS --server=$SERVER/APP --channel=$OS-$R-$ARCH --dir=$RDIR >> $LOGFILE </div><div>      echo "reposync and rhnpush done for $OS-$R-$ARCH" >> $LOGFILE</div><div>   done</div><div>else</div><div>   echo "Missing $REPODIR/$ARCH..." >> $LOGFILE</div><div>fi</div><div><br></div><div>exit 0</div><div>----</div><div><br></div><div>It's possible to remove "base" from REPOS after the first run to save performance on the spacewalk.</div><div><br></div><div>Thomas</div></div></div></div></div></body></html>