EuroLinux 8

Modules, streams and profiles in EuroLinux 8 distribution

The EuroLinux repository from version 8 in addition to individual RPM packages introduces new modular functionality. A typical module includes application packages, packages with application-specific dependency libraries, documentation packages, and packages with supporting tools. This feature is characteristic of all Linux systems in the Enterprise family, which includes, among others, distributions of Red Hat®, Oracle®, CentOS and naturally EuroLinux itself. Thanks to streams, modules provide the ability to separate the operating system life cycle from the life cycle of the applications used.

The EuroLinux repository from version 8 in addition to individual RPM packages introduces new modular functionality. A typical module includes application packages, packages with application-specific dependency libraries, documentation packages, and packages with supporting tools. This feature is characteristic of all Linux systems in the Enterprise family, which includes, among others, distributions of Red Hat®, Oracle®, CentOS and naturally EuroLinux itself. Thanks to streams, modules provide the ability to separate the operating system life cycle from the life cycle of the applications used.

Module Streams are filters that can be imagined as virtual repositories in the physical AppStream repository. They represent versions of components. A new stream is most often created when a new version of the application is no longer backward compatible. Each stream receives updates independently of each other.

Module streams can be active or inactive. Active streams allow make it possible to access RPM packages within a given stream, enabling installation of the appropriate version of the component. Only one stream of a given module can be active at a time, so that only one version of the component can be installed on the system. However, different versions can be used in separate containers.

Each module can have a default stream. Default streams make it easy to use packages in the standard way, even without having to learn the modules. The default stream is also an active stream, unless the entire module has been disabled or another stream of that module has been enabled.

To select a specific stream for a running application, pay attention to the following elements:

  • the required functionality and versions of the components that support it
  • compatibility
  • application lifecycle and update plan.

Module profiles

A profile is a list of recommended packages to be installed jointly for a specific application, such as server, client, development, minimal installation, or other. These package lists can contain packages outside the module stream, usually from the BaseOS repository or from stream dependencies.

The installation of multiple packages using a profile is performed with a single command. It is also possible to install packages using multiple profiles of the same module stream.

Each module stream can have any number of profiles, but in some cases it may not have any. For a given module stream, some of its profiles can be marked as default and then used for profile installation activities when none of the profiles are explicitly specified. However, the mere presence of a default profile for a module stream is not required.

Modular dependencies

Traditionally, packages depend on subsequent packages and typically specify the required dependency versions. This mechanism also occurs for packages contained in modules. However, grouping packages and their individual versions into modules and streams creates new constraints because module streams can declare dependencies on the streams of other modules, regardless of the packages they deliver.

After each operation with packages or modules, the entire dependency tree of all installed packages must meet all the conditions that packages declare. Additionally, all module stream dependencies must be met.

Therefore:

  1. Enabling the module stream may require enabling streams of subsequent modules.
  2. Installing a module stream profile or installing packages from a stream may require enabling streams of subsequent modules and installing subsequent packages.
  3. Disabling the module stream may require disabling other module streams.
  4. Removing a package may require further packages to be removed. If these packages were provided by modules, module streams remain enabled in preparation for further installation, even if packages from those streams are no longer installed (this is a reflection of the behavior of the unused yum repository).
  5. It is not possible to enable a module stream when another stream of the same module is already enabled. To switch streams, follow the appropriate procedure or reset the module, and then enable the new stream.

Modular dependencies are an additional layer that occurs alongside regular RPM dependencies. This means that installing different packages requires not only a resolution of RPM dependency, but also an earlier resolution of modular dependency. The system will retain module and stream selections unless specifically instructed to change them. The modular package will receive updates included in the currently enabled module stream that provides this package, but will not be updated to the version contained in another stream.

Resetting module streams

Resetting a module is the action that returns all its streams to their initial state. If the module has a default stream, it will become active as a result of the reset.

Resetting the module status:

# yum module reset module-name

The module is restored to its initial state. Information about the enabled stream and installed profiles is deleted, but no installed content is deleted.

Disabling all module streams

Modules that have a default stream will always have one active stream at a time. In a situation where the content of all module streams should not be available, it is possible to disable the entire module.

Disabling the module:

# yum module disable module-name

yum will ask for confirmation and then disable the module with all its streams. However, no files will be deleted.

Switching to a later stream

After switching to a later module stream, all packages in the module are replaced for their later versions.

This procedure can only be performed if the following two conditions are met:

  1. The system is fully updated.
  2. No packages installed on the system are newer than those available in the repository.

Procedure

Run the command below to determine if your system is ready to switch to a later stream:

# yum distro-sync

The command must end with a “Nothing to do” message. If yum proposes changes instead and asks for confirmation, carefully review those changes and consider whether you want to continue. If necessary, run yum distro-sync command multiple times. You can also discard the suggested changes and manually modify the system to a state where the command returns the “Nothing to do” message.

Changing the active stream to a later one:

# yum module reset nazwa-modułu
# yum module enable nazwa-modułu:nowy-strumień

Sync the installed packages to activate changes between streams:

# yum distro-sync

If the result of the command action suggests changes outside the streams, they should be carefully analyzed. If some installed packages depend on an earlier stream and there is no compatible version in a later stream, yum will report a dependency conflict. In this case, use --allowerasing command to remove such packages as they cannot be installed with a later stream due to missing dependencies.

Summary

The use of modules, streams, and profiles is clearly more complex, but much more scalable. If we do not need new module functions, we can use the yum command as before, without the additional modular functionality offered in the 8th version of the system. However, it is worth considering using modules when there is a clear need for much greater flexibility of our environment.

Authors

The blog articles are written by people from the EuroLinux team. We owe 80% of the content to our developers, the rest is prepared by the sales or marketing department. We make every effort to ensure that the content is the best in terms of content and language, but we are not infallible. If you see anything that needs to be corrected or clarified, we'd love to hear from you.