[software-collections-guide: 17/17] Update for Fedora

Petr Kovář pmkovar at fedoraproject.org
Fri Jul 11 16:09:37 UTC 2014


commit 48b612adfdfccb8357cfebfe3781c3908d4387af
Author: Petr Kovar <pkovar at redhat.com>
Date:   Fri Jul 11 18:05:42 2014 +0200

    Update for Fedora

 en-US/Extending_Red_Hat_Software_Collections.xml |  822 +---------------------
 en-US/Getting_More_Information.xml               |   12 +-
 en-US/Revision_History.xml                       |   14 +
 en-US/Software_Collections_Guide.ent             |    1 -
 4 files changed, 26 insertions(+), 823 deletions(-)
---
diff --git a/en-US/Extending_Red_Hat_Software_Collections.xml b/en-US/Extending_Red_Hat_Software_Collections.xml
index 932b74e..eb2fc5d 100644
--- a/en-US/Extending_Red_Hat_Software_Collections.xml
+++ b/en-US/Extending_Red_Hat_Software_Collections.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<chapter id="chap-Extending_Red_Hat_Software_Collections">
-  <title>Extending Red Hat Software Collections 1.1</title>
-  <para>This chapter describes extending &DSCL;s that are part of the Red Hat Software Collections 1.1 offering.</para>
+<chapter id="chap-Extending_Software_Collections">
+  <title>Extending Software Collections</title>
+  <para>This chapter describes extending &DSCL;s.</para>
   <section id="sect-Providing_an_scldevel_Subpackage">
     <title>Providing an scldevel Subpackage</title>
     <para>Providing an <package>scldevel</package> subpackage in your &DSCL;'s metapackage can make it easier for users to create a dependent &DSCL;. This section describes creating an <package>scldevel</package> subpackage for Ruby-based &DSCL;s, ruby193 and ruby200.</para>
@@ -63,820 +63,4 @@ Requires: %{scl_prefix_ruby}scldevel</programlisting>
     </procedure>
     </section>
   </section>
-  <section id="sect-Extending_the_python27_and_python33_Software_Collections">
-    <title>Extending the python27 and python33 &DSCL;s</title>
-    <para>This section describes extending the python27 and python33 &DSCL;s by creating a dependent &DSCL;.</para>
-    <para>
-      In Red Hat Software Collections 1.1, the <application>scl</application> tool has been extended to support a macro <systemitem>%scl_package_override()</systemitem>, which allows for easier packaging of your own dependent &DSCL;.
-    </para>
-    <!--para>
-      Note that even though the approach described below generally applies to every &DSCL; shipped with Red Hat Software Collections 1.1, there are specifics that depend on the &DSCL; you are extending.
-    </para-->
-    <section id="The_vt191_Software_Collection">
-    <title>The vt191 &DSCL;</title>
-    <para>
-      Below is a commented example of building a dependent &DSCL;. The &DSCL; is named <literal>vt191</literal> and contains the <package>versiontools</package> Python package version 1.9.1.
-    </para>
-    <para>
-      Note the following in the vt191 &DSCL; spec file:
-    </para>
-    <itemizedlist>
-      <listitem>
-        <para>
-          The vt191 &DSCL; spec file has the following build dependency set:
-        </para>
-        <programlisting language="RPM Spec">BuildRequires: %{scl_prefix_python}scldevel</programlisting>
-        <para>
-          This expands to, for example, <package>python27-scldevel</package>.
-        </para>
-        <para>
-          The <package>python27-scldevel</package> subpackage ships two important macros, <code>%scl_python</code> and <code>%scl_prefix_python</code>. Note that these macros are defined at the top of the spec file. Although the definitions are not required, they provide a visual hint that the vt191 &DSCL; has been designed to be built on top of the python27 &DSCL;. They also serve as a fallback value.
-        </para>
-      </listitem>
-      <listitem>
-        <para>
-          To have a <filename>site-packages</filename> directory set up properly, use the value of the <code>%python27python_sitelib</code> macro and replace <code>python27</code> with <code>vt191</code>. Note that if
-  you are building the &DSCL; with a different provider (for example, <filename>/opt/myorganization/</filename> instead of <filename>/opt/rh/</filename>), you will need to change these, too.
-        </para>
-        <important>
-          <para>
-            Because the <filename>/opt/rh/</filename> provider is used to install &DSCL;s provided by Red Hat, it is strongly recommended to use a different provider to avoid possible conflicts. See <xref linkend="sect-The_Software_Collection_Root_Directory" /> for more information.
-          </para>
-        </important>
-      </listitem>
-      <listitem>
-        <para>
-          The <package>vt191-build</package> subpackage has the following dependency set:
-        </para>
-        <programlisting language="RPM Spec">Requires: %{scl_prefix_python}scldevel</programlisting>
-        <para>
-          This expands to, for example, <package>python27-scldevel</package>. The purpose of this dependency is to ensure that the macros are always present when building packages for the vt191 &DSCL;.
-        </para>
-      </listitem>
-      <listitem>
-        <para>
-          The <filename>enable</filename> scriptlet for the vt191 &DSCL; uses the following line:
-        </para>
-        <programlisting language="RPM Spec">. scl_source enable %{scl_python}</programlisting>
-        <para>
-          Note the dot at the beginning of the line. This line makes the Python &DSCL; start implicitly when the vt191 &DSCL; is started so that the user can only type <command>scl enable vt191 <replaceable>command</replaceable></command> instead of <command>scl enable python27 vt191 <replaceable>command</replaceable></command> to run <replaceable>command</replaceable> in the &DSCL; environment.
-        </para>
-      </listitem>
-      <listitem>
-        <para>
-          The macro file <filename>macros.vt191-config</filename> calls the <code>%scl_package_override</code> function to properly override <code>%__os_install_post</code>, Python dependency generators, and certain Python-specific macros used in other packages' spec files.
-        </para>
-      </listitem>
-    </itemizedlist>
-<programlisting language="RPM Spec"><![CDATA[# define name of the scl
-%global scl vt191
-%scl_package %scl
-
-# Defaults for the values for the python27/python33 Software Collection. These
-# will be used when python27-scldevel (or python33-scldevel) is not in the
-# build root
-%{!?scl_python:%global scl_python python27}
-%{!?scl_prefix_python:%global scl_prefix_python %{scl_python}-}
-
-# Only for this build, you need to override default __os_install_post,
-# because the default one would find /opt/.../lib/python2.7/ and try
-# to bytecompile with the system /usr/bin/python2.7
-%global __os_install_post %{%{scl_python}_os_install_post}
-# Similarly, override __python_requires for automatic dependency generator
-%global __python_requires %{%{scl_python}_python_requires}
-
-# The directory for site packages for this Software Collection
-%global vt191_sitelib %(echo %{python27python_sitelib} | sed 's|%{scl_python}|%{scl}|')
-
-Summary: Package that installs %scl
-Name: %scl_name
-Version: 1
-Release: 1%{?dist}
-License: GPLv2+
-BuildRequires: scl-utils-build
-# Always make sure that there is the python27-sclbuild (or python33-sclbuild)
-# package in the build root
-BuildRequires: %{scl_prefix_python}scldevel
-# Require python27-python-devel, you will need macros from that package
-BuildRequires: %{scl_prefix_python}python-devel
-Requires: %{scl_prefix}python-versiontools
-
-%description
-This is the main package for %scl Software Collection.
-
-%package runtime
-Summary: Package that handles %scl Software Collection.
-Requires: scl-utils
-Requires: %{scl_prefix_python}runtime
-
-%description runtime
-Package shipping essential scripts to work with %scl Software Collection.
-
-%package build
-Summary: Package shipping basic build configuration
-Requires: scl-utils-build
-# Require python27-scldevel (or python33-scldevel) so that there is always access
-# to the %%scl_python and %%scl_prefix_python macros in builds for this Software
-# Collection
-Requires: %{scl_prefix_python}scldevel
-
-%description build
-Package shipping essential configuration macros to build %scl Software Collection.
-
-%install
-%scl_install
-
-# Create the enable scriptlet that:
-# - Adds an additional load path for the Python interpreter.
-# - Runs scl_source so that you can run:
-#     scl enable vt191 "bash"
-#   instead of:
-#     scl enable python27 vt191 "bash"
-
-cat >> %{buildroot}%{_scl_scripts}/enable << EOF
-. scl_source enable %{scl_python}
-export PYTHONPATH=%{vt191_sitelib}\${PYTHONPATH:+:\${PYTHONPATH}}
-EOF
-
-mkdir -p %{buildroot}%{vt191_sitelib}
-
-# - Enable Software Collection-specific bytecompilation macros from
-#   the python27-python-devel package.
-# - Also override the %%python_sitelib macro to point to the vt191 Software
-#   Collection.
-# - If you have architecture-dependent packages, you will also need to override
-#   the %%python_sitearch macro.
-
-cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
-%%scl_package_override() %%{expand:%{?python27_os_install_post:%%global __os_install_post %%python27_os_install_post}
-%%global __python_requires %%python27_python_requires
-%%global __python_provides %%python27_python_provides
-%%global __python %python27__python
-%%global python_sitelib %vt191_sitelib
-%%global python2_sitelib %vt191_sitelib
-}
-EOF
-
-%files
-
-%files runtime]]><!--FIXME:BZ#1072319 -f filesystem--><![CDATA[
-%scl_files
-%vt191_sitelib
-
-%files build
-%{_root_sysconfdir}/rpm/macros.%{scl}-config
-
-%changelog
-* Wed Jan 22 2014 John Doe <jdoe at example.com> - 1-1
-- Initial package.]]></programlisting>
-    </section>
-    <section id="sect-The_python-versiontools_Package">
-    <title>The python-versiontools Package</title>
-    <para>
-      Below is a commented example of the <package>python-versiontools</package> package spec file. Note the following in the spec file:
-    </para>
-    <itemizedlist>
-      <listitem>
-        <para>
-          The <code>BuildRequires</code> tags are prefixed with <code>%{?scl_prefix_python}</code> instead of <code>%{scl_prefix}</code>.
-        </para>
-      </listitem>
-      <listitem>
-        <para>
-          The <code>%install</code> section explictly specifies <code>--install-purelib</code>.
-        </para>
-      </listitem>
-    </itemizedlist>
-<programlisting language="RPM Spec"><![CDATA[%{?scl:%scl_package python-versiontools}
-%{!?scl:%global pkg_name %{name}}
-
-%global pypi_name versiontools
-
-Name:           %{?scl_prefix}python-versiontools
-Version:        1.9.1
-Release:        1%{?dist}
-Summary:        Smart replacement for plain tuple used in __version__
-
-License:        LGPLv3
-URL:            https://launchpad.net/versiontools
-Source0:        http://pypi.python.org/packages/source/v/versiontools/versiontools-1.9.1.tar.gz
-
-BuildArch:      noarch
-BuildRequires:  %{?scl_prefix_python}python-devel
-BuildRequires:  %{?scl_prefix_python}python-setuptools
-%{?scl:BuildRequires: %{scl}-build %{scl}-runtime}
-%{?scl:Requires: %{scl}-runtime}
-
-%description
-Smart replacement for plain tuple used in __version__
-
-%prep
-%setup -q -n %{pypi_name}-%{version}
-
-%build
-%{?scl:scl enable %{scl} "}
-%{__python} setup.py build
-%{?scl:"}
-
-%install
-# Explicitly specify --install-purelib %{python_sitelib}, which is now overriden
-# to point to vt191, otherwise Python will try to install into the python27
-# Software Collection site-packages directory
-%{?scl:scl enable %{scl} "}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-purelib %{python_sitelib}
-%{?scl:"}
-
-%files
-%{python_sitelib}/%{pypi_name}*
-
-%changelog
-* Wed Jan 22 2014 John Doe <jdoe at example.com> - 1.9.1-1
-- Built for vt191 SCL.]]></programlisting>
-    </section>
-    <section id="sect-Building_the_vt191_Software_Collection">
-    <title>Building the vt191 &DSCL;</title>
-    <para>
-      To build the vt191 &DSCL;:
-    </para>
-    <procedure>
-      <step>
-        <para>
-          Install the <package>python27-scldevel</package> and <package>python27-python-devel</package> subpackages that are part of Red Hat Software Collections.
-        </para>
-      </step>
-      <step>
-        <para>
-          Build <filename>vt191.spec</filename> and install the <package>vt191-runtime</package> and <package>vt191-build</package> packages.
-        </para>
-      </step>
-      <step>
-        <para>
-          Install the <package>python27-python-setuptools</package> package, which is a build requirement for <package>versiontools</package>.
-        </para>
-      </step>
-      <step>
-        <para>
-          Build <filename>python-versiontools.spec</filename>.
-        </para>
-      </step>
-    </procedure>
-    </section>
-    <section id="Testing_the_vt191_Software_Collection">
-    <title>Testing the vt191 &DSCL;</title>
-    <para>
-      To test the vt191 &DSCL;:
-    </para>
-    <procedure>
-      <step>
-        <para>
-          Install the <package>vt191-python-versiontools</package> package.
-        </para>
-      </step>
-      <step>
-        <para>
-          Run the following command:
-        </para>
-        <screen><computeroutput>$ </computeroutput><userinput>scl enable vt191 "python -c 'import versiontools; print(versiontools.__file__)'"</userinput></screen>
-      </step>
-      <step>
-        <para>Verify that the output contains the following line:</para>
-        <screen>/opt/rh/vt191/root/usr/lib/python2.7/site-packages/versiontools/__init__.pyc</screen>
-        <para>
-          Note that the provider <filename>rh</filename> in the path may vary depending on your redefinition of the <code>%_scl_prefix</code> macro. See <xref linkend="sect-The_Software_Collection_Root_Directory" /> for more information.
-        </para>
-      </step>
-    </procedure>
-    </section>
-  </section>
-  <section id="sect-Extending_the_ruby193_and_ruby200_Software_Collections">
-    <title>Extending the ruby193 and ruby200 &DSCL;s</title>
-    <para>In Red Hat Software Collections 1.1, it is possible to extend the ruby193 and ruby200 &DSCL;s by adding dependent packages. The Ruby on Rails 4.0 (ror40) &DSCL;, which is built on top of Ruby 2.0.0 provided by the ruby200 &DSCL;, is one example of such an extension.</para>
-    <para>This section provides detailed information about the <package>ror40</package> metapackage and the <package>ror40-rubygem-bcrypt-ruby</package> package, which are both part of the ror40 &DSCL;.</para>
-    <section id="sect-The_ror40_Software_Collection">
-      <title>The ror40 Software Collection</title>
-    <para>This section contains a commented example of the Ruby on Rails 4.0 metapackage for the ror40 &DSCL;. The ror40 &DSCL; depends on the ror200 &DSCL;.</para>
-    <para>Note the following in the ror40 &DSCL; spec file example:</para>
-    <itemizedlist>
-      <listitem>
-        <para>The ror40 &DSCL; spec file has the following build dependencies set:</para>
-        <programlisting language="RPM Spec">BuildRequires: %{scl_prefix_ruby}scldevel
-BuildRequires: %{scl_prefix_ruby}rubygems-devel</programlisting>
-    <para>This expands to, for example, <package>ruby200-scldevel</package> and <package>ruby200-rubygems-devel</package>.</para>
-    <para>The <package>ruby200-scldevel</package> subpackage contains two important macros, <code>%scl_ruby</code> and <code>%scl_prefix_ruby</code>. The <package>ruby200-scldevel</package> subpackage should be available in the build root. It specifies which of the available Ruby &DSCL;s you want to use. You can also replace it with the <package>ruby193-scldevel</package> subpackage.</para>
-    <para>Note that the <code>%scl_ruby</code> and <code>%scl_prefix_ruby</code> macros are also defined at the top of the spec file. Although the definitions are not required, they provide a visual hint that the ror40 &DSCL; has been designed to be built on top of the ruby200 &DSCL;. They also serve as a fallback value.</para>
-    </listitem>
-    <listitem>
-      <para>The <package>ror40-runtime</package> subpackage must depend on the <package>runtime</package> subpackage of the &DSCL; it depends on. This dependency is specified as follows:</para>
-      <programlisting language="RPM Spec">%package runtime
-Requires: %{scl_prefix_ruby}runtime</programlisting>
-      <para>This expands to ruby200-runtime in the case of the ruby200 &DSCL;, and to <package>ruby193-runtime</package> in the case when the package is built against the ruby193 &DSCL;.</para>
-    </listitem>
-    <listitem>
-      <para>The <package>ror40-build</package> subpackage must depend on the <package>scldevel</package> subpackage of the &DSCL; it depends on. This is to ensure that all other packages of this &DSCL; will have the same macros defined, thus it is built against the same Ruby version.</para>
-      <programlisting language="RPM Spec">%package build
-Requires: %{scl_prefix_ruby}scldevel</programlisting>
-      <para>In the case of the ruby200 &DSCL;, this expands to <package>ruby200-scldevel</package>.</para>
-    </listitem>
-    <listitem>
-      <para>The <filename>enable</filename> scriptlet for the ror40 &DSCL; contains the following line:</para>
-      <programlisting language="RPM Spec">. scl_source enable %{scl_ruby}</programlisting>
-      <para>Note the dot at the beginning of the line. This line makes the Ruby &DSCL; start implicitly when the ror40 &DSCL; is started so that the user can only type <command>scl enable ror40 <replaceable>command</replaceable></command> instead of <command>scl enable ruby200 ror40 <replaceable>command</replaceable></command> to run <replaceable>command</replaceable> in the &DSCL; environment.</para>
-      </listitem>
-      <listitem>
-        <para>The <package>ror40-scldevel</package> subpackage is provided so that it is available in case you need it to build a &DSCL; which extends the ror40 &DSCL;. The package provides the <code>%{scl_ror}</code> and <code>%{scl_prefix_ror}</code> macros, which can be used to extend the ror40 &DSCL;.</para>
-      </listitem>
-      <listitem>
-        <para>Because the ror40 &DSCL;'s gems are installed in a separate root directory structure, you need to ensure that the correct ownership for the rubygems directories is set. This is done by using a snippet to generate a file list <package>rubygems_filesystem.list</package>.
-</para>
-        <para>You are advised to set the <package>runtime</package> package to own all directories which would, if located in the root file system, be owned by another package. One example of such directories in the case of the ror40 &DSCL; is the Rubygem directory structure<!--, but it might be pkgconfig directories, etc-->.</para>
-      </listitem>
-    </itemizedlist>
-    <programlisting language="RPM Spec"><![CDATA[%global scl_name_base ror
-%global scl_name_version 40
-
-%global scl %{scl_name_base}%{scl_name_version}
-%scl_package %scl
-
-# Fallback to ruby200. ruby200-scldevel is unlikely to be available in
-# the build root.
-%{!?scl_ruby:%global scl_ruby ruby200}
-%{!?scl_prefix_ruby:%global scl_prefix_ruby %{scl_ruby}-}
-
-Summary: Package that installs %scl
-Name: %scl_name
-Version: 1.1
-Release: 3%{?dist}
-License: GPLv2+
-]]><!--# TODO: This should be removed as soon as scl-utils automatically generates
-# dependencies on scl -runtime (rhbz#1054711).--><![CDATA[
-BuildRequires: help2man
-BuildRequires: scl-utils-build
-BuildRequires: %{scl_prefix_ruby}scldevel
-BuildRequires: %{scl_prefix_ruby}rubygems-devel
-
-%description
-This is the main package for %scl Software Collection.
-
-%package runtime
-Summary: Package that handles %scl Software Collection.
-Requires: scl-utils
-Requires: %{scl_prefix_ruby}runtime
-
-%description runtime
-Package shipping essential scripts to work with %scl Software Collection.
-
-%package build
-Summary: Package shipping basic build configuration
-Requires: scl-utils-build
-Requires: %{scl_runtime}
-Requires: %{scl_prefix_ruby}scldevel
-
-%description build
-Package shipping essential configuration macros to build %scl Software Collection.
-
-%package scldevel
-Summary: Package shipping development files for %scl
-
-%description scldevel
-Package shipping development files, especially usefull for development of
-packages depending on %scl Software Collection.
-
-%prep
-%setup -T -c
-
-%install
-%scl_install
-
-cat >> %{buildroot}%{_scl_scripts}/enable << EOF
-export PATH=%{_bindir}\${PATH:+:\${PATH}}
-export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
-export MANPATH=%{_mandir}:\${MANPATH}
-export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
-export GEM_PATH=%{gem_dir}:\${GEM_PATH:+\${GEM_PATH}}\${GEM_PATH:-\`scl enable %{scl_ruby} -- ruby -e "print Gem.path.join(':')"\`}
-
-. scl_source enable %{scl_ruby}
-EOF
-
-cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
-%%scl_%{scl_name_base} %{scl}
-%%scl_prefix_%{scl_name_base} %{scl_prefix}
-EOF
-
-
-scl enable %{scl_ruby} - << \EOF
-# Fake ror40 Software Collection environment.
-GEM_PATH=%{gem_dir}:${GEM_PATH:+${GEM_PATH}}${GEM_PATH:-`ruby -e "print Gem.path.join(':')"`} \
-X_SCLS=ror40 \
-ruby -rfileutils > rubygems_filesystem.list << \EOR
-  # Create the RubyGems file system.
-  Gem.ensure_gem_subdirectories '%{buildroot}%{gem_dir}'
-  FileUtils.mkdir_p File.join '%{buildroot}', Gem.default_ext_dir_for('%{gem_dir}')
-
-  # Output the relevant directories.
-  Gem.default_dirs[:%{scl}_system].each { |k, p| puts p }
-EOR
-EOF
-
-%files
-
-%files runtime -f rubygems_filesystem.list
-%scl_files
-
-%files build
-%{_root_sysconfdir}/rpm/macros.%{scl}-config
-
-%files scldevel
-%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
-
-
-%changelog
-* Thu Jan 16 2014 John Doe <jdoe at example.com> - 1-1
-- Initial package.]]></programlisting>
-  </section>
-  <section id="sect-The_ror40-rubygem-bcrypt-ruby_Package">
-    <title>The ror40-rubygem-bcrypt-ruby Package</title>
-    <para>Below is a commented example of the <package>ror40-rubygem-bcrypt-ruby</package> package spec file. This package provides the bcrypt-ruby gem. For more information on bcrypt-ruby, see the following website:</para>
-    <itemizedlist>
-      <listitem>
-        <para><ulink url="http://rubygems.org/gems/bcrypt-ruby">http://rubygems.org/gems/bcrypt-ruby</ulink></para>
-      </listitem>
-    </itemizedlist>
-    <para>Note that the only significant difference between the <package>ror40-rubygem-bcrypt-ruby</package> package spec file and a normal &DSCL; package spec file is the following:</para>
-    <itemizedlist>
-      <listitem>
-        <para>The <code>BuildRequires</code> tags are prefixed with <code>%{?scl_prefix_ruby}</code> instead of <code>%{scl_prefix}</code>.</para>
-      </listitem>
-    </itemizedlist>
-    <programlisting language="RPM Spec"><![CDATA[%{!?scl:%global pkg_name %{name}}
-%{?scl:%scl_package rubygem-%{gem_name}}
-
-# Generated from bcrypt-ruby-2.1.2.gem by gem2rpm -*- rpm-spec -*-
-%global gem_name bcrypt-ruby
-
-Summary: Wrapper around bcrypt() password hashing algorithm
-Name: %{?scl:%scl_prefix}rubygem-%{gem_name}
-Version: 3.1.2
-Release: 4%{?dist}
-Group: Development/Languages
-# ext/* - Public Domain
-# spec/TestBCrypt.java - ISC
-License: MIT and Public Domain and ISC
-URL: http://bcrypt-ruby.rubyforge.org
-Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
-Requires: %{?scl_prefix_ruby}ruby(rubygems)
-Requires: %{?scl_prefix_ruby}ruby(release)
-BuildRequires: %{?scl_prefix_ruby}rubygems-devel
-BuildRequires: %{?scl_prefix_ruby}ruby-devel
-BuildRequires: %{?scl_prefix}rubygem(rspec)
-Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
-
-%description
-bcrypt() is a sophisticated and secure hash algorithm designed by The
-OpenBSD project
-for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for
-safely handling
-passwords.
-
-
-%prep
-%setup -q -c -T
-
-%build
-export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
-%{?scl:scl enable %{scl} - << \EOF}
-%gem_install -n %{SOURCE0}
-%{?scl:EOF}
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gem_dir}
-mkdir -p %{buildroot}%{gem_extdir_mri}/lib
-cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
-
-mv %{buildroot}%{gem_libdir}/bcrypt_ext.so %{buildroot}%{gem_extdir_mri}/lib
-
-%check
-pushd .%{gem_instdir}
-%{?scl:scl enable %{scl} - << \EOF}
-rspec spec
-%{?scl:EOF}
-popd
-
-%files
-%dir %{gem_instdir}
-%exclude %{gem_instdir}/.*
-%{gem_instdir}/bcrypt-ruby.gemspec
-%doc %{gem_instdir}/CHANGELOG
-%doc %{gem_instdir}/COPYING
-%exclude %{gem_instdir}/ext
-%{gem_instdir}/Gemfile*
-%{gem_instdir}/Rakefile
-%doc %{gem_instdir}/README.md
-%{gem_libdir}
-%{gem_extdir_mri}
-%{gem_instdir}/spec
-%doc %{gem_docdir}
-%exclude %{gem_cache}
-%{gem_spec}
-
-
-%changelog
-* Fri Mar 21 2014 John Doe <jdoe at example.com> - 3.1.2-4
-- Initial package.]]></programlisting>
-  </section>
-  <section id="sect-Building_the_ror40_Software_Collection">
-    <title>Building the ror40 &DSCL;</title>
-    <para>To build the ror40 &DSCL;:</para>
-    <procedure>
-      <step>
-        <para>Install the <package>ruby200-scldevel</package> subpackage which is a part of Red Hat Software Collections.</para>
-      </step>
-      <step>
-        <para>Build <filename>ror40.spec</filename> and install the <package>ror40-runtime</package> and <package>ror40-build</package> packages.</para>
-      </step>
-      <step>
-        <para>Build <filename>rubygem-bcrypt-ruby.spec</filename>.</para>
-      </step>
-    </procedure>
-  </section>
-  <section id="sect-Testing_the_ror40_Software_Collection">
-    <title>Testing the ror40 &DSCL;</title>
-    <para>To test the ror40 &DSCL;:</para>
-    <procedure>
-      <step>
-        <para>Install the <package>ror40-rubygem-bcrypt-ruby</package> package.</para>
-      </step>
-      <step>
-        <para>Run the following command:</para>
-        <screen><computeroutput>$ </computeroutput><userinput>scl enable ror40 -- ruby -r bcrypt -e "puts BCrypt::Password.create('my password')"</userinput></screen>
-      </step>
-      <step>
-        <para>Verify that the output contains the following line:</para>
-        <screen>$2a$10$s./ReniLY.wXPHVBQ9npoeyZf5KzywfpvI5lhjG6Ams3u0hKqwVbW</screen>
-      </step>
-    </procedure>
-  </section>
-  </section>
-  <section id="sect-Extending_the_perl516_Software_Collection">
-    <title>Extending the perl516 &DSCL;</title>
-    <para>This section describes extending the perl516 &DSCL; by building your own dependent &DSCL;.</para>
-    <important>
-      <para>Examples described in this section only work as expected when extending the perl516 &DSCL; with packages that:</para>
-      <itemizedlist>
-        <listitem>
-          <para>do not provide any Perl modules, and</para>
-        </listitem>
-        <listitem>
-          <para>only depend on Perl modules provided by the perl516 &DSCL;.</para>
-        </listitem>
-      </itemizedlist>
-    </important>
-    <section id="sect-The_h2m144_Software_Collection">
-      <title>The h2m144 &DSCL;</title>
-      <para>This section contains a commented example of a dependent &DSCL;'s metapackage. The dependent &DSCL; is named h2m144 and contains the <package>help2man</package> Perl package version 1.44.1. The h2m144 &DSCL; depends on the perl516 &DSCL;.</para>
-      <para>Note the following in the h2m144 &DSCL; spec file:</para>
-      <itemizedlist>
-        <listitem>
-          <para>The h2m144 &DSCL; spec file has the following build dependency set:</para>
-          <programlisting language="RPM Spec">BuildRequires: %{scl_prefix_perl}scldevel</programlisting>
-          <para>This expands to <code>perl516-scldevel</code>.</para>
-          <para>The <package>perl516-scldevel</package> subpackage contains two important macros, <code>%scl_perl</code> and <code>%scl_prefix_perl</code>, and also provides Perl dependency generators. Note that the macros are defined at the top of the spec file. Although the definitions are not required, they provide a visual hint that the h2m144 &DSCL; has been designed to be built on top of the perl516 &DSCL;. They also serve as a fallback value.</para>
-        </listitem>
-        <listitem>
-          <para>The <package>h2m144-build</package> subpackage has the following dependency set:</para>
-          <programlisting language="RPM Spec">Requires: %{scl_prefix_perl}scldevel</programlisting>
-          <para>This expands to <package>perl516-scldevel</package>. The purpose of this dependency is to ensure that the macros and dependency generators are always present when building packages for the h2m144 &DSCL;.</para>
-        </listitem>
-        <listitem>
-          <para>The <filename>enable</filename> scriptlet for the h2m144 &DSCL; contains the following line:</para>
-          <programlisting language="RPM Spec">. scl_source enable %{scl_perl}</programlisting>
-          <para>Note the dot at the beginning of the line. This line makes the Perl &DSCL; start implicitly when the h2m144 &DSCL; is started so that the user can only type <command>scl enable h2m144 <replaceable>command</replaceable></command> instead of <command>scl enable perl516 h2m144 <replaceable>command</replaceable></command> to run <replaceable>command</replaceable> in the &DSCL; environment.</para>
-        </listitem>
-        <listitem>
-          <para>The macro file <filename>macros.h2m144-config</filename> calls the Perl dependency generators, and certain Perl-specific macros used in other packages' spec files.</para>
-        </listitem>
-      </itemizedlist>
-      <programlisting language="RPM Spec"><![CDATA[%global scl h2m144
-%scl_package %scl
-
-# Default values for the perl516 Software Collection. These
-# will be used when perl516-scldevel is not in the build root.
-%{!?scl_perl:%global scl_perl perl516}
-%{!?scl_prefix_perl516:%global scl_prefix_perl %{scl_perl}-}
-
-# Only for this build, override __perl_requires for the automatic dependency
-# generator.
-%global __perl_requires /usr/lib/rpm/perl.req.stack
-
-Summary: Package that installs %scl
-Name:    %scl_name
-Version: 1
-Release: 1%{?dist}
-License: GPLv2+
-BuildRequires: scl-utils-build
-# Always make sure that there is the perl516-scldevel
-# package in the build root.
-BuildRequires: %{scl_prefix_perl}scldevel
-# Require perl516-perl-macros; you will need macros from that package.
-BuildRequires: %{scl_prefix_perl}perl-macros
-Requires: %{scl_prefix}help2man
-
-%description
-This is the main package for %scl Software Collection.
-
-%package runtime
-Summary: Package that handles %scl Software Collection.
-Requires: scl-utils
-Requires: %{scl_prefix_perl}runtime
-
-%description runtime
-Package shipping essential scripts to work with %scl Software Collection.
-
-%package build
-Summary: Package shipping basic build configuration
-Requires: scl-utils-build
-# Require perl516-scldevel so that there is always access to the %%scl_perl
-# and %%scl_prefix_perl macros in builds for this Software Collection.
-Requires: %{scl_prefix_perl}scldevel
-
-%description build
-Package shipping essential configuration macros to build %scl Software Collection.
-
-%prep
-%setup -c -T
-
-%build
-
-%install
-%scl_install
-
-# Create the enable scriptlet that:
-# - Adds an additional load path for the Perl interpreter.
-# - Runs scl_source so that you can run:
-#     scl enable h2m144 'bash'
-#   instead of:
-#     scl enable perl516 h2m144 'bash'
-
-cat >> %{buildroot}%{_scl_scripts}/enable << EOF
-. scl_source enable %{scl_perl}
-export PATH=%{_bindir}\${PATH:+:\${PATH}}
-export MANPATH=%{_mandir}:\${MANPATH}
-EOF
-
-cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
-%%scl_package_override() %%{expand:%%global __perl_requires /usr/lib/rpm/perl.req.stack
-%%global __perl_provides /usr/lib/rpm/perl.prov.stack
-%%global __perl %{_scl_prefix}/%{scl_perl}/root/usr/bin/perl
-}
-EOF
-
-%files
-
-%files runtime
-%scl_files
-
-%files build
-%{_root_sysconfdir}/rpm/macros.%{scl}-config
-
-%changelog
-* Tue Apr 22 2014 John Doe <jdoe at example.com> - 1-1
-- Initial package.]]></programlisting>
-    </section>
-    <section id="sect-The_help2man_Package">
-    <title>The help2man Package</title>
-    <para>Below is a commented example of the <package>help2man</package> package spec file. Note the following in the spec file:</para>
-    <itemizedlist>
-      <listitem>
-        <para>The <code>BuildRequires</code> tags are prefixed with <code>%{?scl_prefix_perl}</code> instead of <code>%{scl_prefix}</code>.</para>
-      </listitem>
-    </itemizedlist>
-    <programlisting language="RPM Spec"><![CDATA[%{?scl:%scl_package help2man}
-%{!?scl:%global pkg_name %{name}}
-
-# Supported build option:
-#
-# --with nls ... build this package with --enable-nls 
-%bcond_with nls
-
-Name:           %{?scl_prefix}help2man
-Summary:        Create simple man pages from --help output
-Version:        1.44.1
-Release:        1%{?dist}
-Group:          Development/Tools
-License:        GPLv3+
-URL:            http://www.gnu.org/software/help2man
-Source:         ftp://ftp.gnu.org/gnu/help2man/help2man-%{version}.tar.xz
-%{!?with_nls:BuildArch: noarch}
-
-BuildRequires:  %{?scl_prefix_perl}perl(Getopt::Long)
-BuildRequires:  %{?scl_prefix_perl}perl(POSIX)
-BuildRequires:  %{?scl_prefix_perl}perl(Text::ParseWords)
-BuildRequires:  %{?scl_prefix_perl}perl(Text::Tabs)
-BuildRequires:  %{?scl_prefix_perl}perl(strict)
-%{?with_nls:BuildRequires: %{?scl_prefix_perl}perl(Locale::gettext) /usr/bin/msgfmt}
-%{?with_nls:BuildRequires: %{?scl_prefix_perl}perl(Encode)}
-%{?with_nls:BuildRequires: %{?scl_prefix_perl}perl(I18N::Langinfo)}
-Requires:   %{?scl_prefix_perl}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl_perl} '}eval "`perl -V:version`"; echo $version%{?scl:'}))
-
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description
-help2man is a script to create simple man pages from the --help and
---version output of programs.
-
-Since most GNU documentation is now in info format, this provides a
-way to generate a placeholder man page pointing to that resource while
-still providing some useful information.
-
-%prep
-%setup -q -n help2man-%{version}
-
-%build
-%configure --%{!?with_nls:disable}%{?with_nls:enable}-nls --libdir=%{_libdir}/help2man
-%{?scl:scl enable %{scl} "}
-make %{?_smp_mflags}
-%{?scl:"}
-
-%install
-%{?scl:scl enable %{scl} "}
-make install_l10n DESTDIR=$RPM_BUILD_ROOT
-%{?scl:"}
-%{?scl:scl enable %{scl} "}
-make install DESTDIR=$RPM_BUILD_ROOT
-%{?scl:"}
-%find_lang %pkg_name --with-man
-
-%post
-/sbin/install-info %{_infodir}/help2man.info %{_infodir}/dir 2>/dev/null || :
-
-%preun
-if [ $1 -eq 0 ]; then
-  /sbin/install-info --delete %{_infodir}/help2man.info \
-    %{_infodir}/dir 2>/dev/null || :
-fi
-
-%files -f %pkg_name.lang
-%doc README NEWS THANKS COPYING
-%{_bindir}/help2man
-%{_infodir}/*
-%{_mandir}/man1/*
-
-%if %{with nls}
-%{_libdir}/help2man
-%endif
-
-%changelog
-* Tue Apr 22 2014 John Doe <jdoe at example.com> - 1.44.1-1
-- Built for h2m144 SCL.]]></programlisting>
-    </section>
-    <section id="sect-Building_the_h2m144_Software_Collection">
-    <title>Building the h2m144 Software Collection</title>
-    <para>To build the h2m144 &DSCL;:</para>
-    <procedure>
-      <step>
-        <para>Install the <package>perl516-scldevel</package> and <package>perl516-perl-macros</package> packages that are part of Red Hat Software Collections.</para>
-      </step>
-      <step>
-        <para>Build <package>h2m144.spec</package> and install the <package>h2m144-runtime</package> and <package>h2m144-build</package> packages.</para>
-      </step>
-      <step>
-        <para>Install the <package>perl516-perl</package>, <package>perl516-perl-Text-ParseWords</package> and <package>perl516-perl-Getopt-Long</package> packages, which are all build requirements for <package>help2man</package>.</para>
-      </step>
-      <step>
-        <para>Build <filename>help2man.spec</filename>.</para>
-      </step>
-    </procedure>
-    </section>
-    <section id="sect-Testing_the_h2m144_Software_Collection">
-    <title>Testing the h2m144 Software Collection</title>
-    <para>To test the h2m144 &DSCL;:</para>
-    <procedure>
-      <step>
-        <para>Install the <package>h2m144-help2man</package> package.</para>
-      </step>
-      <step>
-        <para>Run the following command:</para>
-        <screen><computeroutput>$ </computeroutput><userinput>scl enable h2m144 'help2man bash'</userinput></screen>
-      </step>
-      <step>
-        <para>Verify that the output is similar to the following lines:</para>
-        <screen>.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.44.1.
-.TH BASH, "1" "April 2014" "bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)" "User Commands"
-.SH NAME
-bash, \- manual page for bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
-.SH SYNOPSIS
-.B bash
-[\fIGNU long option\fR] [\fIoption\fR] ...
-.SH DESCRIPTION
-GNU bash, version 4.1.2(1)\-release\-(x86_64\-redhat\-linux\-gnu)
-.IP
-bash [GNU long option] [option] script\-file ...
-.SS "GNU long options:"
-.HP
-\fB\-\-debug\fR</screen>
-      </step>
-    </procedure>
-    </section>
-  </section>
 </chapter>
diff --git a/en-US/Getting_More_Information.xml b/en-US/Getting_More_Information.xml
index 9ba9113..0926142 100644
--- a/en-US/Getting_More_Information.xml
+++ b/en-US/Getting_More_Information.xml
@@ -18,13 +18,19 @@
     </listitem>
   </itemizedlist>
   </section>
-  <section id="sect-Online_Documentation">
-     <title>Accessing Online Documentation</title>
+  <section id="sect-Online_Resources">
+     <title>Accessing Online Resources</title>
      <para>
-       The following is a brief list of documents that are directly or indirectly relevant to this book:
+       The following is a brief list of resources that are directly or indirectly relevant to this book:
      </para>
   <itemizedlist>
        <listitem>
+         <para><ulink url="https://www.softwarecollections.org/">SoftwareCollections.org</ulink> &ndash; The <citetitle pubwork="webpage">SoftwareCollections.org</citetitle> website is the home for projects creating &DSCL;s (SCLs) for Red Hat Enterprise Linux, Fedora, CentOS, and Scientific Linux. This is where you create and host SCLs, as well as connect with other developers working on &DSCL;s. SoftwareCollections.org is also the central repository for users to find third-party &DSCL;s for their systems.</para>
+       </listitem>
+       <listitem>
+         <para><ulink url="https://bitbucket.org/bkabrda/spec2scl/">spec2scl</ulink> &ndash; The <application>spec2scl</application> tool can help you convert conventional RPM spec files to SCL-style spec files. Install it on Fedora by running the <command>yum install spec2scl</command> command.</para>
+       </listitem>
+       <listitem>
          <para>
            <ulink url="http://docs.fedoraproject.org/en-US/Fedora/20/html/Installation_Guide/index.html">Fedora 20 Installation Guide</ulink> &ndash; The <citetitle pubwork="book">Installation Guide</citetitle> for Fedora 20 provides more details on getting, installing, and updating the system.
          </para>
diff --git a/en-US/Revision_History.xml b/en-US/Revision_History.xml
index d3c2ae4..022e39e 100644
--- a/en-US/Revision_History.xml
+++ b/en-US/Revision_History.xml
@@ -6,6 +6,20 @@
 	<simpara>
 		<revhistory>
 			<revision>
+				<revnumber>1-4</revnumber>
+				<date>Fri Jul 11 2014</date>
+				<author>
+					<firstname>Petr</firstname>
+					<surname>Kovář</surname>
+					<email>pkovar at redhat.com</email>
+				</author>
+				<revdescription>
+					<simplelist>
+						<member>1-4 release of the Software Collections Guide.</member>
+					</simplelist>
+				</revdescription>
+			</revision>
+			<revision>
 				<revnumber>1-3</revnumber>
 				<date>Sun Mar 23 2014</date>
 				<author>
diff --git a/en-US/Software_Collections_Guide.ent b/en-US/Software_Collections_Guide.ent
index 3a1afae..ad2a2db 100644
--- a/en-US/Software_Collections_Guide.ent
+++ b/en-US/Software_Collections_Guide.ent
@@ -12,5 +12,4 @@
 <!ENTITY DSC "SCL">
 <!ENTITY OPT "opt">
 <!ENTITY RH "provider">
-
 <!ENTITY BZURL "<ulink url='https://bugzilla.redhat.com/enter_bug.cgi?product=&PRODUCT;&amp;component=&BOOKID;'>http://bugzilla.redhat.com/</ulink>">


More information about the docs-commits mailing list