diff --git a/base/comps/components.toml b/base/comps/components.toml index b66a6007012..aaae1616ec3 100644 --- a/base/comps/components.toml +++ b/base/comps/components.toml @@ -3755,7 +3755,6 @@ overlay-files = ["overlays/*.overlay.toml"] [components.python-justbases] [components.python-justbytes] [components.python-jwcrypto] -[components.python-jwt] [components.python-k5test] [components.python-kdcproxy] [components.python-keyring] diff --git a/base/comps/python-jwt/overlays/0001-update-to-2.15.1.overlay.toml b/base/comps/python-jwt/overlays/0001-update-to-2.15.1.overlay.toml new file mode 100644 index 00000000000..6f5a35adea6 --- /dev/null +++ b/base/comps/python-jwt/overlays/0001-update-to-2.15.1.overlay.toml @@ -0,0 +1,83 @@ +# Fedora f43 packages PyJWT 2.8.0 and f44 packages 2.10.1. Update to the +# upstream 2.15.1 release on the f43 spec for these CVE fixes: +# CVE-2026-32597, CVE-2026-48522, CVE-2026-48524, CVE-2026-48525, +# CVE-2026-48526, CVE-2026-101917, CVE-2026-101918, CVE-2026-102267, +# CVE-2026-102268, CVE-2026-102269, CVE-2026-102270, CVE-2026-102271, +# CVE-2026-102275 +# Only the changes the new sdist needs are made: it is published as +# pyjwt-.tar.gz, has no setup.cfg any more, and its test +# requirements moved from the "tests" extra to a dependency group. +# Remove this overlay once the imported Fedora spec packages 2.15.1 or newer. + +[metadata] +category = "azl-temp-workaround" +upstream-status = "upstreamable" + +[[overlays]] +description = "Update to upstream 2.15.1" +type = "spec-update-tag" +tag = "Version" +value = "2.15.1" + +[[overlays]] +description = "The sdist and its top directory are lower case since 2.10" +type = "spec-search-replace" +regex = '^%global srcname PyJWT$' +replacement = '%global srcname pyjwt' + +[[overlays]] +description = "Drop the setup.cfg edits; 2.15.1 has no setup.cfg (comment)" +type = "spec-search-replace" +section = "%prep" +regex = '^# remove coverage buildreq and relax pytest req$' +replacement = '' + +[[overlays]] +description = "Drop the setup.cfg edits; 2.15.1 has no setup.cfg (line 1)" +type = "spec-search-replace" +section = "%prep" +regex = "^sed -e '/coverage/d' \\\\$" +replacement = '' + +[[overlays]] +description = "Drop the setup.cfg edits; 2.15.1 has no setup.cfg (line 2)" +type = "spec-search-replace" +section = "%prep" +regex = "^ -e '/pytest/ s/,<7\\.0\\.0//' \\\\$" +replacement = '' + +[[overlays]] +description = "Drop the setup.cfg edits; 2.15.1 has no setup.cfg (line 3)" +type = "spec-search-replace" +section = "%prep" +regex = '^ -i setup\.cfg$' +replacement = '' + +[[overlays]] +description = "Test requirements are no longer an extra; only generate the crypto extra" +type = "spec-search-replace" +section = "%generate_buildrequires" +regex = '^%pyproject_buildrequires -x crypto,tests$' +replacement = '%pyproject_buildrequires -x crypto' + +[[overlays]] +description = "BuildRequire pytest directly (the tests dependency group pins coverage and pytest versions)" +type = "spec-add-tag" +tag = "BuildRequires" +value = "python3-pytest" + +[[overlays]] +description = "Remove the obsolete 2.8.0 source checksum" +type = "file-search-replace" +file = "sources" +regex = '(?m)^SHA512 \(PyJWT-2\.8\.0\.tar\.gz\) = [0-9a-f]+(?:\r?\n|$)' + +# These two tests load a P-192 test key to check that ES256 rejects it. The +# system OpenSSL does not support P-192 at all ("Curve 1.2.840.10045.3.1.1 +# is not supported"), so the key cannot even be loaded. +[[overlays]] +description = "Deselect the P-192 curve tests; the system OpenSSL does not support P-192" +type = "spec-search-replace" +section = "%check" +regex = "^%pytest -k 'not \\(test_ec_to_jwk_with_invalid_curve or test_get_jwt_set_sslcontext_default\\)'$" +replacement = "%pytest -k 'not (test_ec_to_jwk_with_invalid_curve or test_get_jwt_set_sslcontext_default or test_ec_curve_validation_rejects_p192_for_es256 or test_ec_curve_validation_with_pem_key)'" diff --git a/base/comps/python-jwt/python-jwt.comp.toml b/base/comps/python-jwt/python-jwt.comp.toml new file mode 100644 index 00000000000..5c2ebad901b --- /dev/null +++ b/base/comps/python-jwt/python-jwt.comp.toml @@ -0,0 +1,7 @@ +[components.python-jwt] + +[[components.python-jwt.source-files]] +filename = "pyjwt-2.15.1.tar.gz" +hash = "261b07563f1a290f71c6b14806cd92c5b32cf85d3e9d2b96997825ac214546eba61a24c0f1aeaa6ccc5d554135f5870de97565bd2c44aaa36adc00cc08ffcb2e" +hash-type = "SHA512" +origin = { type = "download", uri = "https://files.pythonhosted.org/packages/source/p/pyjwt/pyjwt-2.15.1.tar.gz" } diff --git a/locks/python-jwt.lock b/locks/python-jwt.lock index 641b284ae48..42fe38c4951 100644 --- a/locks/python-jwt.lock +++ b/locks/python-jwt.lock @@ -3,5 +3,5 @@ version = 1 import-commit = '650ff15c240660e9b94423c3f68f579180a7ce80' upstream-commit = '650ff15c240660e9b94423c3f68f579180a7ce80' manual-bump = 2 -input-fingerprint = 'sha256:4e7c4ab3e7052c930839af3d9d49262fc1f6bb1483088fc9fea3b7d0d4188172' +input-fingerprint = 'sha256:7e19977c98a8605c7875392b5c31940e257bf9864fd00708ae0213e9f93bf3c1' resolution-input-hash = 'sha256:ee2b4b2a7474232699f7ef1461160019159849dcc0daf2dcff1aabf35416ecec' diff --git a/specs/p/python-jwt/python-jwt.spec b/specs/p/python-jwt/python-jwt.spec index 6d3ca955250..65b474a6aeb 100644 --- a/specs/p/python-jwt/python-jwt.spec +++ b/specs/p/python-jwt/python-jwt.spec @@ -2,7 +2,7 @@ # Do not edit manually; changes may be overwritten. # what it's called on pypi -%global srcname PyJWT +%global srcname pyjwt # what it's imported as %global libname jwt # package name fragment @@ -16,8 +16,8 @@ encrypted JSON objects.} Name: python-%{pkgname} -Version: 2.8.0 -Release: 10%{?dist} +Version: 2.15.1 +Release: 11%{?dist} Summary: JSON Web Token implementation in Python License: MIT URL: https://github.com/jpadilla/pyjwt @@ -25,6 +25,7 @@ Source: %pypi_source BuildArch: noarch +BuildRequires: python3-pytest %description %{common_description} @@ -42,14 +43,14 @@ Recommends: python3-%{pkgname}+crypto %prep %autosetup -n %{srcname}-%{version} -# remove coverage buildreq and relax pytest req -sed -e '/coverage/d' \ - -e '/pytest/ s/,<7.0.0//' \ - -i setup.cfg + + + + %generate_buildrequires -%pyproject_buildrequires -x crypto,tests +%pyproject_buildrequires -x crypto %build @@ -62,7 +63,7 @@ sed -e '/coverage/d' \ %check -%pytest -k 'not (test_ec_to_jwk_with_invalid_curve or test_get_jwt_set_sslcontext_default)' +%pytest -k 'not (test_ec_to_jwk_with_invalid_curve or test_get_jwt_set_sslcontext_default or test_ec_curve_validation_rejects_p192_for_es256 or test_ec_curve_validation_with_pem_key)' %files -n python3-%{pkgname} -f %{pyproject_files} diff --git a/specs/p/python-jwt/sources b/specs/p/python-jwt/sources index abfe4fc6158..22900d1b165 100644 --- a/specs/p/python-jwt/sources +++ b/specs/p/python-jwt/sources @@ -1 +1 @@ -SHA512 (PyJWT-2.8.0.tar.gz) = 74e74cf8c78494a9e51a2a186347361388031d5c0d0864df2a5d051621d9d31dff617ab1d7ebb4a829cc7d409d196e1bdb3b361ec888b6c14f1abea77544475e +SHA512 (pyjwt-2.15.1.tar.gz) = 261b07563f1a290f71c6b14806cd92c5b32cf85d3e9d2b96997825ac214546eba61a24c0f1aeaa6ccc5d554135f5870de97565bd2c44aaa36adc00cc08ffcb2e