検索

このコンテンツは選択した言語では利用できません。

3.7. Software Collection MANPATH Support

download PDF
To allow the man command on the system to display man pages from the enabled Software Collection, update the MANPATH environment variable with the paths to the man 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
This configures the enable scriptlet to update the MANPATH environment variable. The man 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 man pages are visible to the system even if the Software Collection is disabled.
To allow the man command on the system to display man pages from the disabled Software Collection, update the MANPATH environment variable with the paths to the man 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
  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}"
  3. Add the file to your Software Collection package's spec file:
    SOURCE2: %{?scl_prefix}manpage.sh
  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/
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.