Red Hat Developer Toolset 2.1

Software Collections Guide

A guide to Software Collections for Red Hat Enterprise Linux

Edition 0

Petr Kovář

Red Hat Engineering Content Services

Legal Notice

Copyright © 2014 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.

Abstract

The Software Collections Guide provides an explanation of Software Collections and details how to build and package them. Developers and system administrators who have a basic understanding of software packaging with RPM packages, but who are new to the concept of Software Collections, can use this Guide to get started with Software Collections.
Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback!
3. Acknowledgments
1. Introducing Software Collections
1.1. Why Package Software with RPM?
1.2. What Are Software Collections?
1.3. Enabling Support for Software Collections
1.4. Installing a Software Collection
1.5. Listing Installed Software Collections
1.6. Enabling a Software Collection
1.6.1. Running an Application Directly
1.6.2. Running a Shell with Multiple Software Collections Enabled
1.6.3. Running Commands Stored in a File
1.7. Listing Enabled Software Collections
1.8. Uninstalling a Software Collection
2. Packaging Software Collections
2.1. Creating Your Own Software Collections
2.2. The File System Hierarchy
2.3. The Software Collection Root Directory
2.4. The Software Collection Prefix
2.5. Software Collection Package Names
2.6. Software Collection Scriptlets
2.7. Package Layout
2.7.1. Metapackage
2.7.2. Creating a Metapackage
2.8. Software Collection Macros
2.8.1. Macros Specific to a Software Collection
2.8.2. Macros Not Specific to a Software Collection
2.9. Converting a Conventional Spec File
2.10. Uninstalling All Software Collection Directories
2.11. Making a Software Collection Depend on Another Software Collection
2.12. Building a Software Collection
2.12.1. Rebuilding a Software Collection without build Subpackages
3. Advanced Topics
3.1. Software Collection Automatic Provides and Requires and Filtering Support
3.2. Software Collection Macro Files Support
3.3. Packaging Wrappers for Software Collections
3.4. Software Collection Initscript Support
3.5. Software Collection Library Support
3.5.1. Using a Library Outside of the Software Collection
3.5.2. Prefixing the Library Major soname with the Software Collection Name
3.5.3. Software Collection Library Support in Red Hat Enterprise Linux 7
3.6. Software Collection .pc Files Support
3.7. Software Collection MANPATH Support
3.8. Software Collection cronjob Support
3.9. Software Collection Log File Support
3.10. Software Collection logrotate Support
3.11. Software Collection Lock File Support
3.12. Software Collection Configuration Files Support
3.13. Software Collection Kernel Module Support
3.14. Software Collection SELinux Support
3.14.1. SELinux Support in Red Hat Enterprise Linux 7
3.14.2. SELinux Support in Red Hat Enterprise Linux 5
4. Extending Red Hat Software Collections 1.1
4.1. Providing an scldevel Subpackage
4.1.1. Using an scldevel Subpackage in a Dependent Software Collection
4.2. Extending the python27 and python33 Software Collections
4.2.1. The vt191 Software Collection
4.2.2. The python-versiontools Package
4.2.3. Building the vt191 Software Collection
4.2.4. Testing the vt191 Software Collection
4.3. Extending the ruby193 and ruby200 Software Collections
4.3.1. The ror40 Software Collection
4.3.2. The ror40-rubygem-bcrypt-ruby Package
4.3.3. Building the ror40 Software Collection
4.3.4. Testing the ror40 Software Collection
4.4. Extending the perl516 Software Collection
4.4.1. The h2m144 Software Collection
4.4.2. The help2man Package
4.4.3. Building the h2m144 Software Collection
4.4.4. Testing the h2m144 Software Collection
5. Troubleshooting Software Collections
5.1. Error: line XX: Unknown tag: %scl_package software_collection_name
5.2. scl command does not exist
5.3. Unable to open /etc/scl/prefixes/software_collection_name
5.4. scl_source: command not found
6. Getting More Information
6.1. Red Hat Enterprise Linux Developer Program
6.2. Installed Documentation
6.3. Accessing Red Hat Documentation
A. Revision History