Bug 1956841 - Review Request: python-podman - RESTful API for Podman
Summary: Review Request: python-podman - RESTful API for Podman
Keywords:
Status: ASSIGNED
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-05-17 13:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
lsm5: 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@fedoraproject.org> - 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@redhat.com  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


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