Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

3.9. Software Collection MANPATH Support


To allow the man command on the system to display manual pages from the enabled Software Collection, update the MANPATH environment variable with the paths to the manual pages that are associated with the Software Collection.
To update the MANPATH environment variable, add the following to the %install section of the Software Collection spec file:
%install
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
export MANPATH=%{_mandir}:\${MANPATH}
EOF
Copy to Clipboard Toggle word wrap
This configures the enable scriptlet to update the MANPATH environment variable. The manual pages associated with the Software Collection are then not visible as long as the Software Collection is not enabled.
The Software Collection can provide a wrapper script that is visible to the system to enable the Software Collection, for example in the /usr/bin/ directory. In this case, ensure that the manual pages are visible to the system even if the Software Collection is disabled.
To allow the man command on the system to display manual pages from the disabled Software Collection, update the MANPATH environment variable with the paths to the manual pages associated with the Software Collection.

Procedure 3.7. Updating the MANPATH environment variable for the disabled Software Collection

  1. To update the MANPATH environment variable, create a custom script /etc/profile.d/name.sh. The script is preloaded when a shell is started on the system.
    For example, create the following file:
    %{?scl_prefix}manpage.sh
    Copy to Clipboard Toggle word wrap
  2. Use the manpage.sh short script that modifies the MANPATH variable to refer to your man path directory:
    export MANPATH=/opt/provider/software_collection/path/to/your/man_pages:${MANPATH}
    Copy to Clipboard Toggle word wrap
  3. Add the file to your Software Collection package's spec file:
    SOURCE2: %{?scl_prefix}manpage.sh
    Copy to Clipboard Toggle word wrap
  4. Install this file into the system /etc/profile.d/ directory by adjusting the %install section of the Software Collection package's spec file:
    %install
    install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/profile.d/
    Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat