From Fedora Project Wiki
No edit summary
Line 1: Line 1:
== Addition to ReviewGuidelines ==
== Addition to ReviewGuidelines ==


SHOULD: Reviewer should examine an RPM package's list of dependencies and
MUST: Reviewer must examine an RPM package's list of dependencies and any unnecessary explicit Requires found must be removed.
(1) eliminate superfluous explicit ''Requires'' within the spec file and
SHOULD: Anything in the spec file which is not obvious should have a comment explaining it.
(2) ensure that any explicit ''Requires'' are explained with comments in the spec file.


== Addition to Packaging Guidelines ==
== Addition to Packaging Guidelines ==
=== Explicit Requires ===
Packages should not contain superfluous explicit ''Requires'' within the spec file,  
Packages should not contain superfluous explicit ''Requires'' within the spec file,  
except when absolutely necessary. Any explicit ''Requires'' should be explained with comments in the spec file.
except when absolutely necessary. Any explicit ''Requires'' should be explained with comments in the spec file.
Line 29: Line 30:
Packagers should revisit an explicit dependency as appropriate to avoid that  
Packagers should revisit an explicit dependency as appropriate to avoid that  
it becomes inaccurate and superfluous.
it becomes inaccurate and superfluous.
=== Non-Obvious Items in Spec Files ===
Anything in the spec file which is not obvious should have a comment explaining it.
Some examples of non-obvious items include (but are not limited to):
* Some explicit requires
* FHS violations
* Changes to optflags
* Not using <code>%configure</code> or make install
* Provides/Obsoletes
* Modified tarballs
* Licensing or legal related changes

Revision as of 17:45, 20 January 2009

Addition to ReviewGuidelines

MUST: Reviewer must examine an RPM package's list of dependencies and any unnecessary explicit Requires found must be removed. SHOULD: Anything in the spec file which is not obvious should have a comment explaining it.

Addition to Packaging Guidelines

Explicit Requires

Packages should not contain superfluous explicit Requires within the spec file, except when absolutely necessary. Any explicit Requires should be explained with comments in the spec file.

In particular, we rely on rpmbuild's automatically added dependencies on library SONAMEs. Modern package management tools are capable of resolving such dependencies to determine the required packages. Explicit dependencies on specific package names may aid the inexperienced user, who attempts at installing RPM packages manually. However, history has shown that such dependencies add confusion when library/files are moved from one package to another, when packages get renamed, when one out of multiple alternative packages would suffice, and when versioned explicit dependencies become out-of-date and inaccurate. Additionally, in some cases, old explicit dependencies on package names require unnecessary updates/rebuilds. For example, Fedora packages are only required to retain historical provides for two full release cycles.

Exemplary rationale for a versioned explicit dependency:

  # The automatic dependency on libfubar.so.1 is insufficient,
  # as we strictly need at least the release that fixes two segfaults.
  Requires: libfubar >= 0:1.2.3-7

Packagers should revisit an explicit dependency as appropriate to avoid that it becomes inaccurate and superfluous.

Non-Obvious Items in Spec Files

Anything in the spec file which is not obvious should have a comment explaining it.

Some examples of non-obvious items include (but are not limited to):

  • Some explicit requires
  • FHS violations
  • Changes to optflags
  • Not using %configure or make install
  • Provides/Obsoletes
  • Modified tarballs
  • Licensing or legal related changes