YaST multiple source installation
Motivation
UnitedLinux defines a core set of packages which implement
the UnitedLinux runtime environment.
All tests, certifications, and applications are based on this
set of packages which should not be altered in any way. The
ideal way to guarantee unaltered data, is providing it on
CD-ROM.
However, this makes including (vendor specific) extensions and bug-fixes on the
same media impossible. A separate media must be supplied for
installation.
The 'multiple source' approach of YaST gives a solution as it allows
installation from several (package) sources. So a customer can
start installing from the original UnitedLinux CDs, proceed with
a product CD, and end with a patch CD containing the latest security
patches.
Implementation
The implementation is based on the UnitedLinux
media description which defines
- a media ID to identify the media
(the media.1/media file)
- a product content description
(the content file)
- product selections (set of packages)
(the *.sel files)
- packages (rpm based)
(the packages.* files)
All these files clearly describe (the metadata of) an installation source and it's contents
as needed for YaST when starting an installation.
The key to the multiple source installation is the distinction between the description
about the source and the data (rpm packages) of the source.
Combining several sources for YaST is fairly simple, you must
- provide the media descriptions
- define an installation priority
- define an installation order
Installation workflow
The installer source
When starting the installation from a media (CD, DVD, NFS, ...), linuxrc
looks for a /boot/root file containing a complete (cramfs based)
root-fs for YaST.
Usually, this file is on the boot CD, but other installation types are
also supported by linuxrc. The information, where the /boot/root
file came from, is passed to YaST and defines the installer source.
YaST now looks at this installer source for a /yast/order file.
If this file exists, YaST goes into the 'multiple installation' mode.
In this mode, the source description (information about the packages) is
on the installer source and the source data (the rpm packages itself) is
on separate media.
If the order file does not exist, YaST does not separate the source
description from the source data and both must reside on the same media.
(The latter is what happens if you boot the first UnitedLinux CD.)
The order file
The order file defines which sources are needed for installation
and their priority for installation.
A typical example for an order file is given here:
# yast/order: priority of installation sources
#
# source- product
# description path
/yast/sles8 /sles8-i386/CD1
/yast/ul /unitedlinux-i386/CD1
/ /
The order file is ASCII, line based, '#' at the beginning of a line
denote a comment line.
Each non-comment line should contain two (whitespace separated) directory
specifications. If the second one is omitted, it defaults to "/".
The first directory specifies the location of the description.
The second directory specifies the location of the product as defined here.
For CD/DVD bases products, this is usually "/". But for network installations, or
if several product are placed on a single CD, each product needs a separate path.
You can even specify a full URL (e.g. "nfs://my-nfs-server.domain.org/product/CD1") in the
second column.
During installation, you can't switch the type of media. If your installer source is
CD, every other source must be CD based. If your installer source is NFS, every other source is expected to be
on the same NFS server.
In the above example of the order file, note the last line being "/". This means
the last of the three installation sources is on the same media as the installer.
The instorder file
As stated above, the /yast/order file lists the sources in priority order.
So a package from a source listed earlier in this file overrides a package (of the same name)
from a later source. This technique is used to override the yast2-translation packages
from unitedlinux-i386 (where all help texts refer to UnitedLinux) with yast2-translation packages
from sles8-i386 (where all help texts refer to SuSE Linux).
But the /yast/order also defines the installation order, which might not be wanted when
the 'base' packages are on a lower-priority source.
This is where /yast/instorder comes into play. This defines the installation order
by repeating the entries of the first column of /yast/order in the right order.
A typical example for an instorder file is given here:
# yast/instorder: order of installation sources
#
# install 'ul' before 'sles8'
#
/yast/ul
/yast/sles8
/
Setting it all up
Combining multiple sources requires that all sources comply to the UnitedLinux
media description standard.
On the installer source create a yast/order as described above and copy
the description data of all sources to separate directories. List these directories
in the order file and check for conflicting package (.rpm) or selection (.sel) names.
If names conflict, the name coming 'first' in the order file wins.
In the 'order' example above, the 'order' directory structure looks as follows:
yast/
order # order file, this must be below yast/order
ul/ # product 'ul', placing it below yast isn't really needed
# but practical.
media.1/
media # media ID for first CD
content # content file, describing the pathes
UnitedLinux/
setup/
descr/
*.sel
packages
packages.DU
packages.en
packages.de
...
packages.pt
sles8/
media.1/
media
content
suse/
setup/
descr/
*.sel
packages
packages.DU
packages.en
packages.de
...
packages.pt
(In case you wonder where the '.../setp/descr/' path comes from, look at
the DESCRDIR tag of the content file specification here.)
YaST now takes this description instead of the one from the 'real' media for the installation.
So when asking for a specific media, this media must match the media.1/media file from the
'order' directory.
All dependencies (package or selection) are fulfilled by looking at all installation sources. If multiple
sources provide a dependency, the source listed first in the 'order' file wins.
(The installation order equals the installation priority currently).
Further possibilities
Since you can also add the installer source to the order file, you can provide additional (or patched)
packages for otherwise 'fixed' (since already pressed on CD) sources. Just provide a fixed version on
the installer source and give it a higher priority.