Skip to content

Commit

Permalink
art-obs-beginners-guide,obs_basic_workflow: Reduce duplication
Browse files Browse the repository at this point in the history
Fixes: #392

Signed-off-by: Nathan Cutler <[email protected]>
  • Loading branch information
smithfarm committed Jan 22, 2025
1 parent 6da7b81 commit f520c2f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 52 deletions.
30 changes: 16 additions & 14 deletions xml/art-obs-beginners-guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,25 @@ https://www.suse.com/communities/blog/suse-studio-integration/
</listitem>
<listitem>
<formalpara>
<title>Requirements</title>
<title>Dependencies</title>
<para>
Packages depend on other packages to function properly.
There are two types of requirements:
<emphasis>build requirements</emphasis> and
<emphasis>installation requirements</emphasis>.
Packages depend on other packages to function properly. These
relationships are referred to as "dependencies".
There are two types of dependencies:
<emphasis>build dependencies</emphasis> and
<emphasis>runtime dependencies</emphasis>.
Build dependencies are packages that must be present at build time
in order to successfully build your source package. The act of building
your source package will create one or more binary packages. Each binary
package can specify some number of runtime dependencies (packages that
your software needs to be present at runtime), and the package
manager will try to install these together with your package.
Both types of dependencies - build and runtime - are specified in the
build recipe. Exactly how this is done is described in the documentation
of the build system (RPM, Debian, etc.) in question and is beyond the
scope of this &obs; documentation.
</para>
</formalpara>
<para>
Build requirements are dependencies which are needed during the
build process in &obsa;. For example, a C++ program needs
a C++ compiler.
</para>
<para>
Installation requirements are dependencies which are needed when installing
the final package.
</para>
</listitem>
<listitem>
<formalpara>
Expand Down
45 changes: 7 additions & 38 deletions xml/obs_basic_workflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -513,30 +513,18 @@ Fri Aug 23 08:42:42 UTC 2017 - &exampleuser_mail;</screen>
</sect1>

<sect1 xml:id="sec-obs-basicworkflow-add-dependencies">
<title>Adding Dependencies to Your Project</title>
<title>Dependency Handling in Your Projects</title>
<para>
Software usually depends on other software: To run an application, you
may, for example, need additional libraries. Such dependencies are called
<emphasis>installation requirements</emphasis>.
</para>
<remark>
Firstterm for installation req/build req? - sknorr, 2017-08-24
</remark>
<para>
Additionally, there are also dependencies that are only necessary for
building a package but not when the software it contains is run. Such
dependencies are called <emphasis>build requirements</emphasis>.
As described in more detail in <xref linkend="art-obs-bg"/>, both types
of package dependencies (build and runtime) are specified in the build
recipe, and exactly how this is done is beyond the scope of this &obs;
documentation.
</para>
<para>
The &obs; provides the following methods to handle both dependencies in
your projects:
The &obs; provides the following methods to handle both types of
dependencies (build and runtime) in your projects:
</para>
<itemizedlist>
<listitem>
<para>
<xref linkend="sec-obs-basicworkflow-deps"/>
</para>
</listitem>
<listitem>
<para>
<xref linkend="sec-obs-basicworkflow-layering"/>
Expand All @@ -551,25 +539,6 @@ Fri Aug 23 08:42:42 UTC 2017 - &exampleuser_mail;</screen>
</listitem>
</itemizedlist>

<sect2 xml:id="sec-obs-basicworkflow-deps">
<title>Adding Dependencies to Your Build Recipes</title>
<remark>toms 2017-08-24: Should probably go into the concept part?</remark>
<remark>toms 2017-08-24: should we explain hard and soft requirements?</remark>
<para>
In a spec file, dependencies are expressed with the keywords <literal>Requires</literal>
(installation requirements) and <literal>BuildRequires</literal> (installation
requirements). Both belong to the header of the spec file<!-- (see <xref
linkend=""/>)-->.
</para>
<example xml:id="ex-obs-basicworkflow-excerpt">
<title>Excerpt of Build and Installation Requirements</title>
<screen>Name: foo-example
Version: 1.0.0
BuildRequires: bar
Requires: zool >= 1.5.6</screen>
</example>
<remark>toms 2017-08-24: Version compare with zypper vcmp?</remark>
</sect2>
<sect2 xml:id="sec-obs-basicworkflow-layering">
<title>Associating Other Repositories with Your Repository</title>
<para>
Expand Down

0 comments on commit f520c2f

Please sign in to comment.