Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Installation Guide
Installing the STLinux distribution
Installing using the Installer
stmyum
ST Logo
Previous   Contents   Next

Index



Introduction

From the official YUM web page:

Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

yum has a number of advantages over using RPM directly, including:

  • It can operate over a network as well as from local files
  • It allows automatic updates of installed packages
  • It can easily check for newly available and updated packages
  • If a package is requested to be installed, all the packages that it depends on will be installed automatically.
  • Groups of packages can be installed together. For example "ST40 network utilites" or "ST231 X11 core packages"
  • It offers increased security as all packages are signed

[Top]


Installing stmyum

The first thing to do is to install the ST version of the yum package. This is supplied on the ST Linux distribution CD ROMs or it can be downloaded from the FTP server.

On the CD ROM stlinux20-host-yum package can be found in the ST_Installer/Resources directory, or can be downloaded from the FTP server.

The stlinux22-host-yum package is provided with all the other host packages in the STLinux/host directory, or can be downloaded from the FTP server.

Note: The yum package is automatically installed if the installer program on the CD ROM has been used.

To install from the RPM, called stlinux2x-host-yum, use

host# rpm -i stlinux2x-host-yum-version.rpm

The ST yum application is called stmyum to ensure that it does not interfere with any native yum installation. It can be found in /opt/STM/STLinux-2.0/host/bin once installed and the PATH environment variable must include this directory to be able to use it.


Configuring stmyum

stmyum needs a configuration file to allow it to find the RPM files for the distribution. This is stored in the file /opt/STM/STLinux-2.0/host/etc/yum.conf.

Note: the ST Linux yum RPM is not shipped with a default yum.conf file.

The ST Linux installer program creates a yum.conf file, but it points to where the CD filesystem was mounted. After installation from a CD, a new yum.conf file should be installed to allow further updates from the ST Linux website.

This yum.conf is pre-configured for the ST Linux distribution FTP server. Download this file and copy it to /opt/STM/STLinux-2.0/host/etc/yum.conf.

The stlinux22-host-yum package contains a default yum.conf file. This should be correct for most installations without requiring further editing.

Note: You may have to set up your proxy environment variable if you are behind a firewall and need to use a proxy server (see below).

yum.conf file syntax

The yum.conf manpage gives a full explanation of all the required and optional fields in the yum.conf file.

To view the manpage (which is installed with the ST Linux Distribution yum RPM), you may have to set your MANPATH environment variable.

For example, in BASH type:

host% export MANPATH="/opt/STM/STLinux-2.0/host/man:$MANPATH" 
host% man yum.conf

Using signatures with stmyum

If you have not previously used the ST Linux Distribution installer program, then it is a good idea to manually install the ST Linux public signature key. This is used to confirm that the RPMS are authentic ST Linux packages and is important as you will be installing RPMs as root on your system.

Note: you also need to do this if you get an error message complaining about the key length. This is because some older systems (notably RedHat Enterprise Linux 3) ship with a version of the GPG python bindings which cannot handle long strings. In this case you need to bypass yum, and use RPM directly:

host# rpm --import ftp://ftp.stlinux.com/pub/stlinux/2.0/ST_Linux_2.0/gpg_key

stmyum with proxies

To use yum with a proxy server, you will need to set the ftp_proxy or http_proxyenvironment variable. These are standard environment variables used by many programs which access the Internet, for example wget and curl.

Which you use will depend on which protocol you are using to connect to the STLinux server, which is specified in the yum baseurl. This may be different from the protocol you use to connect to the proxy server.

For example, for a non-authenticated proxy server myproxy.com, which has HTTP access on port 1234 and using the BASH shell, type:

root@host% export ftp_proxy="http://myproxy.com:1234"

For authenticated proxies, the URL can be extended to include the username and password. For example, using the username myuser and password mypassword in the above example we would type (using CSH this time)

root@host% setenv ftp_proxy "http://myuser:mypassword@myproxy.com:1234"

Normally yum will try and keep a single connection open to the server, whether a proxy server is involved or not (this is called HTTP Keep-Alive). This is generally a performance optimisation. However we have found that some proxy servers don't work correctly in this mode, and it is necessary to disable keepalive. This can be done by adding the line:

keepalive=0

either for a specific repository, or in the [main] section if you need to apply it to all servers.

[Top]


Using stmyum

stmyum can be used to query installed packages, check for new and updated packages, and remove packages. Some of the major commands are shown below and more information can be obtained from the man pages.

Note that for all of the examples below, "globs" can be used in the <package name>, so you could use names like stlinux20-st231-*.

By default stmyum will run in interactive mode and will ask you to confirm any actions that will actually change your system. This feature can be overridden with the -y option.

Common stmyum general commands

stmyum help

  • Example: stmyum help
  • This will give details of all commands supported by stmyum

stmyum update

  • Example: stmyum update
  • When run without any additional parameters, this will update every currently installed package. It will ensure that all dependencies are satisfied.

Common stmyum package commands

stmyum can perform operations based on single RPM packages in the ST Linux Distribution. Some useful commands are given below.

stmyum install <package name>

  • Example: stmyum install stlinux20-sh4-nvi
  • Install is used to install the latest version of a package while ensuring that all dependencies are satisfied.

stmyum update <package name>

  • Example: stmyum update stlinux20-sh4-nvi
  • If run without any packages, update will update every currently installed package. If one or more packages are specified, stmyum will only update the listed packages. Again, it will ensure that all dependencies are satisfied.

stmyum info <package name>

  • Example: stmyum info stlinux20-sh4-nvi
  • This returns the information returned by 'rpm -qi <package>', except that if you don't have the package installed, this information is obtained from the yum repository headers. If you have an older version than that found in the repository, it will display both the installed, and the repository version information.

stmyum provides <file name>

  • Example: stmyum provides /opt/STM/STLinux-2.0/devkit/st231/target/usr/bin/bash
  • This returns what you would get from doing an 'rpm -qf <file>', except as with yum info, you don't have to have <file> installed. It gets the information from both the local rpm database, and the yum repository.

stmyum remove <package name>

  • Example: stmyum remove stlinux20-sh4-nvi
  • This command will remove not only the package you supply, but also the packages that depend on it, and those that depend on them, and so forth. Before it erases these packages, it will list all packages to be erased and ask for confirmation. This is a good way to find all the dependancies of a package, but don't hit "Y" at the end or run with the -y option!

stmyum list [<regex> | updates | installed | <package name>]

  • Example: stmyum list stlinux20*
  • list can be used to list various information about available and installed packages.

Common stmyum group commands

As well as operating on single packages, stmyum can also work with groups of associated packages. The ST Linux Distribution contains a number of groups which allow selection of host tools, cross-development tools and different catagories of target packages. Common commands for operating on groups are given below.

stmyum grouplist

  • Example: stmyum grouplist
  • This command will list all known groups

stmyum groupinfo <group name> [<group name> ...]

  • Example: stmyum groupinfo "st231 Text"
  • This command will list all off the RPM packages belonging to the group(s) and whether they are "mandatory" installs or "optional".

stmyum groupinstall <group name> [<group name> ...]

  • Example: stmyum groupinstall "st231 Text"
  • This command will install all the RPM packages belonging to the group(s) and their dependencies.

stmyum groupupdate <group name> [<group name> ...]

  • Example: stmyum groupupdate "st231 Text"
  • This command will update all the RPM packages belonging to the group(s) and their dependencies.

stmyum groupremove <group name> [<group name> ...]

  • Example: stmyum groupremove "st231 Text"
  • This command will delete all the RPM packages belonging to the group(s) and their dependencies.

[Top]

Previous   Contents   Next
Valid HTML 4.01! Last updated: 2006/11/17 20:21:08
© Copyright STMicroelectronics Limited, 2005
Printer