Few days ago I received e-mail with question how to setup Yum on OpenSuse 11.2 as yum package is missing in official repository. Instead of reply I'm posting the solution here. So in case you don't like the Yast utility (many people I know hates the Yast), missing some function that yum provides or you simply prefer installing/uninstalling packages using the Yum utility then here are the simple steps how to install and configure it on OpenSuse distribution (note OpenSuse 11.0 contains Yum package but it does not work on newer releases which contains python-2.6).

Download required packages: From official OpenSuse repository: python-gpgme python-urlgrabber rpm-python yum-metadata-parser

Note: I you have registered package repository in Yast you can install it using:

yast -i python-gpgme python-urlgrabber rpm-python yum-metadata-parser

These packages are not available for Open Suse 11.1 and 11.2 so you need to download and install them manually: python-sqlite2 yum-3.2.34-2

Yum package was built from source package shipped with Fedora 11 using this (just little modified) .spec file Install downloaded packages:

# rpm -i python-sqlite2-2.4.1-2.1.x86_64.rpm yum-3.2.34-2-suse.noarch.rpm

Configure YUM: Add folowing line to "[main]" section of /etc/yum.conf file:

distroverpkg=openSUSE-release

Create source repositories files Create file OpenSUSE-inet.repo and OpenSUSE-local.repo in /etc/yum.repos.d directory.


# touch /etc/yum.repos.d/OpenSUSE-inet.repo
# touch /etc/yum.repos.d/OpenSUSE-local.repo

Contents of OpenSUSE-inet.repo


[base]
name=OpenSUSE-$releasever - Base
baseurl=http://download.opensuse.org/distribution/$releasever/repo/oss/suse/
enabled=1
gpgcheck=0
gpgkey=file:///etc/path/to/file

[updates]
name=OpenSUSE-$releasever - Updates
baseurl=http://download.opensuse.org/update/$releasever/
enabled=1
gpgcheck=0
gpgkey=file:///path/to/file

Contents of OpenSUSE-local.repo (Optional and disabled by default - For installation using local repository/DVD):


[cd-media]
name=OpenSUSE-$releasever - Local
baseurl=file:///media/cdrom/
gpgcheck=0
enabled=0

Now the installation is done.