Hello community, here is the log from the commit of package yup checked in at Thu Dec 6 17:52:24 CET 2007. -------- --- yup/yup.changes 2007-09-07 12:52:41.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yup/yup.changes 2007-12-06 17:40:15.000000000 +0100 @@ -1,0 +2,8 @@ +Thu Dec 6 17:21:41 CET 2007 - meissner@suse.de + +- updated switch-enterprise-nu-mirror to 0.34 from Andreas #309861 +- introduce YUP_SP_SUBCHANS as requested by Robert Zondervan +- minor, but powerful change by Robert Zondervan - thanks +- add ability to find duplicate file and hardlink to safe space + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yup.spec ++++++ --- /var/tmp/diff_new_pack.f17243/_old 2007-12-06 17:52:13.000000000 +0100 +++ /var/tmp/diff_new_pack.f17243/_new 2007-12-06 17:52:13.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yup (Version 222) +# spec file for package yup (Version 232) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -15,13 +15,13 @@ BuildRequires: libidn-devel openssl-devel %define curl_name curl %define curl_version 7.15.5 -License: GPL v2 or later, MOZILLA PUBLIC LICENSE (MPL/NPL) +License: GPL v2 or later; MOZILLA PUBLIC LICENSE (MPL/NPL) %else -License: GPL v2 or later, MOZILLA PUBLIC LICENSE (MPL/NPL) +License: GPL v2 or later; MOZILLA PUBLIC LICENSE (MPL/NPL) BuildArch: noarch %endif -Version: 222 -Release: 20 +Version: 232 +Release: 1 Summary: "Yum Update Proxy" for SLE 10 Maintenance Source0: yup.sh Source1: yup.sysconfig @@ -66,6 +66,7 @@ %if 0%{suse_version} < 1010 %endif + %prep %if 0%{suse_version} < 1010 %setup -T -c -n %{curl_name}-%{curl_version} -a 10 @@ -168,6 +169,11 @@ fi %changelog +* Thu Dec 06 2007 - meissner@suse.de +- updated switch-enterprise-nu-mirror to 0.34 from Andreas #309861 +- introduce YUP_SP_SUBCHANS as requested by Robert Zondervan +- minor, but powerful change by Robert Zondervan - thanks +- add ability to find duplicate file and hardlink to safe space * Fri Sep 07 2007 - meissner@suse.de - updated switch-update-server (0.27) from Andreas, more bugfixes, other architectures. ++++++ switch-enterprise-nu-mirror ++++++ --- yup/switch-enterprise-nu-mirror 2007-09-07 10:14:34.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yup/switch-enterprise-nu-mirror 2007-12-06 17:20:50.000000000 +0100 @@ -1,6 +1,5 @@ #!/bin/bash export LANG=C - # Script to upgrade a host, which is subscribed to an enterprise-internal # mirror of the Novell update service, to SLE?10 SP1. # It is assumed that the update tree has the structure that yup builds. @@ -21,6 +20,17 @@ # 05 Sep 2007 : Minimized the need for manual intervention to customize the script # Add extra restart of ZMD after stage 4 # 06 Sep 2007 : Syntax-check of $UPDATE_ROOT +# 19 Sep 2007 : v0.28 +# Change the way we check if zmd has settled (Bug 309861). Now we +# check for pending services rather than # of available updates, since an +# up-to-date system would fail the first of these checks. +# Added more checks on whether zmd has settled. Misc cosmetics. +# Improved handling of rug errors in stage 5 and 6 +# 02 Oct 2007 : v0.33 +# By default update the SDK if it is installed unless $UPDATE_SDK = NO +# Verify existence of the various repositories (currently only +# checks for nfs and http based repos) and exit on errors +# prior to adding services. Misc cosmetics. # # !!!!! M A N U A L I N T E R V E N T I O N R E Q U I R E D !!!!! @@ -39,45 +49,47 @@ # If architecture is different from i586 or x86_64, you must set $ARCH ARCH="" -# If you are subscribed to a mirror of the SDK updates, then change -# SUBSCRIBED_TO_SDK_REPO to YES. -# It is assumed that updates for the SDK is a subtree created by -# yup and exist in the update repo tree of SLE (for naming reasons) -SUBSCRIBED_TO_SDK_REPO="NO" - -##################################################### -# No need to change anything below this line # -##################################################### +# This script will check if the SLE 10 SDK is installed and upgrade it +# assuming that updates for the SLE-10-SDK-* are also mirrored with +# yup and exist in the update repo tree of SLE (for naming reasons). +# If you for some reason do NOT want to upgrade the SDK along with the OS +# (not having the SDK at the same level as the OS can lead to problems) +# you must change +# UPDATE_SDK to NO. +UPDATE_SDK="YES" + +############################################################################# +# No need to change anything below this line # +############################################################################# if [ `id -u` != 0 ]; then echo "You need to be root to run this script" - exit 1 + exit 7 fi # Log file exec >> /var/log/YaST2/switchUpdateServer.log # Functions start -check_for_updates () +is_anything_pending () { -# Check if ZMD has landed on its feet and sees updates +# Check if ZMD has any services in pending state i=0 -ZMD_FOUND_UPDATES="NO" -while [[ $i -lt 4 ]] ; do - NO_OF_UPDATES=`rug lu | wc -l | awk 'BEGIN{FS=" "}{print $1}'` - if [[ $NO_OF_UPDATES -gt 5 ]] ; then - ZMD_FOUND_UPDATES="YES" +SOMETHING_IS_PENDING="YES" +while [[ $i -lt 6 ]] ; do + if ! [[ `rug sl | grep -i Pending` ]] ; then + SOMETHING_IS_PENDING="NO" break else - echo "Waiting for ZMD to refresh update list" - sleep 15 + echo "Waiting for services to get out of pending state" + sleep 30 fi ((i++)) done -if [[ $ZMD_FOUND_UPDATES = "NO" ]] ; then - echo "ZMD not able to find updates in catalog - exiting" - exit 1 +if [[ $SOMETHING_IS_PENDING = "YES" ]] ; then + echo "ZMD does not settle from pending state - exiting..." + exit 2 fi } @@ -99,31 +111,83 @@ fi ((i++)) done + if [[ $ZMD_STILL_RUNNING = "YES" ]] ; then echo "Pulling the plug on ZMD" killall -9 zmd sleep 10 fi +# Since we may get "An instance of ZMD is already running" although +# /etc/init.d/zmd status reports it as unused, we add yet another delay +sleep 30 echo "Restarting ZMD" rczmd start # Wait for ZMD to calm down sleep 60 -check_for_updates +is_anything_pending } time_stamp () { +# Create time stamp in log file echo "------------------------------------------------------------------- " date echo "------------------------------------------------------------------- " } + +check_if_repo_exists () +{ +# If the file repodata/repomd.xml file exists in a service URL +# we consider the repository to be existing +# Unfortunately we currently only support this check for http-based +# repository access +if [[ $REPO_PROTOCOL == "http" ]] ; then + curl -f -o /dev/null $REPO"repodata/repomd.xml" 1>/dev/null 2>&1 + if [ $? != 0 ] ;then + repo_error + exit 5 + fi +elif [[ $REPO_PROTOCOL = "nfs" ]] ; then + REPO_SHARE=`echo $REPO | awk -F ":" '{print $2}' \ + | sed -e "s/\/\///g" | sed -e "s/^$REPO_HOST//g"` + mount -t nfs -o ro $REPO_HOST":"$REPO_SHARE $TMPDIR + MOUNT_RC=$? + if [ $MOUNT_RC != 0 ] ;then + repo_error + exit 5 + fi + if ! test -r $TMPDIR"/repodata/repomd.xml" ; then + repo_error + umount $TMPDIR + exit 5 + fi + umount $TMPDIR +elif [[ $REPO_PROTOCOL = "https" ]] ; then + # Feel free to implement checks for this protocol + echo "Repo existence not implemented for $REPO_PROTOCOL" +fi +} + +repo_error () +{ + echo "The following repository does not exist or is inconsistent :" + echo "The following repository does not exist or is inconsistent :" >&2 + echo ">>>>> "$REPO "<<<<<" + echo ">>>>> "$REPO "<<<<<" >&2 + echo ; echo "Aborting execution ..." + echo ; echo "Aborting execution ..." >&2 +} # Functions end time_stamp +# Initialize variable(s) +SDK_10_0_INSTALLED="NO" +SCRIPTNAME=`basename $0` +TMPDIR=/tmp/$SCRIPTNAME.$$ # Detect product (SLES/SLED) -if grep -i "suse linux enterprise desktop" /etc/SuSE-release ; then +if grep -i "suse linux enterprise desktop" /etc/SuSE-release >/dev/null 2>&1 ; then PRODUCT="sled" PRODUCT_CAPS="SLED" else @@ -133,16 +197,16 @@ # Detect architechture (i586 or x86_64 unless specified in $ARCH) if [[ $ARCH = "" ]]; then - if grep -i "i586" /etc/SuSE-release ; then + if grep -i "i586" /etc/SuSE-release >/dev/null 2>&1 ; then ARCH="i586" - elif grep -i "x86_64" /etc/SuSE-release ; then + elif grep -i "x86_64" /etc/SuSE-release >/dev/null 2>&1 ; then ARCH="x86_64" fi fi # Construct the service URLs and names # Add trailing slash to $UPDATE_ROOT in case forgotten -if ! echo $UPDATE_ROOT| grep \/$ ; then +if ! echo $UPDATE_ROOT| grep \/$ >/dev/null 2>&1 ; then UPDATE_ROOT=$UPDATE_ROOT"/" fi OLD_UPDATES_SERVICE_URL=$UPDATE_ROOT$PRODUCT_CAPS"10-Updates/"$PRODUCT"-10-"$ARCH"/" @@ -151,13 +215,34 @@ NEW_SP_UPDATES_URL=$UPDATE_ROOT$PRODUCT_CAPS"10-SP1-Updates/"$PRODUCT"-10-"$ARCH"/" NEW_SP_UPDATES_NAME=$PRODUCT_CAPS"10-SP1-Updates" +# Determine access protocol to update repository +case `echo $UPDATE_ROOT | awk -F ":" '{print $1}'` in + http ) REPO_PROTOCOL="http" ;; + https ) REPO_PROTOCOL="https" ;; + nfs ) REPO_PROTOCOL="nfs" + REPO_HOST=`echo $UPDATE_ROOT | awk -F ":" '{print $2}' \ + | awk -F "/" '{print $3}'` + test -w $TMPDIR || mkdir $TMPDIR ;; +esac + +# Verify existence of the repositories +REPO=$OLD_UPDATES_SERVICE_URL +check_if_repo_exists +REPO=$NEW_SP_ONLINE_URL +check_if_repo_exists +REPO=$NEW_SP_UPDATES_URL +check_if_repo_exists + # Check if the machine is indeed already subscribed to $OLD_UPDATES_SERVICE_URL # If not, then we do it +SERVICE_OR_CAT_CHANGED="NO" SUBSCRIBED_TO_OLD_SERVICE="NO" i=0 while [[ $i -lt 4 ]] ; do OLD_CATALOG='' - OLD_CATALOG=$(rug --no-abbrev sl |grep -i -F "active" | grep -F "$OLD_UPDATES_SERVICE_URL" | \ + # Handle missing trailing slash in existing service URL + TMP_OLD_URL=`echo $OLD_UPDATES_SERVICE_URL | sed -e "s/\/$//g"` + OLD_CATALOG=$(rug --no-abbrev sl |grep -i -F "active" | grep -F "$TMP_OLD_URL" | \ awk -F "|" '{print $4}' | sed 's/ //g') if [[ $OLD_CATALOG != '' ]] ; then rug ca |grep -i "yes" | grep -F "$OLD_CATALOG" @@ -166,53 +251,83 @@ break else echo "Not subscribed to the old update service catalog - subscribing ..." + SERVICE_OR_CAT_CHANGED="YES" rug sub $OLD_CATALOG fi else echo "Old update service not in the service list - adding it ..." + SERVICE_OR_CAT_CHANGED="YES" rug sa -t zypp $OLD_UPDATES_SERVICE_URL SLEx10-Updates fi ((i++)) done if [[ $SUBSCRIBED_TO_OLD_SERVICE = "NO" ]] ; then echo "Not able to subscribe to old update service - exiting" - exit 2 + exit 3 fi # SDK -if [[ $SUBSCRIBED_TO_SDK_REPO = "YES" ]] ; then - # Construct the service URLs and names - OLD_SDK_SERVICE_URL=$UPDATE_ROOT"SLE10-SDK-Updates/sles-10-"$ARCH"/" - NEW_SDK_SP_ONLINE_URL=$UPDATE_ROOT"SLE10-SDK-SP1-Online/sles-10-"$ARCH"/" - NEW_SDK_SP_ONLINE_NAME="SLE10-SDK-SP1-Online" - NEW_SDK_SP_UPDATES_URL=$UPDATE_ROOT"SLE10-SDK-SP1-Updates/sles-10-"$ARCH"/" - NEW_SDK_SP_UPDATES_NAME="SLE10-SDK-SP1-Updates" - # Check if the machine is indeed already subscribed to $OLD_SDK_SERVICE_URL - # If not, then we do it - SUBSCRIBED_TO_OLD_SERVICE="NO" - i=0 - while [[ $i -lt 4 ]] ; do - OLD_SDK_CATALOG='' - OLD_SDK_CATALOG=$(rug --no-abbrev sl |grep -i -F "active" | grep -F "$OLD_SDK_SERVICE_URL" | \ - awk -F "|" '{print $4}' | sed 's/ //g') - if [[ $OLD_SDK_CATALOG != '' ]] ; then - rug ca |grep -i "yes" | grep -F "$OLD_SDK_CATALOG" - if [ $? -eq 0 ] ; then - SUBSCRIBED_TO_OLD_SERVICE="YES" - break +if [[ $UPDATE_SDK = "YES" ]] ; then + # Check if the SDK product is installed + QUERYPOOL="/usr/lib/zmd/query-pool" + if [ ! -x $QUERYPOOL ]; then + QUERYPOOL="/usr/lib64/zmd/query-pool" + if [ ! -x $QUERYPOOL ]; then + # query-pool not found + echo "query-pool command not found" >&2 + echo "query-pool command not found" + exit 6; + fi + fi + if [[ `/usr/lib/zmd/query-pool products @system \ + | grep "SUSE-Linux-Enterprise-SDK" | grep "10-0"` ]] ; then + SDK_10_0_INSTALLED="YES" + fi + if [[ $SDK_10_0_INSTALLED = "YES" ]] ; then + # Construct the service URLs and names + OLD_SDK_SERVICE_URL=$UPDATE_ROOT"SLE10-SDK-Updates/sles-10-"$ARCH"/" + NEW_SDK_SP_ONLINE_URL=$UPDATE_ROOT"SLE10-SDK-SP1-Online/sles-10-"$ARCH"/" + NEW_SDK_SP_ONLINE_NAME="SLE10-SDK-SP1-Online" + NEW_SDK_SP_UPDATES_URL=$UPDATE_ROOT"SLE10-SDK-SP1-Updates/sles-10-"$ARCH"/" + NEW_SDK_SP_UPDATES_NAME="SLE10-SDK-SP1-Updates" + # Verify existence of the repositories + REPO=$OLD_SDK_SERVICE_URL + check_if_repo_exists + REPO=$NEW_SDK_SP_ONLINE_URL + check_if_repo_exists + REPO=$NEW_SDK_SP_UPDATES_URL + check_if_repo_exists + # Check if the machine is indeed already subscribed to $OLD_SDK_SERVICE_URL + # If not, then we do it + SUBSCRIBED_TO_OLD_SERVICE="NO" + i=0 + while [[ $i -lt 4 ]] ; do + OLD_SDK_CATALOG='' + # Handle missing trailing slash in existing service URL + TMP_OLD_URL=`echo $OLD_SDK_SERVICE_URL | sed -e "s/\/$//g"` + OLD_SDK_CATALOG=$(rug --no-abbrev sl |grep -i -F "active" | grep -F "$TMP_OLD_URL" | \ + awk -F "|" '{print $4}' | sed 's/ //g') + if [[ $OLD_SDK_CATALOG != '' ]] ; then + rug ca |grep -i "yes" | grep -F "$OLD_SDK_CATALOG" + if [ $? -eq 0 ] ; then + SUBSCRIBED_TO_OLD_SERVICE="YES" + break + else + echo "Not subscribed to the old SDK update service catalog - subscribing ..." + SERVICE_OR_CAT_CHANGED="YES" + rug sub $OLD_SDK_CATALOG + fi else - echo "Not subscribed to the old SDK update service catalog - subscribing ..." - rug sub $OLD_SDK_CATALOG + echo "Old SDK update service not in the service list - adding it ..." + SERVICE_OR_CAT_CHANGED="YES" + rug sa -t zypp $OLD_SDK_SERVICE_URL SDK10-Updates fi - else - echo "Old SDK update service not in the service list - adding it ..." - rug sa -t zypp $OLD_SDK_SERVICE_URL SDK10-Updates + ((i++)) + done + if [[ $SUBSCRIBED_TO_OLD_SERVICE = "NO" ]] ; then + echo "Not able to subscribe to old SDK update service - exiting" + exit 4 fi - ((i++)) - done - if [[ $SUBSCRIBED_TO_OLD_SERVICE = "NO" ]] ; then - echo "Not able to subscribe to old SDK update service - exiting" - exit 2 fi fi # SDK end @@ -222,7 +337,10 @@ # Kill zen-updater to prevent ugly pop-ups on desktop when it abends killall -9 zen-updater -check_for_updates +# In case we added a service - check if we are cool +if [[ $SERVICE_OR_CAT_CHANGED == 'YES' ]] ; then + is_anything_pending +fi echo "Adding SP migration updates service" echo "Adding $NEW_SP_ONLINE_NAME service" @@ -231,7 +349,7 @@ rug subscribe $NEW_SP_ONLINE_NAME # SDK -if [[ $SUBSCRIBED_TO_SDK_REPO = "YES" ]] ; then +if [[ $UPDATE_SDK = "YES" ]] && [[ $SDK_10_0_INSTALLED = "YES" ]] ; then sleep 15 echo "Adding SDK SP migration updates service" rug service-add -t ZYPP $NEW_SDK_SP_ONLINE_URL $NEW_SDK_SP_ONLINE_NAME @@ -242,11 +360,11 @@ # wait for settle sleep 15 +is_anything_pending -check_for_updates echo "Installing updates - stage 1 of 6 - "$PRODUCT"p1o-liby2util-devel" rug in -y -t patch ${PRODUCT}p1o-liby2util-devel -# The above patch requeres zmd to be restarted +# The above patch requires zmd to be restarted restart_zmd_firmly time_stamp @@ -268,7 +386,7 @@ time_stamp # SDK -if [[ $SUBSCRIBED_TO_SDK_REPO = "YES" ]] ; then +if [[ $UPDATE_SDK = "YES" ]] && [[ $SDK_10_0_INSTALLED = "YES" ]] ; then rug in -y -t patch product-sdk10-sp1 fi # SDK end @@ -290,7 +408,7 @@ rug subscribe $NEW_SP_UPDATES_NAME # SDK -if [[ $SUBSCRIBED_TO_SDK_REPO = "YES" ]] ; then +if [[ $UPDATE_SDK = "YES" ]] && [[ $SDK_10_0_INSTALLED = "YES" ]] ; then sleep 60 echo "Deleting old SDK updates service" rug service-delete $OLD_SDK_SERVICE_URL @@ -307,6 +425,7 @@ # Wait for ZMD to calm down sleep 60 +is_anything_pending # These are post-sp1 but still necessary for some fixes... echo "Installing updates - stage 4 of 6 - ${PRODUCT}p1-yast2-online-update" @@ -317,15 +436,42 @@ restart_zmd_firmly time_stamp sleep 240 +is_anything_pending echo "Installing updates - stage 5 of 6 - ${PRODUCT}p1-perl-Bootloader" rug in -y -t patch ${PRODUCT}p1-perl-Bootloader +# Sometimes rug fails with weird errors at this point, so we +# need to check on the returncode and restart zmd if it is non-zero +# Sorry about the clumsy coding +if [ $? -ne 0 ] ; then + echo "Stage 5 failed so we restart zmd and try once more - only once" + restart_zmd_firmly + time_stamp + sleep 300 + is_anything_pending + echo "Installing updates - stage 5 of 6 - ${PRODUCT}p1-perl-Bootloader - second try..." + rug in -y -t patch ${PRODUCT}p1-perl-Bootloader +fi echo "Installing updates - stage 6 of 6 - post-SP1 updates" rug up -y --agree-to-third-party-licences +# Sometimes rug fails with weird errors at this point, so we +# need to check on the returncode and restart zmd if it is non-zero +# Sorry about the clumsy coding +if [ $? -ne 0 ] ; then + echo "Stage 6 failed so we restart zmd and try once more - only once" + restart_zmd_firmly + time_stamp + sleep 300 + is_anything_pending + echo "Installing updates - stage 6 of 6 - post-SP1 updates - second try..." + rug up -y --agree-to-third-party-licences +fi echo "Done." echo "You should reboot the machine now since the kernel has been updated." time_stamp +# Clean up +test -w $TMPDIR && rm -r $TMPDIR ; # reboot ++++++ yup.1.pod ++++++ --- yup/yup.1.pod 2007-07-02 14:04:41.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yup/yup.1.pod 2007-12-06 17:27:39.000000000 +0100 @@ -103,6 +103,10 @@ Which product releases of a product should be mirrored? (GA, SP1, SP2), default: F<GA>. SPACE separated list. +=item YUP_SP_SUBCHANS + +Subchannels to include while mirroring an SP; F<-Online> the patches to go from SP(N-1) to SP(N); F<-Updates> the patches for SP(N); default: "-Updates -Online" + =item YUP_DEBUGINFO Include DebugInfo in mirror? Default: F<no> Enable with F<yes>. @@ -142,6 +146,25 @@ =back +We also addded a way to save some space by hardlinking +identical files in your mirror area. + +=over + +=item YUP_HARDLINK + +Safe storage space by finding duplicate rpms files and hardlinking those files? Default: F<no>, enable with F<yes>. + +=item YUP_PATSIZE + +Only hardlink files larges than YUP_PATSIZE blocks (find parameter). YUP_HARDLINK must be "yes" for YUP_PATSIZE having any effect. Default: F<+20000>. + +=item YUP_MTIME + +Only hardlink files older/younger than YUP_MTIME days (find parameter). YUP_HARDLINK must be "yes" for YUP_MTIME having any effect. Default: F<-8> (last week). + +=back + =head2 Mirror credentials for SLE 10 SP 1 For SUSE Linux Enterprise 10 SP 1 we enhanced the capabilities ++++++ yup.sh ++++++ --- yup/yup.sh 2007-09-07 12:52:16.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yup/yup.sh 2007-12-06 17:27:18.000000000 +0100 @@ -32,7 +32,7 @@ # Proxy. The resulting configuration can be found in # /etc/sysconfig/proxy and /root/.curlrc (authentication data). # -# $Id: yup.sh 223 2007-07-09 08:59:27Z mge $ +# $Id: yup.sh 232 2007-09-11 15:46:13Z mge $ # # Fail on errors in simple commands. @@ -221,6 +221,31 @@ } < $LOOPTMPFILE } +function yup_check_and_hardlink() { + FILES_TO_HARDLINK=$( find $YUP_DEST_DIR -xdev -iname "*.rpm" -type f -size $YUP_PATSIZE -mtime $YUP_MTIME ) + for NN in $FILES_TO_HARDLINK ; do + for MM in $FILES_TO_HARDLINK; do + if [ $NN != $MM ] && [ $( basename $MM ) == $( basename $NN ) ] ; then + echo $MM + echo $NN + if [ $( stat --format="%i" $MM ) == $( stat --format="%i" $NN ) ]; then + echo "files are hard linked. nothing to do." + else + MD5MM=$( md5sum $MM | cut -d" " -f1 ) + MD5NN=$( md5sum $NN | cut -d" " -f1 ) + echo -e -n "checking md5sum ..." + if [ $MD5MM == $MD5NN ] ; then + echo "OK" + ln -f $MM $NN + else + echo " FALSE." + fi + fi + fi + done + done +} + # import the update parameters # ( YUP_CURL YUP_CURLPARAMS YUP_DEST_DIR # YUP_ID YUP_PASS YUP_ID_SLED YUP_PASS_SLED @@ -242,8 +267,11 @@ echo "YUP_SERVER ="${YUP_SERVER:="nu.novell.com"} echo "YOU_SERVER ="${YOU_SERVER:="you.novell.com"} echo "YUP_DEST_DIR ="${YUP_DEST_DIR:="/var/cache/yup"} + echo "YUP_PATSIZE ="${YUP_PATSIZE:="+20000"} + echo "YUP_MTIME ="${YUP_MTIME:="-8"} echo "YUP_ARCH ="${YUP_ARCH:="i586"} echo "YUP_SUBVERSIONS="${YUP_SUBVERSIONS:="GA"} + echo "YUP_SP_SUBCHANS="${YUP_SP_SUBCHANS:="-Updates -Online"} if [ "${YUP_DEBUGINFO}." = "yes." ] ; then YUP_PRODUCTS="${YUP_PRODUCTS:=SLES10} SLE10-Debug" else @@ -307,7 +335,10 @@ SUBCHANNELS="-Updates" elif [ "$SVN" = "SP1" ]; then SVNSUFFIX="-SP1" - SUBCHANNELS="-Updates -Online" + SUBCHANNELS=$YUP_SP_SUBCHANS + elif [ "$SVN" = "SP2" ]; then + SVNSUFFIX="-SP2" + SUBCHANNELS=$YUP_SP_SUBCHANS fi for CHLSUFFIX in $SUBCHANNELS; do if [ "${SLE}." = "SLES10." ]; then @@ -376,7 +407,7 @@ echo "Warning: SLE $SLE unknown. Proceeding anyways ..." # exit 1 fi - if [ "$UPD" != "." ] ; then + if [ "${UPD}." != "." ] ; then bn="https://${useSERVER}/repo/\$RCE/${UPD}-${useARCH}" YUP_CURLCRED=" --user ${useID}:${usePASS} " if [ "$YUP_DRYRUN" = "yes" ] ; then @@ -430,6 +461,13 @@ done || exit $? fi # + # Hardlink files - and safe storage space + # + if [ "${YUP_HARDLINK}." = "yes." ] ; then + yup_check_and_hardlink + fi + + # # Error Report # if test "${errorlog}." != "."; then ++++++ yup.sysconfig ++++++ --- yup/yup.sysconfig 2007-07-02 14:04:41.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yup/yup.sysconfig 2007-12-06 17:29:02.000000000 +0100 @@ -228,3 +228,36 @@ # YUP_DRYRUN="no" +## Type: yesno +## Default: "no" +# +# Safe storage space by finding duplicate rpms files +# and hardlinking those files? +# +YUP_HARDLINK="no" + +## Type: string("+20000","+10000","+5000","+1000") +## Default: "+20000" +# +# Only hardlink files larges than YUP_PATSIZE blocks (find parameter) +# YUP_HARDLINK must be "yes" for YUP_PATSIZE having any effect. +# +YUP_PATSIZE="+20000" + +## Type: string("+0","-1","-8","-32","-365") +## Default: "-8" +# +# Only hardlink files older/younger than YUP_MTIME days (find parameter) +# YUP_HARDLINK must be "yes" for YUP_MTIME having any effect. +# +YUP_MTIME="-8" + +## Type: string +## Default: "-Updates -Online" +# +# Subchannels to include while mirroring an SP +# -Online: the patches to go from SP(N-1) to SP(N) +# -Updates: the patches for SP(N) +# +YUP_SP_SUBCHANS="" + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org