LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-08-2004, 07:48 AM   #1
equilibrium
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 40

Rep: Reputation: 15
Slackware Current using rsync


I was told that it is possible to keep up with slackware-current using rsync, would anyone by any chance know how that is done?
Thanks
 
Old 08-08-2004, 10:13 AM   #2
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
I found this after googling "slackware current rsync" (2nd page): a script to update your slackware-current tree using rsync. I'm reproducing it below for the record, in case the original site is no longer available. DISCLAIMER: I have not used this script, and cannot offer support for it; you might want to contact the author.

Also, I suggest not using ftp.slackware.com as a server; choose a mirror server instead. You can find a list of mirrors at www.slackware.com. Personally, I use www.slackware.at

Code:
# This script should (theoretically) update the slackware-current tree 
# using rsync, copy the correct directories to the iso tree, build an iso 
# image of the iso tree, and then delete the iso tree.
# This script was written by Chris Dellicker (volthead@yahoo.com)

# 12/26/02 The above description is a bit old and outdated.  Read the script
# to find out exactly what it does.  It still builds an ISO of 
# slackware-current, and keeps an up-to-date local tree of same, just does
# it a bit differently (and better) than it used to.

#This sets variables to be used by the script
SLACK=/slack				#slackware-current directory
ISO=/slackiso				#iso directory
BACKUP=/slackbackup                     #path to backup files to
DATE=`date +%m%d%y%H%M`			#current date (MMDDYYHHmm)


# This says which server to use.  Comment out the one(s) you don't want.

#SERVER=ftp.slackware.com
SERVER=carroll.cac.psu.edu

case "$1" in
   -s)
      case "$2" in
         a)
            SERVER=ftp.slackware.com
            ;;
         b)
            SERVER=carroll.cac.psu.edu
            ;;
         *)
            SERVER=$2
            ;;
      esac
esac

# Before we do anything else, check to see if we need to update everything, 
# or if it's already up to date.


# Initialize $LASTCHANGE to avoid an error message in case ChangeLog.txt 
# is non-existant, as in the case where an update is forced by 
# `rm ChangeLog.txt`.
LASTCHANGE=0

# To do this, we get the date of ChangeLog.txt that we already have.
LASTCHANGE=`date -r $SLACK/ChangeLog.txt +%s` 

# Next, we have to find out what the date of the current ChangeLog.txt is.
# To do this, we first download it.

rsync -vvzPtb --backup-dir=$BACKUP --delete --stats $SERVER::slackware\
/slackware-current/ChangeLog.txt $SLACK/

# Now we compare $LASTCHANGE to the date of the new ChangeLog.txt.  If
# they match, we print out a message and exit.
if [ $LASTCHANGE = `date -r $SLACK/ChangeLog.txt +%s` ]; then
  if [ -f $ISO/*.iso ]; then
    echo
    echo "<<<<<<<<<<<<<<<<<<<<<*>>>>>>>>>>>>>>>>>>>>>"
    echo
    echo "     Your mirror is already up to date."
    echo
#    echo " Renaming your ISO image to $DATE.iso"
    echo "<<<<<<<<<<<<<<<<<<<<<*>>>>>>>>>>>>>>>>>>>>>"
    echo
#    mv $ISO/*.iso $ISO/$DATE.iso
    exit
  else
    echo
    echo "<<<<<<<<<<<<<<<<<<<<<*>>>>>>>>>>>>>>>>>>>>>"
    echo "     Your mirror appears up to date,"
    echo "     but something BAD happened!!!!!"
    echo "             You have no ISO!"
    echo "<<<<<<<<<<<<<<<<<<<<<*>>>>>>>>>>>>>>>>>>>>>"
    echo
  fi
fi

# That's it.  Now, if our mirror is not current, we go update the 
# whole thing.  Also, if something BAD happened, we go update the
# whole thing just to make sure it's all current.  Then we make 
# the ISO.

# This makes sure our directories are in place and $ISO is empty.
rm -rf $ISO
mkdir $ISO

rsync -arvvP -b --backup-dir=$BACKUP --delete --stats --exclude "/source/" \
--exclude "/pasture/" $SERVER::slackware/slackware-current/ $SLACK/

# This next var is the last changed date, taken from the most recent
# timestamp in the ChangeLog.txt file.  Added 11/16/02

CHGDATE=`date -d"\`grep -m1 " " $SLACK/ChangeLog.txt\`" +%m%d%y%H`

# next line:  Changed $DATE to $CHGDATE on 11/16/02 to reflect the last 
# changed date of the distribution instead of the last time the image was 
# created.

mkisofs -o $ISO/$CHGDATE.iso \
-R -J -V "Slackware 9.0b Install $CHGDATE" \
-x bootdisks \
-x extra \
-x kdei \
-x *.s \
-x pasture \
-x source \
-x backup \
-x jfs.i \
-x lowmem.i \
-x old_cd.i \
-x pportide.i \
-x speakup.i \
-x usb.i \
-x xfs.i \
-x xt.i \
-hide-rr-moved \
-v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table \
-sort $SLACK/isolinux/iso.sort \
-b isolinux/isolinux.bin \
-c isolinux/isolinux.boot \
-A "Slackware Install CD" $SLACK

#-x ./bootdisks/*.s \
#-v -d -N -no-emul-boot -boot-load-size 128 -boot-info-table \
# Below options seem to be used by Debian:
# -T (TRANS.TBL)
# -r (instead of -R)
# -cache-inodes
# "-x t \"  will get rid of the t series, which is tetex.

# Just for good measure, we put the most recent ChangeLog.txt in
# the $ISO directory.

cp $SLACK/ChangeLog.txt $ISO/ChangeLog.txt

# That's it.  We're done. Simple, really.

Last edited by spurious; 08-08-2004 at 10:16 AM.
 
Old 08-08-2004, 10:20 AM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Now I know why some ISO's files downloaded from sites fail

Hey, I am kidding...I didn't know they were made on the fly.
 
Old 08-08-2004, 11:18 AM   #4
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
That's why I just stick to the canonical release, and update using slapt-get. Actually, I haven't gotten around to upgrading from Slackware 9.0 to Slackware 10; I guess that's why they call it Slackware.
 
Old 08-08-2004, 11:39 AM   #5
equilibrium
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 40

Original Poster
Rep: Reputation: 15
spurious thanks for your help, just wanted to mention that slapt-get can ruin your system
 
Old 08-08-2004, 12:50 PM   #6
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
Quote:
Originally posted by equilibrium
spurious thanks for your help, just wanted to mention that slapt-get can ruin your system
Though I am an advocate of updating by hand instead of automated tools, slapt-get is less likely to break your install than swaret. Especially if you use --download-only.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync over Current SSH Connection tracer Linux - General 1 09-23-2005 07:39 AM
how do I rsync & cron to fetch -current weekly? chess Slackware 3 09-11-2005 10:07 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM
Copying from Slackware 10 to Debian Sarge using rsync apolinsky Slackware 5 10-07-2004 09:17 AM
rsync and slackware-current nikko Slackware 13 06-07-2004 08:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration