SMART Package Manager
From SUSE Wiki
Type: Howto, Application-Specific
Tested Versions: 10.1, 10.0, 10.2
Written By: Kamatsu (based on /dev/loki article)
Further Modifications By: Pascal Bleser
Homepage:[1]
Installing SMART
Determine your architecture
First of all, make sure you know what architecture (32bit or 64bit) your system setup has.
Open up a console (e.g. xterm, konsole (KDE) or gnome-terminal (GNOME)) and type:
$ uname -m
That command will display the architecture of your system, either
-
i686ori586: it's a 32bit system -
x86_64: it's a 64bit system
We will need that information further on in this article, so make sure to perform the right command, depending on your architecture.
Check your SUSE Linux version
Although you can also install and use smart on SUSE Linux 9.3, 9.2 and 9.1, this article is specifically written with SUSE Linux 10.2 (RC), 10.1 and 10.0 in mind, and several commands and URLs will only work properly on 10.2, 10.1 and 10.0.
To see which SUSE Linux version you are using, do the following in a console (as explained above):
$ grep ^VERSION /etc/SuSE-release
The output of the above mentioned command must be
VERSION = 10.2
or
VERSION = 10.1
or
VERSION = 10.0
Make sure to run the commands as explained in the following sections accordingly to the SUSE Linux version you are using.
Installing the prerequisites
Smart has several requirements, besides python (that is installed by default) and rpm (that is obviously always installed):
-
python-xml -
python-elementtree -
rpm-python
We're going to check what dependencies are missing on your system and install them if needed.
To do so, use the rpm -q command, that will query (hence the -q) the RPM package database:
$ rpm -q python-xml python-elementtree rpm-python
The command above will print out, for each of these packages, whether it is installed or not. When the package is installed, it will display the version and release, e.g. like this:
python-xml-2.4.2-18
When the package is not installed, it will display e.g. this:
package rpm-python is not installed
Run the command above (rpm -q ...) and take note of the missing packages, we are going to install them right now.
Switch to root
The subsequent commands will all require root privileges. We will now switch to the root user to perform those.
Open up a console (e.g xterm, konsole (KDE) or gnome-terminal (GNOME)) and type:
$ su Password: <enter root password>
After typing the su command as above, you will be asked for the root user's password.
Enter it when asked for (Password:).
Note: the # shown in the following commands is not supposed to be typed, it just represents the shell prompt
rpm-python
- for SuSE Linux 10.3:
- for 32 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.3/repo/oss/suse/i586/python-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.3/repo/oss/suse/x86_64/python-*.rpm
- for SuSE Linux 10.2:
- for 32 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/i586/python-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/x86_64/python-*.rpm
- for SuSE Linux 10.1:
- for 32 bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/python-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/x86_64/python-*.rpm
- for SuSE Linux 10.0:
- for 32 bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/i586/rpm-python-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/x86_64/rpm-python-*.rpm
python-xml
- for SUSE Linux:
- for 32 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/i586/python-xml-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/x86_64/python-xml-*.rpm
- for SUSE Linux 10.1:
- for 32bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/python-xml-*.rpm
- for 64bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/x86_64/python-xml-*.rpm
- for SUSE Linux 10.0:
- for 32bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/i586/python-xml-*.rpm
- for 64bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/x86_64/python-xml-*.rpm
python-elementtree
- for SUSE Linux 10.2:
- for 32 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/i586/python-elementtree-*.rpm
- for 64 bit systems:
# rpm -ihv ftp://ftp-1.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/suse/x86_64/python-elementtree-*.rpm
- for SUSE Linux 10.1:
- for 32bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/python-elementtree-*.rpm
- for 64bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.1/inst-source/suse/x86_64/python-elementtree-*.rpm
- for SUSE Linux 10.0:
- for 32bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/i586/python-elementtree-*.rpm
- for 64bit systems:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/distribution/SL-10.0-OSS/inst-source/suse/x86_64/python-elementtree-*.rpm
Installing smart
Now that we have rpm-python installed, let's grab smart.
- for SUSE Linux 10.2 RC:
- for 32bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.2/i586/smart-latest.rpm
- for 64bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.2/x86_64/smart-latest.rpm
- for SUSE Linux 10.1:
- for 32bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.1/i586/smart-latest.rpm
- for 64bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.1/x86_64/smart-latest.rpm
- for SUSE Linux 10.0:
- for 32bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.0/i586/smart-latest.rpm
- for 64bit:
# rpm -ihv http://ftp.skynet.be/pub/suser-guru/smart/10.0/x86_64/smart-latest.rpm
Smart comes pre-configured with all the channels you need (main repository, online updates, non-OSS repository, "guru" repository, packman, ...), including the correct repository URLs and mirrors for 10.2 RC, 10.1 or 10.0.
Configuring Metadata
After installing smart, you have to run smart update once to have it download the metadata for the configured repositories. Open a console and type:
# smart update
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).
Please use mirrors. In order to use mirrors as your primary channel source, edit the "baseurl value" in your /etc/smart/channels/[channel-name] files. This is particularly critical for international users. Then run "smart update". Smart will prompt you to change the channel values.
Additional channels
The smart package also includes channel configurations for
| channel name | description |
|---|---|
| suse-mozilla | latest Mozilla, Seamonkey, Firefox, Thunderbird packages for SUSE, maintained by Wolfgang Rosenauer |
| suse-kde | latest KDE version, maintained by the SUSE KDE team |
| suse-wine | latest Wine packages, maintained by Marcus Meissner |
Those channels are included, but disabled by default.
WARNING: The KDE channels are disabled by default for a reason. They are highly experimental and untested. Do NOT enable the KDE channels unless you know precisely what you are doing.
If you want to enable them, use the following command in a console as root:
# smart channel --enable channel-name
e.g.:
# smart channel --enable suse-mozilla
Installing GUI
From there on, you also want to install the graphical user interface for smart:
# rpm --import http://linux01.gwdg.de/~pbleser/guru-rpm.asc # smart install smart-gui
Enabling Optional Repositories
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
Running SMART
Now, to open the SMART GUI (Graphical User Interface), leave the current root shell (by typing exit), then type:
$ sux -c "smart --gui" Password: <enter root password>
Or alternatively find it from the menu.
Performing a systemwide upgrade with the SMART GUI
Open up the SMART GUI as shown, and, once cache is updated, click on the "Refresh" Button as shown:
This will take some time as SMART updates package lists incorporating new updates. Then, to perform the updates, click "Update All Packages" as shown:
SMART will present you with a list of changes. Accept them and apply marked changes when it prompts you.
SMART will then install all your upgrades automatically resolving dependencies.
Using SMART as a Zenworks Replacement
Smart is installed and working, but it is still no replacement for Zen. Open up SMART and search for "ksmarttray" - see Installing packages from repositories later in this article - and install the package entitled "smart-ksmarttray". Apply the changes and let it install.
Automating for GNOME
Once the installation is complete, open up a console app (xterm, Konsole, gterm etc.), and type:
$ su <enter root password> # gedit /usr/bin/install-package
An editor window will come up. In it, type:
#!/bin/bash gnomesu --command="smart --gui $2 $3 $4 $5 $6 $7 $8 $9 install \"$1\""
Save and exit the editor.
Then type:
# chmod 755 /usr/bin/install-package # gnome-control-center
This will open up a control center. Go to the Sessions icon, then the Startup Programs tab. Click "Add" and type "ksmarttray" in the prompt. Press "OK" and then close all that off.
Then, download an RPM file from somewhere, such as here:
Save it to a convenient location such as your desktop or your home folder. Right click the file in the file manager, and go to "Properties". Go to the "Open With" tab. Click "Add", and then "Use a custom command". In the textbox presented, type:
install-package
Then, press "Add" and ensure the install-package radiobutton is checked, then press "OK".
To test this, double click the package file. If it prompts for root password and then installs the package with SMART, all is working well.
Then, restart GNOME (or reboot). If there is a small update watcher notification icon for SMART, ksmarttray is working.
Automating for KDE
Once the installation is complete, open up a console app (xterm, Konsole, gterm etc.), and type:
$ su <enter root password> # kwrite /usr/bin/install-package
An editor window will come up. In it, type:
#!/bin/bash kdesu "smart --gui $2 $3 $4 $5 $6 $7 $8 $9 install \"$1\""
Save and exit the editor. Then, still as root, type:
# chmod 755 /usr/bin/install-package
Then, download an RPM file from somewhere, such as here:
Save it to a convenient location such as your desktop or your home folder. Right click the file in the file manager, and go to "Open With", then "Other". In the textbox presented, type:
install-package
Then, check "Remember Application Association for this type of File", then press "OK".
If it then prompts for root password and then installs the package with SMART, all is working well.
Then, restart KDE (or reboot). If there is a small update watcher notification icon for SMART, ksmarttray is working.
Installing Packages with Command Line
Installing Packages with SMART can easily be done from the commandline. Supposing you had an RPM file saved in /home/user/myrpm.rpm, it could be installed with the following series of commands in a console:
$ su Password: <enter root password> # smart --gui install /home/user/myrpm.rpm
You can also use FTP or HTTP URLs in place of the file path, and SMART will download and install the package.
Installing Packages from Repositories
The command line method, however, is not really the optimal way to install packages. Most reliable SUSE Packages are stored in the major repositories. As a result, you can simply use SMART to install from those repositories very easily. Simply open the SMART GUI, and use the Search function to find the package name (if you don't know the package name, Google may help).
Right click the package you wish to install, and select "Install".
Note: As you can see, packages may also be removed this way.
Click the "Apply Marked Changes" button (the cogs). SMART will automatically update/install any missing dependencies if it can find them, and add them to the list of changes it will display.
Accept these changes and SMART will install the packages!






