LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   A great method for keeping Slackware up-to-date...without slackpkg. (http://www.linuxquestions.org/questions/slackware-14/a-great-method-for-keeping-slackware-up-to-date-without-slackpkg-785339/)

Lufbery 01-28-2010 08:21 AM

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,

sahko 01-28-2010 08:35 AM

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

escaflown 01-28-2010 08:38 AM

Isn't that what slackpkg internally do somehow?

brianL 01-28-2010 08:50 AM

I'm sure running slackpkg is simpler and quicker than that.

hitest 01-28-2010 09:06 AM

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.

allend 01-28-2010 09:35 AM

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!

hitest 01-28-2010 09:39 AM

Quote:

Originally Posted by allend (Post 3843639)

My thanks again to PiterPunk for this wonderful tool!

Yes. I would also like to thank Piter Punk for his excellent work!

H_TeXMeX_H 01-28-2010 09:44 AM

It seems that slackpkg is now official and included so I just use that. So far, no problems with it.

tommcd 01-28-2010 10:39 AM

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.

brianL 01-28-2010 10:49 AM

I check the changelogs regularly before using slackpkg.
There Is More Than One Way To Do It (as someone said).

Lufbery 01-28-2010 12:00 PM

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,

GrapefruiTgirl 01-28-2010 12:13 PM

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

multios 01-28-2010 01:19 PM

totally agree with you GrapefruiTgirl

brianL 01-28-2010 02:13 PM

It sounded more complicated and round-about from the original description, but it's a neat little script.

carbonfiber 01-28-2010 02:20 PM

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.


All times are GMT -5. The time now is 01:42 AM.