Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

art-obs-beginners-guide,obs_basic_workflow: Reduce duplication #394

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions xml/art-obs-beginners-guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,27 @@ 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. You need to look up documentation
of the individual package managers like <link xlink:href="https://rpm.org/"/>
or <link xlink:href="https://www.debian.org/doc/devel-manuals#packaging-tutorial"/>
</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
Loading