검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

2.8. Software Collection Macros

download PDF
The Software Collection packaging macro scl defines where to relocate the Software Collection's file structure. The relocated file structure is a file system used exclusively by the Software Collection.
The %scl_package macro defines files ownership for the Software Collection's metapackage and provides additional packaging macros to use in the Software Collection environment.
To be able to build a conventional package and a Software Collection package with a single spec file, prefix the Software Collection macros with %{?scl:macro}, as in the following example:
%{?scl:Requires: %scl_runtime}
In the example above, the %scl_runtime macro is the value of the Requires tag. Both the macro and the tag use the %{?scl: prefix.

2.8.1. Macros Specific to a Software Collection

The table below shows a list of all macros specific to a particular Software Collection. All the macros have default values that you will not need to change in most cases.
Table 2.1. Software Collection Specific Macros
Macro
Description
Example value
%scl_name
name of the Software Collection
software_collection_1
%scl_prefix
name of the Software Collection with a dash appended at the end
software_collection_1-
%pkg_name
name of the original package
perl
%_scl_prefix
root of the Software Collection (not package's root)
/opt/provider/
%_scl_scripts
location of Software Collection's scriptlets
/opt/provider/software_collection_1/
%_scl_root
installation root (install-root) of the package
/opt/provider/software_collection_1/root/
%scl_require_package software_collection_1 package_2
depend on a particular package from a specific Software Collection
software_collection_1-package_2

2.8.2. Macros Not Specific to a Software Collection

The table below shows a list of macros that are not specific to a particular Software Collection. Because these macros are not relocated and do not point to the Software Collection file system, they allow you to point to the system root file system. These macros use _root as a prefix.
All the macros have default values that you will not need to change in most cases.
Table 2.2. Software Collection Non-Specific Macros
Macro
Description
Relocated
Example value
%_root_prefix
Software Collection's %_prefix macro
no
/usr/
%_root_exec_prefix
Software Collection's %_exec_prefix macro
no
/usr/
%_root_bindir
Software Collection's %_bindir macro
no
/usr/bin/
%_root_sbindir
Software Collection's %_sbindir macro
no
/usr/sbin/
%_root_datadir
Software Collection's %_datadir macro
no
/usr/share/
%_root_sysconfdir
Software Collection's %_sysconfdir macro
no
/etc/
%_root_libexecdir
Software Collection's %_libexecdir macro
no
/usr/libexec/
%_root_sharedstatedir
Software Collection's %_sharedstatedir macro
no
/usr/com/
%_root_localstatedir
Software Collection's %_localstatedir macro
no
/usr/var/
%_root_includedir
Software Collection's %_includedir macro
no
/usr/include/
%_root_infodir
Software Collection's %_infodir macro
no
/usr/share/info/
%_root_mandir
Software Collection's %_mandir macro
no
/usr/share/man/
%_root_initddir
Software Collection's %_initddir macro
no
/etc/rc.d/init.d/
%_root_libdir
Software Collection's %_libdir macro, this macro does not work if Software Collection's metapackage is platform-independent
no
/usr/lib/

2.8.3. The nfsmountable Macro

Using a Software Collection macro nfsmountable allows you to change values for the _sysconfdir, _sharedstatedir, and _localstatedir macros so that your Software Collection can have its state files and configuration files located outside the Software Collection's /opt file system hierarchy. This makes the files easier to manage and is also required when using your Software Collection over NFS.
If you do not need support for Software Collections over NFS, using nfsmountable is optional but recommended. For more information, see Section 3.1, “Using Software Collections over NFS”.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.