LinuxQuestions.org
Review your favorite Linux distribution.
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 01-06-2008, 03:57 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
Use rsync to update patches


I've been reading resources for rsync on the web as well as man rsync.
A lot of this is new to me.
I want to use rsync for updating patches.
I have a home computer, using Slackware 12.

I still have questions:

How I set this up on my computer to download new updates?

What is the difference between using ssh and a rsync daemon; which would be
more secure?

Appreciate help.
Thanks
 
Old 01-06-2008, 04:13 PM   #2
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 15
Posts: 700

Rep: Reputation: 43
Several solutions will be found in this topic.

Good luck.
 
Old 01-06-2008, 04:30 PM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
In addition, you may want to look at Alien's scripts, including rsync_slackware_patches.sh.
Regards,
Bill
 
Old 01-12-2008, 03:18 PM   #4
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
Thanks.
I tried Alien's script.

Is there a way with rsync to list new patches that are downloaded:
When I rsync my patches directory with the source for patches on the net it will update it, but I also want to know which are the new patches that were downloaded as well?
 
Old 01-12-2008, 03:49 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I don't understand what you mean there - when that script of mine finds new patches it will show the new ones.

For instance, the latest addition to the Slackware 12.0 /patches directory resulted in this email (I run the script every night in a cron job so that the script's output gets emailed to me)
Code:
[rsync_slackware_patches.sh:] New patches have arrived for Slackware 12.0 !

.......................................................................

0a1,7
> Mon Dec 31 18:49:52 CST 2007
> patches/packages/glibc-zoneinfo-2.5-noarch-7_slack12.0.tgz:
>   Some deja vu.  ;-)
>   Upgraded to tzdata2007k.  A new year should be started with the
>   latest timezone data, so here it is.
>   Happy holidays, and a happy new year to all!  :-)
> +--------------------------+
Eric
 
Old 01-12-2008, 05:35 PM   #6
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Yes, you get email as Eric has responded.

I have one that directs rsync output to a file that I'll share. Here it is

Code:
#!/bin/bash
# <snipped>
DEST=/home/al/install/build_sw12/stuff
echo "+--- rsync started: $(date) ---+" >> ~/rsync_sl_bldscr_mirr_log.txt
# rsync command next
(cd $DEST && rsync -lptrv --progress --delete ${R}::${S}/${V} .) >> ~/rsync_sl_bldscr_mirr_log.txt
echo "+--- Rsync completed with $?: $(date) ---+" >> ~/rsync_sl_bldscr_mirr_log.txt
>> ~/rsync_sl_bldscr_mirr_log.txt

3 lines with those that is the part that directs STDOUT to a file (logs rsync activity to a file).

(begin date stamp, rsync output logged, rsync has ended date stamp)

--
Alan.
 
Old 01-12-2008, 07:56 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I use Eric's rsync scripts.

One modification I made to the patches script was not to delete files. The simple reason is that occasionally a patched file introduces a bug. By not deleting files I can revert to the previous version. Samba (3.026a I think, but my memory is fuzzy tonight) was a recent example. I no longer could access Samba shares but could read Windows shares fine. I reverted to the previous version. The bug was not my imagination because soon thereafter another patched version of Samba appeared.
 
Old 01-12-2008, 08:50 PM   #8
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current
Posts: 465

Rep: Reputation: 53
Wow, i was missing this post.
What a great script Alien Bob, Thanks!
@op: Here's another thread you may want to take a look.
 
Old 01-13-2008, 03:43 PM   #9
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
Thanks for replies.
Sorry. I'm not familiar with scripts so I couldn't tell from reading the script what it was going to report. I don't think I had any new updates when I tried the script; that's why I didn't see an output like Alien Bob described.
I found this output:
Quote:
sent 129 bytes received 4712 bytes 3227.33 bytes/sec
total size is 283092753 speedup is 58478.16
[rsync_slackware_patches.sh:] Exit status: 0
[rsync_slackware_patches.sh:] Done rsync-ing.
[rsync_slackware_patches.sh:] No change detected in the CHECKSUMS.md5 file.
[rsync_slackware_patches.sh:] Removing temporary file '/tmp/ChangeLog.v8T7Re'.
[rsync_slackware_patches.sh:] Done!
Does No change detected in the CHECKSUMS.md5 file. mean there are no new updates?

Can I edit this: PKGONLY=0to stop downloading the source. I keep forgetting the -p option?
 
Old 01-13-2008, 03:54 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by JosephS View Post
Does No change detected in the CHECKSUMS.md5 file. mean there are no new updates?
Indeed

Quote:
Can I edit this: PKGONLY=0to stop downloading the source. I keep forgetting the -p option?
Yes you can change that line in the script and it will no longer download the package source.

Eric
 
  


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
update solaris 9 patches capricorn80 Solaris / OpenSolaris 6 01-19-2011 11:50 AM
Update Patches For ClamAV Fail carlosinfl Linux - Server 0 10-24-2007 07:46 AM
Rsync script for the first patches of Slackware 11 Alien Bob Slackware 4 10-26-2006 01:06 PM
On-line update patches failing (SUSE 10.0) rwhitworth SUSE / openSUSE 0 06-30-2006 05:07 AM
How to Update Slack Patches? Lucinda Slackware 6 05-15-2005 08:44 AM

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

All times are GMT -5. The time now is 03:11 AM.

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