[software-collections-guide: 6/17] Update prefix docs per devel's feedback
by Petr Kovář
commit 4e573c2782f5bf7bcaf612f5778b20acc202c009
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Fri May 2 18:10:42 2014 +0200
Update prefix docs per devel's feedback
en-US/Packaging_Software_Collections.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/en-US/Packaging_Software_Collections.xml b/en-US/Packaging_Software_Collections.xml
index 7ead3c4..a06d5d3 100644
--- a/en-US/Packaging_Software_Collections.xml
+++ b/en-US/Packaging_Software_Collections.xml
@@ -107,7 +107,7 @@
<itemizedlist>
<listitem>
<para>
- the <replaceable>provider</replaceable> part, which defines the provider name, and
+ the <replaceable>provider</replaceable> part, which defines the provider's name, and
</para>
</listitem>
<listitem>
@@ -118,8 +118,9 @@
</itemizedlist>
<para>These two parts of the &DSCL; prefix are separated by an underscore (<literal>_</literal>), as in the following example:</para>
<programlisting>myorganization_ruby193</programlisting>
- <para>In this example, <replaceable>myorganization</replaceable> is the provider name, and <replaceable>ruby193</replaceable> is the name of the &DSCL;.
+ <para>In this example, <replaceable>myorganization</replaceable> is the provider's name, and <replaceable>ruby193</replaceable> is the name of the &DSCL;.
</para>
+ <para>While it is ultimately a vendor's or distributor's decision whether to specify the provider's name in the prefix or not, specifying it is highly recommended. A notable exception are &DSCL;s provided by Red Hat, they do not specify the provider's name in their prefixes.</para>
</section>
<section id="sect-Software_Collection_Package_Names">
<title>&DSCL; Package Names</title>
9 years, 9 months
[software-collections-guide: 5/17] Update wrapper docs per devel's feedback
by Petr Kovář
commit f86acd611acf358f15ecead5a20124135a6a9299
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Fri May 2 17:37:01 2014 +0200
Update wrapper docs per devel's feedback
en-US/Advanced_Topics.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/en-US/Advanced_Topics.xml b/en-US/Advanced_Topics.xml
index 1dc9e94..2081142 100644
--- a/en-US/Advanced_Topics.xml
+++ b/en-US/Advanced_Topics.xml
@@ -118,12 +118,12 @@
<title>Packaging Wrappers for &DSCL;s</title>
<para>
Using wrappers is an easy way to shorten commands that the user runs in the &DSCL; environment.</para>
- <para>The following is an example of a wrapper from the <package>ruby193</package> &DSCL; that is installed as <filename>/usr/bin/ruby193-ruby</filename> and allows the user to run <command>ruby193-ruby <replaceable>command</replaceable></command> instead of <command>scl enable ruby193 'ruby <replaceable>command</replaceable>'</command>:
+ <para>The following is an example of a wrapper from a Ruby-based &DSCL; named <package>rubyscl</package> that is installed as <filename>/usr/bin/rubyscl-ruby</filename> and allows the user to run <command>rubyscl-ruby <replaceable>command</replaceable></command> instead of <command>scl enable rubyscl 'ruby <replaceable>command</replaceable>'</command>:
</para>
<programlisting language="Bash">#!/bin/bash
COMMAND="ruby $@"
-scl enable ruby193 "$COMMAND"
+scl enable rubyscl "$COMMAND"
</programlisting>
<para>
It is important to package these wrappers as subpackages of the &DSCL; package that will use them. That way, you can make installation of these wrappers optional, allowing the user not to install them, for example, on systems with read-only access to the <filename>/usr/bin/</filename> directory where the wrappers would otherwise be installed.
9 years, 9 months
[software-collections-guide: 4/17] Fixes per pre-1.1 reviews
by Petr Kovář
commit 77e636a9c6ffcf484d0cb71ca91f91ed04444206
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Wed Apr 30 18:25:28 2014 +0200
Fixes per pre-1.1 reviews
en-US/Advanced_Topics.xml | 4 +-
en-US/Extending_Red_Hat_Software_Collections.xml | 80 ++++++++++++++++++----
en-US/Getting_More_Information.xml | 2 +-
en-US/Packaging_Software_Collections.xml | 2 +-
4 files changed, 70 insertions(+), 18 deletions(-)
---
diff --git a/en-US/Advanced_Topics.xml b/en-US/Advanced_Topics.xml
index fe27ab6..1dc9e94 100644
--- a/en-US/Advanced_Topics.xml
+++ b/en-US/Advanced_Topics.xml
@@ -41,7 +41,7 @@
<para>
If there are <code>Provides</code> or <code>Requires</code> that you need to adjust, for example, a <systemitem>pkg_config</systemitem> <code>Provides</code>, there are two ways to do it:
</para>
- <orderedlist>
+ <itemizedlist>
<listitem>
<para>
Add the following lines in the <filename>macros.%{scl}-config</filename> macro file so that it applies to all packages in the &DSCL;:
@@ -63,7 +63,7 @@
%{?scl:%filter_from_requires s|pkgconfig|%{?scl_prefix}pkgconfig|g}
%{?scl:%filter_setup}</programlisting>
</listitem>
- </orderedlist>
+ </itemizedlist>
<important>
<para>
When using filters, you need to pay attention to the automatic dependencies you change. For example, if the conventional package contains <code language="RPM Spec">Requires: pkgconfig(package_1)</code> and <code language="RPM Spec">Requires: pkgconfig(package_2)</code>, and only <package>package_2</package> is included in the &DSCL;, ensure that you do not filter the <code>Requires</code> tag for <package>package_1</package>.
diff --git a/en-US/Extending_Red_Hat_Software_Collections.xml b/en-US/Extending_Red_Hat_Software_Collections.xml
index bd88ecf..ec086c1 100644
--- a/en-US/Extending_Red_Hat_Software_Collections.xml
+++ b/en-US/Extending_Red_Hat_Software_Collections.xml
@@ -1,15 +1,69 @@
<?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 Beta</title>
+ <title>Extending Red Hat Software Collections 1.1</title>
<section id="sect-Extending_the_python27_and_python33_Software_Collections">
<title>Extending the python27 and python33 &DSCL;s</title>
<para>
- In Red Hat Software Collections 1.1 Beta, 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;.
+ 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 Beta, there are specifics that depend on the &DSCL; you are extending.
+ 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="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 dependent &DSCL;. This section describes creating an <package>scldevel</package> subpackage, for examples of extending &DSCL; shipped with the Red Hat Software Collections offering, see <xref linkend="chap-Extending_Red_Hat_Software_Collections" />.</para>
+ <procedure>
+ <step>
+ <para>Add the <package>scldevel</package> subpackage by defining its name, summary, and description:</para>
+ <programlisting language="RPM Spec">%package scldevel
+Summary: Package shipping development files for %scl
+# You might need to BR this virtual provide in package, which has soft dependency,
+# e.g. rubygem-uglifier uses rubygem-therubyracer, which in turn depends on v8 collection.
+# This provide might be versioned, not sure about the usecases or proc/cons though.
+Provides: scldevel(%{scl_name_base})
+
+%description scldevel
+Package shipping development files, especially useful for development of
+packages depending on %scl Software Collection.</programlisting>
+ </step>
+ <step>
+ <para>In the <code>%install</code> section of your &DSCL;'s metapackage, create the macros.%{scl_name_base}-scldevel file that is part of the <package>scldevel</package> subpackage and contains:</para>
+ <programlisting language="RPM Spec"><![CDATA[cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
+%%scl_%{scl_name_base} %{scl}
+%%scl_prefix_%{scl_name_base} %{scl_prefix}
+EOF]]></programlisting>
+ </step>
+ </procedure>
+ <para>Note that between all &DSCL;s that share the same <code>%{scl_name_base}</code> name, the provided <code>macros.%{scl_name_base}-scldevel</code> files must conflict. This is to disallow installing multiple versions of the %{scl_name_base} &DSCL;s. For example, in Red Hat Software Collections, the <package>ruby193-scldevel</package> package cannot be installed when there is the <package>ruby200-scldevel</package> package installed.</para>
+
+- Using the scldevel Subpackage in Dependent &DSCL;
+
+Everything bellow belongs into metapackage of dependent collection
+
+# This is optional. Can be replaced by %{?scl_prefix_ruby}. It is just hint, that the collection
+# was designed with ruby200 in mind. If buildroot has no special settings (i.e. there is
+# explicitely not available different -scldevel package), the BuildRequires pulls in
+# ruby200-scldevel.
+%{!?scl_ruby:%global scl_ruby ruby200}
+%{!?scl_prefix_ruby:%global scl_prefix_ruby %{scl_ruby}-}
+
+# Always BR -scldevel package. That way you ensure that -scldevel package is in buildroot and
+# the default values are actually not in use. When this package would be omitted, it might
+# result in broken requires, which could be discoverred just by build of subsequent packages.
+BuildRequires: %{scl_prefix_ruby}scldevel
+
+%package runtime
+Summary: Package that handles %scl Software Collection.
+Requires: scl-utils
+Requires: %{scl_prefix_ruby}runtime
+
+%package build
+Summary: Package shipping basic build configuration
+# This ensures availability of macros in every package of collection.
+Requires: %{scl_prefix_ruby}scldevel
+
+ </section>-->
<section id="The_vt191_Software_Collection">
<title>The vt191 &DSCL;</title>
<para>
@@ -57,7 +111,7 @@
</para>
<programlisting language="RPM Spec">. scl_source enable %{scl_python}</programlisting>
<para>
- This 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.
+ 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>
@@ -288,8 +342,8 @@ Smart replacement for plain tuple used in __version__
</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 Collection 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 ruby200 &DSCL;.</para>
+ <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>
@@ -318,7 +372,7 @@ Requires: %{scl_prefix_ruby}scldevel</programlisting>
<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>This 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>
+ <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> package 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>
@@ -326,8 +380,6 @@ Requires: %{scl_prefix_ruby}scldevel</programlisting>
<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>
- </listitem>
- <listitem>
<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>
@@ -435,7 +487,7 @@ EOF
</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 bcryp-ruby gem. For more information on bcryp-ruby, see the following website:</para>
+ <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>
@@ -539,12 +591,12 @@ popd
</step>
</procedure>
</section>
- <section id="sect-Testing_the_vt191_Software_Collection">
- <title>Testing the vt191 &DSCL;</title>
+ <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-bcryp-ruby</package> package.</para>
+ <para>Install the <package>ror40-rubygem-bcrypt-ruby</package> package.</para>
</step>
<step>
<para>Run the following command:</para>
@@ -590,7 +642,7 @@ popd
<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>This 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>
+ <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>
diff --git a/en-US/Getting_More_Information.xml b/en-US/Getting_More_Information.xml
index f666bbf..4568e40 100644
--- a/en-US/Getting_More_Information.xml
+++ b/en-US/Getting_More_Information.xml
@@ -46,7 +46,7 @@
</listitem>
<listitem>
<para>
- <ulink url="http://access.redhat.com/site/documentation/en-US/Red_Hat_Software_Collec...">Red Hat Software Collections 1.1 Beta Release Notes</ulink> – The <citetitle pubwork="book">Release Notes</citetitle> for Red Hat Software Collections 1.1 Beta document the major features and contains other information about Red Hat Software Collections, a Red Hat offering that provides a set of dynamic programming languages, database servers, and various related packages.
+ <ulink url="http://access.redhat.com/site/documentation/en-US/Red_Hat_Software_Collec...">Red Hat Software Collections 1.1 Release Notes</ulink> – The <citetitle pubwork="book">Release Notes</citetitle> for Red Hat Software Collections 1.1 document the major features and contains other information about Red Hat Software Collections, a Red Hat offering that provides a set of dynamic programming languages, database servers, and various related packages.
</para>
</listitem>
<listitem>
diff --git a/en-US/Packaging_Software_Collections.xml b/en-US/Packaging_Software_Collections.xml
index dc9f4e0..7ead3c4 100644
--- a/en-US/Packaging_Software_Collections.xml
+++ b/en-US/Packaging_Software_Collections.xml
@@ -723,7 +723,7 @@ EOF
</section>
<section id="sect-Converting_a_Conventional_Spec_File">
<title>Converting a Conventional Spec File</title>
- <para>The following steps show how to convert a conventional spec file into a &DSCL; spec file so that the &DSCL; spec file that you can use in both the conventional package and the &DSCL;.<!--To allow this option, a special macro usage needs to be followed while writing or converting a package for Software Collection.
+ <para>The following steps show how to convert a conventional spec file into a &DSCL; spec file so that the &DSCL; spec file can be used in both the conventional package and the &DSCL;.<!--To allow this option, a special macro usage needs to be followed while writing or converting a package for Software Collection.
Software Collection macros simply relocate package to non-conflicting namespaced path by redefining essential build macros such as %_bindir, %_sysconfdir, etc. and adding Software Collection specific virtual provides. With this concept the Software Collection specific actions in spec file need to be put into the %{?scl: <something> } constructs. --></para>
<procedure>
<title>Converting a conventional spec file into a &DSCL; spec file</title>
9 years, 9 months
[software-collections-guide: 3/17] Update revhistory
by Petr Kovář
commit e37efac8d3026337f2455c6b3ecf308ef76483f2
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Tue Apr 29 17:24:17 2014 +0200
Update revhistory
en-US/Revision_History.xml | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/en-US/Revision_History.xml b/en-US/Revision_History.xml
index eb63400..35ed598 100644
--- a/en-US/Revision_History.xml
+++ b/en-US/Revision_History.xml
@@ -6,7 +6,21 @@
<simpara>
<revhistory>
<revision>
- <revnumber>2.1-19</revnumber>
+ <revnumber>2.1-23</revnumber>
+ <date>Wed May 07 2014</date>
+ <author>
+ <firstname>Petr</firstname>
+ <surname>Kovář</surname>
+ <email>pkovar(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Red Hat Software Collections 1.1 release of the Software Collections Guide.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>2.1-21</revnumber>
<date>Thu Mar 20 2014</date>
<author>
<firstname>Petr</firstname>
9 years, 9 months
[software-collections-guide: 2/17] Add Extending the perl516 SCL
by Petr Kovář
commit 5200564d24f55e7c5efadc22b5fe58ec53de8506
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Tue Apr 29 17:15:30 2014 +0200
Add Extending the perl516 SCL
en-US/Extending_Red_Hat_Software_Collections.xml | 270 +++++++++++++++++++++-
1 files changed, 268 insertions(+), 2 deletions(-)
---
diff --git a/en-US/Extending_Red_Hat_Software_Collections.xml b/en-US/Extending_Red_Hat_Software_Collections.xml
index 6048fc1..bd88ecf 100644
--- a/en-US/Extending_Red_Hat_Software_Collections.xml
+++ b/en-US/Extending_Red_Hat_Software_Collections.xml
@@ -275,7 +275,9 @@ Smart replacement for plain tuple used in __version__
Run the following command:
</para>
<screen><computeroutput>$ </computeroutput><userinput>scl enable vt191 "python -c 'import versiontools; print(versiontools.__file__)'"</userinput></screen>
- <para>The output should contain the following line:</para>
+ </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.
@@ -547,10 +549,274 @@ popd
<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>
- <para>The output should contain the following line:</para>
+ </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> package 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>This 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(a)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(a)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>
9 years, 9 months
[software-collections-guide: 1/17] Add Extending the ruby193 and ruby200 SCLs
by Petr Kovář
commit 20c7248d0f42937bb20adc3e8f831c4f13758400
Author: Petr Kovar <pkovar(a)redhat.com>
Date: Mon Apr 28 21:53:21 2014 +0200
Add Extending the ruby193 and ruby200 SCLs
en-US/Extending_Red_Hat_Software_Collections.xml | 271 +++++++++++++++++++++-
1 files changed, 270 insertions(+), 1 deletions(-)
---
diff --git a/en-US/Extending_Red_Hat_Software_Collections.xml b/en-US/Extending_Red_Hat_Software_Collections.xml
index c02ba0e..6048fc1 100644
--- a/en-US/Extending_Red_Hat_Software_Collections.xml
+++ b/en-US/Extending_Red_Hat_Software_Collections.xml
@@ -28,7 +28,7 @@
This expands to, for example, <package>python27-scldevel</package>.
</para>
<para>
- The <package>python27-scldevel</package> package 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. The definitions are not required, they only provide a hint that the vt191 &DSCL; has been designed to be built on top of the python27 &DSCL;. They also serve as a fallback value.
+ The <package>python27-scldevel</package> package 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>
@@ -284,4 +284,273 @@ Smart replacement for plain tuple used in __version__
</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 Collection 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 ruby200 &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> package contains two important macros, <code>%scl_ruby</code> and <code>%scl_prefix_ruby</code>. The <package>ruby200-scldevel</package> package 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> package.</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>This 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> package 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>
+ </listitem>
+ <listitem>
+ <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(a)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 bcryp-ruby gem. For more information on bcryp-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(a)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> package 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_vt191_Software_Collection">
+ <title>Testing the vt191 &DSCL;</title>
+ <para>To test the ror40 &DSCL;:</para>
+ <procedure>
+ <step>
+ <para>Install the <package>ror40-rubygem-bcryp-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>
+ <para>The output should contain the following line:</para>
+ <screen>$2a$10$s./ReniLY.wXPHVBQ9npoeyZf5KzywfpvI5lhjG6Ams3u0hKqwVbW</screen>
+ </step>
+ </procedure>
+ </section>
+ </section>
</chapter>
9 years, 9 months
[software-collections-guide] (17 commits) ...Update for Fedora
by Petr Kovář
Summary of changes:
20c7248... Add Extending the ruby193 and ruby200 SCLs
5200564... Add Extending the perl516 SCL
e37efac... Update revhistory
77e636a... Fixes per pre-1.1 reviews
f86acd6... Update wrapper docs per devel's feedback
4e573c2... Update prefix docs per devel's feedback
a33d4f1... Fix 1075632
63b3dfb... Fix 1075625
40e4664... Update scldevel docs
d2ff1a8... Edit scldevel docs
e03a6cc... Update per vondruch's review
891097e... Add Troubleshooting_Software_Collections
75d0b67... Edit scldevel & metapackage example
318d56a... Minor fixes
2338926... Update revhistory
9d170c3... Merge branch 'master' into comm
48b612a... Update for Fedora
9 years, 9 months