Introduction to Application Streams
CentOS/RHEL 8.0 introduces the concept of Application Streams. Multiple versions of user-space components shipped with the distribution are now delivered at the same time. They may be updated more frequently than the core operating system packages. This provides you with greater ﬂexibility to customize Red Hat Enterprise Linux without impacting the underlying stability of the platform or speciﬁc deployments.
Traditionally, managing alternate versions of an application’s software package and its related packages meant maintaining different repositories for each different version. For developers who wanted the latest version of an application and administrators who wanted the most stable version of the application, this created a situation that was tedious to manage. This process is simpliﬁed in Red Hat Enterprise Linux 8 using a new technology called Modularity. Modularity allows a single repository to host multiple versions of an application’s package and its dependencies.
CentOS/RHEL 8 content is distributed through two main software repositories: BaseOS and Application Stream (AppStream).
The BaseOS repository provides the core operating system content for Red Hat Enterprise Linux as RPM packages. BaseOS components have a life cycle identical to that of content in previous CentOS/RHEL releases.
The Application Stream repository provides content with varying life cycles as both modules and traditional packages. Application Stream contains necessary parts of the system, as well as a wide range of applications previously available as a part of Red Hat Software Collections and other products and programs.
The Application Stream repository contains two types of content: Modules and traditional RPM packages. A module describes a set of RPM packages that belong together. Modules can contain several streams to make multiple versions of applications available for installation. Enabling a module stream gives the system access to the RPM packages within that module stream.
A module is a set of RPM packages that are a consistent set that belongs together. Typically, this is organized around a speciﬁc version of a software application or programming language. A typical module can contain packages with an application, packages with the application’s speciﬁc dependency libraries, packages with the documentation for the application, and packages with helper utilities.
Each module can have one or more module streams, which hold different versions of the content. Each of the streams receives updates independently. Think of the module stream as a virtual repository in the Application Stream physical repository. For each module, only one of its streams can be enabled and provide its packages.
Each module can have one or more proﬁles. A proﬁle is a list of certain packages to be installed together for a particular use-case such as for a server, client, development, minimal install, or other. Installing a particular module proﬁle simply installs a particular set of packages from the module stream. You can subsequently install or uninstall packages normally. If you do not specify a proﬁle, the module will install its default proﬁle.
Managing Modules Using YUM
Yum version 4, new in CentOS/RHEL 8, adds support for the new modular features of Application Stream. For handling the modular content, the yum module command has been added. Otherwise, yum works with modules much like does with regular packages.
To display a list of available modules, use yum module list:
[user@host ~]$ yum module list Red Hat Enterprise Linux 8.0 AppStream - AppStream HTB (RPMs) Name Stream Profiles Summary 389-ds 1.4 default 389 Directory Server (base) ant 1.10 [d] common [d] Java build tool container-tools 1.0 [d] common [d] Common tools and dependencies for container runtimes ...output omitted... Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
To list the module streams for a speciﬁc module and retrieve their status:
[user@host ~]$ yum module list perl Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB (RPMs) Name Stream Profiles Summary perl 5.24 common [d], minimal Practical Extraction and Report Language perl 5.26 [d] common [d], minimal Practical Extraction and Report Language
To list the packages installed by the default module stream:
[user@host ~]$ yum module info perl Name : perl Stream : 5.26 [d][a] Version : 820181219174508 Context : 9edba152 Profiles : common, minimal Default profiles : default Repo : rhel-8-fo r-x86_64-appstream-htb-rpms Summary : Practical Extraction and Report Language ...output omitted... Artifacts : perl-4:5.24.4-401.module+el8+2464+d274aed1.x86_64 : perl-Algorithm-Diff-0:1.1903-9.module+el8+2464+d274aed1.noarch : perl-Archive-Tar-0:2.30-1.module+el8+2464+d274aed1.noarch ...output omitted...
Note: Without specifying a module stream, yum module info shows details of the default module stream. Use the module-name:stream format to view a speciﬁc module stream. Add the –profile option to display information about packages installed by each of the module’s proﬁles. For example:
[user@host ~]$ yum module info --profile perl:5.24
Enabling Module Streams and Installing Modules
Module streams must be enabled in order to install their module. To simplify this process, when a module is installed it enables its module stream if necessary. Module streams can be enabled manually using yum module enable and providing the name of the module stream.
Install a module using the default stream and proﬁles:
[user@host ~]$ sudo yum module install -y perl Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing group/module packages: perl x86_64 4:5.26.3-416.el8 rhel-8-for-x86_64-appstream-htb-rpms 72 k Installing dependencies: ...output omitted... Running transaction Preparing : 1/1 Installing : perl-Exporter-5.72-396.el8.noarch 1/155 Installing : perl-Carp-1.42-396.el8.noarch 2/155 ...output omitted... Installed: perl-4:5.26.3-416.el8.x86_64 perl-Encode-Locale-1.05-9.el8.noarch ...output omitted... Complete!
To verify the status of the module stream and the installed proﬁle:
[user@host ~]$ yum module list perl Red Hat Enterprise Linux 8.0 AppStream - AppStream HTB (RPMs) Name Stream Profiles Summary perl 5.24 common, minimal Practical Extraction and Report Language perl 5.26 [d][e] common [i], minimal Practical Extraction and Report Language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Removing Modules and Disabling Module Streams
Removing a module removes all of the packages installed by proﬁles of the currently enabled module stream, and any further packages and modules that depend on these. Packages installed from this module stream not listed in any of its proﬁles remain installed on the system and can be removed manually.
To remove an installed module:
[user@host ~]$ sudo yum module remove -y perl Dependencies resolved. ===================================================================================================== Package ArchVersion Repository Size ===================================================================================================== Removing: perl x86_644:5.26.3-416.el8 @rhel-8-for-x86_64-appstream-htb-rpms 0 Removing unused dependencies: ...output omitted... Running transaction Preparing : 1/1 Erasing : perl-4:5.26.3-416.el8.x86_64 1/155 Erasing : perl-CPAN-2.18-397.el8.noarch 2/155 ...output omitted... Removed: perl-4:5.26.3-416.el8.x86_64 dwz-0.12-9.el8.x86_64 ...output omitted... Complete!
After the module is removed, the module stream is still enabled. To verify the module stream is still enabled:
[user@host ~]$ yum module list perl Red Hat Enterprise Linux 8.0 AppStream - AppStream HTB (RPMs) Name Stream Profiles Summary perl 5.24 common [d], minimal Practical Extraction and Report Language perl 5.26 [d][e] common [d], minimal Practical Extraction and Report Language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[user@host ~]$ sudo yum module disable perl ...output omitted... Dependencies resolved. ================================================================================= Package Arch Version Repository Size ================================================================================= Disabling module streams: perl 5.26 Is this ok [y/N]: y Complete!
Switching Module Streams
Switching module streams generally requires upgrading or downgrading the content to a different version. To ensure a clean switch, you should remove the modules provided by the module stream ﬁrst. That will remove all the packages installed by the proﬁles of the module, and any modules and packages that those packages have dependencies on.
To enable a different module stream and install the module:
[user@host ~]$ sudo yum module install perl:5.24
The new module stream will be enabled and the current stream disabled. It may be necessary to update or downgrade packages from the previous module stream that are not listed in the new proﬁle. Use the yum distro-sync to perform this task if required. There may also be packages that remain installed from the previous module stream. Remove those using yum remove.