4.5. Software

4.5.1. Package Selections

You can install software on the new system using the following methods:

In the control file, packages and package selections are described as the following:

Example 4-16. Package selection in control file


....
<software>
   <base>Minimal</base>
   <addons  config:type="list">
        <addon>Kde</addon>
   </addons>
   <packages  config:type="list">
        <package>apache</package>
        <package>sendmail</package>
   </packages>
</software>
....

	  

You can install one base selection and additionally one or multiple add-on selections.

When installing from a CD-ROM, needed packages from other CD-ROMs are installed after the initial boot of the system in the so-called continue mode. If you are installing packages from multiple CD-ROMs, then auto-installation has to be interrupted for switching the CD-ROMs. In the case of NFS installation, all packages are installed at first stage of the installation only if the NFS repository is configured as a one medium.

It is often required, that a package should be installed in the continue mode, especially custom packages which may contain scripts for configuring the system. This can be done using the post-packages resource.

4.5.2. Custom Package Selections

In addition to the pre-defined selections, you can create custom selections by providing a customized selection file in the selection directory. (suse/setup/descr) The selection files have a special format and any additional selection file must conform to this format, otherwise YaST2 will not be able to read it.

As an example for the selection file, take a look at the files available in the directory /suse/setup/descr/ on the CD-ROMs.

After creating a selection file, you can add it to the configuration as described earlier in this section.

Example 4-17. Customized Package selection


....
<software>
   <base>My</base>

</software>
....

	  

The file My.sel should have the following format:

Example 4-18. Package selection file


# SuSE-Linux-Package-Selection 3.0 -- (c) 2002 SuSE Linux AG
# generated on Sat Aug 10 17:55:42 UTC 2002

=Ver: 3.0

# name version release
=Sel: Kde-Desktop 8.1

# size in bytes (pkgsize instsize)
=Siz: 123456 1234567

# Summary
=Sum.cs: ProstÅ?edí KDE
=Sum.de: KDE Desktop-Umgebung
=Sum.en: KDE Desktop Environment
=Sum.es: Entorno Gráfico KDE
=Sum.fr: Environnement de bureau KDE
=Sum.gl: KDE Desktop Environment
=Sum.hu: KDE grafikus munkakörnyezet
=Sum.it: Ambiente Desktop KDE
=Sum.ja: KDE ã??ã,¹ã,¯ã??ã??ã?-ç'°å¢?
=Sum.lt: KDE Desktop Environment
=Sum.nl: KDE Desktop omgeving
=Sum.pt: KDE Desktop Environment
=Sum.sv: KDE Desktop Environment
=Sum.tr: KDE Desktop Environment

# selections required for installation
=Req: X11 Basis-Sound 
# conflicting selections
=Con: Minimal 
# category, add-on or base
=Cat: addon

# visibility of selection (for user interface)
=Vis: true

# list of packages to install
+Ins:
SDL
aalib
alsa

... 
smpppd
unixODBC
wvdial
-Ins:

# list of packages to install if given language is active

+Ins.cs:
kde3-i18n-cs
-Ins.cs:

+Ins.da:
kde3-i18n-da
-Ins.da:

+Ins.de:
kde3-i18n-de
-Ins.de:

... 


	  

4.5.3. Installing additional and customized Packages

In addition to the packages available for installation on the CD-ROMs, you can add external packages including customized kernels. Customized kernel packages must be compatible to the SuSE packages and must install the kernel files to the same locations.

Unlike earlier versions, to install custom and external packages there is no need for a special resource in the control file. Instead you need to re-create the package database and update it with any new packages or new package versions in the source repository.

A script is provided for this task which will query packages available in the repository and create the required package database.

Creating a new package database is only needed if new RPMs (i.e. update RPMs) were added. To re-create the database, use the /usr/bin/create_package_descr command. For example, use this command line to create the package database. (When creating the database, all languages will be reset to English).

Example 4-19. Creating package database


cd /usr/local/CDs/LATEST/suse
create_package_descr  -d /usr/local/CDs/LATEST/suse 
	  

In the above example, the directory /usr/local/CDs/LATEST/suse contains the architecture dependent and independent packages, i.e. noarch and i586. This might look different on other architectures.

The advantage of this method is that you can keep an up-to-date repository with fixed and updated package (i.e. from SuSE FTP server). Additionally this method makes the creation of custom CD-ROMs easier.

4.5.4. Kernel packages

Kernel packages are not part of any selection. The required kernel is determined during installation. If the kernel package is added to any selection or to the individual package selection, installation will mostly fail due to conflicts.

To force the installation of a specific kernel, use the kernel property. The following is an example forcing the installation of the default kernel. In this example this kernel will be installed in any case, even if an SMP or other kernel is required

Example 4-20. Package selection in control file


....
<software>
   <base>Minimal</base>
   <kernel>k_deflt</kernel>
   <addons  config:type="list">
        <addon>Kde</addon>
   </addons>
   <packages  config:type="list">
        <package>apache</package>
        <package>sendmail</package>
   </packages>
</software>
....

	  

4.5.5. Removing automatically selected packages

Some packages are selected automatically either because of a dependency or because it available in a selection.

Removing such packages might break the system consistency and it is not recommended to remove basic packages unless a replacement which provides same services is provided. Best example for this case are MTA packages. By default, postfix will be selected and installed. If you wish however to use another MTA like sendmail, then postfix can be removed from the list of selected package using a list in the software resource. The following example shows how this can be done:

Example 4-21. Package selection in control file


....
<software>
   <addons  config:type="list">
        <addon>Kde</addon>
   </addons>
   <base>Minimal</base>
   <packages  config:type="list">
        <package>sendmail</package>
   <packages>
   <remove-packages  config:type="list">
        <package>postfix</package>
   </remove-packages>
</software>
....