LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-28-2010, 07:21 AM   #1
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
A great method for keeping Slackware up-to-date...without slackpkg.


Hi all,

I know a lot of folks here use slackpkg for routine maintenance, and I tried it a while back, but I always felt that, for me, slackpkg was too much tool for the relatively simple tasks I'd use it for.

I run the stable branch of Slackware, so the only updates I usually need to do are security updates. After reading a bit about lftp, I decided that a local mirror of the /patches/packages directory would be the best way for me to stay up-to-date.

Starting from scratch, here's what I do:

Keeping the Stock Slackware Up-to-date
  1. Install a fresh Slackware from the iso.
  2. Use lftp with the mirror option to mirror the /slackware64-13.0/patches/packages/ directory from my favorite Slackware mirror:
    Code:
    lftp -c "open ftp://my-favorite-mirror-and-slackware-version/patches/ ; mirror -e -n packages"
  3. READ THE CHANGELOG! This is inportant (even when using Slackpkg). There's important information in the changelog. For example, the latest kernel update had a reminder to rerun lilo.
  4. Then cd into the local /patches/packages directory and run upgradepkg *.txz.

Now I've got an up-to-date stock Slackware installation. I subscribe to the security mailing list, so I get notices when there's an important update. Because I'm curious, I also read the changelog every week or so to look for new updates.

When there's a new update, I again use lftp with the mirror option to delete old files and download news ones -- syncing my local mirror with the one on the network. Then I run upgradepkg again. Upgradepkg does nothing to existing packages with versions that match, so only the ones that need to be updated are updated.

Naturally, this procedure can be easily made into a script to run every time I get a security update e-mail.

I'm interested to read what other think of the procedure and possibly other ways to do the same thing.

Regards,
 
Old 01-28-2010, 07:35 AM   #2
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Thats probably the most ancient known method (and best way IMO) of doing that. Most people would prefer rsync instead of lftp though.

I use cd $SLACKDIR; rsync --delete --delete-excluded -vzrlptD --exclude pasture/ $RSYNCURL/slackware64-$VERSION/ .

in a script to sync current

Last edited by sahko; 01-28-2010 at 07:43 AM.
 
Old 01-28-2010, 07:38 AM   #3
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Rep: Reputation: 30
Isn't that what slackpkg internally do somehow?
 
Old 01-28-2010, 07:50 AM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,859
Blog Entries: 51

Rep: Reputation: Disabled
I'm sure running slackpkg is simpler and quicker than that.
 
Old 01-28-2010, 08:06 AM   #5
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware 14.1, Slackware64-current, OpenBSD 5.5
Posts: 4,122

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
Lufbery,

A very interesting idea! However, I'm sold on slackpkg, it does everything I need to install, upgrade, and remove packages. I also like the md5 checking capabilities of slackpkg.
 
Old 01-28-2010, 08:35 AM   #6
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,378

Rep: Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824
Usually it is not an issue with packages that appear in patches, but your method does not include a step to look for *.new config files. (find /etc -name "*.new" -print)
slackpkg does this for you and can also give you a diff output, which I find very useful. Then slackpkg offers options for overwriting the old config , just keeping the *.new for later consideration or removing the *.new.

My thanks again to PiterPunk for this wonderful tool!
 
Old 01-28-2010, 08:39 AM   #7
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware 14.1, Slackware64-current, OpenBSD 5.5
Posts: 4,122

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
Cool

Quote:
Originally Posted by allend View Post

My thanks again to PiterPunk for this wonderful tool!
Yes. I would also like to thank Piter Punk for his excellent work!
 
Old 01-28-2010, 08:44 AM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
It seems that slackpkg is now official and included so I just use that. So far, no problems with it.
 
Old 01-28-2010, 09:39 AM   #9
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,227

Rep: Reputation: 286Reputation: 286Reputation: 286
Here is how I have always updated Slackware:
I check the changelogs regularly. If there are updates, I download them to my slackware-updates directory. Then I run upgradepkg for all the new updated packages. I then run:
Code:
# find /etc -name "*.new"
to find any .new updated files.
I was doing this before I found out about slackpkg. I have continued updating Slackware like this because:
I read the changelogs regularly to find out what is new.
If it aint broke .... then why try to "fix" it.
Slackware stable does not get a lot of updates. It is not a problem getting updates the old fashioned manual way like this.

Last edited by tommcd; 01-28-2010 at 09:42 AM.
 
Old 01-28-2010, 09:49 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,859
Blog Entries: 51

Rep: Reputation: Disabled
I check the changelogs regularly before using slackpkg.
There Is More Than One Way To Do It (as someone said).
 
Old 01-28-2010, 11:00 AM   #11
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Original Poster
Rep: Reputation: 119Reputation: 119
Hi all,

Thanks for the feedback.

Naturally, slackpkg is a pretty nifty, very useful, and well-developed tool. I'm in no way disparaging slackpkg.

Still, I'm in inveterate do-it-yourselfer, and there is something elegant about a script that does one thing very well. A few years ago, I tried, with the help of this forum to figure out a way to parse the change logs to learn when updates were available and then to download just those. This solution works a lot better, with less coding.

So to elaborate a bit, I have a script that looks like this:

Code:
#!/bin/bash
#update_slackware.sh
lftp -c "open ftp://my-favorite-mirror-and-slackware-version/patches/ ; mirror -e -n packages"
upgradepkg *.txz
find /etc -name "*.new"
Note: Thanks to Tommcd for that last line!

When I get an e-mail notifying me of a security update, I simply log in as root and type: ./update_slackware. Very Simple!

The -e and -n switches really work well to delete files in my local mirror that are no longer on the host and then download only the new files from the host.

Sahko, I'll have to delve more deeply into rsync and see if it would suit.

I'm not a programmer, and I'm barely a scripter, so working through this process is very educational.

I suppose my next step is to make the script more general. Possibly by setting the Slackware version as a variable in my .bashrc and then using it in the path for the Slackware mirror so that I can use the same script for both my Slackware 13 and Slackware 64_13 installations.

Regards,
 
Old 01-28-2010, 11:13 AM   #12
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Even though I too am pretty devoted to using slackpkg, I have to commend Lufbery for the "elegant simplicity" of this idea.
Being a do-it-myselfer too, I tend to look for "my own" way to do things that undoubtedly have already been done many times, if for no other reason than to learn something new, and/or see what I can come up with..

Nice, simple work!

Sasha
 
Old 01-28-2010, 12:19 PM   #13
multios
Member
 
Registered: Mar 2006
Location: home
Distribution: OpenBSD, FreeBSD, Slackware, Debian
Posts: 228

Rep: Reputation: 39
totally agree with you GrapefruiTgirl
 
Old 01-28-2010, 01:13 PM   #14
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,859
Blog Entries: 51

Rep: Reputation: Disabled
It sounded more complicated and round-about from the original description, but it's a neat little script.
 
Old 01-28-2010, 01:20 PM   #15
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
I don't get it. I've not used Slackware in years, but when I did, I used a similar method, but using rsync. Anyway. Y'all need to hang out on FreeNode's ##slackware moar.

Last edited by carbonfiber; 01-28-2010 at 01:22 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I need help keeping Xandros 4.1 up to date. litefoot Linux - Newbie 2 01-13-2010 04:53 PM
Keeping Slackware Up-to-date Bash Rules Slackware 22 09-08-2009 10:20 PM
Keeping Slackware 12.1 up to date. glore2002 Slackware 10 06-18-2008 09:58 AM
keeping slackware 11 up-to date ronty Slackware 6 01-20-2007 08:14 AM
Keeping Slackware Up-To-Date introuble Slackware 4 03-21-2006 08:08 AM


All times are GMT -5. The time now is 06:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration