From Fedora Project Wiki
(Reset to existing Libraries and Applications guidelines)
(Update guidelines)
Line 20: Line 20:


Many packages, regardless of their primary purpose, include both
Many packages, regardless of their primary purpose, include both
applications and libraries. The following options are available to the packager:
applications and libraries. In this case, the applications SHOULD
be packaged in subpackages in order to allow other applications to depend
on only the library and not the associated application(s). Installing an
application that depends on a library or service should not automatically
pull in other applications associated with that library or service.


# Split out into one or more subpackages the executables or libraries, following the relevant guidelines.
=== Application Independence ===
# Simply package as an application or a library and just include the libraries or executables in that package.
# Do #2 but also add a Provides: for the name of an application or library according to the regular packaging guidelines.


If the executables have any dependencies which the libraries
Applications SHOULD be installable independently whenever this is technically feasible.
do not, then #1 MUST be followed. Note that RPM itself may automatically
Packages that contain a visible .desktop file (a .desktop file that does not contain the line
add the necessary Provides: and these MUST NOT be duplicated in case #3.
<code>NoDisplay=true</code>) SHOULD NOT have a Requires, Recommends, or Supplements
on any other package containing a visible desktop file, directly or indirectly, unless the
dependency is required for technical reasons or truly makes sense to have.
For example, it would be reasonable for a video game level editor to
require the associated video game in order to function, or for an application's plugin to
require the associated application. But it would not be reasonable for an application that happens
to use a database library to depend on a database management application associated
with that library, or for an application that happens to use a particular programming language
to depend on management tools associated with that programming language.
 
If a source package provides multiple desktop applications, those
applications SHOULD be packaged in separate subpackages when feasible.

Revision as of 01:34, 3 May 2018

Libraries and Applications

Many language- or domain-specific guidelines refer to "libraries", "modules", "plug-ins" or other terms specific to the language or domain. This is specifically important to package naming. Some applications may include libraries, and some libraries may include applications, so the distinction is not always clear.

Library or Application?

  • If the primary purpose of a package is to provide executables to be run by users, it SHOULD be packaged as an application. If it also includes libraries which may be imported or linked to by other code, see #Mixed Use Packages below.
  • If the primary purpose of a package is to provide libraries intended to be imported or loaded into other code, it is considered a library and MUST be packaged as such. If it contains utility programs that can be run by users as well, see #Mixed Use Packages below.

It is left to the packager to determine the primary purpose of a package. Often times upstream will already have done this with their choice of naming and that choice SHOULD be followed by the Fedora packager.

Mixed Use Packages

Many packages, regardless of their primary purpose, include both applications and libraries. In this case, the applications SHOULD be packaged in subpackages in order to allow other applications to depend on only the library and not the associated application(s). Installing an application that depends on a library or service should not automatically pull in other applications associated with that library or service.

Application Independence

Applications SHOULD be installable independently whenever this is technically feasible. Packages that contain a visible .desktop file (a .desktop file that does not contain the line NoDisplay=true) SHOULD NOT have a Requires, Recommends, or Supplements on any other package containing a visible desktop file, directly or indirectly, unless the dependency is required for technical reasons or truly makes sense to have. For example, it would be reasonable for a video game level editor to require the associated video game in order to function, or for an application's plugin to require the associated application. But it would not be reasonable for an application that happens to use a database library to depend on a database management application associated with that library, or for an application that happens to use a particular programming language to depend on management tools associated with that programming language.

If a source package provides multiple desktop applications, those applications SHOULD be packaged in separate subpackages when feasible.