Bug 1956841 - Review Request: python-podman - RESTful API for Podman
Summary: Review Request: python-podman - RESTful API for Podman
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1889391 1960762
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-04 14:17 UTC by Lokesh Mandvekar
Modified: 2021-06-18 01:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-18 01:07:39 UTC
Type: ---
Embargoed:
jnovy: fedora-review+


Attachments (Terms of Use)

Description Lokesh Mandvekar 2021-05-04 14:17:05 UTC
Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.1.3-1.fc34.src.rpm

Description:
RESTful API for Podman

Provide a stable Podman API to call into.

Fedora Account System Username: lsm5

koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=67221201

$ rpmlint python-podman.spec RPMS/noarch/python-podman-3.1.1.3-1.fc34.noarch.rpm SRPMS/python-podman-3.1.1.3-1.fc34.src.rpm 
2 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 1 Daniel Walsh 2021-05-04 14:32:23 UTC
If this is supposed to be called python-podman, can you at least add provides podman-py to the spec file, so someone would easily find it.

dnf install podman-py ...

Comment 2 Lokesh Mandvekar 2021-05-04 14:54:15 UTC
(In reply to Daniel Walsh from comment #1)
> If this is supposed to be called python-podman, can you at least add
> provides podman-py to the spec file, so someone would easily find it.
> 
> dnf install podman-py ...

Done


* Tue May 04 2021 Lokesh Mandvekar <lsm5> - 3.1.1.3-2
- add Provides: podman-py, python3-podman, python-podman-py, python3-podman-py
- update description


SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.1.3-2.fc34.src.rpm

Comment 3 Daniel Walsh 2021-05-04 16:46:37 UTC
LGTM

Comment 4 Jindrich Novy 2021-05-05 10:14:47 UTC
$ rpmlint python-podman-3.1.1.3-2.fc32.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint python-podman.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint python-podman-3.1.1.3-2.fc32.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ sudo dnf install python-podman-3.1.1.3-2.fc32.noarch.rpm 
Last metadata expiration check: 1:56:14 ago on Wed 05 May 2021 10:16:09 AM CEST.
Error: 
 Problem: conflicting requests
  - nothing provides (python3.8dist(urllib3) >= 1.26.4 with python3.8dist(urllib3) < 1.27) needed by python-podman-3.1.1.3-2.fc32.noarch
  - nothing provides python3.8dist(requests) >= 2.24 needed by python-podman-3.1.1.3-2.fc32.noarch
  - nothing provides python3.8dist(toml) >= 0.10.2 needed by python-podman-3.1.1.3-2.fc32.noarch
(try to add '--skip-broken' to skip uninstallable packages)

Lokesh, is this expected?

Comment 5 Lokesh Mandvekar 2021-05-05 11:31:36 UTC
(In reply to Jindrich Novy from comment #4)
> $ rpmlint python-podman-3.1.1.3-2.fc32.src.rpm 
> 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
> 
> $ rpmlint python-podman.spec 
> 0 packages and 1 specfiles checked; 0 errors, 0 warnings.
> 
> $ rpmlint python-podman-3.1.1.3-2.fc32.noarch.rpm 
> 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
> 
> $ sudo dnf install python-podman-3.1.1.3-2.fc32.noarch.rpm 
> Last metadata expiration check: 1:56:14 ago on Wed 05 May 2021 10:16:09 AM
> CEST.
> Error: 
>  Problem: conflicting requests
>   - nothing provides (python3.8dist(urllib3) >= 1.26.4 with
> python3.8dist(urllib3) < 1.27) needed by python-podman-3.1.1.3-2.fc32.noarch
>   - nothing provides python3.8dist(requests) >= 2.24 needed by
> python-podman-3.1.1.3-2.fc32.noarch
>   - nothing provides python3.8dist(toml) >= 0.10.2 needed by
> python-podman-3.1.1.3-2.fc32.noarch
> (try to add '--skip-broken' to skip uninstallable packages)
> 
> Lokesh, is this expected?

I suspect that's because we don't have a new enough python-urllib3 anywhere on fedora.

https://github.com/containers/podman-py/blob/master/requirements.txt

v/s

https://koji.fedoraproject.org/koji/packageinfo?packageID=15601

Jhon, can the urllib3 requirement be relaxed to accommodate for current version in fedora?

Comment 6 Jhon Honce 2021-05-05 15:59:01 UTC
requirements.txt can be adjusted and code tested. Backporting could cause features to be lost. @lsm5  and I agreed to wait on outcome of https://bugzilla.redhat.com/show_bug.cgi?id=1889391

Comment 9 Lokesh Mandvekar 2021-05-14 19:01:09 UTC
err I notice that python3-podman-api will replace this package on a dnf update. Gotta handle that part too.

Comment 10 Lokesh Mandvekar 2021-05-14 19:13:50 UTC
Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.3-2.fc34.src.rpm

Bumped Epoch to 3 to stay ahead of python-podman-api. Shouldn't be replaced by python-podman-api anymore.

Comment 11 Neal Gompa 2021-05-15 04:10:22 UTC
Some review notes as a drive-by reviewer...

> BuildRequires: git

Please use "git-core" instead.

> BuildRequires: python%{python3_pkgversion}-devel
> BuildRequires: python%{python3_pkgversion}-pbr
> BuildRequires: python%{python3_pkgversion}-pyxdg >= 0.26
> BuildRequires: python%{python3_pkgversion}-requests
> BuildRequires: python%{python3_pkgversion}-setuptools
> BuildRequires: python%{python3_pkgversion}-toml
> BuildRequires: python%{python3_pkgversion}-wheel

This is all redundant since you have a "%generate_buildrequires" section. Please drop this.

> Requires: %{srcname}

Please don't use %srcname here, because this could change names and then it would break (podman won't change, but this might). Also, this is not listed in the actual generated subpackage, so this will have no effect. You'll want to move this to the %package section.

> Requires: python%{python3_pkgversion}-pyxdg >= 0.26
> Requires: python%{python3_pkgversion}-requests
> Requires: python%{python3_pkgversion}-sphinx
> Requires: python%{python3_pkgversion}-toml
> Requires: python%{python3_pkgversion}-urllib3 >= 1.24.2
> Requires: python%{python3_pkgversion}-wheel

This is all unnecessary, since the dependencies are autogenerated. Please drop it.

> Provides: python%{python3_pkgversion}-%{pypi_name} = %{version}-%{release}
> Provides: %{pypi_name}-py = %{version}-%{release}
> Provides: python%{python3_pkgversion}-%{pypi_name}-py = %{version}-%{release}

This is not listed in the actual generated subpackage, so this will have no effect. You'll want to move this to the %package section.

> %prep
> %autosetup -Sgit -n %{srcname}-py-%{version}
> %generate_buildrequires
> %pyproject_buildrequires %{?with_tests:-t}

Please put a newline between the %autosetup and %generate_buildrequires lines, because they are separate spec sections. You may also want to use "-S git_am" for patch application instead of "-Sgit".

Comment 12 Lokesh Mandvekar 2021-05-17 13:05:28 UTC
Thanks for the comments Neal. That largely simplifies the spec file. But, I think we still need BR: python-requests mentioned. Otherwise, I get this: https://koji.fedoraproject.org/koji/taskinfo?taskID=68131660 . Specifically this: https://koji.fedoraproject.org/koji/getfile?taskID=68131660&volume=DEFAULT&name=build.log&offset=-4000

Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.3-3.fc34.src.rpm

Comment 13 Neal Gompa 2021-05-17 21:39:41 UTC
(In reply to Lokesh Mandvekar from comment #12)
> Thanks for the comments Neal. That largely simplifies the spec file. But, I
> think we still need BR: python-requests mentioned. Otherwise, I get this:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=68131660 . Specifically
> this:
> https://koji.fedoraproject.org/koji/
> getfile?taskID=68131660&volume=DEFAULT&name=build.log&offset=-4000
> 

You need to add requests to your dependency list here: https://github.com/containers/podman-py/blob/main/pyproject.toml#L19-L22

(As an aside, you probably want to mandate you produce tarballs instead of zip files here: https://github.com/containers/podman-py/blob/main/setup.cfg#L44)

Comment 14 Lokesh Mandvekar 2021-05-18 12:41:54 UTC
(In reply to Neal Gompa from comment #13)
> (In reply to Lokesh Mandvekar from comment #12)
> > Thanks for the comments Neal. That largely simplifies the spec file. But, I
> > think we still need BR: python-requests mentioned. Otherwise, I get this:
> > https://koji.fedoraproject.org/koji/taskinfo?taskID=68131660 . Specifically
> > this:
> > https://koji.fedoraproject.org/koji/
> > getfile?taskID=68131660&volume=DEFAULT&name=build.log&offset=-4000
> > 
> 
> You need to add requests to your dependency list here:
> https://github.com/containers/podman-py/blob/main/pyproject.toml#L19-L22
> 
> (As an aside, you probably want to mandate you produce tarballs instead of
> zip files here:
> https://github.com/containers/podman-py/blob/main/setup.cfg#L44)

Thanks Neal. Jhon, PTAL ^

Comment 15 Miro Hrončok 2021-05-18 19:48:18 UTC
I don't understand the name of this package. The Python package name is "podman-py", hence the component name should be "python-podman-py" and the package name should be "python3-podman-py".

Neither I understand the value of the %pypi_name macro. The PyPI name is "podman-py". Compare https://pypi.org/project/podman/ with https://pypi.org/project/podman-py/

Comment 16 Lokesh Mandvekar 2021-05-18 21:13:21 UTC
(In reply to Miro Hrončok from comment #15)
> I don't understand the name of this package. The Python package name is
> "podman-py", hence the component name should be "python-podman-py" and the
> package name should be "python3-podman-py".
> 
> Neither I understand the value of the %pypi_name macro. The PyPI name is
> "podman-py". Compare https://pypi.org/project/podman/ with
> https://pypi.org/project/podman-py/

I'll change that. Thanks.

Comment 17 Jhon Honce 2021-05-18 21:16:05 UTC
See https://github.com/containers/podman-py/pull/96

Comment 18 Lokesh Mandvekar 2021-05-18 22:29:37 UTC
(In reply to Jhon Honce from comment #17)
> See https://github.com/containers/podman-py/pull/96

I'll post updates including the package name change once this is merged and a new tag published.

Comment 19 Lokesh Mandvekar 2021-05-20 18:46:25 UTC
Update: Jhon archived the recently created `podman-py` pypi and resurrected `podman` pypi with this package. The upstream github repo is still `https://github.com/containers/podman-py` though. So the package name can remain `python-podman` (hopefully).


Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.4-1.fc34.src.rpm

Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=68347741

Comment 20 Jindrich Novy 2021-06-07 13:21:55 UTC
Thanks fo rupdating the src.rpm Lokesh.

Some notes:
- package name is different that spec name?
- there seems to be a missing BuildRequires on python3-wheel?

error: Failed build dependencies:
	python3dist(wheel) is needed by python-podman-3:3.1.2.4-1.fc34.noarch

Comment 21 Lokesh Mandvekar 2021-06-07 14:05:57 UTC
Addressed the name inconsistency issue. Koji scratch build ran fine. https://koji.fedoraproject.org/koji/taskinfo?taskID=69501869

Let me run fedora-review on my own end to check if the BR is fixed: 




Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.4-2.fc34.src.rpm

Comment 22 Lokesh Mandvekar 2021-06-07 14:22:07 UTC
Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.4-2.fc34.src.rpm


Jindrich, I think this is good to go. PTAL.

Comment 23 Jindrich Novy 2021-06-07 14:54:01 UTC
The only error I see in the fedora-review is:

Package contains BR: python2-devel or python3-devel

Note the message is wrong - https://pagure.io/FedoraReview/issue/273 - it should read use either BR: python2-devel or python3-devel but not python-devel. Please review Lokesh - it might be fedora-review tool at fault here. If you are good, I will + the review.

Comment 24 Miro Hrončok 2021-06-07 15:03:11 UTC
fedora-review is correct here. Instead of:

BuildRequires: pyproject-rpm-macros
BuildRequires: git-core
BuildRequires: pyproject-rpm-macros

Have:

BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: git-core

Comment 26 Neal Gompa 2021-06-07 23:56:29 UTC
> Provides: %{pypi_name} = %{version}-%{release}

This is going to confuse things, because it conflicts with podman itself (%pypi_name is defined to be "podman").

Comment 27 Jindrich Novy 2021-06-08 06:15:50 UTC
It will - thanks for noticing Neal. Lokesh, can you please fix/drop the provide?

Comment 28 Lokesh Mandvekar 2021-06-08 13:03:41 UTC
My bad, updated to `Provides: %{pypi_name}-py`. Hope that's alright.


Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.4-4.fc34.src.rpm

Thanks Neal.

Comment 29 Neal Gompa 2021-06-08 13:10:31 UTC
> Source0: %{url}/archive/%{version}.tar.gz

Change this to "%{url}/archive/%{version}/%{pypi_name}-py-%{version}.tar.gz"

That way the tarball name matches correctly and when people fetch them locally, it won't collide.

Otherwise, looks good!

Comment 30 Lokesh Mandvekar 2021-06-08 13:23:31 UTC
(In reply to Neal Gompa from comment #29)
> > Source0: %{url}/archive/%{version}.tar.gz
> 
> Change this to "%{url}/archive/%{version}/%{pypi_name}-py-%{version}.tar.gz"
> 
> That way the tarball name matches correctly and when people fetch them
> locally, it won't collide.
> 
> Otherwise, looks good!

Spec URL: https://pagure.io/python-podman/raw/main/f/python-podman.spec
SRPM URL: https://pagure.io/python-podman/blob/main/f/SRPMS/python-podman-3.1.2.4-5.fc34.src.rpm 

Done. Thanks Neal.

Comment 31 Gwyn Ciesla 2021-06-09 13:31:10 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-podman

Comment 32 Fedora Update System 2021-06-09 17:20:30 UTC
FEDORA-2021-d42d64d818 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d42d64d818

Comment 33 Fedora Update System 2021-06-09 17:40:57 UTC
FEDORA-2021-2c282e3208 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-2c282e3208

Comment 34 Fedora Update System 2021-06-10 01:20:28 UTC
FEDORA-2021-d42d64d818 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-d42d64d818 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d42d64d818

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

Comment 35 Fedora Update System 2021-06-10 01:50:17 UTC
FEDORA-2021-2c282e3208 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-2c282e3208 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-2c282e3208

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

Comment 36 Fedora Update System 2021-06-18 01:07:39 UTC
FEDORA-2021-d42d64d818 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 37 Fedora Update System 2021-06-18 01:09:34 UTC
FEDORA-2021-2c282e3208 has been pushed to the Fedora 33 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.