Show Table of Contents
3.3. Providing syspaths Subpackages
In order to use a Software Collection's packages, users need to perform certain tasks that differ from when using conventional RPM packages. For example, they need to use an
scl enable call, which changes environment variables, such as PATH or LD_LIBRARY_PATH, so that binaries installed in alternative locations can be found. Users also need to use alternative names for systemd services. Some scripts may also call binaries using full paths, for example /usr/bin/mysql, and as a result, those scripts may not work with the Software Collection.
A recommended solution to address the problems described above is to use syspaths subpackages. The basic idea is to allow users to consume different versions of the same package without affecting the base system installation, but with the option to use the Software Collection packages as if they were conventional RPM packages, making the Software Collection easier to use.
The optional syspaths subpackages (such as rh-mariadb102-syspaths) provide shell wrappers and symbolic links that are installed into the standard path (typically,
/usr/bin/). This means that by choosing to install the syspaths subpackages, users deliberately alter the base system installation, making the syspaths subpackages typically suitable for users who do not require installing and running multiple versions of the same package at a time. This is especially the case when using databases.
Using syspaths subpackages avoids the need for adjusting scripts in the Software Collection packages to make those scripts easier to use. Keep in mind that syspaths subpackages do conflict with the packages from the base system installation, so the conventional packages cannot be installed together with the syspaths subpackages. If that is a concern, consider employing a container-based technology to isolate the syspaths subpackages from the base system installation.
3.3.1. Naming syspaths Subpackages
For each Software Collection that utilizes the concept of a syspaths subpackage, there are typically multiple syspaths subpackages provided. syspaths subpackages are made available for each package with a file that can be provided with a wrapper or a symbolic link.
On top of that, there is a Software Collection metapackage's subpackage named software_collection_1-syspaths, where software_collection_1 is the name of the Software Collection. The software_collection_1-syspaths subpackage requires other syspaths subpackages included the Software Collection. Installing the software_collection_1-syspaths subpackage thus results in installing all the other syspaths packages.
For example, if you want to include wrappers for a binary file
binary_1 included in the software_collection_1-package_1 package and a binary file binary_2 included in the software_collection_1-package_2 package, then create the following three syspaths subpackages in the software_collection_1 Software Collection:
software_collection_1-syspaths software_collection_1-package_1-syspaths software_collection_1-package_2-syspaths

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.