Bug 2122391 - python-podman missing toml and requests Requires
Summary: python-podman missing toml and requests Requires
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-podman
Version: 37
Hardware: noarch
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-29 22:36 UTC by Leif Liddy
Modified: 2022-11-10 22:08 UTC (History)
6 users (show)

Fixed In Version: python-podman-4.2.0-7.fc36 python-podman-4.2.0-7.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-07 15:55:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Leif Liddy 2022-08-29 22:36:37 UTC
Description of problem:
python-podman is missing these Requires
python3-requests
python3-toml

Version-Release number of selected component (if applicable):
python-podman 4.2.0-1
Affects Fedora 36 and 37

How reproducible:
Always

Steps to Reproduce:
1. start a Fedora 36 or 37 podman container (for the purposes of testing in a minimal environment)
2. dnf install python3-podman
3. run: python3 -m podman

ModuleNotFoundError: No module named 'requests'
ModuleNotFoundError: No module named 'pytoml'


Additional info:
There's another issue with the dynamically generated build requirements
That feature is simply not working.
So from what I gather  %generate_buildrequires is meant to dynamically generate any missing build requirements.

So if I run:
rpmbuild -br python-podman.spec

....
Handling urllib3>=1.24.2 from build-system.requires
Requirement not satisfied: urllib3>=1.24.2
Handling wheel from build-system.requires
Requirement not satisfied: wheel
Exiting dependency generation pass: build backend
+ RPM_EC=0
++ jobs -p
+ exit 0
error: Failed build dependencies:
	python3dist(requests) >= 2.24 is needed by python-podman-3:4.2.0-1.fc37.noarch
	python3dist(sphinx) is needed by python-podman-3:4.2.0-1.fc37.noarch
	python3dist(urllib3) >= 1.24.2 is needed by python-podman-3:4.2.0-1.fc37.noarch
	python3dist(wheel) is needed by python-podman-3:4.2.0-1.fc37.noarch
Wrote: /root/rpmbuild/SRPMS/python-podman-4.2.0-1.fc37.buildreqs.nosrc.rpm


I can see that the python-podman-4.2.0-1.fc37.buildreqs.nosrc.rpm was generated. 
So if I do the following:

mv python-podman.spec python-podman.spec.orig
rpm -ivh /root/rpmbuild/SRPMS/python-podman-4.2.0-1.fc37.buildreqs.nosrc.rpm
diff -up python-podman.spec.orig python-podman.spec
(no output)

How/why is this feature not working?? 

# man rpmbuild states the following

   DYNAMIC BUILD DEPENDENCIES
       When the %generate_buildrequires stage runs and some of the newly  gen‐
       erated  BuildRequires are not satisfied, rpmbuild creates an intermedi‐
       ate source package ending in buildreqs.nosrc.rpm,  which  has  the  new
       BuildRequires,  and  exits with code 11.  This package can then be used
       in place of the original source package  to  resolve  and  install  the
       missing  build  dependencies  in the usual way, such as with dnf-build‐
       dep(8).

But that feature is clearly not working. Could someone please look into that?


Ok, I'll submit a PR for the following changes:

$ diff -up python-podman.spec.orig python-podman.spec
--- python-podman.spec.orig	2022-08-29 23:56:32.327274521 +0200
+++ python-podman.spec	2022-08-29 23:55:58.600616792 +0200
@@ -51,8 +51,10 @@ Requires: python%{python3_pkgversion}-xd
 BuildRequires: python%{python3_pkgversion}-pyxdg
 Requires: python%{python3_pkgversion}-pyxdg
 %endif
-%if 0%{?fedora} == 35
+%if 0%{?fedora} >= 35
+BuildRequires: python%{python3_pkgversion}-requests
 BuildRequires: python%{python3_pkgversion}-toml
+Requires: python%{python3_pkgversion}-requests
 Requires: python%{python3_pkgversion}-toml
 %endif
 %endif

Comment 1 Leif Liddy 2022-09-28 19:22:19 UTC
Almost 30 days have passed since I submitted this bug report. 
I've diagnosed the issue and pushed out a PR ages go 
https://src.fedoraproject.org/rpms/python-podman/pull-request/1

What else do you need?

Comment 2 Lokesh Mandvekar 2022-09-28 20:18:43 UTC
Thanks, didn't notice this bz until your recent ping. Merged and being built. I'll push bodhi out early tomorrow.

Comment 3 Fedora Update System 2022-09-29 13:31:59 UTC
FEDORA-2022-2d77fbeef4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2d77fbeef4

Comment 4 Fedora Update System 2022-09-29 13:32:31 UTC
FEDORA-2022-3a71396db6 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3a71396db6

Comment 5 Fedora Update System 2022-09-30 01:14:13 UTC
FEDORA-2022-2d77fbeef4 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-2d77fbeef4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2d77fbeef4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-09-30 02:06:50 UTC
FEDORA-2022-3a71396db6 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-3a71396db6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3a71396db6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-10-07 15:55:27 UTC
FEDORA-2022-3a71396db6 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2022-11-10 22:08:22 UTC
FEDORA-2022-2d77fbeef4 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.