Linux.com

Feature

Updating Slackware using Swaret

By Joel Nahrgang on October 19, 2006 (8:00:00 AM)

Share    Print    Comments   

Now that Slackware 11.0 is out, you may wonder what is the best way to update the distribution. Swaret is an open source project that aims to keep various versions of Slackware up-to-date. I use Swaret and some cron scripts to keep my servers current automatically.

Download the stable version (1.6.2, from October 2004) or the development version of Swaret and rename the downloaded file so that you can install it using installpkg:

$ cp swaret-1.6.2-noarch-1.tgz.tar swaret-1.6.2-noarch-1.tgz

From there you need to become superuser or log in as root to install the software using the installpkg command:

# installpkg swaret-1.6.2-noarch-1.tgz

Rename the conf file located in the /etc folder:

# cp /etc/swaret.conf.new /etc/swaret.conf

Next, set the version of Slackware you wish to keep on your computer. You can set it to 11.0 or current. Current is the most up-to-date version, and it may be unstable and could pose problems, but it should be easier to upgrade to the next version when it rolls out. I keep some servers on current and others, the ones I consider critical, on 11.0:

# swaret --set VERSION=11.0

Now you can update the list of packages Swaret uses:

# swaret --update

When that command completes successfully you can run the upgrades. You can use the -a switch to automatically install all new updates without being prompted, or use no switch to be prompted for each package update:

# swaret --upgrade

Since version 11.0 has just come out there won't be many updates right away, so don't expect much at first.

You can also use Swaret to install programs that were not installed originally by using this command (replace package-name with the actual name of the package):

# swaret --install package-name

Here is a simple script you can place in one of your cron folders to run Swaret on a regular schedule:

#!/bin/bash
#
#swaret-update.sh
#
# this will download the update files needed to upgrade
#
swaret --update
#
#
# this will update all the packages automatically
#
swaret --upgrade -a
#
# send an email notifying that the update was complete
#
echo "The updates were completed" | mail -s "Swaret Update" username
#
#eof

I have this script in my weekly cron folder under /etc/cron.weekly. Be aware that this will install all the update packages automatically, whether you want them or not.

Share    Print    Comments   

Comments

on Updating Slackware using Swaret

Note: Comments are owned by the poster. We are not responsible for their content.

Hmm?

Posted by: Anonymous Coward on October 19, 2006 11:57 PM
I don't first have to uninstall the old packages before installing the new packages?

I don't have to configure any config files?

It wont fuck anything up?

I don't need todo anything manually?

If I use slaptget, and put it in cron, my system will always be up-to-date without me have todo or worry about anything?

#

Re:Hmm?

Posted by: Anonymous Coward on October 20, 2006 02:06 PM
>> I don't first have to uninstall the old packages before installing the new packages?

No, first install the new/updated version and then afterwards remove the old one. That's the best way, because pkgtool checks for dependecies.

Gtx Jan.

#

Re:Hmm?

Posted by: Anonymous Coward on October 20, 2006 08:21 PM
Wont the new version overwrite the old version then? -confused-

#

Swaret and slapt-get from my point of view

Posted by: Anonymous Coward on October 20, 2006 04:06 AM
I have used both Swaret and slapt-get to automate downloading and installing Slackware packages. I don't think any of them is specially good, but I use slapt-get as the "less bad" of the two. I'll highlight the good and bad points of each tool, from my point of view. Also, take into account this information belongs to the stable swaret release. I think a new version is being worked on, and it's in Perl IIRC.

Swaret:

[Good] Checks GPG signatures instead of MD5 checksums.
[Good] Checks binary dependencies without using any additional information. This is quite useful.
[Good] As easy to use as slapt-get.
[Bad] It's a shell script. Very big. Very, very slow. slapt-get uses much, much less CPU.
[Bad] I didn't find a way, and let me know if there's one because I truly tried to find it, of automatically downloading and installing patches for the installed packages. You can either answer manually or install all of them, including the ones belonging to previously not installed packages.

Slapt-get:

[Good] Written in C and it's much faster.
[Good] It has the patch behaviour I commented previously, that swaret seems to lack.
[Good] Keeps directory hierarchy in downloaded packages.
[Good] Has the option of removing local packages not present in the remote side (good for people using -current, to clean the package tree from time to time).
[Bad] Doesn't detect binary dependencies.
[Bad] Doesn't check GPG signatures.
[Bad] I don't like the output format. It's similar to the one from apt-get. Swaret's output format isn't beautiful either, but I like it better.

#

Re:Swaret and slapt-get from my point of view

Posted by: Anonymous Coward on October 20, 2006 09:36 AM
It all really depends on whether you set the VERSION to the version you are running or current.

Current doesn't have any patches; they just become the new package. By setting the version to 11.0 (or whatever version is installed) and using the upgrade command, it looks at what packages you have installed (by referencing the<nobr> <wbr></nobr>/var/log/packages directory) and downloads available patches for installed apps.

At least that's the way it works for me when I run swaret. (Point in note: I don't install KDE/X on my server(s) and swaret skips those patches when I issue an --upgrade -a)

#

Re:Swaret and slapt-get from my point of view

Posted by: Anonymous Coward on October 20, 2006 11:46 PM
I had a machine using swaret and Slackware 10.1 some time ago. swaret was correctly configured to use version 10.1 and, indeed, detected new patches as they were published. But, as I tried to explain, there was no way of automatically installing all patches only for already installed packages. I had to answer yes/no for each patch or blindly install all patches, including the ones for packages that were not installed. Is the situation the same now?

#

Re:Swaret and slapt-get from my point of view

Posted by: Anonymous Coward on October 21, 2006 12:25 AM
You must have been doing some thing wrong. Swaret has never defaulted to functionlike that in my experince. IT has always only upgrade installed packages only. Just run swaret --upgrade -a to upgrade all installed packages. It does not install any non-installed pacakges.

#

Re:Swaret and slapt-get from my point of view

Posted by: Administrator on October 21, 2006 12:38 AM
As a happy user of slapt-get, let me correct one possibly misleading piece of information. You wrote:

[Bad] Doesn't detect binary dependencies.

Slapt-get can actually check for dependencies if a file called slack-required is in the install directory of the package. It can also resolve dependency conflicts based on the contents of slack-conflicts. "Official" Slackware packages do not include either of those files in the package. That's why there is no dependency checking for "official" Slackware packages.

With that said, however, slapt-get WILL check for dependencies in packages made by some Slack derivative distros like VectorLinux. It will also check for dependencies in packages distributed through linuxpackages.net.

Please read the following FAQ item from Jason Woodward's web site regarding slapt-get and dependency checking: <a href="http://software.jaos.org/BUILD/slapt-get/FAQ.html#slgFAQ10" title="jaos.org">http://software.jaos.org/BUILD/slapt-get/FAQ.html<nobr>#<wbr></nobr> slgFAQ10</a jaos.org>

#

Not so automaticallly updates.

Posted by: Anonymous Coward on October 20, 2006 06:53 PM
A human intervention to choose what to upgrade is needed. The case about it, is php and mm libraries, some time ago.

If you upgraded php without installing mm, it don't go.

I used swaret, but i choose slapt-get because it's faster.

But either the 2 tools lack for managing dependencies (on server-like installations).

#

Re:Swaret and slapt-get from my point of view

Posted by: Anonymous Coward on October 21, 2006 06:35 PM
Yes, I knew all of that. That's why I used the word "detect" as opposed to "check". The thing is, always talking from my personal situation/usage, that sometimes you want to install an official package for a program that, for example, may depend on 3 other packages, and while swaret will install the other 3 automatically, slapt-get will not. I repeat that I use slapt-get, but it would be nice if that feature was available. When you install a package, it could check all programs in the package for missing libraries, and, for example, use the online package browser automatically to search for the corresponding packages.

#

1.6.3 is released

Posted by: Administrator on November 02, 2006 11:29 PM
I stabilize the 1.x branch, and I released 1.6.3 a few days ago. It added a --rollback ability, in case you want to undo your last upgrade(s). Also working on a new 2.0 branch, written in PERL. Much faster, cleaner....and almost there.

LinuxSneaker (maintainer of swaret)

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya