Issue #3339
closedMissing docs on how to import RPM package which has rich dependencies in Requires
Description
Rich dependencies are also called boolean dependencies.
Docs to get familiar with the syntax: http://rpm.org/user_doc/boolean_dependencies.html
At the moment Pulp supports only strong dependencies (aka Requires), weak dependencies are not supported yet.
For testing purposes create at least one rpm with rich dependencies and a repo. Consider contributing to the pulp-fixtures to create a repo.
Example of creating a simple RPM: https://www.redhat.com/archives/rpm-list/2006-April/msg00015.html
Make sure sync, upload, publish of such package works, information about rich dependencies is listed correctly as other simple dependencies, depsolving for simple dependencies works as before and rich dependencies are just ignored in that case (depsolving for rich dependencies will be implemented later in a separate RFE).
Use rpm
module to read all the dependencies. There is no need to parse them or process somehow for this RFE.
Files
Updated by milan almost 7 years ago
- Sprint/Milestone set to 54
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by ttereshc almost 7 years ago
Please, implement/merge it during sprint 33 so it will go into 2.16.0 release (aka by mid-March)
Updated by milan almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to milan
Updated by milan over 6 years ago
Findings¶
My set up was as follows:
- Fedora26 hosting a development deployment of Pulp 2.15.1 & Pulp_rpm 2.15, installed as development environment
- Fedora28 consumer node, SSL validation switched off
- an RPM repository containing custom rpms with rich dependencies
Those rpms can be built based on a pulp-fixtures PR with e.g rpmbuild -bb <spec_file>
and later turned into a repository using e.g createrepo_c <directory_with_rpms>
Content upload¶
Uploading the custom repository content to an RPM repository works as expected.
The repository id used for this purpose was rich-deps
Content sync&publish¶
I created a repo rich-deps-synced
that I was able to feed from the successfully published rich-deps
repo
Content copy¶
Content copy works as expected, rich dependencies are currently ignored when processing the Requires
rpm field during a recursive content copy.
There was a custom PanAmerican
rpm in the rich-deps
repo, that had both rich and classic dependencies specified in the Requires
attribute.
This rpm required directly (bourbon = 5.10 and tablespoon-sugar = 1.0), lemon-juice = 5.10-0, soda
and transitively the lemon
rpm.
I created the rich-deps-copy-pan-american
and copied the rich-deps
repo PanAmerican
rpm into rich-deps-copy-pan-american
repo, using following command line:
[vagrant@pulp2 rich-deps]$ pulp-admin rpm repo copy rpm --from-repo-id rich-deps --to-repo-id rich-deps-copy-pan-american --str-eq='name=PanAmerican' --recursive
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Copied:
PanAmerican-1-0-noarch
soda-0-1-noarch
[vagrant@pulp2 rich-deps]$
Having investigated why the lemon-juice
wasn't copied, I found out I made a naming mistake in the Requires
field of PanAmerican
that should have read ..., lemon-juice5 = 5.10, soda
instead. The soda
dependency having been copied OK I thought that was a proof of the copy feature working OK so I didn't fix the PanAmerican
rpm.
Content details¶
The custom RPM details were shown OK including both the rich and simple dependencies in the Requires
field e.g:
[vagrant@pulp2 rich-deps]$ pulp-admin rpm repo content rpm --repo-id rich-deps-copy-pan-american
Arch: noarch
Buildhost: pulp3.dev
Checksum: 348696c0cee098a5382d152ff684fead8cfd8627fd92aed1848efadc191b5a9b
Checksumtype: sha256
Description: Soda... Sort of a sparkling water.
Epoch: 0
Filename: soda-0-1.noarch.rpm
License: No Age Limitation
Name: soda
Provides: fizzy, soda, soda = 0-1-0
Release: 1
Requires:
Version: 0
Arch: noarch
Buildhost: pulp3.dev
Checksum: bc9c2ef85cfd7cf937e7745c9975fecb763bf525f8119027ee125166fc2c1c92
Checksumtype: sha256
Description: The amount of soda water controls how dry this cocktail will be.
Put in a big tumbler glass with some ice: - 5/10 Lemon juice -
5/10 cl. Bourbon - 1 tsp. sugar stir well and top off with Soda
Water.
Epoch: 0
Filename: PanAmerican-1-0.noarch.rpm
License: 21+
Name: PanAmerican
Provides: PanAmerican = 1-0-0, bourbon, citrussy, fizzy, fruity, lemon,
long-drink
Release: 0
Requires: (bourbon = 5.10 and tablespoon-sugar = 1.0), lemon-juice = 5.10-0,
soda
Version: 1
[vagrant@pulp2 rich-deps]$
As can be seen further in the attached log, Pulp didn't track any other field than Requires
. Moreover, the Requires
field rich dependency items were kept as a single (non-processed) blob of text (bourbon = 5.10 and tablespoon-sugar = 1.0)
, as expected:
[vagrant@pulp2 rich-deps]$ pulp-admin -vv rpm repo content rpm --repo-id rich-deps --str-eq='name=PanAmerican'
# ------%<------------------
"requires": [
{
"release": null,
"epoch": null,
"version": null,
"flags": null,
"name": "(bourbon = 5.10 and tablespoon-sugar = 1.0)"
},
{
"release": null,
"epoch": "0",
"version": "5.10",
"flags": "EQ",
"name": "lemon-juice"
},
{
"release": null,
"epoch": null,
"version": null,
"flags": null,
"name": "soda"
}
],
# -------%<-----------------------------
Consumer¶
A consumer was able to fetch and install custom RPMs from the rich-deps-synced
repository:
sh-4.3# dnf --best install long-drink scotch fruity
Last metadata expiration check: 0:02:32 ago on Mon Mar 5 21:32:37 2018.
Dependencies resolved.
==================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================
Installing:
Cobbler noarch 1-0 rich_deps_synced 6.2 k
fruity noarch 0-1 rich_deps_synced 5.8 k
scotch x86_64 6.0.5-1.fc28 rawhide 356 k
Installing dependencies:
Contireau2 noarch 2-10 rich_deps_synced 5.8 k
icecubes noarch 2-3 rich_deps_synced 5.6 k
lzma-libs x86_64 4.32.7-19.fc27 rawhide 39 k
tablespoon-sugar noarch 1-0 rich_deps_synced 5.7 k
Installing weak dependencies:
orange-bits noarch 2-3 rich_deps_synced 5.8 k
Transaction Summary
==================================================================================================================================================================================
Install 8 Packages
Total download size: 429 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): fruity-0-1.noarch.rpm 163 kB/s | 5.8 kB 00:00
(2/8): Cobbler-1-0.noarch.rpm 107 kB/s | 6.2 kB 00:00
(3/8): icecubes-2-3.noarch.rpm 164 kB/s | 5.6 kB 00:00
(4/8): tablespoon-sugar-1-0.noarch.rpm 387 kB/s | 5.7 kB 00:00
(5/8): Contireau2-2-10.noarch.rpm 401 kB/s | 5.8 kB 00:00
(6/8): lzma-libs-4.32.7-19.fc27.x86_64.rpm 367 kB/s | 39 kB 00:00
(7/8): orange-bits-2-3.noarch.rpm 326 kB/s | 5.8 kB 00:00
(8/8): scotch-6.0.5-1.fc28.x86_64.rpm 1.3 MB/s | 356 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 772 kB/s | 429 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : Contireau2-2-10.noarch 1/8
Installing : tablespoon-sugar-1-0.noarch 2/8
Installing : icecubes-2-3.noarch 3/8
Installing : lzma-libs-4.32.7-19.fc27.x86_64 4/8
Running scriptlet: lzma-libs-4.32.7-19.fc27.x86_64 4/8
Installing : scotch-6.0.5-1.fc28.x86_64 5/8
Running scriptlet: scotch-6.0.5-1.fc28.x86_64 5/8
Installing : Cobbler-1-0.noarch 6/8
Installing : orange-bits-2-3.noarch 7/8
Installing : fruity-0-1.noarch 8/8
Running scriptlet: fruity-0-1.noarch 8/8
Verifying : fruity-0-1.noarch 1/8
Verifying : scotch-6.0.5-1.fc28.x86_64 2/8
Verifying : Cobbler-1-0.noarch 3/8
Verifying : lzma-libs-4.32.7-19.fc27.x86_64 4/8
Verifying : icecubes-2-3.noarch 5/8
Verifying : tablespoon-sugar-1-0.noarch 6/8
Verifying : Contireau2-2-10.noarch 7/8
Verifying : orange-bits-2-3.noarch 8/8
Installed:
Cobbler.noarch 1-0 fruity.noarch 0-1 scotch.x86_64 6.0.5-1.fc28 orange-bits.noarch 2-3 Contireau2.noarch 2-10 icecubes.noarch 2-3 lzma-libs.x86_64 4.32.7-19.fc27
tablespoon-sugar.noarch 1-0
Complete!
sh-4.3# rpm -q Cobbler
Cobbler-1-0.noarch
sh-4.3#
Updated by milan over 6 years ago
Just created PR: https://github.com/pulp/pulp_rpm/pull/1092
Updated by milan over 6 years ago
- File pulp_admin.log pulp_admin.log added
- File consumer.log consumer.log added
Added by milan over 6 years ago
Updated by milan over 6 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset db4cb456c1a8f7afe97eb339f755dc1b9267de74.
Updated by bmbouter over 6 years ago
- Tracker changed from Story to Issue
- Subject changed from As a user, I can import RPM package which has rich dependencies in Requires to Missing docs on how to import RPM package which has rich dependencies in Requires
- Severity set to 2. Medium
- Triaged set to No
Switching to issue since code wasn't added and only issues can go into a z-stream release.
Added by milan over 6 years ago
Revision 3fa048dc | View on GitHub
Document boolean dependencies support
Pulp has some limited boolean dependencies support. This patch updates the documentation to reflect it.
Fixes: #3339 https://pulp.plan.io/issues/3339 (cherry picked from commit db4cb456c1a8f7afe97eb339f755dc1b9267de74)
Updated by milan over 6 years ago
Applied in changeset 3fa048dc3a8229335eff30b1e6fa42857fc5d7cc.
Updated by bmbouter over 6 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Document boolean dependencies support
Pulp has some limited boolean dependencies support. This patch updates the documentation to reflect it.
Fixes: #3339 https://pulp.plan.io/issues/3339