Chapter 2. Introduction to modules
Besides individual RPM packages, the AppStream repository contains modules. A module is a set of RPM packages that represent a component and are usually installed together. A typical module contains packages with an application, packages with the application-specific dependency libraries, packages with documentation for the application, and packages with helper utilities.
The subsequent sections describe further features for organization and handling of content within modules:
2.1. Module streams
Module streams are filters that can be imagined as virtual repositories in the AppStream physical repository. Module streams represent versions of the AppStream components. Each of the streams receives updates independently.
Module streams can be active or inactive. Active streams give the system access to the RPM packages within the particular module stream, allowing installation of the respective component version. Streams are active either if marked as default or if they are explicitly enabled by a user action.
Only one stream of a particular module can be active at a given point in time. Thus only one version of a component can be installed on a system. Different versions can be used in separate containers.
Each module can have a default stream. Default streams make it easy to consume RHEL packages the usual way without the need to learn about modules. The default stream is active, unless the whole module has been disabled or another stream of that module enabled.
The default stream is designed to be unchanging throughout the RHEL major release. Make sure to consider each stream’s life cycle. Do not rely on the default stream for instances in which the default stream reaches the End of Life status prior to the end of the RHEL major release.
Certain module streams depend on other module streams. For example, the perl-App-cpanminus, perl-DBD-MySQL, perl-DBD-Pg, perl-DBD-SQLite, perl-DBI, perl-YAML, and freeradius module streams depend on certain perl module streams.
To select a particular stream for a runtime user application or a developer application, consider the following:
- Required functionality and which component versions support it
- Life cycle length and your update plan
Example 2.1. postgresql module streams
The postgresql module provides the PostgreSQL database versions 9.6, 10, 12, and 13 in the respective streams 9.6, 10, 12, and 13. Stream 10 is the default one. This means that the system will attempt to install the postgresql-10.6 package if asked for postgresql.
Always determine which module stream you want to use, and install the version explicitly.
- For more information about modular dependencies, see Section 6.1, “Modular dependencies and stream changes”.
- For instructions on how to upgrade module streams, see Section 6.5, “Switching to a later stream”.
2.2. Module profiles
A profile is a list of recommended packages to be installed together for a particular use case such as for a server, client, development, minimal install, or other. These package lists can contain packages outside the module stream, usually from the BaseOS repository or the dependencies of the stream.
Installing packages by using a profile is a one-time action provided for the user’s convenience. It does not prevent installing or uninstalling any of the packages provided by the module. It is also possible to install packages by using multiple profiles of the same module stream without any further preparatory steps.
Each module stream can have any number of profiles, including none. For any given module stream, some of its profiles can be marked as default and are then used for profile installation actions when no profile is explicitly specified. However, existence of a default profile for a module stream is not required.
Example 2.2. httpd module profiles
The httpd module, which provides the Apache web server, offers the following profiles for installation:
common- a hardened production-ready deployment, the default profile
devel- the packages necessary for making modifications to
minimal- the smallest set of packages that will provide a running webserver