Chapter 22. Software management
The following chapter contains the most notable changes to software management between RHEL 9 and RHEL 10.
22.1. Notable changes to DNF Copy linkLink copied to clipboard!
- Modularity is deprecated
In RHEL 10, the modularity functionality is deprecated and will be removed in a future major release. Therefore, the DNF
modulecommand displays a deprecation warning.NoteIn previous RHEL major versions, some Application Streams were available as modules as an extension to the RPM format. In RHEL 10, Red Hat does not intend to provide any Application Streams that use modularity as the packaging technology. Therefore, no modular content is being distributed with RHEL 10.
- The repository metadata is not downloaded by default
Previously, when you downloaded a repository’s metadata, the filelists metadata was downloaded by default. The filelists metadata is large and is typically not needed. With this update, this metadata is not downloaded by default, which improves responsiveness and saves disk space. The filelists metadata is also no longer downloaded or updated from repositories and is not loaded into the DNF transaction when you run a
dnfcommand. If thednfcommand requires the filelists metadata or includes a file-related argument, the metadata is loaded automatically.NoteWhen a package has a filepath dependency that requires filelists metadata to be resolved, the transaction fails with a dependency resolution error and the following hint:
(try to add '--skip-broken' to skip uninstallable packages or '--setopt=optional_metadata_types=filelists' to load additional filelists metadata)
(try to add '--skip-broken' to skip uninstallable packages or '--setopt=optional_metadata_types=filelists' to load additional filelists metadata)Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf you want to re-enable the default filelist metadata downloading, you can add the
filelistsvalue to theoptional_metadata_typesoption in the/etc/dnf/dnf.confconfiguration file.- The DNF
debugplugin is removed The DNF
debugplugin, which included thednf debug-dumpanddnf debug-restorecommands, is removed from thednf-plugins-corepackage. Depending on your scenario, you can use the following commands instead:-
dnf list --installedordnf repoquery --installedto list packages installed on your system. -
dnf repolist -vto list repositories enabled on your system. dnf install $(</tmp/list)to replicate packages installed on a source system to the target system. For example:Save a list of packages installed on a source system into the
/tmp/listfile:dnf repoquery --installed >/tmp/list
$ dnf repoquery --installed >/tmp/listCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy the
/tmp/listfile to the target system. Replicate packages on the target system:
dnf install $(</tmp/list)"
$ dnf install $(</tmp/list)"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
- The support for the
libreportlibrary is removed -
The support for the
libreportlibrary is removed from DNF. If you want to attach DNF logs to your bug reports, you need to do it manually or by using a different mechanism. dnf-plugins-corerebased to version 4.7.0-
The
dnf-plugins-corepackage has been rebased to version 4.7.0 that provides a newpython3-dnf-plugin-pre-transaction-actionspackage. This package includes a newpre-transaction-actionsDNF plugin that allows you to execute a command upon starting an RPM transaction. For more information, see thednf-pre-transaction-actions(8)manual page on your system.
22.2. Notable changes to createrepo_c Copy linkLink copied to clipboard!
- Default
createrepo_ccompression has changed fromgziptoZstandard -
The
createrepo_ccommand now compresses non-database metadata with theZstandard(zstd) compression algorithm instead ofgzip. Note that the database metadata still defaults to thebzip2format. You can override the compression format by using the--general-compress-typeoption. - SQLite databases are now not generated by default
To save disk space, the
createrepo_ccommand no longer creates SQLite databases next to XML files. You can explicitly create the databases by using the--databaseoption.NoteSupport for creating the SQLite databases with the
createrepo --databasescommand is deprecated and will be removed in future RHEL major versions.
22.3. Notable changes to RPM Copy linkLink copied to clipboard!
Red Hat Enterprise Linux 10 is distributed with RPM version 4.19. This version introduces many enhancements over its previous versions.
22.3.1. Improved user experience and security Copy linkLink copied to clipboard!
- A new OpenPGP backend based on Sequoia
- RPM now uses Sequoia PGP for the verification of package signatures, which replaces the legacy OpenPGP parser. Sequoia PGP is a modern, Rust-based implementation of the OpenPGP standard that focuses on safety and robustness.
- Major updates to cryptography
RHEL 10.1 introduces the following updates to RPM cryptography, which provide major security enhancements to signing and verifying RPM packages:
- Support for multiple signatures in a package
- Support for the new OpenPGP (RFC-9580) standard
- Support for post-quantum cryptography (PQC) in RPM packages. PQC is a set of algorithms that should withstand the attacks of quantum computers, enhancing software security. To sign a package with PQC algorithms, you can use Sequoia PGP software.
For more information, see Signing RPM packages with Sequoia PGP by using PQC.
rpmsign --addsignno longer replaces existing signatures in an RPM packageBefore this update the
rpmsign --addsigncommand replaced any existing signatures in an RPM package. Starting from RHEL 10.1,rpmsign --addsignonly adds new signatures and never deletes any. If an identical signature is already present in a package, RPM prints an error message and keeps the existing signature untouched.For more information, see Signing RPM packages with Sequoia PGP by using PQC.
- A new
rpmluacommand-line tool -
This tool runs the RPM Lua interpreter in a standalone way that you can use for the development and testing of Lua scriptlets and macros. For more information, see the
rpmlua(8)man page on your system. - A new
rpmsortcommand-line tool -
This tool allows you to sort RPM versions passed on standard input, similar to
sort(1)but with the awareness of RPM versioning scheme. For more information, see therpmsort(8)man page on your system. - A new
dbus-announceplugin - This plugin writes basic information about RPM transactions to the system D-Bus, for example, when packages are installed or removed. Other programs can subscribe to these signals to be notified of such events.
- Downgrade support in
--freshenmode -
Previously, you could use the
--freshenoption only to upgrade packages that were already installed and skip packages that were not installed. With this enhancement, you can also use this operation to downgrade such packages. To do this, combine the--freshen(F) option with the--oldpackageoption.
22.3.2. Improved packaging experience Copy linkLink copied to clipboard!
- Support for dynamic
specgeneration -
You can now add subpackages during the build process by placing files containing
specparts into a predefined location. For more information, see Dynamic Spec Generation. - A new
--shelloption in therpmspeccommand-line tool -
This option runs an interactive RPM macro interpreter that you can use for the development and testing of RPM macros, either in or outside of the context of a
specfile. For more information, see therpmspec(8)man page on your system. - Support for applying individual patches in
%autopatch -
You can now list specific patch numbers as positional arguments, for example,
%autopatch 1 4 6to apply patch numbers 1, 4 and 6. - Proper shell-like globbing and escaping in the
%filessection -
Wildcard patterns and escaping characters, such as backslashes and quotes, in filenames are now interpreted in a more conventional way, mirroring the behavior of shell interpreters such as Bash. Previously, undocumented limitations and exceptions to these rules could have unexpected results and could prevent the use of more complex patterns in the
%filessection of aspecfile. - A new tag in source RPM packages containing the parsed and expanded contents of the
specfile -
To help with analyzing packaging issues, a new
RPMTAG_SPECtag is now added to source RPM packages. This tag includes the contents of the expandedspecfile in the form used during the build. You can view this tag by executing therpm --qf ‘%{spec}’ -q /path/to/my/src.rpmcommand. - Build parallelism now considers system resources
RPM now considers the available physical memory and address space when estimating the number of parallel processes and threads to use when building packages. This helps to prevent performance issues or build failures on systems with constrained resources, such as systems with a large number of CPUs but a limited amount of memory.
You can adjust these estimates by specifying the amount of memory a single process or thread is assumed to require for your build by defining the
%_smp_tasksize_procand%_smp_tasksize_threadmacros, respectively. Both macros have the default value of 512 MB. For example, if your system has performance issues, you can increase these values for RPM to allocate fewer CPUs for the build. Likewise, if your system is underutilized, you can decrease these values for RPM to allocate more CPUs.For more information, see Macros for controlling build parallelism.
- Payload compression with
zstdnow supports multi-threading -
The
zstdiocompression method now accepts an optionalTparameter that specifies the number of threads to use when compressing payload during the build. This can help reduce the build time of large packages. To enable this feature, set the%_binary_payloadand%_source_payloadmacros accordingly. For more information, see the associated comment block in the/usr/lib/rpm/macrosfile and the expected format table. - A new optional
%confspecfile section -
You can use this section to configure the unpacked sources for building instead of configuring them in the
%prepor%buildsections of aspecfile. - Lua-native macro integration
The embedded Lua interpreter has been updated to include the following enhancements:
Easy access to options and arguments through Lua tables
Previously, you had to use the
rpm.expand()function to access the options and arguments of parametric Lua macros. With this enhancement, these macros receive their options and arguments as theoptandarglocal tables, respectively.Simplified access to macros
Macros can now be accessed through the
macrostable in the global Lua environment. This table can also be used to call parametric macros, including all built-in macros.New bindings for RPM version objects and I/O streams
You can now create objects from RPM version strings by using the new
rpm.ver()function. You can use these objects to perform the following actions:-
Obtain the individual pre-parsed EVR components through the
e,v, andrfields, respectively. - Compare RPM version strings to each other.
You can also use the new
rpm.open()function to open file streams that use RPM’s I/O features, such as transparent compression and decompression.-
Obtain the individual pre-parsed EVR components through the
For more information, see Lua in RPM.
- New macros for convenient string operations implemented in Lua
- You can now perform basic string operations, such as extracting a substring or obtaining the length, directly by using RPM macros, without having to execute shell subprocesses. For more information, see String operations.
- Unified calling conventions for built-in and user-defined macros
-
The
%foo arg,%{foo arg}, and%{foo:arg}notations used for calling macros are now equivalent. Note, however, that there might still be minor exceptions and differences. - Multiple new built-in macros
Multiple new built-in macros are now available, most notably:
-
%{rpmversion}for obtaining the version of RPM installed on the system. -
%{exists:…}for testing a file’s existence. -
%{shescape:…}for encompassing a string in single quotes ('') for use in a shell command that expects a single argument.
-
- New
%preuntransand%postuntransscriptlets The
%preuntransand%postuntransuninstall-time scriptlets complement the existing install-time%pretransand%posttransscriptlets:-
%preuntransscriptlets are executed before a transaction for packages that this transaction will remove. -
%postuntransscriptlets are executed after a transaction for packages that this transaction removed.
-
- Support for signing packages with Sequoia PGP is available as a Technology Preview
The
macros.rpmsign-sequoiamacro file that configures RPM to use Sequoia PGP instead of GnuPG for signing packages is now available as a Technology Preview. To enable its usage, perform the following steps:Install the following packages:
dnf install rpm-sign sequoia-sq
# dnf install rpm-sign sequoia-sqCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the
macros.rpmsign-sequoiafile to the/etc/rpm/directory:cp /usr/share/doc/rpm/macros.rpmsign-sequoia /etc/rpm/
$ cp /usr/share/doc/rpm/macros.rpmsign-sequoia /etc/rpm/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
22.3.3. Other notable changes Copy linkLink copied to clipboard!
- User and group name resolution is now strictly local
When installing packages, RPM now obtains the information about users and groups from the
passwd(5)andgroup(5)files on the local system, respectively, as opposed to using the Name Service Switch (NSS).When building packages, the
%defattrdirective now interprets the dash (-) placeholder for the user and group attributes asroot, instead of obtaining the information about the actual ownership from disk. Similarly, files in source RPM packages, such asspecfiles, source archives, or patch files, are now always owned by the root user and group, regardless of their ownership on disk.- The build tree (
%_builddir) is now removed by default after a successful build -
Previously,
rpmbuild(8)only cleaned up the build directory in the--rebuildmode, not in the more commonly used modes, such as-bb. Consequently, multiple packages being built caused the unnecessary accumulation of files over time. With this enhancement, if you prefer to always keep the build tree, for example, to investigate a non-fatal build issue, you can use the--nocleanoption. - The
%patchdirective must now explicitly specify the patch numbers to apply You can specify the patch number either of the following ways:
-
By using the
-Poption, for example,%patch -P1 -P2to apply patch numbers 1 and 2. -
By passing the patch numbers as positional arguments, for example,
%patch 1 2to apply patch numbers 1 and 2.
ImportantThe
%patchNsyntax, whereNis the patch number to apply, is now deprecated.NoteIf no explicit patch number is specified with the
%patchdirective, the build terminates with an error.NoteIt is recommended that you use the
%autosetupmacro whenever possible, instead of applying the individual patches manually with the%patchdirective. When you use%autosetup, patches are applied automatically in the order identified by their patch numbers. As a result, thespecfile is easier to read and maintain. For more information, see Automating patch application.-
By using the