3.5.2. Registering and Deregistering Software Collections
In case a Software Collection is shared over NFS but not locally installed on your system, you need to make the scl tool aware of it by registering that Software Collection.
Registering a Software Collection is done by running the
scl register
command:
$
scl register /opt/provider/software_collection
where /opt/provider/software_collection is the absolute path to the file system hierarchy of the Software Collection you want to register. The path's directory must contain the
enable
scriptlet and the root/
directory to be considered a valid Software Collection file system hierarchy.
Deregistering a Software Collection is a reverse operation that you perform when you no longer want the scl tool to be aware of a registered Software Collection.
Deregistering a Software Collection is done by calling a
deregister
scriptet when running the scl
command:
$
scl deregister software_collection
where software_collection is the name of the Software Collection you want to deregister.
3.5.2.1. Using (de)register Scriptlets in a Software Collection Metapackage
You can specify (de)register scriptlets in a Software Collection metapackage similarly to how enable scriptlets are specified. When specifying the scriptets, remember to explicitly include them in the
%file
section of the metapackage spec file.
See the following sample code for an example of specifying (de)register scriptets:
%install %scl_install cat >> %{buildroot}%{_scl_scripts}/enable << EOF # Contents of the enable scriptlet goes here ... EOF cat >> %{buildroot}%{_scl_scripts}/register << EOF # Contents of the register scriptlet goes here ... EOF cat >> %{buildroot}%{_scl_scripts}/deregister << EOF # Contents of the deregister scriptlet goes here ... EOF ... %files runtime %scl_files %{_scl_scripts}/register %{_scl_scripts}/deregister
In the register scriptlet, you can optionally specify the commands you want to run when registering the Software Collection, for example, commands to create files in
/etc/opt/
or /var/opt/
.