Project

Profile

Help

Issue #4008

python-debpkgr does not structure Repositories correcly (in some case)

Added by quba42 about 1 year ago. Updated 7 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version - Debian:
Platform Release:
2.19.0
Blocks Release:
Target Release - Debian:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

python-debpkgr (a dependency of Pulp Debian Support) does not structure Debian repositories quite right:

The Debian repository structure (https://wiki.debian.org/DebianRepository/Format) is built from the following schema:

<repo_base_url>/dists/<distribution>/<plain_component>/Packages
<repo_base_url>/dists/<distribution>/Release

Here, <distribution> may contain additional "/" (like "stretch/updates").
Even were components are listed in the Release file as "updates/main", only the "main" part is the "<plain_component>". (slightly simplified.)

However, the debpkgr data structure of the relevant object is built entirely from a <repo_base_url> and a Release file.
Therfore, debpkgr has no way of knowing what the <distribution> part of the paths should be.
It builds the following paths instead:

<repo_base_url>/dists/<Releasefile.codename>/<Releasefile.component>/Packages
<repo_base_url>/dists/<Releasefile.codename>/Release

For most official debian repos this happens to work since <Releasefile.codename>=<distributrion>.
However for debian security the <Releasefile.codename> is for example "stretch" and the <distribution> is "stretch/updates".
The reason we can still synchronize debian security is because <Releasefile.component> happens to be "update/stretch" while <plain_component> is "stetch". (Two wrongs do make a right...)

However the downstream repository in pulp will have a different structure than the upstream Debian repository, making it impossible to reuse this downstream repository as a new upstream repository. In other words, pulp to pulp synchronization is broken.


Related issues

Related to Debian Support - Issue #4138: Handling publish paths correctly CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision c3831093 View on GitHub
Added by quba42 9 months ago

Account for components with an extra path prefix

The components in the repo metadata object ('Release' file) may be
prefixed. This prefix must be stripped from certain comparisons.
See also: https://wiki.debian.org/DebianRepository/Format#Components

Fixes #4008
https://pulp.plan.io/issues/4008

History

#1 Updated by quba42 about 1 year ago

I now have a pull request to resolve this issue:
https://github.com/pulp/pulp_deb/pull/52

This pull request is in turn dependent on the following changes in python-debpkgr:
https://github.com/sassoftware/python-debpkgr/pull/13

#2 Updated by mdellweg about 1 year ago

  • Assignee set to quba42

#3 Updated by mdellweg about 1 year ago

  • Related to Issue #4138: Handling publish paths correctly added

#4 Updated by quba42 9 months ago

  • Status changed from NEW to MODIFIED

#5 Updated by ttereshc 8 months ago

  • Platform Release set to 2.19.0

#6 Updated by ttereshc 8 months ago

  • Sprint/Milestone set to 2.19.0

#7 Updated by ttereshc 8 months ago

  • Status changed from MODIFIED to ON_QA

#8 Updated by ttereshc 8 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF