RDOPKG-ADV-REQUIRE(7)
π RDOPKG-ADV-REQUIRE(7) π
okay bestie, so this whole page is the RDOPKG-ADV-REQUIRE(7) manual, and it's literally a whole adventure story about wrangling requirements for an RDO package with rdopkg. grab a lil snack, we're going in π
β¨ NAME β¨
rdopkg-adv-requirements β rdopkg adventures: requirements management π
πΈ SYNOPSIS πΈ
This is a story about managing requirements of an RDO package using rdopkg. yes, an actual story. main character energy fr fr π
π¦ PROLOGUE π¦
rdopkg contains actions to help you with requirements management, namely:
rdopkg reqdiffshows diff ofrequirements.txtbetween versionsrdopkg reqcheckcomparesrequirements.txtwith.specRequiresrdopkg queryqueries RDO repos for version of a supplied packagerdopkg reqqueryqueries RDO repos for versions ofrequirements.txt
This document will give you some examples of how to use these commands. π
Please make sure you have the latest rdopkg, at least 0.28. no cap, older versions are not it.
Let's explore python-openstackclient RDO package. All commands are run in its distgit with patches and upstream remotes set up:
$ cd python-openstackclient
$ git fetch --all
$ git remote -v
openstack git@github.com:openstack/python-openstackclient.git (fetch)
openstack git@github.com:openstack/python-openstackclient.git (push)
origin ssh://jruzicka@pkgs.fedoraproject.org/python-openstackclient (fetch)
origin ssh://jruzicka@pkgs.fedoraproject.org/python-openstackclient (push)
patches git@github.com:redhat-openstack/python-openstackclient.git (fetch)
patches git@github.com:redhat-openstack/python-openstackclient.git (push)
Let's assume we see the package for the first time and we want to check whether its requirements are met. π
$ rdopkg pkgenv
Package: python-openstackclient
Version: 1.0.3
Upstream: 1.1.0
OS dist: RDO
Dist-git branch: master
Local patches branch: master-patches
Remote patches branch: patches/master-patches
Remote upstream branch: openstack/master
RDO release/dist guess: kilo/f22
Now we know that
- package is at version
1.0.3while upstream is at1.1.0 rdopkgwas able to detect the upstream remote/branch (automagic works β¨)masterbranch currently corresponds to Kilo release (seerdopkg info)
so we can start inspecting the requirements. slay, onward π«Ά
π CHAPTER 1 π
rdopkg reqdiff
reqdiff shows a human friendly summary of changes to requirements.txt file between two git refs (usually version tags).
When patches and upstream remotes are set correctly, the action can be run without arguments and rdopkg will do a diff between current and latest upstream versions:
$ rdopkg reqdiff
requirements.txt diff between 1.0.3 and 1.1.0:
ADDED:
os-client-config
CHANGED:
cliff >=1.10.0 (was >=1.7.0)
oslo.config >=1.9.3 (was >=1.9.0)
oslo.i18n >=1.5.0 (was >=1.3.0)
oslo.serialization >=1.4.0 (was >=1.2.0)
oslo.utils >=1.4.0 (was >=1.2.0)
python-novaclient >=2.22.0 (was >=2.18.0,!=2.21.0)
stevedore >=1.3.0 (was >=1.1.0)
With one argument, diff between current package version and supplied git ref is done:
$ rdopkg reqdiff 1.1.0
requirements.txt diff between 1.0.3 and 1.1.0:
...
Finally, we can supply two git refs to get requirements.txt diff between them:
$ rdopkg reqdiff 0.4.0 1.0.0
requirements.txt diff between 0.4.0 and 1.0.0:
ADDED:
Babel >=1.3
cliff-tablib >=1.0
oslo.i18n >=1.0.0
oslo.serialization >=1.0.0
oslo.utils >=1.0.0
python-neutronclient >=2.3.6,<3
stevedore >=1.1.0
CHANGED:
cliff >=1.7.0 (was >=1.4.3)
python-cinderclient >=1.1.0 (was >=1.0.6)
python-glanceclient >=0.14.0 (was >=0.9.0)
python-keystoneclient >=0.11.1 (was >=0.9.0)
python-novaclient >=2.18.0 (was >=2.17.0)
requests >=2.2.0,!=2.4.0 (was >=1.1)
REMOVED:
keyring >=2.1
pycrypto >=2.6
π‘ little heads-up bestie:reqdiffis automatically shown duringrdopkg new-version. no need to go hunting for it.
π CHAPTER 2 π
rdopkg reqcheck
reqcheck is used to check whether requires defined in requirements.txt are met in the .spec file. Human friendly summary is printed. π
$ rdopkg reqcheck
VERSION NOT ENFORCED:
python-babel >=1.3
python-cliff >=1.7.0
python-oslo-i18n >=1.3.0
python-oslo-serialization >=1.2.0
python-oslo-utils >=1.2.0
python-pbr >=0.6,!=0.7,<1.0
python-cinderclient >=1.1.0
python-glanceclient >=0.15.0
python-keystoneclient >=1.1.0
python-neutronclient >=2.3.11,<3
python-novaclient >=2.18.0,!=2.21.0
python-requests >=2.2.0,!=2.4.0
python-six >=1.9.0
python-stevedore >=1.1.0
MISSING:
python-cliff-tablib >=1.0
python-oslo-config >=1.9.0
Human brain superpowers are used to evaluate the report and fix the .spec file if needed. yes, your brain, the icon π
β CHAPTER 3 β
rdopkg query
Is package X available in RDO? At which version? rdopkg query was created to answer these recurring questions. it's giving search engine but make it requirements π
We can query a specific release/dist:
$ rdopkg query kilo/f22 python-novaclient
kilo/f22
python-novaclient-2.23.0-1.fc23 @ RDO Kilo f22
python-novaclient-2.20.0-1.fc22 @ Fedora 22
We now see that python-novaclient-2.20.0-1 is present in base Fedora 22 repo but newer python-novaclient-2.23.0-1 is available from RDO Kilo f22 repo. iconic reveal honestly π
We can also query a package across all dists of an RDO release. We might want to use -v/--verbose to see what's happening in the background:
$ rdopkg query -v kilo python-novaclient
repoquery --nvr --repofrompath=rdopkg_RDO_Kilo_f22,...
RDO Kilo f22: python-novaclient-2.23.0-1.fc23
repoquery --nvr --repofrompath=rdopkg_Fedora_22_Updates,...
...
kilo/f22
python-novaclient-2.23.0-1.fc23 @ RDO Kilo f22
python-novaclient-2.20.0-1.fc22 @ Fedora 22
kilo/f21
python-novaclient-2.23.0-1.fc23 @ RDO Kilo f21
python-novaclient-2.17.0-3.fc21 @ Fedora 21
kilo/el7
python-novaclient-2.23.0-1.el7 @ RDO Kilo el7
See rdopkg info to get supported release/dist combinations. iykyk π¦
π CHAPTER 4 π
rdopkg reqquery
reqquery queries versions of requirements.txt or .spec Requires in RDO repos and provides colorful report to easily check whether dependencies are available and in correct versions. colorful!! my fave kind of report πβ¨
Simplest use case without arguments queries all requirements.txt of current package version in autodetected release/dist:
$ rdopkg reqquery
Autodetected filter: kilo/f22
Querying requirements file from git: 1.0.3 -- requirements.txt
kilo/f22
pbr
nvr: python-pbr-0.10.8-1.fc22
need: >=0.6,!=0.7,<1.0
state: OK
python-novaclient
nvr: python-novaclient-2.23.0-1.fc23
need: >=2.18.0,!=2.21.0
state: OK
cliff-tablib
nvr: python-cliff-tablib not available
need: >=1.0
state: not met
...
We can also select the release/dist filter manually (see rdopkg info):
$ rdopkg reqquery kilo/el7
By default, current version requirements.txt are used, but we can select a different requirements source:
- git ref (version):
$ rdopkg reqquery -R 1.2.3
- file:
$ rdopkg reqquery -r path/to/requirements.txt
- from current
.specfile:
$ rdopkg reqquery -s
As it usually takes quite some time to repoquery all the repos, we might want to run with -v/--verbose, dump to requirements.yml with -d/--dump and then view the report with -l/--load:
$ rdopkg reqquery -v -d
Autodetected filter: kilo/f22
Querying requirements file from git: 1.0.3 -- requirements.txt
repoquery --nvr --repofrompath=...
RDO Kilo f22: N/A
...
$ rdopkg reqquery -l
π«Ά pro tip from the manual itself: that dump-then-load flow is literally there because repoquerying all the repos takes a hot minute. save yourself the wait, bestie.
π EPILOGUE π
See rdopkg ACTION -h to get options for each ACTION.
See rdopkg(1) manual for more information.
and that's the whole adventure, bestie π this lil treasure of a page comes from the RDOPKG-ADV-REQUIRE(7) manual, dated 10/04/2023 β go forth and manage those requirements, you absolute icon ππβ
π¦ where this page comes from
- epel 9: rdopkg 1.7.0-1.el9 Β· ASL 2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms