Bug 2161003 - Review Request: pyjwkest - Python implementation of JWT, JWE, JWS and JWK
Summary: Review Request: pyjwkest - Python implementation of JWT, JWE, JWS and JWK
Keywords:
Status: CLOSED DUPLICATE of bug 2178938
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/IdentityPython/pyj...
Whiteboard:
Depends On:
Blocks: 2161156
TreeView+ depends on / blocked
 
Reported: 2023-01-15 05:16 UTC by lichaoran
Modified: 2023-04-07 15:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-07 15:13:39 UTC
Type: ---
Embargoed:
jkadlcik: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 5403736 to 5524910 (499 bytes, patch)
2023-02-14 09:12 UTC, Jakub Kadlčík
no flags Details | Diff

Description lichaoran 2023-01-15 05:16:06 UTC
Spec URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest.spec
SRPM URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest-1.4.2-1.fc37.src.rpm
Description: Im introduce flask-pyoidc into fedora, this is a denpendency
Fedora Account System Username: lcrpkking

Comment 1 Jakub Kadlčík 2023-01-16 15:22:38 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5238011
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2161003-pyjwkest/srpm-builds/05238011/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

Comment 2 Jakub Kadlčík 2023-01-17 16:40:33 UTC
Hello @lichaoran,
thank you for the package.

> Bug 2161003 - Review Request: pyjwkest - dependency of pyoidc library

Can you please update the summary and put the package summary instead
of "dependency of pyoidc library"?


> # Check if the automatically generated License and its spelling is correct for Fedora
> # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
> License:        ASL

I guess that's an autogenerated comment telling you to check if the
ASL is a correct license name according to Fedora guidelines. Please
do so :-)

Please take a look here
https://docs.fedoraproject.org/en-US/legal/allowed-licenses/
and use the SPDX expression for the exact ASL version.

Then you can remove the autogenerated comment.


> URL:            https://pypi.org/project/pyjwkest/

This is up to you, I don't see it as a blocker but I am confused where
the source code lives. Because the PyPI page doesn't show any project
homepage.

I think it is this project?
https://github.com/IdentityPython/pyjwkest

The homepage URL was added in
https://github.com/IdentityPython/pyjwkest/commit/dde43072349917ba1f94c8962fe19e2b77896115

but there is a total mess in versions. The last release on GitHub is
1.4.0, the version on PyPI says 1.4.2, and in src/jwkest/__init__.py
there is 1.4.3 . Can you please ask/help the maintainer to sort this out?


> # Fill in the actual package description to submit package to Fedora
> %global _description %{expand:
> This is package 'pyjwkest' generated automatically by pyp2spec.}

Can you please write two or three sentences about the package and
then remove the comment?


> # For official Fedora packages, including files with '*' +auto is not allowed
> # Replace it with a list of relevant Python modules/globs and list extra files in %%files
> %pyproject_save_files '*' +auto

As the comment says, '*' is not allowed for official Fedora
packages. Instead, you should change it to the package name. If you do
`import foo` to use the package, then the value is 'foo'.


> Issues:
> =======
> - Spec file name must match the spec package %{name}, in the format
>   %{name}.spec.
>   Note: pyjwkest.spec should be python-pyjwkest.spec
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_spec_file_naming

The fedora-review tool also found this error. Your spec should be named
python-pyjwkest.spec

Comment 3 lichaoran 2023-01-19 07:02:16 UTC
Hi @Jakub Kadlčík

> Can you please update the summary and put the package summary instead
> of "dependency of pyoidc library"?

Already done.

> I guess that's an autogenerated comment telling you to check if the
> ASL is a correct license name according to Fedora guidelines. Please
> do so :-)

Already done.

> This is up to you, I don't see it as a blocker but I am confused where
> the source code lives. Because the PyPI page doesn't show any project
> homepage.

> I think it is this project?
> https://github.com/IdentityPython/pyjwkest

> The homepage URL was added in
> https://github.com/IdentityPython/pyjwkest/commit/dde43072349917ba1f94c8962fe19e2b77896115

> but there is a total mess in versions. The last release on GitHub is
> 1.4.0, the version on PyPI says 1.4.2, and in src/jwkest/__init__.py
> there is 1.4.3 . Can you please ask/help the maintainer to sort this out?

For now i can't find the maintainer, contacted roland/roland but he did not do the maintaince job for a while.
I think the pypi latest version 1.4.2 is relate to https://github.com/IdentityPython/pyjwkest/commit/f0be3f5a5630a64b1c4cd6296a663935edbcb00f,
because the pypi latest release date is alse the same day, so i guess the latest codebase is not in pypi but 1.4.2 is general avaliable.

> Can you please write two or three sentences about the package and
> then remove the comment?

Done.

> As the comment says, '*' is not allowed for official Fedora
> packages. Instead, you should change it to the package name. If you do
> `import foo` to use the package, then the value is 'foo'.

Done

> The fedora-review tool also found this error. Your spec should be named
> python-pyjwkest.spec

Done and modified the origin request body.

Comment 4 Jakub Kadlčík 2023-01-20 19:48:34 UTC
Thank you for the updates @lichaoran,


> Done and modified the origin request body.

You can do this if you prefer. But the general practice is adding the
new

Spec URL: ..
SRPM URL: ...

lines to the new comment.


> # Fill in the actual package description to submit package to Fedora

You can remove this comment as well :-)


> Done and modified the origin request body.

Did you update both the spec file and the SRPM? I suspect you forgot
to upload the new spec file because I am seeing some of the previous
errors, like this

> Issues:
> =======
> - Spec file name must match the spec package %{name}, in the format
>   %{name}.spec.
>   Note: pyjwkest.spec should be python-pyjwkest.spec
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_spec_file_naming

and this

> python3-pyjwkest.noarch: W: invalid-license ASL

Comment 5 lichaoran 2023-01-29 03:22:43 UTC
> You can do this if you prefer. But the general practice is adding the
> new ...
> lines to the new comment.

New uploads now @Jakub Kadlčík:

Spec URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest.spec
SRPM URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest-1.4.2-1.fc37.src.rpm

> You can remove this comment as well :-)

Done.

> Did you update both the spec file and the SRPM? I suspect you forgot
> to upload the new spec file because I am seeing some of the previous
> errors, like this

You are right, forget to update the SRPM :-)

Comment 6 Jakub Kadlčík 2023-01-29 03:28:54 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5350114
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2161003-pyjwkest/fedora-rawhide-x86_64/05350114-python-pyjwkest/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

Comment 7 Jakub Kadlčík 2023-02-01 10:51:54 UTC
Thank you for the changes. Sorry, one last thing.

The licensecheck found also these two files with MIT license.

    MIT (Old Style, legal disclaimer)
    ---------------------------------
    pyjwkest-1.4.2/src/jwkest/PBKDF2.py

    MIT License
    -----------
    pyjwkest-1.4.2/src/jwkest/aes_gcm.py

so we have to update the LICENSE field to mention both, like this:

   License:        Apache-2.0 AND MIT

Comment 8 lichaoran 2023-02-02 07:42:39 UTC
> so we have to update the LICENSE field to mention both, like this:
>
>   License:        Apache-2.0 AND MIT

Spec URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest.spec
SRPM URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest-1.4.2-1.fc37.src.rpm

Comment 9 Jakub Kadlčík 2023-02-02 07:48:03 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5403736
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2161003-pyjwkest/fedora-rawhide-x86_64/05403736-python-pyjwkest/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

Comment 10 Jakub Kadlčík 2023-02-09 15:00:25 UTC
> [ ]: If the package is under multiple licenses, the licensing breakdown
>     must be documented in the spec.

One last thing that needs to be fixed.
You can see how others did the "licensing breakdown"
https://src.fedoraproject.org/rpms/bitwise/blob/rawhide/f/bitwise.spec
https://src.fedoraproject.org/rpms/river/blob/rawhide/f/river.spec

It will be a +1 after that. So there is a topic that I would like to bring forward.



Since this would be your first Fedora package, you will need to get
sponsored into the `packager' group before this package can be
accepted.

I would like to sponsor you.

That would make it my responsibility to guide you through the processes that
you will do, and the tools that you will need as a package maintainer. I
would also be there to answer your packaging-related questions, or to
help you find somebody who knows the answers.

Your responsibilities as a future package maintainer are explained here
https://docs.fedoraproject.org/en-US/fesco/Package_maintainer_responsibilities/

To make sure a person is able to fulfill the package maintainer
responsibilities, we usually stick to this process
https://docs.fedoraproject.org/en-US/fesco/Packager_sponsor_policy/#requirements


I am sending you an email with some follow-up information and my
contact information. But for the sake of full transparency, there are
also other packager sponsors, so you can reach out to them if you
prefer to do so. They might be busy though.
https://docs.pagure.org/fedora-sponsors/active

Comment 12 Jakub Kadlčík 2023-02-10 14:38:31 UTC
> # pyjwkest: Apache-2.0
> # src/jwkest/aes_gcm.py: MIT

In a previous comment, we discussed that src/jwkest/PBKDF2.py is MIT as well.

Comment 13 lichaoran 2023-02-14 09:06:09 UTC
> In a previous comment, we discussed that src/jwkest/PBKDF2.py is MIT as well.

Updated :)

Spec URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest.spec
SRPM URL: https://github.com/pkking/oidc-in-fedora/raw/main/pyjwkest/python-pyjwkest-1.4.2-1.fc38.src.rpm

Comment 14 Jakub Kadlčík 2023-02-14 09:12:10 UTC
Created attachment 1944042 [details]
The .spec file difference from Copr build 5403736 to 5524910

Comment 15 Jakub Kadlčík 2023-02-14 09:12:12 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5524910
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2161003-pyjwkest/fedora-rawhide-x86_64/05524910-python-pyjwkest/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 16 Jakub Kadlčík 2023-02-15 10:47:21 UTC
Thank you for the updates,
the package looks good to me and the review is finished now. 
Once I sponsor @lichaoran, I will give this ticket fedora-review+.



Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Apache License 2.0", "Unknown or generated",
     "Apache License 2.0", "MIT (Old Style, legal disclaimer)", "MIT
     License". 24 files have unknown license. Detailed output of
     licensecheck in /home/jkadlcik/2161003-python-
     pyjwkest/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[ ]: Python eggs must not download any dependencies during the build
     process.
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[?]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-pyjwkest-1.4.2-1.fc38.noarch.rpm
          python-pyjwkest-1.4.2-1.fc38.src.rpm
============================================================================================================ rpmlint session starts ===========================================================================================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpefy34bhh')]
checks: 31, packages: 2

python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/PBKDF2.py 644 /usr/bin/python
python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/aes_gcm.py 644 /usr/bin/env python
python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/ecc.py 644 /usr/bin/env python
python3-pyjwkest.noarch: W: no-manual-page-for-binary gen_symkey.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwdecrypt.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwenc.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwk_create.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwk_export.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwkutil.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary peek.py
python3-pyjwkest.noarch: W: no-documentation
============================================================================= 2 packages and 0 specfiles checked; 3 errors, 8 warnings, 3 badness; has taken 1.0 s ============================================================================




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/PBKDF2.py 644 /usr/bin/python
python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/aes_gcm.py 644 /usr/bin/env python
python3-pyjwkest.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/jwkest/ecc.py 644 /usr/bin/env python
python3-pyjwkest.noarch: W: no-manual-page-for-binary gen_symkey.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwdecrypt.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwenc.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwk_create.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwk_export.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary jwkutil.py
python3-pyjwkest.noarch: W: no-manual-page-for-binary peek.py
python3-pyjwkest.noarch: W: no-documentation
 1 packages and 0 specfiles checked; 3 errors, 8 warnings, 3 badness; has taken 0.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/pyjwkest/pyjwkest-1.4.2.tar.gz :
  CHECKSUM(SHA256) this package     : 5560fd5ba08655f29ff6ad1df1e15dc05abc9d976fcbcec8d2b5167f49b70222
  CHECKSUM(SHA256) upstream package : 5560fd5ba08655f29ff6ad1df1e15dc05abc9d976fcbcec8d2b5167f49b70222


Requires
--------
python3-pyjwkest (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3.11dist(future)
    python3.11dist(pycryptodomex)
    python3.11dist(requests)
    python3.11dist(six)



Provides
--------
python3-pyjwkest:
    python-pyjwkest
    python3-pyjwkest
    python3.11-pyjwkest
    python3.11dist(pyjwkest)
    python3dist(pyjwkest)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2161003
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: Perl, Ocaml, C/C++, R, fonts, Haskell, Java, PHP, SugarActivity
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 17 Fedora Admin user for bugzilla script actions 2023-03-14 09:22:51 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/pyjwkest

Comment 18 Jakub Kadlčík 2023-04-07 15:13:39 UTC

*** This bug has been marked as a duplicate of bug 2178938 ***


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