From Fedora Project Wiki

< Changes

Revision as of 12:43, 30 August 2019 by Bcotton (talk | contribs) (Change withdrawn by the owner: https://pagure.io/fesco/issue/2218#comment-593939)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Automatic strict inter-package dependencies

Summary

Implement feature in RPM which will enforce strict dependencies between subpackages automatically (right now packagers have to do it themselves).

Owner

  • Name: Igor Gnatenko
  • Email: ignatenkobrain@fedoraproject.org
  • Release notes owner:

Current status

Detailed Description

If there's no requires that matches with a provides in another subpackage that's built from the spec, rpm would not do anything, and it'll be exactly as it is now. This is merely about optimizing requires across subpackages from the same source package.

Abstract example

For example, foo, foo-libs, libfoobaz, and foo-devel exist, built from foo.spec.

foo-devel requires libfoobaz.so.1 (provided by libfoobaz) and libfoo.so.0 (provided by foo-libs).

Currently, rpm generates the libfoobaz.so.1()(64bit) and libfoo.so.0()(64bit) dependencies and leaves the rest to you. This will change the behavior so that when it identifies that a subpackage produced from the spec contains that dependency, it'll be replaced with a strictly versioned dep on the subpackage. So instead of libfoo.so.0()(64bit), it'll be foo-libs%{?_isa} = %{version}-%{release}. And the libfoobaz.so.1()(64bit) dependency would be replaced with libfoobaz%{?_isa} = %{version}-%{release}.

Concrete example (graphene)

Spec file contains:

%package devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%package tests
Requires: %{name}%{?_isa} = %{version}-%{release}

What we see when we build RPMs is:

  • graphene-devel requires graphene(x86-64) = 1.8.2-3.fc30 AND libgraphene-1.0.so.0()(64bit) AND pkgconfig(graphene-1.0)
  • graphene-tests requires graphene(x86-64) = 1.8.2-3.fc30 AND libgraphene-1.0.so.0()(64bit)

What can we do?

  • Requires: libgraphene-1.0.so.0()(64bit) is actually provided by graphene (coming from same package), so it can be dropped in favor of Requires: graphene(x86-64) = 1.8.2-3.fc30
  • Requires: pkgconfig(graphene-1.0) is provided by graphene-devel (coming from the same subpackage), so it can be dropped entirely

Benefit to Fedora

Package dependencies (between subpackages) will be more strict, more automated (this section from guidelines can be dropped entirely). Metadata size will decrease as well.

Scope

  • Proposal owners: Implement required feature in RPM, backport it to Fedora.
  • Other developers: Drop unneeded dependencies to keep spec file simpler.
  • Release engineering: #8128
  • Policies and guidelines: Drop yet another Packaging Guidelines section because it will be automated.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

Everything will keep working.

How To Test

TBD.

User Experience

User's won't see packaging errors (wrt. inter-package dependencies) anymore.

Dependencies

RPM changes are needed. Will be handled by Proposal Owners.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Proposal Owners will try to fix problems ASAP or move Change to the next release (and revert changes).
  • Contingency deadline: Beta Freeze.
  • Blocks release? No.
  • Blocks product? No.

Documentation

TBD.

Release Notes