Thursday, May 04, 2006

» How to install and use smart on SUSE Linux 10.1

As a complement to one of my previous blog entries about setting up smart on 10.1RC, I've seen a few people struggle to install smart on their 10.1 in the first place, so here's a short wrapup on how to do that.

Installing rpm-python

Smart has only one requirement, besides python (that should be always installed by default anyway), that's rpm-python (RPM bindings for python). rpm-python is not installed by default, so you will have to pull that one first. Let's assume that your current zmd/yast2 setup isn't working correctly, and do it the low-level way. After opening a shell and having switched to the root user, do this to install the rpm-python package from Factory:

for 32 bit systems:

rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-*.rpm
(note that the whole command is supposed to be a single line, just splitted for the sake of readability, but you can still copy/paste that line as-is into your root shell)

for 64 bit systems:

Note that if you have a 64bit system (the command "uname -m" shows "x86_64"), then use the following command instead:
rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/x86_64/rpm-python-*.rpm

Installing smart

Now that we have rpm-python installed, let's grab smart Go to one of these: (the latter should be the fastest) And pick the URL of the latest smart package for 10.1 and your architecture (i686 or x86_64), e.g. this one for 32bit: http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.i686.rpm Or this one for 64bit: http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.x86_64.rpm Pass that to rpm -ivh in a root shell, like this for 32 bit:
rpm -ihv http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.i686.rpm
or like this for 64bit:
rpm -ihv http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.x86_64.rpm
From release 0.41-24 and 0.42-1 onwards, my smart RPM comes pre-configured with all the channels you need (main repository, online updates, non-OSS repository, my own "guru" repository, packman, ...), including the correct repository URLs and mirrors for 10.1. Another nice tutorial can be found here, written by sPiN: http://spinink.net/2006/05/20/installing-smart-package-manager/

Post installation

After installing smart, you have to run smart update once to have it download the metadata for the configured repositories. When you run it the first time, it will prompt you on whether you want to include preconfigured channels or not (it asks for every channel). Note that as of version/release 0.41-25 (or 0.42-*) on, the package also includes preconfigured channels for the latest wine, firefox/thunderbird/... updates and the supplementary KDE repository, but those are disabled by default. From there on, if you also want to install the graphical user interface for smart:
smart update
smart install smart-gui
Personally, I prefer the shell interface: smart --shell ;) If you also want to enable e.g. the supplementary KDE repository, do this:
smart channel --enable suse-kde
smart update suse-kde
You get a list of all configured channels with the following command:
smart channel --show