Project

Profile

Help

Issue #4962

Modules are incorrectly copied when their artifacts shadow the names of non-modular RPM dependencies

Added by dalley 7 days ago. Updated 3 days ago.

Status:
POST
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Severity:
3. High
Version:
Platform Release:
2.20.0
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
Yes
Sprint:
Sprint 54

Description

When Pulp tries to copy a module like openmpi or mariadb from the Fedora modular repository (https://dl.fedoraproject.org/pub/fedora/linux/updates/30/Modular/x86_64/), using either the recursive or recursive-conservative depsolving strategies, it will additionally (and incorrectly) copy modules like perl, perl-bootstrap, and setools.

This happens because one of the artifacts in these modules (modules: openmpi and mariadb) depends on the perl package, which is meant to be provided by the normal Fedora repositories. However in this case there also exists a "perl" module, and libsolv tries to use artifacts from the "perl" module to satisfy the dependency. This should not happen because the openmpi and mariadb modules do not not declare a modular dependency in the "dependencies" section of their modulemd documents.

Dependency solving uses a libsolv "pool" that contains the entire contents of the source repository, and in conservative mode, also the entire contents of the target repository. We need to change the behavior of the depsolver such that such that all non-modular RPMs in the pool are "considered" during depsolving, but only the modular RPMs that are part of the module being copied or an explicitly listed modular dependency are "considered", and all others are excluded from depsolving.

I'm unsure if a mechanism to do hide certain units from the depsolver is exposed to us, see: https://github.com/openSUSE/libsolv/issues/258.

If not, it may be necessary to hack around the problem by being more selective about what module / modular artifact solvables we load into the pool to begin with.

---
document: modulemd
version: 2
data:
  name: openmpi
  stream: 4.0
  version: 3020190331170644
  context: a5b0195c
  arch: x86_64
  summary: Open Message Passing Interface
  description: >-
    Open MPI is an open source, freely available implementation of both the MPI-1
    and MPI-2 standards, combining technologies and resources from several other projects
    (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library
    available.  A completely new MPI-2 compliant implementation, Open MPI offers advantages
    for system and software vendors, application developers, and computer science
    researchers. For more information, see http://www.open-mpi.org/ .
  license:
    module:
    - MIT
    content:
    - BSD and MIT and Romio
  dependencies:
  - buildrequires:
      platform: [f30]
    requires:
      platform: [f30]
  references:
    community: https://www.open-mpi.org/
    documentation: https://www.open-mpi.org/doc/v4.0/
    tracker: https://github.com/open-mpi/ompi/issues
  profiles:
    buildroot:
      rpms:
      - openmpi-devel
    default:
      rpms:
      - openmpi
  api:
    rpms:
    - openmpi
  components:
    rpms:
      openmpi:
        rationale: The core package
        ref: 4.0
        buildorder: 10
        arches: [aarch64, armv7hl, i686, ppc64le, s390x, x86_64]
  artifacts:
    rpms:
    - openmpi-0:4.0.1-1.module_f30+3806+d6645847.src
    - openmpi-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-debuginfo-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-debugsource-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-devel-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-devel-debuginfo-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-java-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - openmpi-java-devel-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - python2-openmpi-0:4.0.1-1.module_f30+3806+d6645847.x86_64
    - python3-openmpi-0:4.0.1-1.module_f30+3806+d6645847.x86_64
...

See: no "dependencies" listed beyond the standard "platform"

The openmpi-devel package is the one that has a requires on /usr/bin/perl


Related issues

Related to RPM Support - Issue #4693: Module Streams not copying correctly with recursive and recursive_conservative ASSIGNED Actions
Copied to RPM Support - Test #4995: Modules are incorrectly copied when their artifacts shadow the names of non-modular RPM dependencies NEW Actions

Associated revisions

Revision b550dba0 View on GitHub
Added by dalley 3 days ago

Refactor depsolving part 2 (necessary for bugfix)

The scope of UnitSolvableMapping needs to be reduced for reasons
discussed on the PR. It makes sense to keep this separate from the
bugfix to reduce noise.

re: #4962
https://pulp.plan.io/issues/4962

History

#1 Updated by dalley 7 days ago

  • Related to Issue #4693: Module Streams not copying correctly with recursive and recursive_conservative added

#2 Updated by dalley 7 days ago

  • Description updated (diff)

#3 Updated by bherring 7 days ago

  • QA Contact set to bherring
  • Verification Required changed from No to Yes

#4 Updated by dalley 7 days ago

  • Description updated (diff)

#5 Updated by dalley 7 days ago

  • Description updated (diff)

#7 Updated by dalley 3 days ago

  • Status changed from ASSIGNED to POST

PR: https://github.com/pulp/pulp_rpm/pull/1377

Still a work-in-progress

#8 Updated by bherring 1 day ago

  • Copied to Test #4995: Modules are incorrectly copied when their artifacts shadow the names of non-modular RPM dependencies added

Please register to edit this issue

Also available in: Atom PDF