Issue #3917
closedThe repo metadata (Release) generated by pulp_deb doesn't allow repo pinning
Description
- Problem statement
The general context of this issue is that we have a few Deb repos managed by pulp and we'd like to use apt pinning client-side (https://wiki.debian.org/AptPreferences) to control the priorities of the various repos.
The problem is that apt pinning works by distinguishing the repos based on the information present in each repo metadata file and the metadata produced by pulp_deb effectively uses the codename across the board for all the metadata fields, thus preventing apt pinning.
Here is an example of a Release file (the repo metadata file) produced by pulp_deb (this is version 1.7.1 but looking at the code, current master works the same):
# head -n 10 /var/lib/pulp/published/deb/master/deb_distributor/upstream_ubuntu-xenial-security_all/1529937308.62/dists/xenial/Release
Architectures: amd64
Components: restricted main universe
Codename: xenial
Suite: xenial
Description: Xenial
Origin: Xenial
Label: Xenial
Version: 1.0
SHA256:
da98163c0f347ad50af1e564365af689c57f4d7d7a99143cd9c28bc697907994 103571 restricted/binary-amd64/Packages
Here is a "proper" Release file from http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/dists/xenial/Release
Origin: LP-PPA-kubuntu-ppa-backports
Label: Kubuntu Backports
Suite: xenial
Version: 16.04
Codename: xenial
Date: Tue, 14 Aug 2018 12:28:35 UTC
Architectures: amd64 arm64 armhf i386 powerpc ppc64el s390x
Components: main
Description: Ubuntu Xenial 16.04
MD5Sum:
67bf01f32017e60f75b9dd66160104f5 334136 main/binary-amd64/Packages.gz
[...]
The main problem is that, in the Release file generated by pulp, the value for 'Label' and 'Origin' which are typically used to pin repositories, are both 'xenial'/'Xenial' (i.e. the codename) and not something meaningful which allows to distinguish repos.
- Suggested solution
Since it's not entirely clear where to get the 'Origin' information I suggest simply fixing the 'Label' by setting it to the repo id: this will enable us to do pinning. Additionally, the 'Description' field can also be fixed.
Updated by rvba over 6 years ago
The suggested fix is implemented here: https://github.com/pulp/pulp_deb/pull/49
Updated by mihai.ibanescu@gmail.com over 6 years ago
- Platform Release set to 2.17.1
Added by rvba over 6 years ago
Updated by rvba over 6 years ago
- Status changed from NEW to MODIFIED
Applied in changeset 92d79cf557cf47f5b2726fd26ad1a8eee6f27615.
Updated by ttereshc about 6 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Fix repo metadata information
Fix the 'Label' and the 'Description' in the repo metadata ('Release' file). This enables Apt Pinning because pinning uses this metadata to distinguish between repos.
Fixes #3917 https://pulp.plan.io/issues/3917